Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've been programming for years now, mainly in VBA (the horror), Python, Javascript (Node.js mainly), HTML, and SQL. Most of these languages came with environments that made sense: for VBA I used the built-in editor for Microsoft Office, HTML I could use whatever and debugged with Chrome Dev Tools, and SQL doesn't really require anything fancy.

However, for Python and Javascript, I switched around a bunch between editors. History of my usage:

Python - IDLE, nano, Notepad++, Sublime Text 2, JetBrains PyCharm
Javascript - Notepad++, Sublime Text 2, Node interpreter, JetBrains WebStorm

Languages I plan to learn (eventually): [Clojure | Common Lisp | Scheme], [C | C++ | Objective C], Ruby, Haskell, Assembly

As I'm getting more serious into programming, I'm starting to look into the most famous editors--emacs and vim. I have some idea of what they do and don't have over IDEs. I'm a really quick typer so I like the idea of not having to use the mouse. I also love the functions that Sublime Text 2 has for quick switching for funcitons and across open files, and also the multiline select.

However, despite lots of research, I'm having trouble figuring out the difference between emacs and vim, and I'd like to have a good understanding of them before deciding which one to commit lots of time to.


Question: What are the key differences between emacs and vim? What are the advantages and disadvantages of each for a developer?

Please note: I am not asking which is better, which is higher quality, which is more useful--I'm not trying to restart a famous debate. I just want to know what is distinct about each in terms of functionality and user interface, so I can decide based on my own needs.

share|improve this question

closed as not constructive by ZJR, gnat, Glenn Nelson, Yannis Rizos Dec 21 '12 at 7:52

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

That's practically a religious debate you're starting. Suffice it to say that no dynamic language will ever have IDE support to match a statically-typed one. Emacs and Vim are equivalent in my mind and it's just a matter of personal preference. –  jiggy Dec 21 '12 at 0:20
There's no real debate here--I'm not asking which is better. Just what's the difference between them. Is there that much disagreement over how they are different? –  jdotjdot Dec 21 '12 at 0:24
At the categorical level there isn't any difference: they are both highly extensible, powerful editors, oriented to touch typing programmers. At the detailed level the differences are too numerous to enumerate. Just as an example, emacs uses Lisp as it's extension language, while Vim has it's own idiosyncratic macro language and can also be customized using Python. VIM has separate command and edit modes, EMACS doesn't have modes but has slightly more complex key strokes needed to invoke commands. Most of the extensions available on one will have equivalents on the other. Try 'em and pick one. –  Charles E. Grant Dec 21 '12 at 0:35
Emacs and VIM were both originally created as attempts to make a really good text-based text editor, back in primitive times before the advent of the GUI made the basic premise obsolete. Today they're both maintained and advocated by a bunch of people who, for whatever reason, would like to believe that the last 3 decades of UI research and development never happened. –  Mason Wheeler Dec 21 '12 at 2:50
It's absolutely astounding that a question as simple as this one will get closed just because people can't avoid debating it. –  jdotjdot Dec 21 '12 at 14:25

6 Answers 6

