Vim Splits – Move Faster and More Naturally
robots.thoughtbot.com
Vim Splits – Move Faster and More Naturally
1–10 of 68 posts
Re: Vim Splits – Move Faster and More Naturally
#2https://github.com/skeept/dotvim/blob/master/plugin/ZoomWinP...
Basically, if you have multiple split windows, it allows you to do a cmd+O to zoom the current split view (i.e. making it the only view visible). That's neat if there's something tricky going on (say a weird bug) and you want to focus just on this piece of code, without seeing anything else. Once you're done, you can hit cmd+O again, and your old split setup comes back. I love this plugin.
Re: Vim Splits – Move Faster and More Naturally
#3Re: Vim Splits – Move Faster and More Naturally
#4The relevant parts are:
" shortcuts
map
" Tabs
map :tabnew
map :tabnext
map :tabpreviousRe: Vim Splits – Move Faster and More Naturally
#5Re: Vim Splits – Move Faster and More Naturally
#6 "quick window movements
map
map l
map k
map j
map h
imap li
imap ki
imap ji
imap hiRe: Vim Splits – Move Faster and More Naturally
#7 " Split window vertically
nnoremap v
" Split window horizontally
nnoremap _ s
" Use tab to toggle between windows
nnoremap wRe: Vim Splits – Move Faster and More Naturally
#8In addition to that, I can heartily recommend the ZoomWindowPlugin: https://github.com/skeept/dotvim/blob/master/plugin/ZoomWinP... Basically, if you have multiple split windows, it allows you to do a cmd+O to zoom the current split view (i.e. making it the only view visible). That's neat if there's something tricky going on (say a weird bug) and you want to focus just on this piece of code, without seeing anything e…
nmap :tabedit %
nmap :tabcloseRe: Vim Splits – Move Faster and More Naturally
#9After years of abusing my little finger for using Ctrl & the RSI that goes with it, I tend to use alt/meta with my thumb more and more nowadays, for this I make it usable in insert mode also, this is probably one of the oldest bits of my .vimrc "quick window movements map map l map k map j map h imap li imap ki imap ji imap hi
I'd also suggest using instead of the ...i dance.
Edit: "The way [Vim] stores alt+letter in its input queue collides with UTF-8/Unicode handling" -- LeoNerd in freenode/#vim at 2013-04-15 15:22:29
Re: Vim Splits – Move Faster and More Naturally
#10au VimResized * exe "normal! \ ="
au VimResized * wincmd =