Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make the yank register configurable #153

Open
mikesmithgh opened this issue Jan 7, 2024 · 0 comments
Open

feat: make the yank register configurable #153

mikesmithgh opened this issue Jan 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mikesmithgh
Copy link
Owner

mikesmithgh commented Jan 7, 2024

Currently, the register '+' copies text and immediately exits. This register is hardcoded in the autocommands and keymaps, make this configurable similar to the paste window register.

See

Using the example from #152

        global = function()
          vim.keymap.set({ 'v' }, 'Y', '<Plug>(KsbVisualYankLine)', {})
          vim.keymap.set({ 'v' }, 'y', '<Plug>(KsbVisualYank)', {})
          vim.keymap.set({ 'n' }, 'Y', '<Plug>(KsbNormalYankEnd)', {})
          vim.keymap.set({ 'n' }, 'y', '<Plug>(KsbNormalYank)', {})
          vim.keymap.set({ 'n' }, 'yy', '<Plug>(KsbYankLine)', {})

          vim.keymap.set({ 'v' }, '<leader>Y', '"aY', {})
          vim.keymap.set({ 'v' }, '<leader>y', '"ay', {})
          vim.keymap.set({ 'n' }, '<leader>Y', '"aY', {})
          vim.keymap.set({ 'n' }, '<leader>y', '"ay', {})
          vim.keymap.set({ 'n' }, '<leader>yy', '"ayy', {})
          return {
            paste_window = { yank_register = 'a' },
          }

yanks to other registers, for example b still go to the register +.

The current state makes it difficult to modify the behavior of yanks opening the paste window vs normal behavior vs copying to the clipboard and quitting.

@mikesmithgh mikesmithgh added the enhancement New feature or request label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant