Fast Jump (cmd model) within Vim's line
^: The cursor jumps quickly to the first character of the bank header .
$: The cursor quickly jumps to the last character at the end of the bank.
NW: The cursor quickly jumps to the header of n fields after the current cursor position, ex:. ? are all a field.
NB: And NW are just the opposite.
NC: The cursor jumps quickly to the end of N Fields after the current cursor position .
Enter input in vim (CMD model)
CW: Deletes the cursor position (including itself) toWord TailCharacters and enter the input mode. C $: Deletes the cursor position (including itself) toBank TailAll the characters and enter the input mode. c^: Delete cursor location (excluding itself) toThe Bank's inauguralAll the characters and enter the input mode. 3. Delete character (cmd model) x: Delete one character in Vim.
DD: Deletes the entire row. DW: Deletes the current character (including itself) toWord TrailerCharacters (with spaces also deleted).
d$: Deletes the current character (including itself) toBank TailThe character. d^: Deletes the current character (excluding itself) toThe Bank's inauguralThe character. J: Merges the contents of the current row and the next row.Note: The cursor backwards contains itself, and the forward does not contain itself. 4. Undo operation (Cmd model) u: Undo the current operation.
U: Undo all current operation.
Ctrl +r: Restores using the U command.
5. Copy and paste yy: copy when moving forward
Nyy: Copy N rows (contains the current row)
y$: Copies the current cursor to the trailing character (with the cursor's own character). y^: Copy the current cursor to the first character (without the cursor's own character): M,ny: Copies the contents of line m to Nth row (containing the contents of the N,m row).
P: Paste (Copy the content). 6. Find and replace
Find (top-down)
:/word Press N is the next matching word,n is the previous matching word.
Find (bottom-up)
Word Press N is the next matching word,n that is the previous matching word. Replace
: s/old/new: Replace the current line with the first character old is new. : s/old/new/g: Replaces the current line with all characters old is new. : m,ns/old/new/g: Replace the old character of the M,n line with new.
:%s/old/new/g: Replaces all old characters new in the entire text. If you use the Confirm function: To add a C after the four commands above. You can do it.
This article is from the "123" blog, please be sure to keep this source http://9014348.blog.51cto.com/9004348/1640979
Vim Tips Summary (keep in mind)