Live data from Hacker News

Two Simple Steps Helped Me Learn Vim

adamdelong.com

21–30 of 92 posts

Re: Two Simple Steps Helped Me Learn Vim

#21

Earlier quoted context omitted.

Why would you want to disable arrow keys?

To to keep your fingers on the home row, in order to have better access to all the other keys in your keyboard. Having your fingers on the arrow keys mean your hand has to travel that much further to type the other keys—making you slower.

It's not so much about speed. It's about comfort.

Re: Two Simple Steps Helped Me Learn Vim

#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 mean, both measured in lines and in number of projects. I'd like to think I've advanced to the point where I'm spending 95% of my time thinking and 5% of my time actually typing in code...being able to quickly grep and navigate through Sublime Text is definitely a vital asset, but I'm not sure how much vim will add to my overall efficiency.

Re: Two Simple Steps Helped Me Learn Vim

#23

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,;]

  > - force yourself to only move vertically using relative numbers
  > - force yourself to only move horizontally using [fF,;]
These tips doesn't strike me as helpful. The w, b, e et al. (word boundary); % (paired delimiters); /, ? (occurrence); ^, $ (begin/end of line); and text object motions are indispensable to a Vimmer, and I use them all far more than I use [fF,;]. / and ? are more useful to me than f/F because it's often easier and faster to include another character or two of unique context for a character than to count occurrences beforehand or tap ; a bunch of times and they also work across multiple lines.

I'm finally learning and remembering to use marks which are another great way to navigate a buffer or even several buffers at once.

Re: Two Simple Steps Helped Me Learn Vim

#25
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.

Re: Two Simple Steps Helped Me Learn Vim

#27

Earlier quoted context omitted.

Why would you want to disable arrow keys?

To to keep your fingers on the home row, in order to have better access to all the other keys in your keyboard. Having your fingers on the arrow keys mean your hand has to travel that much further to type the other keys—making you slower.

I've always wondered if the "disable the arrow key" advice given to every VIM novice makes any sense for the user of a 11" - 13" laptop. It was probably a good advice for a classical keyboard, but I find the arrow keys quite handy when I work on a small laptop keyboard.

Re: Two Simple Steps Helped Me Learn Vim

#28

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 keys can help you stay productive and keep using it for long enough until you cross over the productivity threshold (where you're more productive than on a normal editor, even though you still have a lot more learning to do).

Re: Two Simple Steps Helped Me Learn Vim

#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 operates: https://pragprog.com/book/dnvim/practical-vim

Re: Two Simple Steps Helped Me Learn Vim

#30

Vim is a huge editor but I don't think the subset of commands that are absolutely necessary to do any editing at all is difficult to memorise; from memory, these are the ones I started with: hjkl i Esc or ^[ :w :q :q! :wq

Also, if you want to learn hjkl you just have to play some NetHack ;)
Post reply on HN