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.
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.
:map J jjjj
But I guess using existion elisp functions might be useful. (map J jjjj)I have not used evil, so I'm not sure how vimpulse compares with evil.
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.
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.
* 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.)
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.
I'm just glad that C-x doesn't quit most applications while I'm trying to save.
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/
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).