Live data from Hacker News

Vim - Putting arrows to use

codingfearlessly.com

21–30 of 42 posts

Re: Vim - Putting arrows to use

#21
post #15

It's a nice idea, but I don't buy it. What I like most about vim is how few unnecesary moves I make with my hands - in particular my wrists stay in the same place all the time; reaching for arrows would require moving the whole forearm, which I don't like and which breaks my flow. Also I'm curious about this quote from OP: I just might remap hjkl to split navigation, because I use hjkl less and less, favoring navigat…

I got used to better ways to navigate in Vim - RegEx pointed out quite a few of them - http://news.ycombinator.com/item?id=4414502. I would especially emphasize f,F,t,T and w,W,b,B,e,E.

Re: Vim - Putting arrows to use

#22
post #20
post #18

I believe many VIM users overestimate the importance of using h,j,k,l in comparison to numeric modifiers. Holding down j to scroll down the page is no more "right" than holding down the down arrow, in my opinion. The following made me considerably faster: * Relative Line numbering (For Vim 7.3). G/gg stop being convenient for frequent line movement once your file goes beyond 100 lines. Doing math in your head to figu…

zz is nice. but i hardly need it with set scrolloff=5 with which i always have 5 lines context below and above the cursor.

I had tried scrolloff=1000 for middle scrolling. I liked it for a while, but got a little tired of the jumpy-ness. I'll give 5 a go.

Re: Vim - Putting arrows to use

#23
post #18

I believe many VIM users overestimate the importance of using h,j,k,l in comparison to numeric modifiers. Holding down j to scroll down the page is no more "right" than holding down the down arrow, in my opinion. The following made me considerably faster: * Relative Line numbering (For Vim 7.3). G/gg stop being convenient for frequent line movement once your file goes beyond 100 lines. Doing math in your head to figu…

Even better, just learn to use EasyMotion, it's one of the most efficient ways of navigating around a file:

https://github.com/Lokaltog/vim-easymotion

Re: Vim - Putting arrows to use

#24
post #23
post #18

I believe many VIM users overestimate the importance of using h,j,k,l in comparison to numeric modifiers. Holding down j to scroll down the page is no more "right" than holding down the down arrow, in my opinion. The following made me considerably faster: * Relative Line numbering (For Vim 7.3). G/gg stop being convenient for frequent line movement once your file goes beyond 100 lines. Doing math in your head to figu…

Even better, just learn to use EasyMotion, it's one of the most efficient ways of navigating around a file: https://github.com/Lokaltog/vim-easymotion

I've tried it and didn't like it at all.

The main problem is how it replaces the letter I'm searching with another unrelated one, making all the matches practically unreadable. To me, at least.

    set incsearch
and

    /foo
    ?bar
are more than enough for my needs.

Re: Vim - Putting arrows to use

#25
post #22
post #20

Earlier quoted context omitted.

zz is nice. but i hardly need it with set scrolloff=5 with which i always have 5 lines context below and above the cursor.

I had tried scrolloff=1000 for middle scrolling. I liked it for a while, but got a little tired of the jumpy-ness. I'll give 5 a go.

Same experience here. I have set it to 4 since one year: it's perfect.

Re: Vim - Putting arrows to use

#26

I use arrow keys for movement all the time. Not always, but I found no value in forcing myself otherwise.

You do use hjkl and the others, right? As long as you do, we're good here. But if not, you need to block the arrow keys and use vim the 'right way'. I assume what you must mean is that you are using these in insert mode. Simply don't. Drop out of insert mode for navigation concerns and let vim handle the heavy movement work.

Vim allows us to use arrows so using the arrows is "right".

Re: Vim - Putting arrows to use

#27
My issue has always been one of muscle memory.

The hjkl keys are fine to use when in Vim, but the majority of other products (browsers, word processors, spreadsheets, etc) don't support them for movement. So I have a constant context-switch in my muscle memory when moving between these different applications.

On a Mac keyboard, I find arrow-key navigation with my pinky finger very efficient… only requiring the rest of my fingers to move from the home row when pressing right.

I'm not sure this would work for everyone… but for me, one set of muscle memory is superior to convincing my nervous system to context-switch.

Post reply on HN