Labels

algorithms (22) Design Patterns (20) java (19) linux (14) Snippet (13) service mix (6) soa (4)

VI Editor

VI – Visual Editor.

Normal no sign
Command Line : colon
Input INSERT/REPLACE

 

Normal –> Insert mode a,i,o,r,s A,I,O,R,S

Esc/Enter –>  to normal mode.

: to command line mode.

H

-{minus}     k

0<----h       *        l---->$ ----------------------->M

Enter         j

L

 

GG= go to line number

x delete command

X replacement for back space

u undo char by char

U undo at once
DW delete a word

DD delete a whole line

repeat a command 5x will delete 5 chars meaning number specifies number of times the command has to be executed.

q quit, vi wont allow if there are any changes done.
q! quit without saving
wq write and quit
wq <filename> save as file name and quit,if file not exists
wq! <filename> save as file name and quit,if file exists
r! <Command> run the command and put  the output at the cursor position
sh takes u to shell from vi ,where you can execute commands and come back.

No comments:

Post a Comment

Search 24 Bytes