5 ms·
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
by astrobe_ 13y ago
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.
- massysett 13y agoI 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.
- fafner 13y ago> I grew frustrated trying to edit Haskell in Emacs; there are a bunch of half-baked modes out there. What's wrong with the normal haskell-mode? https://github.com/haskell/haskell-mode https://github.com/haskell/haskell-mode (interestingly another commentator here claims that Emacs' Haskell indentation is superior to VIM's https://news.ycombinator.com/item?id=7111521 https://news.ycombinator.com/item?id=7111521) > It's not great at doing version control [...] Have you tried magit? It's probably the best version control support I've ever seen in an editor.
- massysett 13y ago> What's wrong with the normal haskell-mode? 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.
- charlieflowers 13y agoI 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?
- klibertp 13y agoAs for customize-option, if you don't want options to clobber you main init file you can do this: (setq custom-file "~/.emacs.d/custom.el") (load custom-file) It's good for version control and for separating manual changes from customizations.