Vi:visual Interface
ASCII, Unicode
Three modes: 1, edit mode, command mode, 2, input mode, 3, last line mode
command:# vim [OPTION] ... FILE ...
Edit mode--Input mode
I:insert, enter at the cursor position;
A:append, enter at the back of the cursor position;
O: Opens a new line below the line where the cursor is currently located;
I: Enter at the beginning of the line where the cursor is currently located;
A: Enter at the end of the line at the current cursor;
O: Opens a new line above the line where the cursor is currently located;
Input mode--edit mode ESC
Edit mode--and last-line mode:
Last-line mode-- edit mode ESC
Close file: Wq Save exit: q! Force exit, discard the changes made;
Cursor Jump:
Between characters jump H: Left L: Right J: Next K: Up
jump between Words W: The beginning of the next word e: The ending of the current or next word B: the first word of the current or previous word
Beginning line end Jump 0: Jump to the beginning; $: Jump to the end of the line;
Vim's edit command:
X: Delete the character at the cursor;
#x: Delete the # characters at the beginning of the cursor;
XP: Swap the position of the character where the cursor is located and the character behind it;
R: the character at which the cursor is replaced
D: Delete command
Paste command (p, put, paste):
P: If the buffer is an entire row, the current cursor is pasted below the line, otherwise, it will be pasted at the back of the current cursor;
P: If the buffer is an entire row, the current cursor is pasted above the row, otherwise, it is pasted at the front of the current cursor;
Copy command (y, yank):
Y: Copy, work behaves similar to D command;
This article is from the "Qinnengbuzhuo" blog, make sure to keep this source http://echoroot.blog.51cto.com/11804540/1922573
Use of Vim