7.6. Split Windows - shinokada/vimnotes GitHub Wiki
<C-w>s # Split windows horizontally
<C-w>v # Split vertically
:edit {filename} # load another buffer to splited window
# Split the current window horizontally , loading {file} intot the new window
:sp[lit]{file}
# Split the current window vertically, loading {file} into the new window
:vs[lit]{file}
Changing the focus between windows
<C-w>w # Cycle between open windows
<C-w>h # Focus the window to the left
<C-w>j # Focus the window below
<C-w>k # Focus the window above
<C-w>l # Focus the window to the right
Closing windows
:cl[ose] # <C-w>c # Close the active window
:on[ly] # <C-w>o # Keep only the active window, closing all others
10<C-w>+ # will increase by 10 lines
<C-w>= # Equalize width and height of all windows
<C-w>+, <C-w>- # to resize the height by a single row
<C-w><, <C-w>> # to resize the width of the current window by a single column
<C-w>_ # Maximize height of the active window
<C-w>| # Maximize width of the active window
[N]<C-w> # Set active window height to [N] rows
[N]<C-w>| # Set active window width to [N] columns