From ac594a57cf47366008e0d14023da6039511cba32 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 2 Nov 2021 13:09:09 +0300 Subject: feat(nvim): add mappings for moving selection --- nvim/.config/nvim/init.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nvim') diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 1206cd5..8f8b8b1 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -53,6 +53,12 @@ nnoremap l vnoremap < >gv +" Moving selection +noremap k :m .-2== +noremap j :m .+1== +vnoremap J :m '>+1gv=gv +vnoremap K :m '<-2gv=gv + " Remove trailing whitespace on save autocmd BufWritePre * %s/\s\+$//e -- cgit v1.2.3