Speaking of the text editor, you have to say that the vim of the old age, say, but also Hale, still have a lot of advocates. It is true that vim is practical, and the advantages of VI are listed first.
1, if the master of vim, you can save the mouse.
2, Vim is a cross-platform editor, and is the default editor of Liunx, Unix
3. Compatible with all VI commands
To master the VIM editor, you must first understand the command mode in Vim, the following is the 3 command mode of VIM:
1, edit mode: Popular point, that is, you want to edit the text, enter text.
2, Visual mode: For text operations, such as: Copy a row, delete a row, etc. (cannot use the keyboard to write text)
3, Command mode: Can be found, replace, delete and other functions
To enter the editing mode of the steps:1, hands to Idle point, more press a few times ESC. 2, press the I key or a built.
Edit mode no commands, only, input text, what you hit on the keyboard, Vim shows what, simply said to use the window of the writing.
To Enter the visual mode:1, more than a few times esc, as a rule, once is enough.
Commands used in Visual mode:
GG: Back to the top of the page
G: Skip to the end of the page
DD: Delete the line where the cursor is located
2DD: Delete the row and the next line where the cursor is located, and 2 is the number is a word definition
YY: The line where the cursor is copied
Enter the command mode step:1, press the ESC several times. 2, then press the combination key: shift+:
Commands used by command mode:
S/old/new/g: Replace the old string of the file with the new string
2,20s/old/new/g: Replaces all old strings in line 2nd through 20 of the file with the new string
Set Nu: line number will appear
Set Nonu: The line number that already appears will be canceled
The above summarizes how to use vim, more specific commands also need to search the Internet. Just search: Vim's command. Then, the distance mastery is not far away.
A summary of the VIM text editor