From 4c12d66546724e6a40f02d053619b1871f153ae5 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Date: Sat, 4 May 2019 20:43:26 -0300 Subject: [PATCH] Add: vim - multiple windows --- cheat/cheatsheets/vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cheat/cheatsheets/vim b/cheat/cheatsheets/vim index c0a7859..3540bb2 100644 --- a/cheat/cheatsheets/vim +++ b/cheat/cheatsheets/vim @@ -63,3 +63,18 @@ d{motion} delete text that {motion} moves over 2dw deletes 2 words 5yy copies 5 lines 42G go to line 42 + +# 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