Flip Screen
CTRL+F: Flip one screen down
Ctrl+b: Turn up one screen
Ctrl+d: Flip Down half screen
Ctrl+u: Flip up half screen
Delete a single character
X: Delete a single character at the cursor location
#x: Remove the total # characters from the cursor and backwards
Delete command: D (the use of Copy command y is the same as this)
DD: Deletes the current cursor in the row
#dd: Delete the line containing the line of the current cursor;
DFK Remove from cursor to K-letter position
FK cursor moves to the next K-letter position
Press in command-line mode: Enter STARTADD,ENDADDD (delete Staradd to EndAdd)
.: Indicates when the forward
$: Last line
+#: Down # line
Paste Command P
P: If you delete or copy to a whole line, paste to the bottom of the line where the cursor is located, and if the copied or deleted content is a non-full line, paste it behind the character of the cursor;
P: If you delete or copy to an entire row, paste to the top of the line where the cursor is located, and if the copied or deleted content is a non-full row, paste it in front of the character in the cursor;
Replacement: R
R: Replacement mode
Undo Edit Operation U
U: Undo previous edit Operation Continuous u command to undo previous n edits
#u: Undo Recent # edits directly
Undo the most recent undo action: Ctrl+r
Visual operation (in command mode v Enter)
Match selection: such as if (strcmp ("ABC", szstr) = = 0) cursor at position a
I "-" selected ABC, removed ""
A "-" check "ABC"
i)-"ABC" selected, Szstr
2a)-"Checked (strcmp (" ABC ", szstr) = = 0)
Enter block Action (Ctrl + V Enter)
Move arrow key selection block
Add content to the front of each line of the cursor: Select Block-->i (capital I) and enter what you want to add-->[esc]--> carriage return
Add content after each line of cursor: Select Block-->a--> Enter what you want to add-->[esc]--> enter
Indent left and right: Select Blocks < and >
Auto indent: Select block =
Repeats the previous edit operation.
Find
:/pattern
:? PATTERN
N,n move to the next/previous matching place
Use Vim to edit multiple files
Vim FILE1 FILE2 FILE3
: Next switches to the next file
:p Rev Switch to the previous file
: Last switch to final file
: first to switch to file one
Exit: QA All exits
Split-screen display of a file
Ctrl+w, S: Horizontal splitter window
Ctrl+w, V: Vertical splitter window
Toggle cursor between windows: Ctrl+w, ARROW
: QA Closes all windows
Edit multiple files in a split window
Vim-o: Horizontal Split display
Vim-o: Vertical Split display
Fills the contents of another file in the current file
: R/path/to/somefile
Interacting with the shell
:! COMMAND
Show or suppress line numbers
: Set Number (: Set NU)
: Set Nonu
Show ignore or differentiate character case
: Set ignorecase (: Set IC)
: Set Noic
Set Auto Indent
: Set Autoindent (: Set AI)
: Set Noai
Find text to highlight or cancel
: Set Hlsearch
: Set Nohlsearch
Syntax highlighting
: Syntax on
: Syntax off