Discover the best of the web!
Learn more about Digg by taking the tour.
vi/vim Graphical Cheat Sheet & Tutorial
viemu.com — A visually accessible guide to vi/vim editing, using graphical keyboard maps. It should help a lot in understanding those powerful but cryptic commands.
- 1291 diggs
- digg it
- v4m21, on 10/12/2007, -0/+1Good to learn.
- fodi, on 10/12/2007, -0/+2I'm digging because I think the layout is quite unique
- xaqc, on 10/12/2007, -2/+0Viemu is a cool editor to put into Visual Studio, but too bad its only a 30 days trial. But at least the sheet is good for the vi/vim standalone.
- backdoc, on 10/12/2007, -0/+1As much time as I have to spend in Visual Studio, I might fork over the $. Although as I think about it, I might be able to persuade my employer to do it. But, even if they won't, I find myself doing VI commands in VS so much, I think it would be worth it to me. The price is kind of steep though.
- backdoc, on 10/12/2007, -0/+1As much time as I have to spend in Visual Studio, I might fork over the $. Although as I think about it, I might be able to persuade my employer to do it. But, even if they won't, I find myself doing VI commands in VS so much, I think it would be worth it to me. The price is kind of steep though.
- bobonot, on 10/12/2007, -0/+4Dugg... Vi Rules!
-- Just another vi zealot- stevievep, on 10/12/2007, -2/+2Not Dugg... [there are plenty of diggs already] :) Just because there will always be those who swear by Emacs. If I ever *had* to learn vi, I would do it through an emacs shell.
-- Just another Emacs zealot - enodev, on 10/12/2007, -1/+1same here but dugg anyway. it's certainly a nice overview.
but:
there is only one text editor ;) - noamsml, on 10/12/2007, -0/+1"there is only one text editor ;)"
I suppose you are talking about ed, and not some other blashphemous binary.
- stevievep, on 10/12/2007, -2/+2Not Dugg... [there are plenty of diggs already] :) Just because there will always be those who swear by Emacs. If I ever *had* to learn vi, I would do it through an emacs shell.
- drunkJerkface, on 10/12/2007, -0/+1Very nice approach!
- ezweave, on 10/12/2007, -11/+5emacs, son.
Had to be said.- rolf, on 10/12/2007, -5/+1I use both - but for anything more complex than inserting/deleting text - I use emacs. I didn't even think vi had this complexity to it, but even so, I don't feel learning yet another program to do essentially the same thing plus it doesn't have the extensibility.
Nice lesson plans though. - eltoozero, on 10/12/2007, -1/+9In the words long rememberd, but long forgotten: "Emacs is like a beautiful woman, while Vi is like your hand, always there when you need it."
- rolf, on 10/12/2007, -5/+1I use both - but for anything more complex than inserting/deleting text - I use emacs. I didn't even think vi had this complexity to it, but even so, I don't feel learning yet another program to do essentially the same thing plus it doesn't have the extensibility.
- thewise1, on 10/12/2007, -0/+3AWESOME. I've used vi/m for a long time, but in spite of that I still have never bothered to learn more than how to save, quit, quit without writing, and insert. Oh, and search.
diggdugg- AhmedB, on 10/12/2007, -0/+2Oh man, you are missing a whole lot...try the following:
q: - command history
? and / - Search backwards and forwards
CTRL-W-S - split edit window
TAB - command completion
and lots more...I find myself much more efficient using it than any other editor - SideshowBob, on 10/12/2007, -0/+1Absolutely agreed! I use Vi exclusively but have maybe 20% of its capabilities committed to memory. The other stuff I either didn't know about or just didn't use frequently enough. There's a lot of power under the hood here.
+Dugg - backdoc, on 10/12/2007, -0/+2I have just discovered the [I command. That's a left bracket followed by the capital letter "i". It will bring up all of the occurrences of the current word the cursor is next to when you do the command. It is very helpful for finding all of the variables with the same name.
Another of my favorite things about vi is that it maintains the history of commands. For example, if you wanted to delete (copy or whatever) a few lines of text you could do it by doing:
:begin_line,end_lined (for example :50,87d or whatever line numbers)
Then, suppose that you meant to yank those lines instead (that means copy). You could undo by typing the letter "u". Then, hit the colon ":". Then, use the up arrow to bring up the last command (or more if your command was a little ways back). Backspace over the "d" and change it to a "y".
That sounds like alot. But, it's second nature and extremely fast once you know about it and use it a few times.
- AhmedB, on 10/12/2007, -0/+2Oh man, you are missing a whole lot...try the following:
- cannibal, on 10/12/2007, -6/+2Vi Is teh leet. vi /etc/config.conf
w00t - treed, on 10/12/2007, -1/+1No dvorak versions. :(
- scheper, on 10/12/2007, -0/+3That's exactly why I stopped using my Dvorak keyboard.. I wish I could have kept using it, but I need vim more
- TiCL, on 10/12/2007, -0/+0http://chronos.cs.msu.su/vim/howto/dvorak.html
- Monoboy, on 10/12/2007, -0/+0I saw this on the del.icio.us popular feed the other day. Very nice little guide. Easy to go through for any beginner and eases the scariness of jumping into Vi/Vim.
- jswensson, on 10/12/2007, -0/+0Emacs should have of these. Could help beginners.
- enodev, on 10/12/2007, -0/+1try ctrl-h t for the tutorial. then there is also a very good help system built-in. loads of commands start with ctrl-h. try ctrl-h ? for an overview.
- deadbaby, on 10/12/2007, -10/+3Nano > Vim
- dhcmrlchtdj, on 10/12/2007, -0/+17if you mean "vim has a huge crocodile mouth with which to eat nano", then yes, i agree wholeheartedly.
- jay314, on 10/12/2007, -10/+2Dugg because I don't know how to use Vim, but I have to say..
This is a perfect illustration of why I can't stand the modern Linux command line: a 7-page "cheat sheet" for a text editor. Why is there an "insert" and a "not insert" mode? The HJKL keys are NOT needed for navigation anymore. We have arrows. If I press the arrows, PgUp, PgDown, Home or End keys, I obviously want to navigate the document. Any other button without a control or alt key means I want to insert.
The entire interface for Vi (and Emacs as well) is completely counter-intuitive and cumbersome for anyone who hasn't been using it for ages, and it is only surviving for legacy and force-of-habit reasons. It's time to get out of the 70's.- barbobot, on 10/12/2007, -0/+3just because something isnt intuitive that doesnt mean it isnt easy.
- Writher, on 10/12/2007, -0/+2There are other alternatives that people who do not want to (or cannot) learn how to operate vi(m) and do not mind sacrificing speed can use. You are not required to use vi(m), but if you do learn how to use it effectively, it can be more time efficient than anything else out there.
- Monoboy, on 10/12/2007, -0/+2Vim is all designed so you never have to take your hands off the keyboard or even move your hands very far on the keyboard (except for that lame Esc key, but you can also hit ctrl+[ I think to exit insert mode).
Once you get it down, it feels very nice. I hated Vim at first because it feels so complicated to use having to switch modes all the time. - jay314, on 10/12/2007, -10/+1"just because something isnt intuitive that doesnt mean it isnt easy."
Here's a hypothetical: I just made an editor called vviimm. In order to type a character into a document, you must press the key twice. Typing "wwoorrdd" would print "word".
This setup is very easy, and still very fast. A person could train themselves to become very efficient using vviimm. But it's a terrible interface design, and completely unneccessary. - drag, on 10/12/2007, -1/+6Vi is very fast to use. If you need to edit lots of text files I have yet to see anything that is nearly as fast or has the same usefull features as vim. The reason people still use it is because of this fact. Often times I will be editing a file fast enough that I can't barely follow visually what my fingers are doing.
If you don't like vim or vi or emacs or whatever just use nano for the command line and gedit or kate or kedit. Saying that people are being put off Linux because many Linux users prefer Vi and find it usefull is simply a fairly stupid thing to say. - tempusrob, on 10/12/2007, -1/+6Spoken like someone who's never seen a vim power-user in action. It's nearly inspiring...
- Writher, on 10/12/2007, -1/+3"This setup is very easy, and still very fast. "
How does having to hit the insert button once even compare to having to double the amount of typing for every other letter you are typing? - frontbrain, on 10/12/2007, -0/+1I think you can set the arrow keys to do navigation as well, the graphical versions do it by default I think. If you don't like vim then don't use it, but if you take the time to learn the basics, it really is a pretty slick editor. I never used it for a long time, but I got tired of editing text using all different kinds of programs with different interfaces, so I learned vim, and there is a version of vim for just about every platform.
- austinf, on 10/12/2007, -1/+2You should read the authors comments on why he learned vi in the first place. He, like many of us, was cramped by the poor design of laptop keyboards where the arrow and navigation keys are not intuitive and uncomfortable. And really, it _is_ faster, once you learn it :-)
- AhmedB, on 10/12/2007, -0/+0Will be useful for newbies, but if you already use vim will be quite confusing and timewasting to keep looking at it, much easier and faster to grep the Vim help for what you want.
- omnivector, on 10/12/2007, -0/+3I actually wrote up a little cheat sheet for people in my lab once:
http://otierney.net/vimkeys.html
Some here might find it handy if you dugg the linked article - boredzo, on 10/12/2007, -0/+2I like it, and will print it out. I want one for Dvorak, though...
Maybe I'll make one. Wouldn't be too hard.- boredzo, on 10/12/2007, -0/+3Well, I made it:
http://digg.com/programming/vi_vim_graphical_cheat_sheet_for_Dvorak
It also adds a grayscale version. So now there are four: Dvorak-color, Dvorak-grayscale, QWERTY-color, QWERTY-grayscale. Plus the original QWERTY-color version in SVG and GIF format. Mine is in PostScript and PDF.
- boredzo, on 10/12/2007, -0/+3Well, I made it:
- ilikejam, on 10/12/2007, -8/+7The only tutorial you need:
<Esc>:q!<Return>emacs
And relax.- deadlinegrunt, on 10/12/2007, -0/+0I use vi to edit my .emacs
- goalieca, on 10/12/2007, -0/+3From the guy who brought us gentoo (this is how i learned vim)
http://www.gentoo.org/doc/en/vi-guide.xml - jaderobbins, on 10/12/2007, -1/+2Vi is the best! Digg for spreading the word to emacs users ;)
- peerk, on 10/12/2007, -0/+1Gotta digg it.
A few days ago I spent 20 minutes trying to navigate in visudo.
And that was with 3 or 4 browser windows open with vi documentation. So frustrating. - TiCL, on 10/12/2007, -0/+0Vim needs to release a video tutorial.
- talso, on 10/12/2007, -0/+0vilearn is also great as far a vi tutorials go, I'm at the point where I need some drills to pound some of the lesser known stuff into my head. gvim + minibuf + ctags is pimp too, as far as extensions go.
http://vilearn.org/ - AnotherIdiot, on 10/12/2007, -0/+0Very useful +digg.
- Merlin8000, on 10/12/2007, -0/+0I'd like to see more of this kinda thing. I have a widescreen-aspect display so I had to modify it a bit in gimp but at least it gives the desktop a real purpose. There's one for prototype out there somewhere too. I'd like to start a nice quickref desktop wallpaper type of thing for most of the languages/apps that I use
- 0zymandias, on 10/12/2007, -0/+0Worth a dig - VIM is an excellent editor.
- cabazorro, on 10/12/2007, -1/+1To those pointNClick coders..
Sometimes, when aiding a fellow coder, my fingers twitch and twist with frustration whe while at it, the compiler aborts with a message complaining about a missing ; on Line 344 on File x.cc and my fellow coder reachers for the.... mouse!!!
Arrrghh! (get out my way!!! You wuzzz!)
The mouse lovers have their IDE's choke full of tabbed editors so they can drag the cursor all over the holy screen searching for the file. If they IDE is "good', it highlights the offending file so the user can CLICK on the naughty file and the you can CLICK on the bad line and by then I just went to have a cup of coffee I CAN"T TAKE IT!.
Me?
>vim /path/file.c
:344
$
a;
esc
ZZ
make
Badabim!!- Merlin8000, on 10/12/2007, -0/+0and Me?
:344
A;
esc
ZZ
make
technically same # of keystrokes but I count modifiers as half-keystrokes personally.
- Merlin8000, on 10/12/2007, -0/+0and Me?
- wrinkles, on 10/12/2007, -0/+1My pet peeve...
I hate it when zip docs open up under a different name than the parent zip, then I have to look through 600+ items in my download folder to find it. BTW, this opens as "cheat sheet". - khilari, on 10/12/2007, -0/+1Thanks... very useful
- bayouJosh, on 03/07/2008, -0/+1Very cool cheat sheet. By far, the best I've ever seen. Thanks!
