News for hackers. Stuff that matters.
Re:The weight of the clipboard by avnigo on Wednesday January 05, 2022 @03:35AM (#29806571)
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>==

There are no comments on this comment yet.