4 ms·
You can also move lines up and down using the move command: :[range]m[ove] {address} Some common remaps: vnoremap <c-j> :m '>+1<CR>gv=gv vnoremap <c-k>
by avnigo 5y ago
You can also move lines up and down using the move command:
:[range]m[ove] {address}
Some common remaps:
vnoremap <c-j> :m '>+1<CR>gv=gv
vnoremap <c-k> :m '<-2<CR>gv=gv
inoremap <c-j> <Esc>:m .+1<CR>==gi
inoremap <c-k> <Esc>:m .-2<CR>==gi
nnoremap <leader>j :m .+1<CR>==
nnoremap <leader>k :m .-2<CR>==