4 ms·
I would contest the assertion that emacs is powerful enough to emulate vi. Every attempt I've seen so far has been a superficial effort that enables some keyst
by kemiller 15y ago
I would contest the assertion that emacs is powerful enough to emulate vi. Every attempt I've seen so far has been a superficial effort that enables some keystrokes but doesn't really get at the heart of what makes vi(m) what it is. I was actually a full-time emacs user for several years. There was a lot I liked: lisp, programmability in general, readable-if-verbose-identifiers. But I went back to vim because it offered enough programmability (I had been using plain vi before!) to suit my needs, but it had the addictive center of the vi experience. That is:
* The action + (motion | text object) system. I haven't tried evil yet, but viper and vimpulse just don't seem to get this right. It's there but it's incomplete, which kinda kills it for an experienced user. More importantly, though, it's broken. Text objects aren't real, atomic elements at the deepest level -- they're simulated programmatically, which means the illusion breaks down if there are errors in the middle. It also means there are things which vi gets for free in all circumstances that the emulator has to laboriously simulate each time -- like atomic undo. Of course, you CAN do all the programming (hasn't happened yet) but all of that circumlocution has a cost, which is...
* Performance. I was shocked, when I tried out vimpulse on a relatively modern machine several months ago, 15 years after I last used emacs regularly, to find that emacs still feels like a movie with the framerate set too low. It's especially noticeable when, courtesy of viper and vimpulse, you can compare commands somewhat apples to apples. There's just this little delay. It might be milliseconds, but when it's something you're doing all day every day, that really starts to annoy.
So, no. I don't think emacs CAN emulate vi, if you actually consider what most vi users value in their editor. At best, it reaches the level of, say, eclipse emulating emacs movement keys. I would love an editor with vi speed and the movement model, but a sane programming environment. I'm still waiting.
(Sublime text 2 seems like it might be heading there, though for now its vi mode is not much better than vimpulse.)