A, VIM
1, vim + filename
There are no open this file to re-create a
Enter into the vim vim in terminal interface
Two, VIM mode
VIM has three modes
1, command mode (normal mode)
After the start vim default command mode, any mode can be returned through the esc key to the command mode (you can press it several times). Command Mode
Can be done by typing select a different command, copy, paste
i: Insert text before the cursor
o: insert a new row below the current row
dd: delete the entire line
yy: The contents of the current line into the buffer (copy current line)
n + yy: the n-th row into the buffer contents (copy n rows)
p: The text in the buffer placed after the cursor (paste)
u: undo the last operation
r: Replace the current character
/: Find Keyword
2, insert mode
In the command mode by pressing "i" key to enter the insert mode, the programming can enter text in insert mode, using the return command mode esc
3, ex mode
In the command mode Press ":" key to enter ex mode, the cursor moves in the end portion, where you can save the changes or exit vim
: W save
: Q Quit
: Q! Forced exit without saving changes
: X save and exit, the equivalent of: wq
: Set number display line numbers
:! System commands execute a system command and display the results
: Sh switch to the command line, to switch to using ctrl + d vim