Now the Linux system is generally installed by default vim editor, if there is no VIM editor installed, there will be a VI editor, the VI editor produced more time than the mouse to come earlier, although the function is very powerful, but I recommend the installation of Vim tool, after the installation of Vim, VI is automatically soft-connected to the Vim editor. The next step is to introduce some simple tips for getting started, and then using the Vim editor is the equivalent of using Notepad as simple, but more powerful vim.
Vim Sub-command mode and insert mode, when vi a new file, the default into the command mode, at this time press I can enter the insertion mode. Here are some simple commands:
Command mode:
Move:
H = left L = right K = up J =
G = moves to the last line, does not enter insert mode
GG = return to the beginning
Number n + k/j = Move Up/down n rows
Enter: number, enter set NU on the command line, you can display all the line number, after: Enter the corresponding number n can be moved to the corresponding line
After: Enter "/xx" in the file to find XX
Insert:
I/= insert before cursor
I = insert at current beginning
A = insert after the cursor
A = insert at the end of the current line
Copy:
YY = copy Current line + P = paste
Number n + YY + = copy n rows from the current line
Delete:
x = Delete Cursor position content
DD = Delete the current line (DD This command is actually with the cut meaning, press P can paste the deleted information)
Number n + DD = delete N rows starting from the current line
Number n + x = Remove n from cursor
Insert mode
Move:
Direction key
Delete:
BACKSPACE: Backspace
Linux:vim Simple Start