Live data from Hacker News

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

slashusr.wordpress.com

51–60 of 66 posts

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

#51
post #48

I used emacs for a while, but fairly recently I switched to vim for one simple reason: opening speed. Emacs always takes a while to launch, but no matter how many plugins and whatnot I install in Vim it always launches instantly. And that, to me, is worth learning a new editor.

Launch it in server mode at startup then use emacsclient: http://www.emacswiki.org/emacs/EmacsClient

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

#52
post #44

I went the other way around. I was a long-time Vim user (around 10 years or so) and switched to Emacs in order to use Lisp + Slime in order to win an argument about Lisp. What's important is that I lost that argument, like Lisp, and use Emacs as my primary editor now. However, the Vim keybindings are still etched upon my soul so I still find myself popping it open for quick-and-dirty edits. They're both good editors…

I'm also an Emacs user, but I've been curious about Vi. Have you tried using Viper? As somebody with experience in both, do you think it's something worth trying?

I'm not going to bother asking why Vim/Vi is interesting to you, but in answer to your question: No.

I immediately went for the Viper-mode Vi emulation and it's not good. Go whole-hog. Just dive into the deep end and start swimming.

The reason for that is that the emulation layer lives in a limbo that is half-emacs-half-vi. The modes don't work the same way. And I'd be wary of falling back on Emacs instead of learning the Vi way.

If you really want to try to transition to a new editor, I would open up a fresh install of Vim and start with the in-editor tutorial.

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

#53
post #50

Earlier quoted context omitted.

There's a great deal of power in '.', which repeats the last command. So if you have to do something 12 times, your steps could look something like this; - Run the command once - Think "Hmm, looks like I have to do this about ten more times" - Type '10.', repeating the last command 10 times - See that there's only one left to do, since you guessed 10 and it was 11 - Press '.' one more time to do the last one You won'…

Actually, 10. doesn't necessarily repeat the last command 10 times, it just runs it again with an argument of 10. For example ">>10." will indent the current line and then indent it and the following 9 lines. I still haven't found an easy way to indent a line N times without pressing ">" 2N times...

Activate visual mode first. In visual mode, the argument is used for the number of indents (because the lines to indent are selected visually). So to indent the current line 4 times, type: "V4>". Happy vimming! :)

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

#54

These "I've used vim/emacs and decided to try switching..." articles always leave me cold. I mean, both are insanely powerful editors. It's not as if there is something one can do that the other cannot, and if there is, it's doubtful that a user would want to -- for example, I don't think vim has a built in email client, but the vim users I've talked to laugh at the idea of an email client in their editor. As a resul…

While I generally agree with your sentiment, I will say that I use http://danielchoi.com/software/vmail.html Vmail (vim-gmail) daily and quite like it. Some of us don't mind Vim throwing in the proverbial kitchen sink :)

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

#55

Earlier quoted context omitted.

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…

I'd honestly go so far as to say that people who feel they must stay in Insert Mode most of the time should not be using Vim. They're not using Vim; they're pounding a square peg into a circular hole. They should stop pretending that they're using Vim.

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

#57
I've been a vim user for about 10 years now. I've recently started using emacs for lisp/SLIME dev. The number one feature I miss when I'm in emacs land is vim's "i" and "a" commands.

di" deletes everything between the double quotes. da" deletes everything between including the double quotes themselves

It works with other matching pairs as well (ie di(, di[ di'). I use it constantly. I've searched and search, and have not been able to find an emacs equivalent.

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

#58

Does anyone here use Dvorak + Vim? I've wanted to try out Vim really bad but not sure if the key bindings will make sense to my Dvorak fingers.

I used it without any problems for a number of years. Once the keystrokes make it into your muscle memory, you're off to the races.

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

#59
post #58

Does anyone here use Dvorak + Vim? I've wanted to try out Vim really bad but not sure if the key bindings will make sense to my Dvorak fingers.

I used it without any problems for a number of years. Once the keystrokes make it into your muscle memory, you're off to the races.

Seconded. The direction keys (j, l, I think, and I forget which the other two were; I just kept the mapping from movement-of-fingers to movement-of-cursor) may not be as intuitive as they are in qwerty, but after a short while you just ingrain them in your muscle memory and it doesn't matter anymore.

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

#60
post #36

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 d…

Your understanding is very much flawed. (FYI, Emacs has been my primary editor for 5 years and Vim has been my over-ssh editor for 6) Your guitar analogy is more applicable not between Emacs and Vim but between something like pico/nano and vim/emacs. It's hard to find a good analogy between Emacs and Vim because they are both awesome editors for many different reasons. Emacs (due to its LISP origins) is highly config…

You're acting like I've never heard of either Emacs or Vim before, and you shouldn't do that. The net effect is to make HN less fun and less useful for everyone.

Because the next time I think about starting a conversation on, say, similarities and differences between successful, competing software packages and the cognitive models they encourage...

I'll remember that this time, when I tried to keep my opening post friendly, informal, and solicitous, you assumed I was an idiot.

I'll be sure not to make jokes when I think someone else is getting too uptight, because jokes are emotional and text editors are serious business.

And most importantly, next time I'll establish my credentials up front, by prepending everything in my .emacs.d to all my posts. It's a little verbose, but it means nobody gets insulted by being mistaken for a n00b.

Plus, in Conkeror, it's really easy to write a regex that will detect 30,000 lines of custom elisp and set it to {display:none;}.

Post reply on HN