Linux Vim Text Editor
Vim Overview
Linux offers a wide range of powerful editors, such as VI and Asciitext,and Unicode is the first full-screen interactive editor for Linux systems. VI (VIM) commands are numerous but if used flexibly it will greatly improve efficiency. VI is the abbreviation for "Visual Interface", Vim is VI improved (enhanced version VI). In general system Management Maintenance VI is sufficient, if you want to use code highlighting can be usedvim. VimThere are 3 modes of operation, namely command line mode, insert mode, and bottom line mode.
Command-line mode: The general mode of the initial entry, in which the cursor can be moved to browse, the entire row deleted, but the text cannot be edited.
Insert mode: Only in this mode will the user be able to edit the text input and the user can use the [ESC] key to return to the command line mode.
Bottom line mode: In this mode, the cursor is in the bottom row of the screen, the user can save or exit the file, or set the editing environment, such as looking for a string, listing line numbers.
Creation of VIM
# VIM [options] [file:]
+#: After opening the file, leave the cursor directly at the beginning of line #. (#表示注释行)
+/pattern: After opening the file, leave the cursor directly at the beginning of the first line that is matched to the PATTERN.
Vim's preservation
: w//Save file
: w Flie//Save to Flie file
vim
:q //exit editor, use the following command if the file has been modified
: q! Exits the editor without saving
: Wq//Exit editor, and save file
mode conversion:
Edit mode--input mode shift+i
Input mode--edit mode ESC
Edit Mode---last-line mode shift+:
Last-line mode--edit mode
I:insert, enter at the cursor position
A:append, enter at the rear of the cursor
o: Opens a new line below the cursor position
I: Enter at the beginning of the line where the cursor is located
A: The line at the end of the line where the cursor is entered
O: Opens a new line above the cursor position
This article is from "Jet ' aime" blog, declined reprint!
Vim Text Editor