6 years ago
Rebinds J and K in visual mode to move block up or down in relation to the other lines, while keeping the selection.
This version also re-indents the line to match indentation rules in its new position. (if you don't like that, remove the 'gv=' in the middle :D)
" Move visual block vnoremap J :m '>+1<CR>gv=gv vnoremap K :m '<-2<CR>gv=gv