Why should I learn vim?
- All Unix like systems have their own VI editor
- Some software's editing interface will automatically adjust the VI
- As an upgraded version of VI, VIM has the program editing function, but also has the code color highlight, the identification code correctness and so on function
The above advantages lay the absolute position of vim in the Linux system
Two VI use 1 mode to understand
VI has three modes, namely: General mode, edit mode, command mode. Let's get to the bottom three of these patterns.
General mode: is also the default mode, with VI open a file directly into the general mode. In this mode, you can delete characters, delete whole lines, replace characters, copy and paste operations
Edit mode: User vi Open the file into the general mode, when you just press "I i a o o r r" any one of the letters, it will enter the editing mode.
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321174807580-286956939. PNG "style=" margin:0px;padding:0px;border:0px; "/>
When you enter edit mode, the words "INSERT" or "REPLACE" appear in the lower left corner of the document; To exit edit mode, press the ESC key to return to normal mode
Command mode: In general mode, you can enter ":/?" in the command mode with the keyboard, and the cursor moves to the bottom line, waiting for the user to enter the next step. In this mode, users can perform common operations such as reading, saving, bulk substitution, displaying line numbers, exiting the editor, such as ": Set Nu" To display line numbers in a document
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321175621596-1451300339. PNG "style=" margin:0px;padding:0px;border:0px; "/>
2 Common key instruction cursor movement
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321180605549-1840937798. PNG "style=" margin:0px;padding:0px;border:0px;width:686px; "/>
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321180728549-1947234836. PNG "style=" margin:0px;padding:0px;border:0px;width:686px; "/>
Copy and paste
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321180821065-489536944. PNG "style=" margin:0px;padding:0px;border:0px;width:686px; "/>
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321180849096-920020693. PNG "style=" margin:0px;padding:0px;border:0px;width:686px; "/>
Search and replace
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321181345815-1156023014. PNG "style=" margin:0px;padding:0px;border:0px;width:686px; "/>
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321181419705-1482727253. PNG "style=" margin:0px;padding:0px;border:0px;width:686px; "/>
Instruction in command mode
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321180936955-530204588. PNG "style=" margin:0px;padding:0px;border:0px;width:686px; "/>
Instructions in edit mode
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/893198/201703/893198-20170321181008393-1689154681. PNG "style=" margin:0px;padding:0px;border:0px;width:686px; "/>
The use of VIM in Linux learning