Skip to content

Instantly share code, notes, and snippets.

@maxsum-corin
Created June 24, 2011 03:25
Show Gist options
  • Save maxsum-corin/1044165 to your computer and use it in GitHub Desktop.
Save maxsum-corin/1044165 to your computer and use it in GitHub Desktop.
Multiple windows in vim
:split filename
ctrl-w w split window and load another file
:vsplit filename
ctrl-w v vertical split
:hide
ctrl-w q close current window
ctrl-w arrow move cursor up/down/left/right a window
ctrl-w ctrl-w move cursor to another window (cycle)
ctrl-w _ maximize current window
ctrl-w = make all equal size
[n] ctrl-w + increase window size by n lines
[n] ctrl-w - decrease window size by n lines
[n] ctrl-w > move window divider by n columns to the right
[n] ctrl-w < move window divider by n columns to the left
ctrl-w r rotate windows anti-clockwise
ctrl-w R rotate windows clockwise
:sview file same as split, but readonly
:only keep only this window open
:ls show current buffers
:b 2 open buffer #2 in this window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment