ViVim Image copyright: lampbrother description: after entering VimVi, the default mode is command mode 1) Basic command a attaches text after the cursor
Vi/Vim
Picture copyright: lampbrother
Note: after entering Vim/Vi, the command mode is used by default.
1) basic commands
AAdd text behind the cursor
IInsert text before the cursor
: WqSave changes and exit
ZZShortcut key, save the modification and exit
: Q!Exit without saving changes
: WSave changes
2) Basic operations
UCancel the previous operation
Ctrl + r Restore the undo operation in the previous step
: Set nuSet row number
: Set nonuCancel row number
GgTo the first line
GTo the last line
: NTo row n
Clear screen
A. First, execute gg to jump to the first line of the file.
B. run the following command: dG.
3) advanced operations
Start split screen
A.Use uppercase O parameters for vertical split screen
$ Vim? On file1file2...
B.Use lower-case o parameters for horizontal split screen
$ Vim? On file1file2...
Note:N is a number, indicating the number of split screens
C.To switch between screens, just press ctrl + w.