4 ms·
I've just recently switched to using Emacs with Evil (A Vim mode for emacs). That's just simply awesome.
by phzbOx 15y ago
I've just recently switched to using Emacs with Evil (A Vim mode for emacs). That's just simply awesome.
- davidw 15y agoEmacs is powerful enough to emulate vi. Is the contrary true as well?
- ConstantineXVI 15y agoThere is a lisp written in VimL[1], so it's theoretically possible. Practical, probably not. But possible. The long-running "emacs is a great OS without a text editor" jab is partly true; Emacs is best described as a Lisp environment that happens to be built around a text editor. [1] http://www.vim.org/scripts/script.php?script_id=1986 http://www.vim.org/scripts/script.php?script_id=1986
- rcfox 15y agoEmacs isn't 100% Lisp, there's also C code at the lower levels.
- davidw 15y agoI think that doing a usability study on both of them would reveal that the usability people would run shrieking from the building once the basics were explained to them. On one hand, you peck at the esc button like a hungry chicken to do anything useful, with the other, your hands play twister on the keyboard "pinky.... CTRL... thumb... ALT... index finger... S". That said, I've never been even remotely tempted to move to anything besides Emacs, and at this point, it's ingrained in my fingers, so non-Emacs things really piss me off.
- rcfox 15y ago> so non-Emacs things really piss me off I'm just glad that C-x doesn't quit most applications while I'm trying to save.
- prakashk 15y agoAs someone who accidentally closed many, many firefox tabs by pressing C-w, especially when I am writing in a textbox which is even more annoying, I can't imagine the havoc it would wreak if C-x were to quit apps. I know there are alternatives like It's All Text extension [1] which lets me hook emacs into Firefox, but it's not been updated for recent versions of Firefox. [1] https://addons.mozilla.org/en-US/firefox/addon/its-all-text/ https://addons.mozilla.org/en-US/firefox/addon/its-all-text/
- phzbOx 15y ago(I'm somewhat replying to the next message but HN didn't let me reply to it) There's conkeror that use the same renderer engine of Firefox but with emacs mentality of keybindings and customisability. Also, I've read that some people like to rebind their ctrl+W to something else so they don't have the habit to close their windows in other os/apps. IIRC, C-w is kill-region? Personally, as stated earlier, I use evil so I don't have that problem (I press d to delete the selected region).
- huahaiy 15y agoThat usability study has already been done in 1980s and published in CHI, the conclusion is that vi is a better text editor than emacs.
- Symmetry 15y agoNot really, due to some design choices in Vim. http://upsilon.cc/~zack/blog/posts/2008/11/from_Vim_to_Emacs_-_part_2/ http://upsilon.cc/~zack/blog/posts/2008/11/from_Vim_to_Emacs...
- phzbOx 15y agoThe philosophy is very different. Emacs is really a lisp repl with a good API to manage windows. So, in a way, it's not an editor. I mean, you can use it to check your e-mail, chat on IRC.. or basically anything that can be interacted through a window (I.e. mostly anything) Also, mostly everything is a command in Emacs.. So, when you press "a" it basically translate to "call the function insert-character 'a'". So, in a way, Emacs keybinding are really just a little api over the real commands. In vim, it's a totally different philosophy. Everything is based on making the editor as efficient as possible. Yes you can hack stuff and go on IRC with Vim but conceptually, it's not what it's been designed for and you'll likely hit lots of problems down the road and will have to use all kinds of hack. So, is putting emacs in Vim possible? Vimscript, even thought being an abomination (my opinion), could implement elisp.. with all the necessary wrapper. So, maybe that'd be possible.. but rather useless. Finally, my personal opinion.. with Vim, I really felt like "tweaking/hacking" it when I tried to customize it. For instance, I'd try lots of different mapping/paste things found on internet and hope it'd work. Sometime it'd fail for obscure reasons.. and you'd add another hack on top of the hack to fix it. On the other hand, in Emacs, I feel like I'm really coding my editor as I want it. I'm not surprised by its behavior or its interface. I.e. You can bind an event to call a function when a buffer opens. If you know a little bit of lisp, you'll feel right at home. And if not, there's no better way to get started with that fabulous language.
- kemiller 15y agoI 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.)
- almost 15y agoAre you finding Evil to be an improvement over Vimpulse at the moment? I tried Evil and it seemed to do some weird things with the point...
- phzbOx 15y agoEvil is the most recent 'vim-mode' for Emacs.. I'm sure there're still few bugs in it but as far as I can see, it's really good. The nice thing is how easy it is to configure/change the default behaviors and also how fast the mainteners/implementers answer your question. Also, I think it's important to point out that these mode try to "integrate" as best as they can with Emacs. So, it's not Vim in Emacs, but more, Emacs with Vim' best features and keybinding. (Arguably the best feature of vim). For instance, evil for emacs is a little bit like clojure for Java. I.e. it's a totally different beast but doesn't force you to make dozen of wrappers.. you simply use both at the same time.
- exDM69 15y agoPlease tell more. I tried Emacs with the Viper vi emulation but it was less than spectacular. Eg. text objects were missing. I really really like Vi for doing text editing, but Vim's integrated tools are pretty crappy. The sorest point is definitely the lack of a decent debugger interface, but there are other tools I'd like to use too. Emacs is far superior when it comes to integrated tools. So I'm looking for a good Vi mode for Emacs, or rather, any sort of language agnostic IDE that has a decent Vi-like text editor mode.
- monk_the_dog 15y agoI use emacs with viper and vimpulse (http://www.emacswiki.org/emacs-es/vimpulse.el http://www.emacswiki.org/emacs-es/vimpulse.el) and I'm very happy. This setup does support text objects. I have not used evil, so I'm not sure how vimpulse compares with evil.
- phzbOx 15y agoEvil is the most recent 'vim mode' for Emacs. I've had a couple of problems.. submitted an issue of github and it was resolved in hours (if not minutes). (For instance, :<number> was missing to go to a line.. fixed in minutes. I wanted jk to behave like <esc> in insert mode, I've been redirected to a post explaining how to do it, etc.) The great thing about evil (and other vim-mode) is how it is easy to customize it as you wish. IMO, it's even easier to hack than with vimscript. For instance, I rarely use shift+j in normal mode and decided to use it to go go 4 lines down.. same for K and I want it to work in visual mode. Here's how I did it with evil: (define-key evil-normal-state-map "J" "jjjj") (define-key evil-normal-state-map "K" "kkkk") (define-key evil-visual-state-map "K" "kkkk") (define-key evil-visual-state-map "J" "jjjj") (define-key evil-normal-state-map "0" "^") So basically, I find it pretty cool that I can customize how I want my vim-mode to behave. And obviously, from vim-mode I can call any normal elisp functions. It's impossible to find an editor that'd fit exactly your need without you customize it because that's how we are.. everyone using Emacs or Vim use it because they want to have their own personal editor with their own function/binding. However, Emacs with Evil was what I was seeking for a couple of years. I wish I could have made the switch sooner.
- 15y ago