Live data from Hacker News

Vim - Putting arrows to use

codingfearlessly.com

1–10 of 42 posts

Re: Vim - Putting arrows to use

#3
Cool idea. I read an article here a couple months ago about vim autocomplete and I mapped my tab key to autocomplete, but that was super annoying for, you know, adding indentation.

Now I've got my arrow keys mapped to Nop in all modes except I mapped my right key to autocomplete in insert mode, which has worked pretty well for the last 10 minutes. I'd really like to start using autocomplete more, so for me it's handier than text moving.

Re: Vim - Putting arrows to use

#5

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.

Re: Vim - Putting arrows to use

#6
post #3

Cool idea. I read an article here a couple months ago about vim autocomplete and I mapped my tab key to autocomplete, but that was super annoying for, you know, adding indentation. Now I've got my arrow keys mapped to Nop in all modes except I mapped my right key to autocomplete in insert mode, which has worked pretty well for the last 10 minutes. I'd really like to start using autocomplete more, so for me it's handi…

Check this[0] out. Autocomplete when typing words, indentation otherwise.

[0]: https://gist.github.com/3418565

Re: Vim - Putting arrows to use

#7
post #4

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

Interesting. How long have you been using Vim?

you did not ask me, but: when i'm busy thinking about the code, when i'm not typing for a long time, i lay back and browse the sourcecode with arrows and (up and down or pg-up and pg-down). not that fast, sure. but can be done with one hand, the other is scratching my head or what helps me think.

Re: Vim - Putting arrows to use

#8
post #7
post #4

Earlier quoted context omitted.

Interesting. How long have you been using Vim?

you did not ask me, but: when i'm busy thinking about the code, when i'm not typing for a long time, i lay back and browse the sourcecode with arrows and (up and down or pg-up and pg-down). not that fast, sure. but can be done with one hand, the other is scratching my head or what helps me think.

[deleted]

Re: Vim - Putting arrows to use

#9
post #7
post #4

Earlier quoted context omitted.

Interesting. How long have you been using Vim?

you did not ask me, but: when i'm busy thinking about the code, when i'm not typing for a long time, i lay back and browse the sourcecode with arrows and (up and down or pg-up and pg-down). not that fast, sure. but can be done with one hand, the other is scratching my head or what helps me think.

Page up and page down are part of my must-learn-asap shortcuts when learning a new editor - once you have hjkl and ctrl+f/ctrl+b ingrained, browsing code while keeping your hands mostly over the home row becomes a lot easier and you don't have to move your hands back and forth. I've found that if I want to browse my code with one hand, the scrollwheel on my mouse does the trick :)

Re: Vim - Putting arrows to use

#10
post #6
post #3

Cool idea. I read an article here a couple months ago about vim autocomplete and I mapped my tab key to autocomplete, but that was super annoying for, you know, adding indentation. Now I've got my arrow keys mapped to Nop in all modes except I mapped my right key to autocomplete in insert mode, which has worked pretty well for the last 10 minutes. I'd really like to start using autocomplete more, so for me it's handi…

Check this[0] out. Autocomplete when typing words, indentation otherwise. [0]: https://gist.github.com/3418565

thanks, that's a way better solution.
Post reply on HN