I switch between Vim and Emacs depending on mood. It's a very hard deal: Emacs is a plateform that can do a lot of things besides editing, but it requires a lot of configuration fiddling, and is a bit too slow on the old machine on which I'm using it (must be a single core Pentium with Mandriva 9). Vim has a lot of things right off the box and is fast, but you have to use other programs to have a comfortable environment (mc, screen, ...).
Anyway. The trick with Emacs is to customize incrementally. Also, use customize-option as much as possible instead of editing your .emacs; too often people make you insert lines in your .emacs when already customization exists. Also, use the package manager (list-packages) that Emacs acquired recently instead of fetching from emacswiki or a github repo. It compiles automatically stuff, so it might help with startup times.
I switched to Emacs after being very impressed with nxml-mode. I found no better xml editor on Linux.
Emacs is great if there is a mode that's written for what you're doing--for instance, nxml-mode. I can imagine it's also great for C, for instance, because that mode is old and has seen lots of work. For lisp I'm sure Emacs is peerless.
Emacs is not so great if there's not a good mode for you. I grew frustrated trying to edit Haskell in Emacs; there are a bunch of half-baked modes out there. The problem is that without a good mode, even basic tasks like indentation are painful in Emacs, while Vim will indent anything well without a specific mode.
Often cited as Emacs' biggest advantages is how it integrates with other tools or, perhaps, how Emacs can become those tools. You can run your debugger in Emacs. You can read mail in Emacs. You can do version control in Emacs. The problem is that Emacs is never truly good at any of those other things. Running a shell in a buffer has problems. (You can run a shell inside a real terminal emulator in Emacs, but by that point you might as well just use a real terminal outside of Emacs.) Emacs is not a great mail reader. It's not great at doing version control and, what's more, it doesn't keep you from having to learn your underlying VCS, so now you have to know two ways to do things. Same goes for dired--it's a completely different way to manage files, but you still need to know how to use a real shell, so it just ends up being too much trouble to learn dired.
The thing is, when you strip out all the other stuff Emacs is supposedly good for--managing files, being a terminal, etc.--all you're left with is a middling editor with a good lisp interpreter. That other stuff is supposed to make Emacs great, but it all ends up being middling too.
So I have switched back to Vim. It excels at being an editor and doesn't try to do other stuff. In some ways Emacs is still better (for instance its support for multiple "frames" is something Vim can't get close to.) But with Vim I spend less time fiddling with the editor and more time editing text. If I ever need to do something for which there is an outstanding Emacs mode (edit XML, for instance) I will load up Emacs for that. But without a good mode Emacs is not worth it.
The indentation doesn't work well. It gets the indentation right maybe 80% of the time, but missing it 20% of the time is a big deal when you have to deal with the "tab-cycle." I spent so much time fiddling with indentation that I turned off auto indentation...and Emacs without mode-based auto indentation is much worse than Vim with manual indentation.
I also had problems with inferior-haskell-mode. I could have tried to fix them but I was fed up with futzing with Emacs, especially when I can go to Vim and just use ghci in a terminal.
A response might be "but you can use ghci in a terminal and still use Emacs." Which is true, but then I'm using a not-so-great editor that's not fulfilling its promise of integrating other tools. What's the point?
> Have you tried magit?
Yep. I still need to know Git and its command-line interface. With magit I was spending time learning magit, but not getting functionality beyond what the Git command line offers. Not worth it.
It seemed to me I was spending time learning tools in order to justify my use of Emacs. That's backward, so I stopped. I could have kept using Emacs without the other baked-in Emacs tools...but then you're just left with an editor. In that case I will pick Vim since it's the better editor.
Yep, tried all three, and looked at at least one mode that someone else is developing to see if it had better indentation. I don't remember the names of the three indenters being all that distinguishing, so I had to keep notes in my .emacs just to tell them apart.
One good indenter (maybe with options to select how to style your code) would be better than three. I remember reading a blog post about how hard it is to indent Haskell automatically. It breaks my chain of thought though to have something automatic that works only most of the time. It means I routinely have to stop to fiddle with the editor to make it indent correctly.
I see where you're coming from here. But my conclusion was that Emacs with Evil is just as good an editor as Vim. And as a bonus I get the complete customizability of Emacs.
So when you say "I will pick Vim since it's the better editor," what Vim features in particular (beyond modeful editing, which Evil provides) make you say that?
This is exactly my point. The Emacs mentality is that Emacs can do everything...it can even be Vim. Why should I do that when I can just use Vim? Maybe Emacs can do anything, but it doesn't do anything well unless you've got a dynamite mode. Evil is not going to be as good of a Vim as Vim. I can tell that even with a glance at the Evil website. One of the best things about Vim is the extensive documentation. Evil just has a 22 page PDF manual...lots of which is filled with Emacs Lisp. So if I use Evil, I then need to spend time learning Evil and how to customize it with Emacs Lisp. Or I can just use Vim.
I was hoping I could get a "minimal" setup to edit Python code, and even that was too much to ask for. "Code folding? What's code folding precious? What's code folding?" --Smeagol
Apparently "minimal" doesn't apply to Emacs. Being complex is in its nature. It wants to become everything.
The worst was how every time you open a different file, your `CWD` always changes to that file's location.
Interesting, I consider that a great feature. That always bugged me in Vim. When I open a file in a different location, most of the time I want to be in that CWD. I guess it depends on how people work.
Oh, yeah, that drives me crazy too. Usually, I cd to the root of whatever project I'm working on, and I want all paths to be relative to the root of that project (though since I started to use ctrlp[1], it's less relevant).
Anyway. The trick with Emacs is to customize incrementally. Also, use customize-option as much as possible instead of editing your .emacs; too often people make you insert lines in your .emacs when already customization exists. Also, use the package manager (list-packages) that Emacs acquired recently instead of fetching from emacswiki or a github repo. It compiles automatically stuff, so it might help with startup times.