What is vim : vim is a text editor developed from vi; vi is a text editor that comes with the unix like system;
Three modes :
-
Command mode (Command mode) to
vim 文件名
start the vim editor, enter the command modecommand meaning i Switch to input mode to enter characters x Delete the character at the current cursor : Switch to bottom line command mode to enter commands on the bottom line -
Insert mode
command meaning ENTER Wrap ACK SPACE Backspace, delete the character before the cursor OF Delete key, delete one character after the cursor Arrow key Move the cursor in the text HOME/END Move the cursor to the beginning/end of the line Page Up/Page Down Page up/down ESC Exit input mode and switch to command mode -
Last line mode
command meaning :w Save changes :q drop out :q! Do not save and exit, the effect is equivalent to uppercase ZQ wq Save and exit, the effect is equivalent to uppercase ZZ