Vim split screen function
To sum up, ctrl + w and a key letter are used to trigger a function.
(1) open several files in shell and split the screen:
Vim-On file1 file2...
Vim-on file1 file2...
Large O represents vertical, and small o Represents horizontal Split (horizontal by default). n represents several screens. In fact, I don't think I need to write it, by default, several screens are split based on the number of files to be split.
(2) open a split screen in vim:
Create a blank split screen:
: New
Open any file:
: Vsplit (: vsp) filename
: Sp (split) filename
Open the current file:
Ctrl + w and s (split)
Ctrl + w and v (vsplit)
(3) close a split screen:
: Only or ctrl + w and o cancel other split screens, only keep the current split screen
Ctrl + w and c (close)
Only the last split screen is available:
Ctrl + w and q (quit)
(4) move the cursor, that is, switch the split screen. You can also move the split screen, for example, move the left split screen to the right.
Ctrl + w and w (various switches are convenient only when there are two split screens)
Ctrl + w and h (H) left
Ctrl + w and j (J)
Ctrl + w and k (K)
Ctrl + w and l (L) Right
(5) The last step is to change the split screen size.
Ctrl + w and <left
Ctrl + w and> right
Ctrl + w and +
Ctrl + w and-bottom
Ctrl + w and = restore equality