~ / windows
11
Windows & Tabs
Split the screen, move between windows, close and rearrange them, and organise whole layouts with tab pages.
- 01
Split the screen: <C-w>s, <C-w>v, :sp, :vs
Cut a window in two, or open another file beside the one you have.
<C-w>s<C-w>v:sp {file}:vs {file}<C-w>n:vnew:wincmd {key}nvim - 02
Move between windows: <C-w>h j k l, w, p
Hop to a neighbour, jump to window N, and pop back to where you were.
<C-w>h<C-w>j<C-w>k<C-w>l<C-w>w<C-w>W{N}<C-w>w<C-w>tnvim - 03
Close windows: <C-w>c, <C-w>o
Close the window you are in, close one from afar, or keep only one.
<C-w>c<C-w>q{N}<C-w>c<C-w>o{N}<C-w>onvim - 04
Rearrange windows: <C-w>x, <C-w>r, <C-w>H J K L
Swap, rotate and move windows without closing anything.
<C-w>x<C-w>r<C-w>R<C-w>H<C-w>J<C-w>K<C-w>L<C-w>= - 05
Tab pages: :tabe, gt, gT, <C-w>T
Keep whole layouts on separate tab pages and flip between them.
:tabe {file}:tabnewgtgT{N}gt<C-w>T:tabc:tabo