nvim: keymappings: Add helpful mappings for visual block shift & buffer copy

This commit is contained in:
Sanchayan Maity 2021-05-07 20:13:51 +05:30
parent 16a797df6f
commit 0d806355ab

View file

@ -115,3 +115,11 @@ remap('c', '<Tab>', 'getcmdtype() =~ \'[?/]\' ? \'<C-g>\' : feedkeys(\'<Tab>\'
remap('c', '<S-Tab>', 'getcmdtype() =~ \'[?/]\' ? \'<C-t>\' : feedkeys(\'<S-Tab>\', \'int\')[1]', { noremap = true, expr = true }) remap('c', '<S-Tab>', 'getcmdtype() =~ \'[?/]\' ? \'<C-t>\' : feedkeys(\'<S-Tab>\', \'int\')[1]', { noremap = true, expr = true })
remap('n', '<F1>', ':call SyntaxAttr#SyntaxAttr()<CR>', { noremap = true }) remap('n', '<F1>', ':call SyntaxAttr#SyntaxAttr()<CR>', { noremap = true })
-- After shifting a visual block, select it again
remap('v', '<', '<gv', { noremap = true })
remap('v', '>', '>gv', { noremap = true })
-- Copy whole buffer
remap('', '<C-c><C-c>', ':norm gg0VG$cp<CR>', { noremap = false })
remap('i', '<C-c><C-c>', ':norm jkgg0VG$cp<CR>', { noremap = false })