VI - Kurzreferenz

 

 :q

quit

 :w

write

 :wq :x

write quit

 :q!

forced quit w/o write

 h j k l

cursor movement

 10h

move 10 char to left

 gg

go to beginning of file

 G

go to the end

 xxG

go to line  xx

 a

insert text after cursor

 i

insert text before

 o

open new line below

 O

open new line above

 A

append at end of line

 x

delete char after

 X

delete char before

 dw

delete word after

 

 db

delete word before

 d^

delete from line beginning

 d$

delete to line end

 dd

delete current line

 xxdd

delete xx lines

 yw

copy/yank word after

 yb

copy/yank word before

 y^

copy/yank line before

 y$

copy/yank line after

 yy

copy/yank current line

 p

paste after

 P

paste before

 /xxx

search for xxx

 /

search again with last xxx

 n

next search

 ?yyy

search backwards

 u

undo

 

 :line,line2s/old_string/new_string

replace first string  in line

 :line,line2s/old_string/new_string/g

replace all strings  in line

 :1,$s/.....

all lines of the file

 

(Kommando-Ende mit Escape-Taste)

 


qtao.de