Skip to content

Instantly share code, notes, and snippets.

@Johnytran
Created June 13, 2016 02:52
Show Gist options
  • Save Johnytran/71a69b927db9af9f4ece70cc4a53d219 to your computer and use it in GitHub Desktop.
Save Johnytran/71a69b927db9af9f4ece70cc4a53d219 to your computer and use it in GitHub Desktop.
split window in vim
Using windows
Ctrl-W s and Ctrl-W v to split the current window horizontally and vertically. You can also use :split and :vertical split (:sp and :vs)
Ctrl-W w to switch between open windows, and Ctrl-W h (or j or k or l) to navigate through open windows.
Ctrl-W c to close the current window, and Ctrl-W o to close all windows except the current one.
Starting vim with a -o or -O flag opens each file in its own split.
With all these I don't need tabs in Vim, and my fingers find my buffers, not my eyes.
Note: if you want all files to go to the same instance of Vim, start Vim with the --remote-silent option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment