Last Updated: February 20, 2016
·
654
· cloud8421

Move (bubble) lines in 4 directions

Normal and visual mode mappings to move lines with CTRL + arrow, works also for visual blocks.

nmap <C-Up> ddkP
nmap <C-Down> ddp
nmap <C-Left> <<
nmap <C-Right> >>

vnoremap < <gv
vnoremap > >gv
nmap gV `[v`]

"Bubble multiple lines
vmap <C-Up> xkP`[V`]
vmap <C-Down> xp`[V`]
vmap <C-Right> >gv
vmap <C-Left> <gv