Differences between VI and VIM in Linux

All Linux systems will be built in vi text compiler
vim has the ability of program editing, is an enhanced version of vi, can take the initiative to distinguish the correctness of grammar with font color, convenient programming. The programming functions of code completion, compilation and error jump are particularly rich.
vi three modes
command line mode
insert mode
insert mode
bottom line mode
command line mode: when users edit files with vi, they initially enter the general mode. In this mode the user can move up and down through the cursor on the “delete” or “the whole line operations” and other operations, also can undertake “copy”, “paste”, such as operation, but cannot edit text
insert mode: text edit users to input, the user can press the ESC key to return to the command line mode
the bottom line: the cursor is located in the bottom of the screen, the user can save to file, or exit the operation, also can set the editing environment, such as looking for a string, line Numbers listed
common command line mode function keys

function keys



switch to the insert mode, in front of the current cursor insert input text


switch line mode, Behind the current cursor insert input text


what line mode switch

Ctrl + b

screen back to turn over a page

Ctrl + f

screen forward one page

Ctrl + u

screen turn back half a page

screen turn back half a page

0 (zero) array

cursor to the beginning of the bank


cursor to the end of the file


cursor to the first n rows


moved to the end of each line cursor line


cursor moves down n


after the cursor a called name string

?The name

before the cursor a called name string


delete the location of the cursor one character


delete the location of the cursor one character at a time before


delete line cursor


lines from the cursor downward to delete n


copy line cursor


copy from the cursor down n rows


characters paste to the cursor to the buffer


recovery before an action

: the set Nu

cancel line number

: set nonu

Bottom row mode function key

function keys


: w

to edit the file to disk

: q

exit vi (system to do modified files giving prompt)

: q!

forced exit vi (to the modified file is saved)

: wq

save and exit

: w/fileame

save a file named filename

Read More: