I. Overview
WE
Visual interface visual interface, similar to Notepad in Windows
VI> vim
Operating mode:
(1) Command mode command mode
(2) Insert mode input mode
(3) Last line mode line mode (last line, last line)
Second, the basic
vim [filename]
Enter Vim editor, if the file does not exist is automatically created and opened
Enter default in command mode, waiting for user input commands
Type i to enter Insert mode
ESC key to exit Insert mode
Use: wq and press enter to save and exit
Three, Vim command format
vim + filename : open the file, position the cursor to the last row
vim +3 filename : open the file, position the cursor to the third line
vim + / xxx file name : the file open, position the cursor to the first occurrence of line xxx, by n- , where switching occurs several key xxx
AA BB cc Vim : create and edit multiple files simultaneously, by typing in the line mode : n switching edit file downwardly (aa-> bb-> downwardly in order cc), : N or : prev switching edit files up (cc-> bb-> aa upwards order)