5.5vim entering edit mode
5.6vim Command mode
5.7vim Practice
5.5vim entering edit mode
Everything entered in edit mode is entered in front of the cursor.
press the "I" cursor to enter the editing mode at the current position.
Press the "I (shift+i)" cursor to enter the edit mode at the beginning of the bank.
Press the "O" cursor on the next line of the bank, and another line enters edit mode.
Press the "O (shift+o)" cursor on the line of the row, and another line enters edit mode.
Press the "a" cursor to move backward one into edit mode.
Press the "A (shift+a)" cursor to move to the last face of the bank to enter edit mode.
5.6vim Command mode
"/work" into general mode search he will highlight what you want to search for, "shift+n" to look forward.
": Nohl" does not highlight
": 1,100s/192.168.137/119.119.1/g" begins with ":", 1 for the first line, 100 ($ for the last line) for the 100th row, s for the replacement, 192.168.137 this is the content to replace, 119.119.1 This is the new content to replace, G represents the global substitution. (If you don't add g then if you have two items to replace in your line he will only replace the previous one, and the one behind will not be replaced)
":" Up and down keys to find the commands you used before
"1, $s//bin:/sbin/nologin/gyblinux/g" If we replace the content with the "/" number, we can use the following method "1, $s/\/bin:\/sbin\/nologin/gyblinux /g "or" 1, $s#/bin:/sbin/nologin#gyblinux#G "," 1, $s@/bin:/sbin/nologin@ gyblinux@g "
Small knowledge:
": Wq" and ": X". But a situation is not the same, that is, you vim a document you did not change the content, and then ": Wq" then the document Mtime will change, and ": X" will not.
5.7vim Practice
We learned the operation of Vim to practice, we memorize is too long to remember that only we use skilled will not forget the following we do the following requirements to do experiments
If you don't know what to do, you can look at the following answers:
Special usage of VIM
Vim Common shortcut key summary
Vim quickly deletes a segment of characters
Vim garbled
Keypad issues
VIM encryption
Amin Linux
Vim tool (bottom)