Skip to content

Instantly share code, notes, and snippets.

@goddoe
Created July 30, 2018 00:35
Show Gist options
  • Select an option

  • Save goddoe/bc2e0d244ed4abf98499ff7da7139780 to your computer and use it in GitHub Desktop.

Select an option

Save goddoe/bc2e0d244ed4abf98499ff7da7139780 to your computer and use it in GitHub Desktop.
move between multiple windows in vim

multiple windows

If you want, you can probably do everything from one vim session! :) Here are some commands to turn one vim session (inside one xterm) into multiple windows.

 :e filename      - edit another file
 :split filename  - split window and load another file
 ctrl-w up arrow  - move cursor up a window
 ctrl-w ctrl-w    - move cursor to another window (cycle)
 ctrl-w_          - maximize current window
 ctrl-w=          - make all equal size
 10 ctrl-w+       - increase window size by 10 lines
 :vsplit file     - vertical split
 :sview file      - same as split, but readonly
 :hide            - close current window
 :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