Live data from Hacker News

Why I can’t stop using Vim

kornerstoane.com

91–100 of 169 posts

Re: Why I can’t stop using Vim

#91
post #34

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

Its reason for existence is historical, but it persists because it is useful. "Normal mode" (the most common mode other than insert mode) uses key bindings that wouldn't be possible in insert mode, rather than using the ctrl/alt/etc. keys for binding. For example, hovering over a word and typing ciw (change-in-word) will delete the word and place you in insert mode. There is a nice grammar and logic to the default ke…

Efficiency trumps tradition in this istance. The reason for horse carriages is historical too and persists because it is useful but a horse carriage isn't as efficient as a car.

One measure of effectiveness would be: to count the number of keystrokes needed to do something in vi compared to other editors.

Re: Why I can’t stop using Vim

#92
post #39
post #34

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

If you have multiple modes you can basically reuse the entire keyboard for commands. That's one advantage that is impossible to achieve in non-modal editors. Ctrl-ing, Alt-ing, Shift-ing stuff just isn't the same, especially as those commands get more and more complex.

Esc-ping isn't the same either. What makes pressing a key (Escape) to enter a mode better than Ctrl, Alt, Shift to enter a mode?

It's also not true that it's impossible to make other editors work like vi. evil-mode in Emacs lets you work like vi.

Re: Why I can’t stop using Vim

#94

I use a text editor because using a text editor that you've mastered is pleasant. (I'm an Emacs user fwiw.) I think we should stop trying to rationalize this choice. Or rather, we should realize that we like text editors because we went through a long training and acquired complex skills which are fun to put in practice. Being a power user of Emacs or Vim is is satisfying, the same way mastering a video game is satis…

If that is so, why do people change text editors? (I agree with you, I just wonder this myself)

Re: Why I can’t stop using Vim

#95
post #78

Earlier quoted context omitted.

No way! I just tried it, it doesn't work :( That's too bad.

Are you on a mac and using the system default vim? If so, Apple cripples it to not be able to directly access the system clipboard -- use homebrew's vim or macvim instead.

No, I'm on Ubuntu, it just looks like this method doesn't work with terminal vim. Your sibling comment looks like it has a solution, though!

Re: Why I can’t stop using Vim

#96
post #34

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

Because as a programmer your time is dominated by editing rather than creating text, therefore it is more efficient for every key to default to direct access to an editing function.

That's too broad of a stroke on what a programmer does with text. It's not just about editing. It's also about (a) moving to the point where you want to edit, (b) moving to an other point right after you just finished editing. Switching between the two becomes harder when you always have to Escape, compared to having direct access to an arrow key.

And (c) about editing. Why type an extra character (i for insert) to let you insert? Why not just type to insert?

Re: Why I can’t stop using Vim

#97

I use a text editor because using a text editor that you've mastered is pleasant. (I'm an Emacs user fwiw.) I think we should stop trying to rationalize this choice. Or rather, we should realize that we like text editors because we went through a long training and acquired complex skills which are fun to put in practice. Being a power user of Emacs or Vim is is satisfying, the same way mastering a video game is satis…

Exactly. It's why I wrote the article. For me, using Vim brings with it a whole general feeling of comfort, which probably includes those early days hacking away on the Xenix box with family close by and Mario dinging in up the hallway. Weird, I know. But whenever I come back to Vim after straying for any amount of time, I just feel happy. Probably because I can do everything I want to do in the text without having t…

I get the same feeling. It's usually accompanied by the similar feeling I get when I drop back into a linux terminal after having spent eight or nine hours at work on .net. I just sort of automatically relax and feel good, heh.

It's like the nostalgia I get when the seasons change, and for a few days I can feel my childhood.

Re: Why I can’t stop using Vim

#99
post #12
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.

It sounds like you're assuming that the default is insert mode. If you're in insert mode the majority of the time you're not really using vim correctly.

Or you're typing out a stream-of-consciousness thing. In which case you may be using vim correctly, but vim isn't buying you much.

Re: Why I can’t stop using Vim

#100
post #40
post #34

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

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.

Post reply on HN