This is the kind of reason I switched from vi/vim for code editing. There is so much available power and flexibility in emacs, and it really makes things fun.
I switched from VIM to emacs. While a lot of the nice things in emacs can eventually be backported into vim, I think the extensibility and apples all/most of the way down approach of emacs is superior. Even after using it for 6 years, I'm continually astounded by the things people do with it.
I've just discovered pabbrev-mode for js and ruby editing. It's off the hook.
Also once you've coded with a repl in an inferior shell buffer, you won't know how you ever did without it
While the extensibility of Emacs could be ported to vi, it isn't fitting with the culture/design. The best summary I've heard is that vi is an editor, Emacs is an environment. (I prefer vi as an editor, but use Emacs. Go figure.)
pabbrev rocks! The fact that you can just add that sort of functionality to Emacs is telling.
yeah, I think a lot of the frustration with the emacs editing experience comes down to its standard keybindings. While on a level they do make sense, there's far too much cruft and history in them. Having to type multiple keystrokes to do things like save files, switch buffers, split windows etc is pretty poor in this day and age. I used to use vimpulse until I discovered ergo-emacs. It provides a really good set of alt keybindings for the most common emacs commands. Makes using emacs so much nicer
I was a vim user and made the switch to Emacs. After finding out about Viper [1] I had to try it. If what you love about vim is the genius key bindings and modal editing, you don't really have anything to lose.
In that sense, you could say I never did switch to Emacs, since I never really got fluent in the default key bindings for basic editing in Emacs (always use the vim/Viper ones). So when I'm in an unfamiliar environment that doesn't have my personalizations, I still load up vi or vim before Emacs. :)
I tried viper, and even customized it to be more like vim, but still run into issues, e.g.:
* If I hit escape followed by <something> it often doesn't do what I want
* Various major modes lose the vi keybindings
This is actually a common overstatement of the benefits of Emacs. The beauty of vim besides the modal editing approach is its lightweight footprint. While Emacs may be able to replicate the keybindings and modes, it cannot match the file load times or memory usage of vim. The reason I continue to use vim is because I edit dozens of files a day. I am in and out of my editor 50 times a day, Emacs just can not and does not support this approach.
> I am in and out of my editor 50 times a day, Emacs just can not and does not support this approach.
This is true. I think the typical approach with Emacs is to leave 1 instance open for a long period of time and just keep coming back to it. (This is what I do, anyway.) I don't think this is any worse in general than opening and closing the editor as needed, it's just different. Especially when you consider that you can run terminals/shells within Emacs, it's a completely inside-out workflow. Instead of:
1. do a bunch of stuff at the terminal
2. need to edit a file
3. open my editor
Once you've gotten to step 2 you're already in your editor!
I guess it boils down to what you prefer using. Emacs is my shell, filebrowser, ftp client etc. Having a standard UI for all your text editing is pretty amazing. After all, everything inside a CLI is just text.
I run up an emacs server on startup and use emacs client to connect to it. It gives me the instant on of VI, plus the power of all the plugins and tweaks I've made to my emacs config.
These days, most coders using vim or gvim have a pretty large config setup which takes as long as emacs to startup anyway.
I'm a vim user, not an Emacs user (though I have dabbled with emacs before). If you still use vim on the console, you can do a lot better.
There's a reason why vim has support for multiple buffers. That you can keep multiple files open simultaneously. Read about vim remoting, and you can use a single gvim instance (which offers better performance and font rendering), and edit all files in just that.
Even in emacs, buffers are everything. Nobody opens a new instance of emacs for each file.
Actually years ago I discovered one bewildered undergrad would run Emacs to edit a single source file, control-Z out of it, run the compiler from the shell, test, start another Emacs (after all, the shell announced the previous Emacs was "stopped"), lather-rinse-repeat until the shared host had finally died under the weight of all the suspended Emacs processes.
To sum up, nobody sane opens a new Emacs for each file. VISUAL=emacsclient is your friend, as are Dired and M-x compile....
Emacs really feels like an IDE. But not just some normal IDE, one that I can hand customize the shit out of to do what I want it to _easily_ (which is important).
If vim had a SLIME like frontend I may not have switched in the first place, but now that I know emacs I don't think I would go back to full-time vim.
Vim is still great for quick change editing due to it's awesome load time and superior default keybindings.