Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

41–50 of 218 posts

Re: Vim users: stop using hjkl

#41
Linkbait title alert. Please, please stop this crap. Article really says: n00b vim users, consider disabling hjkl while learning other movement commands.

What vim user does all their movement with hjkl only anyway? If you're going to deliberately cripple your editing habits like that, or if you're not even bother to learn other movement command at the same time as getting used to hjkl, you might as well stick to notepad.exe.

Re: Vim users: stop using hjkl

#42

One of the best (collection of) cheatsheets: http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial... The pdf version can be found here: http://www.glump.net/howto/vim_graphical_cheat_sheet

I never found the keymap cheat sheets useful. It tells me what happens if I press a certain key, but what I need is the reverse. Tell we what key to press if I want X to happen. When using a cheat sheet like that I waste a lot of time scouring the image looking for text relating to the type of operation I want. I'd rather have a list of options grouped by operation type.

It is organized by types of cheats. It's more of a tutorial that aims to familiarize you with available features comprehensively. Once you kind of get an idea of what options are available, lookup is a little easier.

This is definitely not the best cheatsheet for hanging above your computer, but more to be read as a tutorial. (Calling it a cheatsheet would be a stretch in this case.)

For your purposes (and what I do quite a bit anyway), google is the best cheatsheet.

Re: Vim users: stop using hjkl

#43

No advice on moving from line to line? Word and character movements are great (and well worth learning), but how do you suggest moving to just the next line without spamming `w`?

If you want to go to the same cursor position on the next line, definitely j is the way to go.

Much of the time, I want to go to a specific part of the next line. In which case, let's say I want to go to the parse function, I'll do "/par".

Re: Vim users: stop using hjkl

#44
post #2

> Moving your Vim cursor around using the arrow keys is a bad habit ... Yes, as is having a keyboard with more than 64 keys, a pointing device, software that allows character insertion, deletion and cursor motion all without changing modes, or any computer designed after 1980. We must all fight against this rising tide of convenience and efficiency by insisting that everyone use vim and its descendants.

This is so true. The basic error the article makes is equating number of keys typed with efficiency. Not all key presses are equal. When you navigate with letter searches you have to think much more than holding down an arrow key until you're at the point you want to be, or even better moving your mouse pointer. Fingers are quick, brains are slow. Especially when you are already using that brain at full capacity for the programming task itself.

I for one welcome touch screens for programming, which are even better than a mouse (touch screens are of course not a good replacement for a keyboard, they are however a good replacement for a mouse for many tasks).

Re: Vim users: stop using hjkl

#45
post #41

Linkbait title alert. Please, please stop this crap. Article really says: n00b vim users, consider disabling hjkl while learning other movement commands. What vim user does all their movement with hjkl only anyway? If you're going to deliberately cripple your editing habits like that, or if you're not even bother to learn other movement command at the same time as getting used to hjkl, you might as well stick to note…

>What vim user does all their movement with hjkl only anyway?

Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location.

Re: Vim users: stop using hjkl

#46

No advice on moving from line to line? Word and character movements are great (and well worth learning), but how do you suggest moving to just the next line without spamming `w`?

I use {} for moving paragraphs at a time. And HML for switching to top, middle or bottom of screen.

Re: Vim users: stop using hjkl

#47
post #24

Earlier quoted context omitted.

This comment is ridiculous. Being "anti-vim" is perfectly alright with me. I use vim because it's the fastest thing I've ever used by a very wide margin. I also respect others who find it too hard to learn or find they're more productive elsewhere. But a comment that essentially boils down to "vim is archaic" in a post about vim usage habits is totally ridiculous, so in the nicest way possible, get lost.

> But a comment that essentially boils down to "vim is archaic" in a post about vim usage habits is totally ridiculous ... And entirely topical. Young programmers who read such posts may not realize how many more efficient options are now available. Speaking about vim as though it's an obvious choice in 2013 would be like insisting that everyone code in Fortran in 2013.

I would really like to know what options are there that are more efficient than VIM for text editing...

And when talking about IDEs and code writing remember to include VIM plugins in comparison.

Re: Vim users: stop using hjkl

#48
post #30

No advice on moving from line to line? Word and character movements are great (and well worth learning), but how do you suggest moving to just the next line without spamming `w`?

For moving directly vertical: :nnoremap k gk :nnoremap j gj These move up/down one character, even if it is the same line wrapped over. Really beneficial for things like LaTeX editing.

I was going to say. Disabling hjkl makes moving between word wrapped lines impossible

Re: Vim users: stop using hjkl

#49
post #24

Earlier quoted context omitted.

This comment is ridiculous. Being "anti-vim" is perfectly alright with me. I use vim because it's the fastest thing I've ever used by a very wide margin. I also respect others who find it too hard to learn or find they're more productive elsewhere. But a comment that essentially boils down to "vim is archaic" in a post about vim usage habits is totally ridiculous, so in the nicest way possible, get lost.

> But a comment that essentially boils down to "vim is archaic" in a post about vim usage habits is totally ridiculous ... And entirely topical. Young programmers who read such posts may not realize how many more efficient options are now available. Speaking about vim as though it's an obvious choice in 2013 would be like insisting that everyone code in Fortran in 2013.

[deleted]
Post reply on HN