Live data from Hacker News

Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

slashusr.wordpress.com

11–20 of 66 posts

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#11
I noticed recently that you can use the ex commands in Emacs without converting the whole editor over to Viper. This is really the part of vi that I find attractive. Notes:

http://www.advogato.org/person/chalst/diary/277.html

That said, vim's command set is a superset of ex, and includes some nice things that the above misses.

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#12
post #9

I apologize in advance for this ode to Vim, but I feel I should get it off my chest. I admit, the main reason for me to develop in Vim these days is to simply minimize the number of keystrokes I have to press (and the number of times I have to reach for the mouse), because, due to RSI, I experience a mild, but constant, and noticeable discomfort in my wrists (...and triceps, and shoulder) whenever I type (I distinctl…

Another great addition is: http://vim.wikia.com/wiki/Avoid_the_escape_key Getting out of insert mode with a double j instead of moving your hand (esc) or doing the slightly awkward ctrl+[ is a godsend.

Another good alternative is to remap the infrequently used Caps-Lock key to Esc (what Emacs users remapped to Control for ages). http://c2.com/cgi/wiki?RemapCapsLock

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#13
post #9

I apologize in advance for this ode to Vim, but I feel I should get it off my chest. I admit, the main reason for me to develop in Vim these days is to simply minimize the number of keystrokes I have to press (and the number of times I have to reach for the mouse), because, due to RSI, I experience a mild, but constant, and noticeable discomfort in my wrists (...and triceps, and shoulder) whenever I type (I distinctl…

Another great addition is: http://vim.wikia.com/wiki/Avoid_the_escape_key Getting out of insert mode with a double j instead of moving your hand (esc) or doing the slightly awkward ctrl+[ is a godsend.

Actually, Ctrl-c is the fastest way to get back to normal mode. Unlike Ctrl-[ and , it does not check for abbreviations and does not trigger InsertLeave. And on most keyboards it's even easier to type.

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#14
post #10

Earlier quoted context omitted.

Pressing escape in Vim will put you back in command mode.

Yes, I know how to use the editor and use it moderately. I'm saying there's something fundamentally unlearnable about modes for me as I keep making mode related errors after years of using both emacs and vim.

I have the same trouble when I use unconfigured vim. It gets rather better when I give vim stronger visual clues as to which mode it is in, which I seem to remember for no more that 2 seconds otherwise.

The following scripts give the general idea of how to do this:

1. http://vim.wikia.com/wiki/Change_statusline_color_to_show_in...

2. http://www.vim.org/scripts/script.php?script_id=3165

Also, I gather than the Gnome Vim's colorscheme support allows you to affect the appearance of the whole window, not just the status line or whatever. I don't use it, though.

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#15
post #6

I just can't get vim's modes - I'm constantly unintentionally entering keystrokes in the wrong mode, especially when I'm concentrating on what I'm doing. Of course emacs also has annoying modes, e.g. if you change your mind half way through a key combination, you are stuck in a mode. Ctrl+G gets you out of it with the result that I'm constantly pressing Ctrl+G in emacs before I do anything to avoid the sting of keyst…

The solution to this is that when using Vim properly you're always in normal mode except for short bursts of typing. Don't hang around in insert mode. Need to think for a second about what to type next? Get out of insert mode, think, and then enter insert mode again.

The result of this is that "insert mode" stops being so much like a separate mode and starts feeling more like a command itself! It's the difference between:

    move over a word
    enter insert mode
    type "foo"
    exit insert mode
    move back a word
and

    move over a word
    insert the word "foo"
    move back a word

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#16
Aren't Emacs and Vim basically the same editor at this point?

There are some stylistic differences, which can be surprisingly subtle, like the differences between acoustic and electric guitar.

But pretty much every other editor these days wants to be an MP3 player.

Today's editor war is between (a.) technical people who expect to spend many hours a day manipulating text for the next few decades, and (b.) people who don't ever want to think about text editing because it seems low-level and boring.

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#17

I apologize in advance for this ode to Vim, but I feel I should get it off my chest. I admit, the main reason for me to develop in Vim these days is to simply minimize the number of keystrokes I have to press (and the number of times I have to reach for the mouse), because, due to RSI, I experience a mild, but constant, and noticeable discomfort in my wrists (...and triceps, and shoulder) whenever I type (I distinctl…

Then you'll love http://www.viemu.com/ .... There are so many good things to say about ViEmu that it's hard to know where to begin. I've been a happy ViEmu customer for about three years now. Best $99 I've ever spent, hands-down.

Maybe it will suffice to say: "VisualAssist + ViEmu = Someday I should record a video of me coding C++ in Visual Studio. In the last 4 days alone, I've written 8,700 lines of C++. No way could I have done that without my precious ViEmu / VAX templates / custom hotkeys. (It's rare to ever need to touch the mouse, which is pretty fabulous.)

At this point, I write systems as fast as I can think, not type.

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#18
post #6

I just can't get vim's modes - I'm constantly unintentionally entering keystrokes in the wrong mode, especially when I'm concentrating on what I'm doing. Of course emacs also has annoying modes, e.g. if you change your mind half way through a key combination, you are stuck in a mode. Ctrl+G gets you out of it with the result that I'm constantly pressing Ctrl+G in emacs before I do anything to avoid the sting of keyst…

The solution to this is that when using Vim properly you're always in normal mode except for short bursts of typing. Don't hang around in insert mode. Need to think for a second about what to type next? Get out of insert mode, think, and then enter insert mode again. The result of this is that "insert mode" stops being so much like a separate mode and starts feeling more like a command itself! It's the difference bet…

I totally agree with you for myself, but in order to make a more general point I'm going to have to to point out that people not destined to use vim as their primary editor can get away with doing the exact opposite. That is, they're almost always in insert mode and only briefly go to normal mode to change something.

The really important thing with any modal interface is that you have one primary mode which you only leave to accomplish a task and to which you return as soon as the task is done. Even emacs has modes in that you're sometimes, say, doing an incremental search. The important thing is that when you're done you're dropped back to the usual mode by default.

For more on the theory of modal interfaces, see here: http://www.osnews.com/story/18904/pt_V_Modes

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#19
post #9

Earlier quoted context omitted.

Another great addition is: http://vim.wikia.com/wiki/Avoid_the_escape_key Getting out of insert mode with a double j instead of moving your hand (esc) or doing the slightly awkward ctrl+[ is a godsend.

Actually, Ctrl-c is the fastest way to get back to normal mode. Unlike Ctrl-[ and , it does not check for abbreviations and does not trigger InsertLeave. And on most keyboards it's even easier to type.

Wow. Thanks! That is fantastic. great tip.

Re: Heretical Confessions of an Emacs Addict – Joy of the Vim Text Editor « /usr

#20

I apologize in advance for this ode to Vim, but I feel I should get it off my chest. I admit, the main reason for me to develop in Vim these days is to simply minimize the number of keystrokes I have to press (and the number of times I have to reach for the mouse), because, due to RSI, I experience a mild, but constant, and noticeable discomfort in my wrists (...and triceps, and shoulder) whenever I type (I distinctl…

VsVim is a free open source Visual Studio plugin that provides decent Vim bindings: http://visualstudiogallery.msdn.microsoft.com/59ca71b3-a4a3-...

It's not perfect, but in my opinion it is certainly the best free option available. I have never used ViEmu, so I can't compare it to that.

Post reply on HN