6 ms·
Vim Cheat Sheet - For Programmers By Programmers
- tudorizer 15y agoNow that's some visual clutter :(
- sunkencity 15y agoThere's simply no reason to think VIM is complicated or hard to learn at all :) There's a better looking but less information dense cheatsheet here. http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial... I have it printed and taped to the window in the office.
- gbog 15y agoThis cheat sheet reminds me of http://www.visibone.com/ http://www.visibone.com/ 's Browser book, which has the same kind of density of information. Doing this well is very hard and while the idea is good, more work is needed to attain Visibone's level.
- l0st3d 15y agovi(m) is for sys-admins. Programmers need to know :q! $ emacs !$ Let the war continue ;P
- nicklovescode 15y agoooh ooh holy war, let me try! more like emacs(ucks!)
- MindTwister 15y ago:q! $ emcas !$ Fatal: NOT_ENOUGH_FINGERS (10 found 15 required)
- pclouds 15y agoLet's make it attractive and say only "11 required" ;)
- anonymoushn 15y agoUnfortunately, my keyboard can only register 6 keys being down at the same time. This has thus far prevented me from successfully playing emacs.
- cjdavis 15y agoI remember the old joke of emacs standing for Eight Megabytes (of RAM) And Constantly Swapping. Oh for the days when that was a lot of system memory.. Not really.
- kamaal 15y agoI started out vim, with bare minimum commands but later on went to emacs. With emacs I have an option M-x tab auto complete In case I don't get to remember something. I would like to know what are vim equivalents of this? Some how I feel deep down inside that vim was not designed bottom for this kind of complexity. I mean to say when you want to design something to scale you have to clearly decide what goes into the core and what can be added using a extension system. Although I understand the spirit behind the use cases for vi when it was first invented to light weight. Now when you decide to stick to minimalism you must be consistent to that philosophy. When you violate that, you go on bolting stuff on top of it which doesn't belong there. The net result is a huge bloat of things which make usability too complex. Besides I only can commit so many things to memory. One look at this cheat sheet made my head spin. Every time I fire up a editor to write code, I need brain space to think about the problem at hand. I can't afford to context switch between looking a up a sheet of command to do editor work. Which in case even Notepad will turn up to be more useful than this. If someone has a better way to doing this I would be more than happy to learn. I keep hearing a lot of vim these days, and want to learn it too. But everytime I face the uphill task of memorizing something, I just drop it and go on to do something else.
- DrJ 15y agoThere is the auto/omni-complete functionality using C-n
- wollw 15y agovim will auto complete words if you press control-p while in insert mode. http://i.imgur.com/tdcEc.png http://i.imgur.com/tdcEc.png For what it's worth I feel how you feel about vim, about emacs. I suspect it's just a matter of familiarity. edit: As DrJ points out, control-n works too. Seems the 'p' is for previous keyword and the 'n' for next keyword.
- pyre 15y agoThe "M-x <tab>" that kamaal is talking about is for editor commands. Similar to ": <tab>" in Vim. The difference being that all of Emacs' editor commands (even "move one char to the left") are elisp functions that are available from the M-x prompt.
- dongsheng 15y agoVery well made cheat sheet, but will it scare the new VIMers? I was using http://www.viemu.com/vi-vim-dvorak-cheat-sheet.gif http://www.viemu.com/vi-vim-dvorak-cheat-sheet.gif when I started.
- HamMan_0 15y agoI'm far from a new VIMer and this scares me. While it contains a great deal of information, the noise level feels pretty high when I try to dig into it.
- jvc26 15y agoCheers for the colourblind one - actually makes a surprising amount of difference!
- syaz1 15y agoWhy the need to stress For Programmers by Programmers? Isn't it obvious? The sheet itself is really messy. I'd appreciate if anyone know a sheet that separates typical-editing and advanced-usage.
- i386 15y agoVIM - For Teenage Mothers By Teenaged mothers
- nagnatron 15y agoYou can tell it's by programmers because it's fucking ugly.
- lhnz 15y agoThis is why I only use the most basic features of vim. There are simply too many commands to learn and many of these tutorial and cheatsheets present you with too much information. I don't think the time investment makes sense, and I don't understand why there has to be so much noise: how many of those commands save a significant amount of time; how often are they used? The questions I would like to ask advanced vim users, are: (1) Imagine that you had your memory of vim wiped, and you lost the ability to remember more than 10 commands. If you decided to learn vim again which 10 commands would you keep in memory? (2) How many commands does somebody need to know before they can used vim productively? Is it less or greater than 10?
- kleim 15y agoSomeone posted recently about a nice, step by step, tutorial: http://news.ycombinator.com/item?id=2936670 http://news.ycombinator.com/item?id=2936670
- HamMan_0 15y agoYup, really like that one.
- dhimes 15y agoI prefer to think of the commands being organized conceptually, not by location. Something like this: http://fprintf.net/vimCheatSheet.html http://fprintf.net/vimCheatSheet.html So, if you are just starting out, learn the basic command(s) for doing each thing. Then, as you do it over and over, you'll begin to wonder how to do it easier. That's where the more advanced commands come in. I do have printed cheat sheets that I occasionally will look at and say "oh, cool, that looks really convenient." But I'm not aiming for total mastery- just efficient use.
- danneu 15y agoAbsolutely. My question is always "How do I ____, again?" The most hellpful cheatsheets are the ones that showcase alias commands, alternative commands, and related commands. Thanks for the link.
- raghava 15y agoSeems like a lot of visual clutter to me (tried having it as background on a monitor running 1366x768, not pretty usable for me) Many might find http://www.qitty.net/lnx/vim-cheatsheet.png http://www.qitty.net/lnx/vim-cheatsheet.png helpful too.
- brandoncordell 15y agoCheat sheet looks great! One question though. IT has 1g as a shortcut to goto the top of the file shouldn't this be 1G?
- roel_v 15y agoThe canonical way is 'gg'.
- fsiefken 15y agoAh Qwerty, can you make a version for the Dvorak typists?
- babebridou 15y agoThis sheet does not achieve its specified goal. When using a tool, the question that always comes to mind until muscle memory kicks in is "how do I do this?" and not "What will pressing that key do?". Think of it as a control settings in a console game menu: there are two ways to display the info, one is good design, the other is bad design. Bad design: a list of buttons, and for each button the action. (ex: A = Shoot, B = Jump, C = Crouch...). Why it's bad design: If you want to learn how to perform a given action, you need to parse the whole list to find the action, then look at the button, because there is no index. Likewise, if you want to change the button performing the action, you press the new button, scroll the list of choices, select the new action, press the previous button that was performing this new action, scroll the list of choices, select another action. One click, one scroll for each step. Good design: list of actions, indexed in alphabetical order (or any order that makes sense in the context). (ex: Crouch = C, Jump = B, Shoot = A...) Why it's good design? You can use the index to find the action quickly. Also, when changing the keys, just ask the game for a complete key remap and reply to each "press button for Jump", "press button for Shoot" etc with a single button press each time and no chance for a conflict. A better design would be for this cheat sheet to display an indexed list of actions, and then the "motion" required to perform it - or a list of acceptable solutions. The problem with VIM as I see it is that it requires understanding an additional layer of abstraction: it's not "press A to Jump", but rather "press A to execute the action that is relevant to the mode that you're in: if grounded, jump and enter airborne mode, if airborne, jump and enter double jump mode, if in double jump mode, do nothing". Both do the same thing, but if what you're looking for is crossing a pit, the solution in both cases is simply to press A twice - except VIM is designed to be so powerful that there's no way to list actions without mentioning at least the possibility of side effects. On the good side, if you are proficient with VIM, plan things in advance and know exactly where you are compared to the pit, you can do a double jump backflip and shoot at the marker with a single keypress, and even add a numbered parameter to specify the number of bullets which can be a function of remaining ammo, distance to ammo bonus, number of enemies on screen and their toughness, etc. Sorry for the stupid metaphor, it kind of made sense while I was writing it but I can already feel bad karma coming my way :P
- chernevik 15y agoIt's a comprehensive summary of the keyboard, I'm looking forward to studying it and extending what I know.
- kaishin 15y agoThe look of the cheat sheet lives up to the 'for Programmers by programmers' part...
- pge 15y agoOne useful command that was missed: C-^ (aka Ctrl-6) switches back to the most recently used buffer. That is, if you are using two buffers, you can just flip back and forth with C-^
- pyre 15y agoOf note: 1) OSX will not send any sequence when you press C-6 in Terminal.app. You have to press C-S-6 or C-^. I've never had this issue on Linux. Either C-6 or C-^ will work. 2) If you launch Vim with "vim file1 file2", the Ctrl-6 buffer switching will not switch you between file1 and file2 until you manually do it for the first time in that Vim session. 3) The Ctrl-6 switching is frame-dependent. The "previous buffer" is maintained locally between window splits or tabs in Vim, so you could have a vertical split that allowed you to easily swap between 4 separate files (i.e. 2 per side).
- slowpoke 15y agoThis is awesome, thanks. Every day is a day to learn new stuff in vim. :)
- baumgartn3r 15y agoThe "For Programmers By Programmers" is a bit unnecessary. Is anybody else using it?
- damoncali 15y agoIs there an award for title redundancy?
- mahcode 15y agoAs a new programmer (I started learning Ruby and ROR about a month ago), the added value of learning VIM has already been paying off. Adding a new learning element into the mix (in this case VIM) does take some time at first, but once you realize how much time you can save in the long run there is no turning back.
- SkyMarshal 15y agoHere's another that's better for learning Vim, it combines the cheatsheet with a tutorial to make a four-step progressive cheatsheet: http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial...