Hacker News new | ask | show | jobs
by Gabler 5223 days ago
As someone who is thinking about learning Vim, this diagram is severely daunting.
7 comments

Speaking as somebody who learned Vim two years ago, I'm able to follow this diagram and recognize most of it, but in everyday flight I don't use all of it.

A little bit every day and you'll be there in no time.

EDIT: I should say, I took some time to go through every part of the diagram and it's been very helpful for forming a better mental model of Vim. It will look scary to the beginner, but for the moderate to advanced vimmer, this is a very useful learning tool provided you take some time to understand.

The thing about diagrams is that they often encode as much information as you might find in an essay, yet since the information is presented all at once, we have the expectation that we should be able to understand it immediately. It should take 10-20 minutes to understand this diagram.

I am pretty proficient in Vim and this diagram scares me. I can understand it if I try, but it does nothing to improve my intuitive sense of Vim commands.

Don't let this scare you. Learn 10 basic Vim principles and they will serve you 95% of the time. All this extra stuff can be learned incrementally on a case-by-case basis.

Definitely don't let this discourage you. I've only been using vim for about six months and I do not know all the commands and modal changes on this diagram.

The great thing about vim is you do not need to know very much to be productive, but every day you learn something new that will make you more productive.

While this is a great reference writing a vim plugin or looking up the behaviour of a specific command, I don't really see it as a learning tool.

Au contraire, I find this to be a great learning tool. As a post-novice vimmer, this is the first time that I've been able to see it all laid out like this so that I can see what I know already, what's left to learn and how it all fits together. I didn't even know "select mode" existed before this (though I promise I'll never use it – even MacVim uses visual mode with the mouse). I've saved this to my help/vim folder and I plan to refer to it periodically.
I agree, it's not really a learning tool (for a novice). Some commands here are pretty obscure; you wouldn't use some of them very much or at all, but that's not evident in the diagram. And you also have the right idea about learning vim incrementally (http://yehudakatz.com/2010/07/29/everyone-who-tried-to-convi...), instead of the "learn everything in parallel" approach that some advise.
Thanks for the link. I'm only just starting my second year of University now and I feel like skills with Vim will be an invaluable thing to have for my course.
Do you play videogames? If you have played any RPGs, strategy games, or even modern shooters, you can handle vim. That is, when you're playing a game like Starcraft/Warcraft/Final Fantasy Tactics, you have to build a similar state machine in your head, you reference it and manipulate it all the time, and you do it because it's fun.

Modern shooters have become just as complex, with the various options available to you. If you can do those, you can use vim.

I've been using Vim exclusively for about 2 years now, and I don't even want to begin to know what the hell is going on in that diagram. It was clearly not created for the purpose of teaching Vim but probably as an exercise of mapping out all the possible transitions between various modes and motions. Cool beans, but I hope the novices don't mistake it for something else.

If you're still on the edge about Vim, there have been a few good articles on how to begin learning it. What worked for me personally was learning the very basics, how to enter insert mode, how to save and quit, and starting to use Vim as a regular mode-less editor while slowly learning about various useful things you can do in normal mode ("hey, I can delete a word or a line with two key presses"). That way you can begin to extract use out of it immediately while growing increasingly efficient with other modes.

If you're on a Mac, MacVim gives you native OS X shortcuts for things like Copy/Paste, and maps selecting text with the mouse to visual mode which, combined with using insert mode, gives you the same functionality as a regular mode less editor would.

It's as useless as a state diagram of any other software you use. Imagine a state diagram for Chrome or Firefox and how scary that would look.
I was just watching Bret Victor's Inventing on Principle talk and thus learned about Larry Tesler. He says Larry Tesler dedicated his life to removing modes from software back where was no such thing as modeless editing. Perhaps this is why.
I watched the talk and was caught off guard by his mention of Larry Tesler. I can understand why because that did usher an era of easier to use text editors.

However, I'd like to emphasize that there is always a place for tools that are sufficiently complex such that it allows the craftsman wield it proficiently. Past a certain point of simplification, a tool would lack the necessary vocabulary to express things succinctly. Like why Jargon is necessary sometimes.

However, I think Vim is fundamentally a finite state machine. While complex, once you grok the mental model of how it works, everything else comes quite naturally. So fear not.

I find it interesting that emacs is basically the modeless Vim. I imagine that there are modes involved, but chorded input is basically modeless. I wonder if it makes a difference to the craftsman. Perhaps I should learn emacs to understand the difference.
I'm currently going in sort of the other direction. I'm usinge evil-mode which is VIM implemented in Emacs. Emacs does have many of the powerful features of VIM but what it lacks are composable commands. So what in Emacs would take NxM separate commands can be supported in VIM/Evil-mode with N edit commands and M movement commands (not to mention the modifiers like (i)nside or (a)around). I find myself intuitively using combos ive never used before, it just makes sense that they would work whereas I would have had to learn them individually in Emacs. What Emacs has that VIM lacks is it's amazing customisability, I love switching to scratch and changing how my editor works on the fly, I also totally rely on Org-mode along with my customisations of it (I even use it to generate my website!). I'm sure it's not for everyone and I wouldn't recommend it to someone without Emacs, or at least VIM, experience but for me Evil-mode really feels like the best of both worlds.

(commenting from my phone so please excuse weird autocorrect thingies)

you don't need modes for richness of expression and complexity- Modal errors can mystify even the most experienced of users- and waste vast amounts of time while you're learning to use VIM. Emacs is really no better. Sublime Text 2 is as close to modeless as I've seen, but there's still a long way to go.
I was at that talk and, let me tell you, there was magic in the room: http://vimeo.com/36579366