Follow Us

VI shortcuts
Written by
Sunday, 14 December 2008 21:55

General Shortcuts

dd
delete a line
x
delete a character
a
append after cursor
A
append after line

Useful for script editing

:![command]
allows you to run a command while still in VI
:!!
repeats previous command
:! [command] %
allows you to run a command, with % = current file name

Motion

h
Move left
j
Move down
k
Move up
l
Move right

Modes

i
insert mode
esc
return the editor to command mode

Quitting

:q!
Exit and ignore changes
:wq! Exit and save changes

 For a full guide on VI please click here






 

Secured by Incapsula