Alright, so any hacker with air in their lungs has heard of these debates where someone argues vi sucks, and someone else claims that GNU Emacs is slow or sluggish, then the vi guy says that vi is easier to use, and the GNU Emacs guy says that no, GNU Emacs is in fact easier to use. I suppose the title of this entry may even perpetuate these.
Well, let me get one thing clear… I don’t care what editor you use. Just stop bitching about how you don’t like the one I use. That is the one and only comment you’ll see to that degree for this post. Now onto something worth reading.
So, here are a list of features that I know how to do in GNU Emacs, but many of my buddies who use vi ask me how to do. My answer is usually a joking “you use GNU Emacs,” but I’m curious to see how many of these things you can actually do in vi. I’m going to focus on features specifically tailored to software development so as to avoid the “it’s too bloated” scorn of vi users. So, here’s the list of features…
- In emacs, with tramp-mode, you can edit files remotely with a local running instance of emacs. This allows you to even compile and debug a program on the remote host, still using your local emacs session (only with ssh in tramp-mode).
- In emacs you can manage your version control for your files from inside of the editor. Check in, diff, etc. All works.
- In emacs, ediff is an insanely cool diffing program inside of emacs. It lets merge, diff, and diff entire directories of files.
- In emacs, you can use a database directly from your editor. With two buffers in a split window, you can bind one buffer to your database interface buffer, and execute queries directly from one buffer to another buffer, even live SQL from inside a source file.
- In emacs, many languages (not all; I’m talking about you, Ruby) have debuggers that are well integrated into emacs. Perl, C, Java, Python, lisp, all just a handful of such languages. Lets you control the debugger from inside emacs, not just a command-line embedded in the buffer.
Once again, this is not a flame at vi users. I’m just curious if/how you can do these things in vi so the next time I get an “how do you do that in vi?” I can answer. Please comment (politely) to this post. Thanks for spreading the knowledge.