[Vim] vim notes-split screen operation
We often need to open multiple files, operate multiple files in different windows, and split the screen is very useful.
1 command mode: new, create a file and split the screen, shortcut key, Ctrl + W, then immediately press the n key: spilt horizontal split screen, the current screen is divided into two, horizontal. Ctrl + w, s: vsplit Vertical Split screen. The current screen is divided into two vertical ones. Ctrl + w, v: only cancel the split screen, cancel the current screen, the current screen refers to the screen where the cursor is located.
2. Close the current screen: Ctrl + w, c. 3. How do I switch the focus? Ctrl + w, w followed by Ctrl + w, p followed by Ctrl + w, h four direction Ctrl + w, I Ctrl + w, k Ctrl + w, l 4. how to close other windows? Ctrl + w, o 5. Load file: vs file path/file name open file in new Vertical Split screen: sv file path/file name open file in new horizontal split screen