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
Written by Claudio Ortolina
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#