News for hackers. Stuff that matters.
Re:Two Simple Steps Helped Me Learn Vim by alfiedotwtf on Wednesday December 10, 2014 @07:23AM (#8728803)
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,;]
Re:Two Simple Steps Helped Me Learn Vim by beaumartinez on Wednesday December 10, 2014 @08:06AM (#8728928)
Good tips. Getting in the habit of explicitly searching (/) instead of scrolling is another one.

On the subject of using fFtT (and other motions), there's a plugin I quite like that works well with my mental model of that motion—I often don't want to go to the first instance of that character, but the second or third in that line. EasyMotion[1] lets you do that.

[1] https://github.com/Lokaltog/vim-easymotion

Re:Two Simple Steps Helped Me Learn Vim by tomjakubowski on Wednesday December 10, 2014 @08:52AM (#8729118)

  > - 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 by mmahemoff on Wednesday December 10, 2014 @09:07AM (#8729170)

  - 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 by IE6 on Wednesday December 10, 2014 @10:56AM (#8729807)
Agreed - I use vim heavily and also use arrow keys (when I can) and when they do not work for whatever reason i fall back to HJKL.

For me my main blocker was just purely not being able to use it for the absolute basic operations. I found that once I learned how to do the absolute basic (insert, copy, paste, move around, search, etc.) I was able to use vim. The next step was building my own vimrc with some very basic configurations that made vim much easier to use. Then whenever I need or want to do something complicated I just google for the command, plugin, or write my own plugin.

Re:Two Simple Steps Helped Me Learn Vim by raverbashing on Wednesday December 10, 2014 @09:23AM (#8729246)
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 by delongshot on Wednesday December 10, 2014 @07:37AM (#8728843)
Good tips! You just reminded me that I did both of those first two at first as well. Arrows especially. But those last two are good too! I'll have to add them into my workflow.
Re:Two Simple Steps Helped Me Learn Vim by Supermighty on Wednesday December 10, 2014 @09:35AM (#8729297)
I think disabling the arrow keys is a mistake for someone just coming to vim. The arrow keys can act as a warm blanket of familiarity while learning the harsh winter of vim. When a noob is making mistakes and getting frustrated having the arrow keys work like normal is a comforting reprieve.

Once someone has a couple of months of vim under their belt then would I recommend disabling the arrow keys.

Re:Two Simple Steps Helped Me Learn Vim by madeofpalk on Wednesday December 10, 2014 @08:01AM (#8728913)
Why would you want to disable arrow keys?
Re:Two Simple Steps Helped Me Learn Vim by beaumartinez on Wednesday December 10, 2014 @08:08AM (#8728934)
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.

Re:Two Simple Steps Helped Me Learn Vim by AlexeyBrin on Wednesday December 10, 2014 @09:06AM (#8729166)
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 by Morgawr on Wednesday December 10, 2014 @10:40AM (#8729694)
I started seriously using vim around the time I started coding on the go with a very old eeePC (the first model, the absurdly small one). This was around 5-6 years ago probably. Back then I had already used vim before but only as a "normal" text editor, just go into insert mode and move around with arrows.

I was forced to use vim because that old piece of crap PC (I still love it though) wasn't powerful enough to run anything, really, and the screen was super small. I noticed using arrows key was super uncomfortable because yes, they were closer to the actual home row but they were also smaller, clunkier and harder to press. So I decided to force myself to use hjkl and disable arrow keys. It was definitely one of the best decisions of my (coding) life. Just comfortably resting your hands on the home row (either laptop keyboard or normal one) simply makes your typing more relaxed and after the couple of weeks (months?) struggling with left/right (up and down was fairly easy) you really stop noticing it.

Funnily enough, I re-enabled arrow keys a year or so ago and I haven't really felt the temptation to use them anymore.

DISCLAIMER: This turned me into a super slow and awkward typist when I am trying to work on text in an editor that does not support vim mode (like google docs for example). I have several documents around with jjjkkjhjjhjjllljh unfortunately.

Re:Two Simple Steps Helped Me Learn Vim by Syssiphus on Wednesday December 10, 2014 @08:48AM (#8729091)
It's not so much about speed. It's about comfort.
Re:Two Simple Steps Helped Me Learn Vim by throw_away on Wednesday December 10, 2014 @02:49PM (#8731257)
I would argue that it's best to disable arrow keys in insert mode only. This is the real problem here. By using arrow keys in insert mode, the novice ends up using vim just like a glorified notepad, and never truly understanding the different modes. Since they aren't ever going back to command mode, they never consider using more advanced movement operators, and then they never realize the power of composing motions and commands.

Whenever I start teaching someone vim, I always add this to their .vimrc:

    inoremap <Left> <nop>
    inoremap <Right> <nop>
    inoremap <Up> <nop>
    inoremap <Down> <nop>
This way, arrows still work as expected in command mode, but not in insert mode. The novice will learn to only insert in insert mode, and move and operate in command mode.