1
0
Fork 0

nvim: allow to use shift + arrow for selecting text

This commit is contained in:
tastytea 2022-08-11 21:51:31 +02:00
parent cba0c92d9c
commit 93c7960620
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 7 additions and 0 deletions

View File

@ -74,3 +74,10 @@ map({ 'n', 'i', 'v' }, '<Home>',
)
map('n', '<C-F>', '==') -- re-indent line
-- select text with shift + arrow
for _, key in ipairs({ 'Left', 'Up', 'Down', 'Right' }) do
local format = string.format
map({ 'n', 'i' }, format('<S-%s>', key), format('<Esc>v<%s>', key))
map({ 'v' }, format('<S-%s>', key), format('<%s>', key))
end