nvim: keymaps: scroll in visual mode, too

This commit is contained in:
tastytea 2022-08-11 22:32:26 +02:00
parent e84cb3c7c0
commit 2a6c37ea2c
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -12,6 +12,9 @@ for key, cmd in pairs({ Left = 'bprevious', Right = 'bnext' }) do
map('n', format('<M-%s>', key), format(':%s<cr>', cmd)) map('n', format('<M-%s>', key), format(':%s<cr>', cmd))
map('i', format('<M-%s>', key), format('<esc>:%s<cr>', cmd)) map('i', format('<M-%s>', key), format('<esc>:%s<cr>', cmd))
end end
-- move buffer without moving cursor
map({ 'n', 'v' }, '<M-Up>', '<C-y>')
map({ 'n', 'v' }, '<M-Down>', '<C-e>')
--windows --windows
for key, letter in pairs({ Left = 'h', Down = 'j', Up = 'k', Right = 'l' }) do for key, letter in pairs({ Left = 'h', Down = 'j', Up = 'k', Right = 'l' }) do
@ -50,10 +53,6 @@ map({ 'n', 'i' }, '<C-S-Del>',
end end
) )
-- move buffer without moving cursor
map('n', '<M-Up>', '<C-y>')
map('n', '<M-Down>', '<C-e>')
-- system clipboard -- system clipboard
map('v', '<Leader>y', '"+y') map('v', '<Leader>y', '"+y')
map('n', '<Leader>p', '"+p') map('n', '<Leader>p', '"+p')