Live data from Hacker News

Two Simple Steps Helped Me Learn Vim

adamdelong.com

31–40 of 92 posts

Re: Two Simple Steps Helped Me Learn Vim

#32
post #29

I have been meaning to learn Vim for a while but everytime I was trying I ended up being overwhelmed by the number of command (and also frankly, the weird syntax of .vimrc). I finally took a step by step approach and started with a very minimal .vimrc and worked my way up from there, solving real problems I ran into. I think the key is to choose your battle. Also this helped me understand the core concepts of how Vim…

That is the way to do it, because I think it's a mistake to copy another user's ~/.vimrc especially if you aren't aware of why those settings are in use. You'll learn more, faster, if you start with a blank ~/.vimrc and build it up yourself.

Another tip to advance up the learning curve is to start using vim for everything, not just code. Write email, todo's, documentation, and everything else with it and pretty soon the learning curve doesn't feel so steep anymore.

Re: Two Simple Steps Helped Me Learn Vim

#33
post #17

The biggest thing that helped me to learn to use vim fluently by building up muscle memory (and making commands automatic) was playing Vim Adventures, a browser based adventure game that gradually teaches you vim commands: http://vim-adventures.com/ I haven't tried the full (paid) version yet, but the demo was enough to get me moving around text quickly. Now I finally understand why people use this crazy thing. :) Al…

I sprung for the paid version, and have progressed part of the way through the last level. Compared to the demo, I think that it helped with some more advanced features, but mostly just made me aware of them rather than giving me the proficiency I learned with the basic commands. Perhaps if I repeated the game, I'd become more natural with them.

Still, highly recommended. It's been a lot of fun to play, and it helped me to quickly become proficient.

Re: Two Simple Steps Helped Me Learn Vim

#34
For me, what finally worked, after many other attempts, was:

1. Run through vimtutor thoroughly [~30 mins].

2. While doing that, memorize the 10-15 commands in the tutorial that stick. Leave the rest (for a later time).

3. Start using vim full-time from now on.

Worked perfect!

Re: Two Simple Steps Helped Me Learn Vim

#35
post #4

But that was what Ornstein meant by cheatsheet. Anyways, why did you "want to learn Vim for a long time", did you feel limited by st?

Vim is much more efficient. For example, within Tmux, one never needs to leave the terminal; with ST, there's a frequent switching cost which compounds over the course of a day. If one were to put Tim Pope up against an ST master, it's almost certain Pope would win.

I love the iTerm2 + tmux + vim + zsh environment. It takes a little time to figure out how to juggle the configuration for them, but once you do, it's super efficient.

Re: Two Simple Steps Helped Me Learn Vim

#36
For me, mapped caps lock to escape and thereafter never looked back. I found reaching to the top left of my keyboard was breaking my concentration. Especially given I touch type.

Also visualbell is almost mandatory otherwise "beep mode" was enough to drive me crazy.

Re: Two Simple Steps Helped Me Learn Vim

#37
post #22

I've always wanted to learn vim, as so many great coders use it and swear by it, and it doesn't seem fundamentally harder than any other power-user skill. My biggest fear is that I work with novices (who are using something like Sublime) on a regular basis, and it's more friction than it's worth to switch between the two kinds of muscle memories. Also...maybe I don't write/edit enough code to justify learning vim? I…

If you have tools that work for you I don't see a reason to change. I use vim because it's a great editor, can run in a terminal, and is open source. I know the producer won't go out of business.

Re: Two Simple Steps Helped Me Learn Vim

#38

Here are some more tips: - disable arrow keys - turn relative numbers on by default - force yourself to only move vertically using relative numbers - force yourself to only move horizontally using [fF,;]

- disable arrow keys - force yourself ... - force yourself ... This strikes me as an attitude that drives people away from Vim. Maybe it depends on individual differences in learning style, but I would say the exact opposite. Embrace the arrow keys! And all else that is familiar. The moment you start with Vim you're diving in the deep end and productivity will take a plunge. At least training wheels like the arrow ke…

Arrows are just another way of jumping, this is not Unix VI, this is VIM

It's an editor, it should be as easy as possible. People (should) use VIM because it's powerful, not because it's different from other editors.

Re: Two Simple Steps Helped Me Learn Vim

#39
Time and again, these "how to coerce yourself into learning this hostile tool called vim" posts appear. I read them, and it sparks my interest.

But usually, whats missing is part 2, which goes: "... and this is why it was so totally worth it". An no, just because it works over SSH and is installed on every server is not quite sufficient.

Also, are you programming in a script language or a .NET or JVM behemoth?

Re: Two Simple Steps Helped Me Learn Vim

#40
post #29

I have been meaning to learn Vim for a while but everytime I was trying I ended up being overwhelmed by the number of command (and also frankly, the weird syntax of .vimrc). I finally took a step by step approach and started with a very minimal .vimrc and worked my way up from there, solving real problems I ran into. I think the key is to choose your battle. Also this helped me understand the core concepts of how Vim…

One thing to remember about your .vimrc file is that it's just a list of commands. What's the command to expand tabs? :set et. And the corresponding .vimrc setting? set et.

One fun thing to do to a friend is echo q >> ~/.vimrc.

Post reply on HN