I'm going to give a novice answer because you aren't getting any good ones and a novice answer is better than none at all (which is what you're getting). I've stopped and started learning emacs many times over the years and still haven't gotten it down. Therefore, I use vim.

There are huge differences between the two and it boils down to the ability to extend the use of the editor. While it can be done in both, emacs has its own built-in Lisp-like language. Emacs can be configured in many more ways. This extendability, and all the ins and outs, makes it necessary to dive into it and live there before you can become familiar with it. Many, including me, don't have the time or don't want to put that investment into learning an editor and find vi/vim easier to learn and, therefore, easier to use.

Learning emacs in-depth can be as much an effort as learning an operating system but you can go as far into it as you wish. Some use emacs but don't get any deeper or learn the tools any more than what they could accomplish with vim. But learning all that emacs can do will give you the feeling that it is an operating system unto itself.

That's a pretty lame answer but all I can muster tonight. While I've used emacs, I haven't gone further than the "use it like vi" person I mentioned but, probably like you, I asked these same questions 10 years ago and what little I spit out now is what I've learned from others.

share|improve this answer
while you may think my answer is a "none at all", it really isn't. Once you've dug into vim, you'll find that it's the same as emacs, just different. Yes, we can talk about contexts and extensibility and macros and blah blah blah. They are the same. Just different. It's a state of enlightenment that you'll reach after using both editors for a while. –  GlenH7 Dec 21 '12 at 2:33

Developers don't choose emacs or vim based on their technical differences.

They just fall in love with one and most are faithful.

Try them both and make your opinion yourself.

share|improve this answer
I almost want to -1 for being overly reasonable. Stop with the reason already. More fight! –  Erik Reppen Dec 21 '12 at 6:00

Scripting differences:

Emacs is written in C and Emacs Lisp. Most surface-level features (e.g. fundamental mode, dired, etc.) are in fact written in Emacs Lisp, or else as C functions exposed to Emacs Lisp.

Emacs Lisp is de facto for scripting, is heavily supported, and has mild usability issues in scoping (Is this controversial?). There are third party efforts to allow scripting in other languages, most notably PyMacs, but it is unusual.

Vim is written in C and Vimscript, but the primary features - especially simple text editing - are written in C. (I believe Vim will start and edit text with all the default scripts removed.)

Vimscript is the primary choice for scripting, and the scripts shipped with Vim are all in Vimscript (I think), but Vim itself has built-in support for separate interfaces to Perl, Python, Ruby, Tcl, Lua, and MzScheme (now Racket, don't know the status of scripting).

About scripting, more subjective: I put forth that fundamental changes to the editor are more natural in Emacs (in Emacs Lisp); tasks completely changed the nature of Vim are less common regardless of language. (If I'm wrong at this, yell, but I understand that there are exceptions.)

Please note any factual errors in here and I'll be sure to fix them.

share|improve this answer
IMHO No one really gives a damn about the perl, python, ruby, tcl, lua, and mzscheme interfaces for Vim. Vim is about having one editor that works almost everywhere unchanged. Compiled-in language bindings need especially compiled versions of vim. Absymal portability with little payback. –  ZJR Dec 21 '12 at 2:39

You like LISP → you use Emacs.

You loathe LISP → you use Vim.

Also you might get anxious if things beep a tad bit too much.
You can disable that in Vim, but if beeps really get on your nerves, start liking LISP.

Also you might get nervous when documentation refers to an apparently-non-existent Meta key (it actually used to appear on, now defunct, keyboards from MIT and SUN) or keystrokes for basilar tasks require a sequence of two or three ctrl-something combos. If you can't cope with that, forget about LISP, and go Vim.

share|improve this answer

For specific uses, your preference will likely boil down to plugin support and features for Python. Either one of emacs or vim will be very keyboard driven, though I do believe that vim has richer plugin support for Python development.

Keep in mind that all of this will be very 'text editor' centric; I find myself gravitating to editors that have richer service integrations with OS X.

share|improve this answer

Ultimately, there is no real difference between emacs and vim. They are both editors. They both have their strengths. They both have their quirks (ahem, advantages!!!). The advantages of one outweigh the disadvantages of the other and vice versa.

Which you will prefer was pre-ordained by the Fates before you were born. As with all things Fate related you should simply accept your destiny and move forward. Contesting your lot in life is an exercise in futility.

Many a religious war has been fought between the two sides, and my almost perfectly objective statement opening this answer will inflame both camps.

About the only substantial difference is that vi is installed by default on my unix-like systems. But it's typical that both vim and emacs have to be installed after installing the OS.

Listen to the quiet voice inside of you and you will be told which editor is most appropriate for you. We are hopelessly unable to guide you in that decision.

share|improve this answer
And the silent voice whispered: Emacsss... –  jco Dec 21 '12 at 1:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.