nvim: keymappings: Add mapping to copy to clipboard

This commit is contained in:
Sanchayan Maity 2021-07-29 12:44:17 +05:30
parent a26efca087
commit 8f5e45cb52

View file

@ -9,6 +9,9 @@ remap('c', '<Esc>', '<Nop>', { noremap = true })
remap('n', 'Q', '<Nop>', { noremap = true }) remap('n', 'Q', '<Nop>', { noremap = true })
-- Save -- Save
remap('n', '<Leader>w', '<Esc>:w<CR>', { noremap = true }) remap('n', '<Leader>w', '<Esc>:w<CR>', { noremap = true })
-- Copy to clipboard
remap('v', '<Leader>y', '"+y', { noremap = true })
remap('v', '<Leader>Y', '"*y', { noremap = true })
-- Search and Replace -- Search and Replace
remap('n', 'c.', ':%s//g<Left><Left><CR>', { noremap = true }) remap('n', 'c.', ':%s//g<Left><Left><CR>', { noremap = true })
remap('n', '<Leader>c.', ':%s/\\<<C-r><C-w>\\>//g<Left><Left>', { noremap = true }) remap('n', '<Leader>c.', ':%s/\\<<C-r><C-w>\\>//g<Left><Left>', { noremap = true })