Skip to content

Instantly share code, notes, and snippets.

@milesrout
Created April 2, 2015 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milesrout/fc5dcddbaa71cef60098 to your computer and use it in GitHub Desktop.
Save milesrout/fc5dcddbaa71cef60098 to your computer and use it in GitHub Desktop.
vim splits
I: location of cursor
initial state
+-------+-------+
| | |
+-------+ |
| I | |
+-------+ |
| | |
+-------+-------+
:topleft vsplit :leftabove vsplit :vsplit
+-----+-----+-----+ +-----------+-----+ +-----------+-----+
| | | | | | | | | |
| +-----+ | +-----+-----+ | +-----+-----| |
| I | | | | | I | | | | I | |
| +-----+ | +-----+-----+ | +-----+-----| |
| | | | | | | | | |
+-----+-----+-----+ +-----------+-----+ +-----------+-----+
window horizontal up --> :topleft split
window horizontal down --> :botright split
window vertical left --> :topleft vsplit
window vertical right --> :botright vsplit
buffer horizontal up --> :leftabove split
buffer horizontal down --> :rightbelow split
buffer vertical left --> :leftabove vsplit
buffer vertical right --> :rightbelow vsplit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment