Use Vim, vim
Mode
- ESC \ Ctrl + c: Exit edit mode
- ZZ \ wq: Save and exit in command mode
Edit
- I: Enter the editing mode.
- I: Go to the beginning of the line to start editing
- S: deletes the current character and enters the editing mode.
- A: edit the current character
- A: edit A non-null character from the end of the current row.
Mobile
- H j k l: bottom left, top right
- 0: zero number, to the line Header
- ^: The first place in the line that is not a blank character (the so-called blank character is a space, tab, line feed, carriage return, etc)
- $: End of the row
- G _: the last position of the line that is not a blank character.
- W \ W: Line jump to the beginning of the next word \ quick jump
- B \ B: Line-word jump back \ fast jump back
- E: Move to the end of the next word
- Ge: Move to the end of the last word
- Td \ Td: Jump to the previous character of the next d \ The next character of the previous d
- Ntd \ nTd: Jump to the previous character \ next character of n d
- Fa \ Fa: jump to the next a \ and return to the previous a. nfa \ nFa is similar to the previous one.
- *: Jump to other identical words
Copy, paste, and delete
- Ndd: delete n rows
- Nyy: Copy n rows
- Yap: copy a piece of content
- Gp: paste a piece of content
- GP: paste content in the previous line
- P: paste it to the next row.
- P: paste it to the previous line.
Register
- ": The default anonymous register
- Dd: by default, the content is cut to the unknown register.
- "_: Black Hole register, discard the stored content
- "_ Dd: Delete
- "+ P: paste the system clipboard content," +, system clipboard register
- "0 p: paste the copy register content
Combined Command Delete copy Modification
- Dw | yw | cw: delete by word \ Copy \ modify
- Dfd | yfd | cfd: Delete to \ Copy \ modify next d, including d
- Dtd | ytd | ctd: Delete to \ Copy \ modify the character before the next d
- Di "| yi" | ci ": Delete content between \ Copy \ modify"
- Da "| ya" | ca ": delete \ Copy \ modify content between quotation marks and quotation marks