Live data from Hacker News

Why I can’t stop using Vim

kornerstoane.com

121–130 of 169 posts

Re: Why I can’t stop using Vim

#121
post #100
post #40

Earlier quoted context omitted.

Multiple modes allows the same keys to do different things in different modes, there isn't much more to it than that. Say, at a Bash shell prompt in a terminal window, pressing Ctrl+R starts "reverse command search" mode, so that pressing letter keys searches for commands entered in the past, rather than entering a new command. In this mode, up and down move through search results, rather than moving through the enti…

Why have a mode focused on navigation? Is there something this mode allows beyond navigating? What would be impossible to do if you didn't have this mode? The keyboard allows you to navigate too, without the need for a mode.

Keep in mind that a lot of the keyboard features we take for granted weren't always present on early terminals. Navigating is a lot harder if you don't have, say, arrow keys. In that case, a separate mode makes a lot of sense for getting around (no arrow keys? Just map hjkl to them in navigation mode). Plus the same command can do different things depending on mode, so there are less distinct patterns of keypresses to memorize. Yes, you could do everything as a series of chords (like in emacs), but I don't think it's necessarily superior.

Here's a list of some navigation mode commands. You can probably come up with reasonable ways to do them with only the keyboard & none of the alphanumeric or punctuation keys used alone, but would that be any easier? http://www.thegeekstuff.com/2009/03/8-essential-vim-editor-n...

Re: Why I can’t stop using Vim

#122
post #38

Earlier quoted context omitted.

In my opinion, other people's opinions about how I program are worth just about nothing. I'll never understand the sort of arrogance that leads to posting things like that. do you really believe you're so smart that you figured out the only way anyone should do anything?

Well, I wasn't trying to be arrogant.. sorry. But would you really take a programming class taught by a professor who doesn't know how to use a terminal?

Yes, absolutely. It'd be a little odd if they hadn't picked up that skill, but I don't see what relevance using or preferring vim could have to, say, teaching functional programming.

Re: Why I can’t stop using Vim

#123
> and ‘Esc’ to move around again.

For me personally this is the reason I stopped using Vi(m) except for occasional config file editing on unfamiliar servers, and started looking elsewhere (Emacs) for my goto text editor. I'm not looking to switch, but it genuinely interests me how Vi users put up with the constant need to strain their pinky to switch to command mode.

Re: Why I can’t stop using Vim

#124
post #104
post #4

"/ for searching (really, no other editor has made it this simple)" Well, it's really esc-/ which is no easier than ctrl-f. Or am I missing something? Edit: Same with "1G to go to the top of the file, G to go to the bottom" - esc-1-shift-g vs ctrl-home. Same with ctrl-end.

Why is Esc-/ easier than Ctrl-f (or Ctrl-s in Emacs)? Esc requires you twist your entire left hand sideways up to hit the Esc, whereas Ctrl requires you move only your left pinky to hit the Ctrl. Ctrl is more efficient.

Efficiency really depends upon the keyboard you're using. If you use a keyboard with thumb clusters, the control and meta keys are under your thumbs and you don't need to twist your pinkies at all.

Re: Why I can’t stop using Vim

#125
post #46

Earlier quoted context omitted.

"Anyone who doesn't have the same exact opinion as me isn't a real programmer." Is that correct?

If you join my team and tell me you're a programmer but when you sit down with a terminal you have no idea what to do, then you're off my team and I don't respect you as a programmer. Sorry if this offends you, but how can you consider your self a programmer when you don't know how to use a terminal?

I'd consider someone a programmer if they can program. Whatever their preferred workflow is, is completely irrelevant if they can deliver.

Re: Why I can’t stop using Vim

#126
post #123

> and ‘Esc’ to move around again. For me personally this is the reason I stopped using Vi(m) except for occasional config file editing on unfamiliar servers, and started looking elsewhere (Emacs) for my goto text editor. I'm not looking to switch, but it genuinely interests me how Vi users put up with the constant need to strain their pinky to switch to command mode.

You've got a couple of options here - I personally have remapped my Caps Lock key to escape (not many downsides, besides limiting my ability to post humorous trolling messages).

You can also use Ctrl-[ which I believe essentially sends an escape character to whatever program you happen to be running.

Both options should save your pinky!

Re: Why I can’t stop using Vim

#127
post #123

> and ‘Esc’ to move around again. For me personally this is the reason I stopped using Vi(m) except for occasional config file editing on unfamiliar servers, and started looking elsewhere (Emacs) for my goto text editor. I'm not looking to switch, but it genuinely interests me how Vi users put up with the constant need to strain their pinky to switch to command mode.

I've heard of people rebinding it to caps lock. It makes sense as long as you don't mind holding down shift for the occasional all-caps text.

Re: Why I can’t stop using Vim

#128
post #100
post #40

Earlier quoted context omitted.

Multiple modes allows the same keys to do different things in different modes, there isn't much more to it than that. Say, at a Bash shell prompt in a terminal window, pressing Ctrl+R starts "reverse command search" mode, so that pressing letter keys searches for commands entered in the past, rather than entering a new command. In this mode, up and down move through search results, rather than moving through the enti…

Why have a mode focused on navigation? Is there something this mode allows beyond navigating? What would be impossible to do if you didn't have this mode? The keyboard allows you to navigate too, without the need for a mode.

It's used for text manipulation, too - the advantage lies in the fact that the same navigation keys are used to operate on blocks of text. For example, move to the next close-parenthesis can become copy everything up to next close-parenthesis, move to the next blank line can become indent everything up until the next blank line, move to the end of the line can become delete everything up to the end of the line, etc.

(For the record - I think it was a legitimate question. Upvoted!)

Re: Why I can’t stop using Vim

#129
post #123

> and ‘Esc’ to move around again. For me personally this is the reason I stopped using Vi(m) except for occasional config file editing on unfamiliar servers, and started looking elsewhere (Emacs) for my goto text editor. I'm not looking to switch, but it genuinely interests me how Vi users put up with the constant need to strain their pinky to switch to command mode.

I remapped it to 'jk'. I don't think I've seen any vim users using 'esc' key to go to normal mode.

Re: Why I can’t stop using Vim

#130
post #34

What I never heard explained in one sentence about vi is: why have multiple modes? Why not zero modes instead?

I like to think of it this way:

Why should I have to hold down a modifier key for 5 minutes? Just make it toggle.

Take that to its logical extension and you get modes, and they are beautiful.

Post reply on HN