Basic instructions for use vim

vim editor (vi Editor upgraded version)

How to enter edit mode:

Through the above command will open the vim editor, then, need to enter a keystroke letters of the alphabet in order to modify the contents of i, enter edit mode after this time, you can to type a few words word.txt file. After modification, need to press on the keyboard Esc to exit edit mode of vim , then have the following options:

   1. From the keyboard " : WQ " three letters of the alphabet, and then return, expressed save the file and exit .
   2. from the keyboard " : q " two letters, then Enter to indicate exit without saving .

  Note: If this editing process just to see the contents of the file, the file does not make any changes, you can exit successfully. However, if you have modified the contents of the file, the vim editor does not exit this way, will give prompt information, then, to exit without saving them vim editor, we should adopt the following ways, that is, enter ": q! ". 3. From the keyboard " :! Q " three letters of the alphabet, and then return, represents not save and forced to withdraw .
   

Guess you like

Origin www.cnblogs.com/hwh000/p/12308232.html