You are on page 1of 1

vi Editor Quick Reference Chart

Execute in Command Mode


:w :w file :w! file :wq :q :q! :c! Save Files and Exit write buffer to disk write buffer to file write Absolutely write buffer and quit quit quit and discard buffer reedit and discard changes h j k l O S % G 3G W 3W B 3B Cursor Movement left down up right go to beginning of line go to end of line go to match go to last line go to line 3 go forward 1 word go forward 3 words go back 1 word go back 3 words Delete Text delete 1 character delete 1 word delete 1 line delete to end of line delete to beginning of line delete to end of file delete 4 lines a A i 5i l Add/Append Text append after cursor append to end of line insert before cursor insert 5 times insert at beginning of line Add New Lines new line below cursor new line above cursor Change Text change word change 3 words change line replace 1 character replace line Copy and Insert Text copy a line copy 3 lines put below cursor put above cursor

Move and Insert Text :3,8d delete lines 3-8 :4,9m 12 move lines 4-9 to 12 :2,9m 13 copy lines 2-5 to 13 :59w file write lines 5-9 to file Cancel Edit Function undo last change do last change again Search Functions go forward to expression go backward to expression repeat previous search reverse previous search

o O

u *

cw 3cw C r R

/exp ?exp n N

x dw dd D d0 dG 4dd

yy 3yy p P

www.beausanders.com/vi

vi Editor Quick Reference Chart v01.xls

You might also like