Postings
‘vi’ quick command references
I’m a die hard vi user and still prefer using vi to edit plaintext files. There were some discussion on twitter on vi awhile back and I thought I’d share my own command cheat sheet for vi in edit mode. This is not quite a full tutorial but makes for a useful reference.
Editing Text…
i Insert before cursor
I Insert before line
a Append after cursor
A Append after line
o Open a new line after current line
O Open a new line before current line
r Replace one character
R Replace many characters
x Delete character to the right of cursor
X Delete character to the left of cursor
D Delete to the end of the line
dd Delete current line
:d Delete current line
yy Yank the current line
p Put after the position or after the line
J Join lines
u Undo last change
Moving the cursor around…
h Move left
j Move down
k Move up
l Move right
w Move to next word
W Move to next blank delimited word
b Move to the beginning of the word
B Move to the beginning of blank delimted word
e Move to the end of the word
E Move to the end of Blank delimited word
0 Move to the begining of the line
$ Move to the end of the line
Exiting ‘vi’…
Filed under: cli-fu — appgirl @ 5:21 pm:wq Exit, saving changes
:q Exit as long as there have been no changes
ZZ Exit and save changes if any have been made
:q! Exit and ignore any changes
Comments (0)
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL
Leave a comment
About
My name is Catherine Liao and you're reading the latest postings of various blogs I follow. You'll notice that the topics tend to center around Cloud Computing, Data Center, Virtualization, Servers, Web Technologies and 24x7 Operations.
These are topics that I'm interested in as I've spent a large chunk of my professional career building, deploying, and maintaining 24x7 application delivery environments. I use the knowledge I've garnered daily in my role as a Technology Solutions Architect for Cisco. I should note that this site is my personal site and does not reflect the views of Cisco.
Feel free to drop me a note if you find this site useful or if you'd like for me to check out your blog. I can be reached at catherine.liao@gmail.com. You can also connect with me via LinkedIn or Twitter.
Looking for less "geeky" content? Check out my travel blog 1-Day Itinerary.

