diff options
author | eug-vs <eugene@eug-vs.xyz> | 2021-11-02 13:09:09 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2021-11-02 13:09:33 +0300 |
commit | ac594a57cf47366008e0d14023da6039511cba32 (patch) | |
tree | 5fcc3204fadc75bb1acd273f1284b1d86a674e2f /nvim | |
parent | 66b622b2375238183f28d1aff3097b1e7d33b01b (diff) | |
download | dotfiles-ac594a57cf47366008e0d14023da6039511cba32.tar.gz |
feat(nvim): add mappings for moving selection
Diffstat (limited to 'nvim')
-rw-r--r-- | nvim/.config/nvim/init.vim | 6 |
1 files changed, 6 insertions, 0 deletions
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 <c-l> <C-w>l vnoremap < <gv vnoremap > >gv +" Moving selection +noremap <leader>k :m .-2<CR>== +noremap <leader>j :m .+1<CR>== +vnoremap J :m '>+1<CR>gv=gv +vnoremap K :m '<-2<CR>gv=gv + " Remove trailing whitespace on save autocmd BufWritePre * %s/\s\+$//e |