Lesson 1
-----------------------------------------------------------
1 Cursor Movement:
K
H + L
J
# The arrow keys can also be used
2 Do not save exit: q!
Q-quit
3 Delete characters: X
4 Insert mode: I
I-insert
5 Normal Mode: ESC
6 Append mode: A
A-append
7 Save exit: Wq
Wq-write quit
8 Editing files: Vim filename
Lesson 2
-----------------------------------------------------------
1 Delete: D [n]motion
Motion
W to Lower [n] words, including spaces after a single time
e to lower [n] words, not including spaces after a single time
$ from current character to end of line character
D Cut when moving forward
W-word
E-end
D-delete
2 beginning of line: 0
3 Revocation:
U measure down to previous step
U Test the previous step
U-undo
4 Redo: Ctrl+r
Lesson 3
-----------------------------------------------------------
1 pasting rows
DD Cut one line
P Pastes rows below the current line
P-paste
2 Select replace one character: R
R-replace
3 C [N]motion
Motion
W to Lower [n] words, including spaces after a single time
e to lower [n] words, not including spaces after a single time
$ from current character to end of line character
D Cut when moving forward
Lesson 4
-----------------------------------------------------------
1 ctrl+g Display the name of the cursor in the column and so on
GG File Header
End of G file
n + G jumps to the specified line
2 Search
Search down/target
Search up? target
N Next
N Previous
Back to the original position Ctrl+o
Back to search location Ctrl+i
3 Find the corresponding brackets:%
4 Finding replacements
S/old/new replaces the first one found
S/old/new/g as a forward
[n1,n1]s/old/new/g from N1 to N2 line
%s/old/new/g Find and replace full file
%S/OLD/NEW/GC find the full file and ask whether to replace
Lesson 5
-----------------------------------------------------------
1 Execute shell command in vim:!command
Enter back in Vim.
2 Select text to write text
Enter V Mode: V, move cursor selected text
Execute command Write text:!w filename
3 Insert the contents of the file in the next line of the current cursor
: R filename reads in file contents
: R!dir reads the contents of the command output
Lesson 6
-----------------------------------------------------------
1 Add a row below the current line and enter insert mode: o
O-open a new line
2 Jump to the end of the next word: E
E-end of Next word
3 Enter replacement mode: R
4 Next line: J
5 End of Line: $
6 Copy: Y
V Mode selected
# paste: P
7 ignoring case when searching: Set IC
Search without ignoring case: set Noic
Highlight all search results: Set HLS
Lesson 7
-----------------------------------------------------------
1 Help F1
2 Vim configuration file path: ~/.VIMRC
3 Command display: Ctrl+d
Command check: Tab
Vim User manual Vimtutor Learning notes