Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

101–110 of 218 posts

Re: Vim users: stop using hjkl

#101
I see too many love-hate comments in here, I realize now that people can be really fanatical about their preferences for editors.

For what is worth, I use vim and visual studio in daily basis, and love both. I love vim experience over a console and the fact that I can code in a remote machine without any perceptive latency.

I love visual studio goodies (mostly intellisense) and being a keyword guy I just learnt VS shortcuts.

So, Is there something wrong with me? for me those are just tools not religions.

Edit/PS: I know am comparing an IDE and a editor, but in this case I think the analogy is valid

Re: Vim users: stop using hjkl

#102
post #78
post #61

Earlier quoted context omitted.

> 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. Young programmers should be made aware that there are now programming editors that do away with the need to think of…

Not sure if just trolling, but if not it seems you're not very experienced yet in the use of the tools of the trade of the professional programmer. The point of using the vi interface is nowadays (and yes I know about the original reasons of the modal workings of vi...) that moving your fingers off the home row takes too much effort, let alone having to move your hand to the mouse. It's easier to drive an automatic,…

> Not sure if just trolling, but if not it seems you're not very experienced yet in the use of the tools of the trade of the professional programmer. [emphasis added]

Guess again -- I wrote Apple Writer in the late 1970s (http://en.wikipedia.org/wiki/Apple_Writer). One of my goals was to eliminate the modes that plagued contemporary editors and attract people interested in ease of use and efficiency. Apple Writer became a best-seller because (among other things) its competition, most derived from vi, required users to switch modes.

And I can't believe I'm having this conversation over 30 years later, still trying to get people to choose more efficient tools.

> ... you're not very experienced yet ...

It's likely that I was programming -- and publishing my programs -- before you were born:

http://arachnoid.com/programmable_calculators

Re: Vim users: stop using hjkl

#103
post #51
post #38

Earlier quoted context omitted.

Oooh. I'd love to hear those many more efficient options!

> I'd love to hear those many more efficient options! This may come as a surprise, but modern programming editors don't require the operator to switch between three mutually exclusive modes -- insert, delete and navigate. That's because modern keyboards have keys dedicated to those purposes, which means the operator doesn't have to either wonder which mode he is in, or switch modes, which saves an enormous amount of…

But Vim's not just hjkl. And all those new keys don't exactly help me get stuff done faster.

Sure those F-keys can be useful. If I'd like to change the screen brightness or skip to next song. Pause/Home/Insert/Print... Half of the time they don't do anything the other half they don't do anything useful. And then there are a bunch of keys that toggle a light and change the behaviour of keys to annoy everyone. Because switching the num block from one duplicated set of functionalities to another greatly increases the available keys!

No wonder 'modern' editors use so many shortcuts. There are simply far more useful functions to perform than keys. Most newer editors go the emacs way and make you press a bunch of modifier keys. Vim makes you go through modes. I prefer to hit easy to reach keys multiple times, but to each his own.

Re: Vim users: stop using hjkl

#104
post #77

Earlier quoted context omitted.

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.

> I would really like to know what options are there that are more efficient than VIM for text editing... In answer, I have to say that nearly every other text editor that exists is more efficient than vi/vim. Modern editors are mode-free, meaning (don't faint) you don't have to change modes to insert, delete and navigate. These editors don't need "cheat sheets" to help you figure out how to switch modes and navigate…

First, I don't know vi. Well, I am aware that something like this exists, because I see "{not in vi}" everywhere in VIM docs. So maybe you should familiarize yourself with VIM before talking about it - for example I noticed that you wrote that "[in modern editors] there is no need to wonder in what mode you are" as if it was a problem in VIM. It's true for vi, but VIM has a mode indicator on a status bar since times immemorial.

Second, in VIM there are three modes, that's true, but not the ones you enumerate. There is: insert mode, normal mode and visual mode. All modern editors have at least the last one: the editor (all of them) behaves differently when you have some text selected.

Third, in VIM you can freely delete and navigate (with arrows!) in insert mode. No problem at all. Even things like ctrl+left for to skip a word backwards work.

Fourth, sheer amount of commands and functions makes the cheatsheets you mention valuable, they are not needed because the functions are so weird, they are needed because there is so many of them. I saw cheatsheets for Word and Photoshop too. You could argue that paint is better than photoshop because you don't need a cheatsheet to use it, but I doubt you'd want to do that. It's the same for editors: you don't need a cheatsheet for notepad...

Fifth, VIM evolved to the point that it is effectively a platform for building text processing apps, similar to Emacs. There's VIMScript and Python, Ruby and Lua support. With this there is practically no limit to what you can make VIM do for you.

To summarize: you seem to mistake VIM for vi; please take a closer look at modern VIM and then come back with a critique that makes sense in 2013.

Re: Vim users: stop using hjkl

#106
post #78

Earlier quoted context omitted.

Not sure if just trolling, but if not it seems you're not very experienced yet in the use of the tools of the trade of the professional programmer. The point of using the vi interface is nowadays (and yes I know about the original reasons of the modal workings of vi...) that moving your fingers off the home row takes too much effort, let alone having to move your hand to the mouse. It's easier to drive an automatic,…

My problem is that this power doesn't motivate me. Do I want to make lots of changes rapidly? No. Further: THAT WOULD BE BAD. I want to make concise changes based on sober reflection. Do I want a convenient browsing mechanism that stays minimal while I internalise the code I'm reading? Yes. I get the _why_ of vim, but the obsession over mashing keys as fast as you can seems like a bad smell in terms of developer atti…

> My problem is that this power doesn't motivate me. Do I want to make lots of changes rapidly? No. Further: THAT WOULD BE BAD.

This is the best argument yet in favor of vi/vim -- it keeps you from doing things quickly that you would later regret.

> ... the obsession over mashing keys as fast as you can seems like a bad smell in terms of developer attitude.

Unfortunately, that's not an argument in favor of increasing the number of pointless keystrokes.

Re: Vim users: stop using hjkl

#107

Oh please, not vim again. Now you are not even supposed to use the already ridiculous hjkl mappings. It's really amazing to me to see this sub-culture attach itself to an editor that was designed as it is BECAUSE THE AUTHORS DID NOT HAVE KEYBOARDS WITH MORE KEYS ON THEM! "hjkl is faster than reaching for the cursor keys". Holy frigging crap! Really? You are so good as a developer that MILLISECONDS make a difference?…

hahahahahah. I use vim. It probably takes me a good deal longer to get anything done in it. I do it cuz I like the challenge. And I am not particularly pressed for time. Also it's just faster when do you know what the eff you're doing ;)

Re: Vim users: stop using hjkl

#108
the F,f,t,T commands really changed my life.

However, after using vim for a long time, I still use the arrows! Not all the time, but a lot. I find that my fingers are always darting around on the margins using $ an ^ and ~ and ... my argument is what's wrong with traveling a little to get to those equally distant arrow keys? I don't really consider the hjkl to be my home position for my hands much. Thumb on space bar is home, if I had to define it.

Re: Vim users: stop using hjkl

#109
post #93

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.

I use vim for some things (mainly script and minor XML editing) and IDEs for other things. I would never attempt to develop a big C, Java or even Ruby (after trying RubyMine) system in. Stuff that refactoring, finding usage-of and looking at call-hierarchy are some of the things that are either only done in a 'patchy' way or non-existent in Vim.

Try using IdeaVim plugin with RubyMine. It's a real gem.

Re: Vim users: stop using hjkl

#110
Another inefficient command that I use way too much is "x".

Using those keys once or twice is, of course, perfectly fine. One could set up some mechanism that limits the number of repetitions in a row.

Post reply on HN