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

function

I

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

a

switch line mode, Behind the current cursor insert input text

o

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

G

cursor to the end of the file

nG

cursor to the first n rows

$

moved to the end of each line cursor line

n

cursor moves down n

/name

after the cursor a called name string

?The name

before the cursor a called name string

x

delete the location of the cursor one character

x

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

dd

delete line cursor

NDD

lines from the cursor downward to delete n

yy

copy line cursor

nyy

copy from the cursor down n rows

p

characters paste to the cursor to the buffer

n

recovery before an action

: the set Nu

cancel line number

: set nonu

cancel
Bottom row mode function key

function keys

function

: 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: