Do you lead a life of extensive text processing? Maybe you're a programmer and it's your job. Or maybe you write for a news paper and currently use microsoft word for all of your editing (please don't... There's a better way...)
Let me guess, if you're not a VIM or Emacs-er already, you use a fancy IDE to write code because it provides syntax highlighting, offers "magical code completion", and a unified environment" which automatically compiles your code. Chances are you've gotten into an argument (or several) with a VIM or Emacs 'elitist' and spent more time defending your choice of tools rather than learning about their advantages or disadvantages -- and I'm sure the emacs/vim users were just as guilty.
I am not in the business of converting people from one tool to another. From personal experience, I know many people tend to become comfortable with tools with which they are familiar. I'm writing this essay because I spend a lot of time typing in front of a computer. I'd like to share my experience of what's worked well for me.
I've programmed in a variety of environments including netbeans, eclipse, dev's bloodshed interface, emacs, vim, pico, nano, ed, notepad, etc, and find that different tools have different advantages. Being a lisp programmer who spends most his time on the CLI (command line interface), emacs is my favourite editor to date (though elisp's lack of tail recursion and TCO is disappointing).
That said, I must admit I feel a bit guilty and hypocritical about writing this post. For years my hubris clouded my judgment, preventing me from acknowledging the advantages of VI. Despite the steep learning curve, I find myself preferring VIM's macro system and there really isn't much emacs can do that vim can't (and vis versa). I don't want to make this a VIM versus emacs religious battle, but I will say that emacs' abundance of modes, interactive and supported environments (like SLIME, python-shell, and and sql-mysql (not like I'm in love with sql), bash friendly key-bindings, lower learning curve, indentation, etc, make it a better fit for my life style... Also, I am a heavy org-mode user, something I don't have with vim. However, if you see a talented VIM hacker magicking, it's difficult not to concede that VIM may indeed have the upper hand for text processing.
But what about IDEs? Why the heck would someone use a command line tool (or even X emacs) when perfectly good IDEs are available for specific languages. Before I answer, I invite you to read the hacker community's thoughts @
why do some programmers hate ides or think programmers that use ides are bad programmers.
Why VIM or Emacs over an IDE?
In case you're not comfortable trusting my experience, see for yourself why Google recommends solutions like VIM.
- Macros (available in vim and emacs)
If you just recorded a macro in emacs via C-x ( to start and C-x ) to end, you can use C-u 5 e to execute it 5 sequentially times. (In vim you would use 'q' to start recording a macro, followed by the letter for which you wish the completed macro to be bound. Then, type the operations you wish to be invoked by the macro, type q to stop recording, and execute by typing: <# times to execute -- default 1> @ <key to which macro is bound>.
- Repeat Commands
- Terminal Programs & Code, side-by-side
- Interactive REPLs (read eval print loop)
- Superior Navigation and Context Switching
- Syntax highlighting, tabbing, and code completion
If you're really into programming, an IDE is a great tool. However, I prefer using a programmable text editor with tons of features added by the community, to accomplish exactly what I want.
- Michael E. Karpeles