Live data from Hacker News

Vim: revisited

mislav.uniqpath.com

11–20 of 117 posts

Re: Vim: revisited

#11
post #4

Nicely done. A new or returning vimmer will profit from following his advice. His best recommendation is at the top: don't configure a lot of settings and plugins at first. Start with a minimal setup, and slowly work up from there when needed . In particular, don't copy someone's huge .vimrc. In fact, that's good advice for any tool or technology: start minimal, and only add what you need, when you know you need it.…

Also, colorschemes are supposed to set the colors_name variable:

  :let colors_name
Though this doesn't always happen.

Re: Vim: revisited

#13
I've been using Vim more or less exclusively for the last year or so, and there is only one feature of Aptana Studio that I miss, and have not been able to find in any Vim plugins. In the directory/project tree in Aptana, files had different styles based on their git status. I think I just need to take a weekend and learn enough vim programming to make it happen as a Nerd Tree plugin.

Re: Vim: revisited

#14
post #7

I remember reading the web page I linked to below some time late last year, and remembered thinking at the time I wished someone told me this when I first started learning vim some 18 years ago. To those who would say “that’s obvious; of course you learn vim incrementally”, I would simply say that having spoken to a number of vim users in the past, I never got that advice. Instead, I got a lot of advice about turning…

The reason so many experienced people suggest learning the basics of Vim (or, in my case, Emacs) in one go is because it works quickly and efficiently--certainly more quickly and more efficiently than an incremental approach. Additionally, just giving up on arrow keys and the like does not necessarily entail a "huge volume" of memorization.

I am an inherently lazy person; I cannot just sit down and memorize stuff (one of the reasons I'm in CS). Yet I definitely support giving up the mouse and arrow keys immediately.

When I originally picked up Emacs, I went through the tutorial and promptly forgot exactly which keys did what. However, I decided to follow the tutorial's advice and learn how to navigate properly. To do this, all I did was not use the mouse or arrow keys for editing some text. For the first couple of days, I had to keep looking the keys up each time I did anything; later--relatively abruptly--I started using them without realizing. There is no way I would have learned nearly as much as quickly if I had not got through a couple days of not knowing what I was doing.

Once the standard moving commands became second nature, I started using some of the more specialized ones (like moving around by line or paragraph or expression). Without having given up on the arrow keys and mouse, I would probably never have learned the more advanced movements which are now exceptionally useful.

Basically, to follow your suggestion would be to avoid a couple days of bumbling around in favor of being less effective for a very long time. On the other hand, with my approach, I did spend a couple days being incompetent but then the bindings became natural. Ultimately, to me, being lazy involves not just minimizing work immediately, but increasing efficiency in the long run as well.

As a contrast, I know many classmates who have tried to learn Emacs your way. Most of them can use it, but not much more efficiently than notepad; I regularly see them spending minutes doing menial tasks that would have taken seconds had they known Emacs better. In the context of a 90 minute lab, that is not trivial at all; even in the context of working full time, the amount of time they can save should not be ignored.

Ultimately, all it takes to learn Emacs (and, I imagine, the same can be said of Vim) is a little bit of patience and willingness to embrace change. By jumping into the deep end immediately, you can learn really quickly, and reap the benefits almost immediately.

Re: Vim: revisited

#15

I use and like Vim, but I feel like the articles that make it to HN all say the same thing ("I had a conversion experience," followed by some configuration details, followed by basic keystrokes, etc). Why does everyone feel the need to re-tell the same story?

To get more people to use Vim. It's also annoying when IDE people assume that Vim and Emacs people are just old-fashioned and using inferior tools; explaining why and how you use Vim is a great way to dispel these misconceptions.

Re: Vim: revisited

#16
OT: This is such a beautifully designed blog. One of the few that I don't immediately pass through Readability or something similar in order to, you know, read it.

Re: Vim: revisited

#18

I use and like Vim, but I feel like the articles that make it to HN all say the same thing ("I had a conversion experience," followed by some configuration details, followed by basic keystrokes, etc). Why does everyone feel the need to re-tell the same story?

[deleted]

Re: Vim: revisited

#19
"And if you did multiple jumps, you can backtrack with ."

I learn something new with these posts every time! I've been wanting something like this for a while.

Re: Vim: revisited

#20
If only I had read this when I first started using Vim!

I've been using Vim for a while, and this is one of the best-organized overviews of Vim I've seen, partly because he doesn't try to enumerate every single key combination (which is the wrong way to learn Vim - the right way is to synthesize the way that the individual operations are logically combined, though that admittedly takes some time). The best two pieces of advice he gives are (1) not to put anything in .vimrc without knowing exactly what it does, and (2) don't use too many plugins.

At this point, I actually don't think I really use any plugins regularly. I have nothing against Vim plugins in general. It might be a bit faster to install a choice few, sure, and someday I might try and figure out which ones work best for me. But for the time being, I'd much rather know how to navigate my file or project with just the standard set of operations and minimal configuration. That way, I can launch Vim on any machine and start using it, without needing to waste time setting it up just so I can use it properly.

(Disclaimer: I have mapped Caps Lock to Esc, which is indeed a major problem if I use another person's computer. I've gotten used to seeing "E492: Not an editor command: W" practically every time I type on a friend's laptop. But it saves me so much time when working on my own machine that it's worth it!)

In short: stick with Vim long enough, and you'll find that you don't really need many plugins or much configuration for it to be incredibly useful. They help, but not as much as you might think, especially once Vim's standard keybindings become part of your keyboard reflexes.

Post reply on HN