Vim or Emacs: Which text editor do you prefer?

No readers like this yet.
No readers like this yet.
Vim or Emacs keyboard letters

Jason Baker. CC BY-SA 4.0

It may be 2016, but among many developers and system administrators, the editor war is still alive and well. Vim (and vi) or Emacs: Both have strong followings, and of course, plenty of people use something else entirely. Which do you prefer?

There is little doubt that both still have strong followings. When we asked about favorite text editors last year, vi came out ahead, but it's clear that the debate is still alive.

Which works best for you probably depends a great deal on personal preferences. You've likely built a small pool of desired plugins and a group of settings that meet your exact needs. And perhaps you've developed some strong feelings along the way.

So let us know which text editor you prefer: Vim, Emacs, or something else—and what informs this preference?

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
3397 votes tallied
Vim
56% (1917 votes)
Emacs
27% (907 votes)
Something else
17% (573 votes)

Results

Comments

42 Comments

I prefer Vim for a couple reasons. The first is personal preference, because I use it all the time and am very familiar with it. It has become embedded as part of my muscle memory.

Secondly, I use it because, as I was told when I first started in Linux, Vi is always there, even in recovery and single user mode and other editors are not. This is still true to the best of my knowledge.

I have tried Emacs but, because I am so familiar with Vim, it just does not flow well for me.

Vi is ever-present.

But I have to be honest, it's hard swapping between modes.

And there's no obvious marker on the screen to remind you which mode you're in.

> And there's no obvious marker on the screen to remind you which mode you're in.

Usually people install vim, which does give a feedback whenever insert mode is active.

A reason I can add is that vi(m) is kinda "programmable": it's just about having tons of commands, but about being able to compose them like Lego blocks and build complex sequences to deal with momentary needs.

Inclusive to that idea is the mechanism of extending commands -- like e.g. delete: one char to the right, one word to right, till the end of line etc.

I'm afraid I can't talk about Emacs. Maybe it does the same and I simply don't know.

A lot of users are asking this, but if you do, then you are doing it completely wrong!
You should be in NORMAL mode most of the time and INSERT mode should only be short trip.
For example let say you would like to type "Hello word", you need to do this:
1. You are starting in NORMAL mode. Always!
2. i (to get into insert mode) and type: Hello word
You get it Always you should press at the end! When ever you make a pause press and then when you continue press i for insert mode.

It looks strange in first but it is vital for understanding modes. And also when using u key to undo you will see what the power of undo is in Vim. It always undoes your last thought (word, sentence, paragraph what ever paused your thought).

For me vi is very much like playing a piano - when using it I am playing songs rather than hitting individual keys. Likely I know it too well to really be happy with anything else.

But I did have fun with "ed" last week - it proceeded vi - and proves my level of madness ;-(

There was a famous movie of the 1950's called Gentleman Prefer Blondes, starring the legendary moviestar of that time period Marilyn Monroe. I'd definitely say now, over half a century after the famous film, that Serious Developers Prefer Emacs!

Never found myself confortable at all using Vim or Emacs, instead love using nano.

From that .png only one's installed!

Emacs without question, which I have been using since c1982.

The main reason is that it was designed as a visual editor and was not, like vi (Visual Interface) bolted onto a previously existing line editor (ex). Yes, I know its origins are in a set of macros for the TECO editor, but at least they were well designed.

Vi(m) OTOH looks and feels clunky and I have never liked the fact that it operates in two modes: command mode and insert mode, a heritage of its origins.

I agree that everyone should know how to do basic stuff in vi, because, as David Both says, it is always there (although, frankly, I'd just as soon use ex), but for developing code and the like, emacs will always be my preference.

I'm an Emacs user but, like David Both mentioned in an earlier comment, it's all about personal preference. I have absolutely nothing against Vim at all. I'm just more familiar with Emacs. Now, I will admit that for quick edits, I like nano. I do a lot of my development work in Emacs.

Modal interfaces are the bane of my existence, whether it's a terminal-based app like vi or a GUI app. It's just bad design. In vi's defense, it was done that way so that it would work on keyboards with a very limited number of keys. So, it has its uses. For most things, emacs is just much easier to use.

Emacs was also designed to work on standard 1970s keyboards. (There was allowance for the non-standard "Meta" key, used at MIT and the Alt key now does service, but you could always type ESC-then-whatever in place of Meta+whatever.

The reason for vi's clunkiness is that is was an add-on (Visual Interface) to the previousy existing ex editor. When you rae in command mode, you are basically entering ex commands.

You're already using Linux or Mac or Windows; why run the Emacs operating system on top of it?

I do a lot of cross-platform dev, and have become familiar with the natives: Xcode on Mac, Visual Studio on Windows, Qt Creator. But more often just as code editors, not using their full IDE powers. Used to rely heavily on BBEdit. Can use vi in a pinch.

Neovim

I use both, emacs for serious work and vi for simple stuff VI is always there so on a guest system I.'ll use it but for doing development work it is the lightest weight IDE I know of. Once upon a time it was also the email client and Usenet news reader of choice. Can vi psychoanalyze you? Emacs can ;-)

I'm a system admin, so don't often have a requirement for manipulating large text files (for doco I use Word or Libreoffice Writer).

For small config edits and the like I use nano, or mcedit. Hate hate hate vi, it's not much smarter than the card punches where I started my computing career. Using vi is like hammering nails with your fist. Sure, once in a blue moon you have to, but why would you choose to?

Emacs is OK for my purposes I guess, but if it's available, likely several other, simpler editors are as well.

Vim !

For all the people wanting clear distinction between Vim mode, check out my work here :
https://github.com/sd65/MiniVim

Looks like Nano/Sublime

There are my three best articles about Vim:
1. Answer to the forum post: Your problem with Vim is that you don't grok vi.
https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim

2. Why, oh WHY, do those #?@! nutheads use vi?
http://www.viemu.com/a-why-vi-vim.html

3. Why Atom Can't Replace Vim
https://medium.com/@mkozlows/why-atom-cant-replace-vim-433852f4b4d1

What is the biggest problem with Vim? It is very different from ordinary text editor and so difficult to learn at first. Many people stop using vim, because they become way less efficient, but this is only at the beginning, I am now 10-times more efficient with Vim.

Nano. (And not just because she sits behind me!)

It drives me crazy when I see someone using VI, it's so primitive. Emacs is much more powerful. I've been using Emacs since 1979, that was ITS Emacs that ran on the Dec System 20. Currently my preferred Emacs is XEmacs.

If you think Vi is primitive, then you don't understand it. Maybe you are seeing only people who just don't know how to use it and in this case you can get crazy.

You most probably don't know much about vi. It is one of the most powerful (in not the most) text editor out there. But for ordinary person it looks completely different what most of people are used of. It may be primitive, but in fantastic sense! Vi/Vim is the only text editor that actually has a language when working with it.
How do you delete a word? daw

How do you delete a sentence? das (delete a sentence)

How do you delete a paragraph? dap (delete a paragraph)

Now how do you copy a word/sentence/paragraph? Using yank command: yaw, yas, yap.

How do you upper case the word/sentence/paragraph? gUaw gUas gUap

You see Vim in compository? Use verb (like yank-y, delete-d, go_upper_case-gU etc) and a noun (word, sentence, paragraph, etc). Combining the commands is the real power of Vi.

It is difficult to understand at first, but when you do, then you get the whole power of it.

By the way, how do you jump to the end of file: G (upper g is a goto end). But you already know how do delete to the end of file dG, copy to the end of file yG, upper case to the end of file gUG. You see like learning a real human language. You learn a verb and you can combine it with each of the noun. You learn noun and you can combine it with each of the verb.

But it gets more fun, because you can use proverbs, adjectives etc if resemble the human language. Like 2daw means execute command 2 times like: 2 times delete a word. You have learned the proverb now. So how to use delete two sentences, paragraphs? 2das, 2dap. Ok, now how to copy two sentences/paragraphs? 2yas and 2yap

But there is much much much more. I am using vim for 10 years and there is everyday you can learn something new and interesting. Just like learning foreign human language...

You can't say Vim is primitive or not powerful. You just can't. If you do, then you don't understand vi at all.

I am not saying you should be using it, but saying it is primitive and not being powerful just mean you don't understand it.

Nice synopsis. In fact, I learned some very interesting things and command variations that will make my use of Vi(m) even better. Thanks for a great article.

In my opinion, Vi(m) is to other editors as Unix/Linux is to other operating systems. They look old and clunky on the surface, but once you understand them and the philosophy behind them, they make complete sense and are incredibly powerful.

I started on Emacs and thought it was the coolest thing. I could program, compile, execute commands, debug, etc. all from one application. But, about the time i realized that programming was not my thing, rather that I enjoyed systems administration/engineering, I realized Vi(m) was more practical for the task. It took a little bit of effort to un-learn Emacs, but now, I am Vi(m) through and through. Not that there's anything wrong with Emacs, it's just a better tool for me.

I don't remember exactly why vi was the first one I used (around 1981-2 on a VAX-11/780 running BSD 4.x UNIX) in graduate school. Since it was first, I never used emacs enough to be comfortable. So I stuck with vi(m) to this day.

I prefer nano though do understand why people love (Vi)m. I've never done too much with text editors other than delete or add stuff. When I found out one can do sed like commands in (Vi)m I was amazed When I leaned that there are block like selection options I thought that Vim was/is on a roll. When I heard about Neovim I was blown away. Still, it comes down to preference and of course the environment one is in. I can say I at least can use (Vi)m but not like an expert user.

The last modal editor, VI is an antique that should have been jettisoned decades ago. On the other hand, EMACS is the poster child for uncontrolled feature creep. It is the complete antithesis of good Unix process design. Personally, I prefer JOE in Wordstar mode. But then, Wordstar on CP/M was my first real word processor experience. All prior experience was with a cassette tape based line editor.

I've used emacs for 35 years. Seems to be a tool that does everything and I seldom leave it during my development day - it has everything - a git interface (really, really slick), Python programming equivalent (or better than) Eclipse, Ansible help, compiler integration (for moving to errors quickly and fixing builds), ..... I am vim competent and use it on occasion, but have never found anything that approaches the power I've been able to unlock in emacs.

I have to vote for vim here. I really use it just about every day and I certainly am in love with it. On the other hand, I've been itching to try emacs for a while now and just haven't gotten around to it. I really enjoy GNU, so I think emacs deserves a chance with me. I have heard of its evil mode that emulates vim. I am not sure if it's a perfect implementation or just the basics, but it certainly makes me more likely to give emacs a shot.

GNU Emacs for sure!!

I've been using vi for a very long time on many various flavours of Unix since I encountered it in Xenix. Emacs in those early days was an enormous beast with the most determinedly arcane and obtuse keystrokes and you were at the mercy of the quality of your termcap file. Nano was a not even a twinkle in pico's eye so if you were hacking around doing installs and support for you learned ex and vi was a luxury.

VIM is also my preferred text editor in Windows, in part because I'm comfortable with it but more importantly as I often have to manipulate data in large text files. Every couple of days I will be performing tasks like switching from US to European date order in a CSV file before importing into Excel, stripping chaff from very large log files until I'm left with interesting events or finding and joining multi-line records into a single line. That kind of transformations is trivial and second nature to anyone who carries the scars of learning vi's regex.

Vi has it's dangers though, and I suffer from "Esc-twitch-rage" which is the chronic debilitating effect of hitting the escape key when you are done editing only to discover that the application you are working in interprets this as "discard everything that I just typed".

That's a little like being almost ready to post something in a forum BBCode(al) editor when my login times out. Ouch! For which I developed a habit that could possibly help with the Esc-twitch-rage thing. If your running X, compose with Vim. Then use the clipboard to paste it in to any application where the Esc key is unkind to your Vi trained reflexes. If you then bump the Esc key before "Saving/posting/whatever" the changes. You can just paste it in again.

I did once try to learn emacs a long time ago. Couldn't adapt to the default shortcuts, didn't see an obvious way to change them. So since I needed to edit some files I went back to vi where I already knew how to :map command sequences to the key combinations of my choice.
That was before I learned about the advantages of vim. Or probably I should say some of the advantages. I really only know the parts I use. For anything else there is the :help command. Why use anything else?

I started to learn vi about 25 years ago and used it ever since - ok for the job.

Repent! ;-) http://dc.ubuntu-us.org/tutorials/penance.html

On a DECsystem-10 mainframe running TOPS-10, circa 1980, our systems programmer installed a new editor: FINE. The manual explained the name was a recursive acronym; the first I'd ever heard of the concept. FINE = FINE Is Not Emacs. I'd never heard of Emacs, RMS, FSF, GNU, etc. But it was a DAMNED FINE (pun obviously intended) editor compared to the alternatives. Fast forward to 1993, when I switched to Linux. And reacquainted myself with an old friend, under it's original name.

I will say, back in 1980, I went deep into learning how to bend FINE to my will, with lots of customizing. Since then, I've forgotten all of that, but haven't felt compelled to customize Emacs very much at all.

I have been around since the beginning of vi. In fact I was in the computer room in Cory Hall at Berkeley when a grad student came in and told everyone to look at what he just did! He logged in to a terminal and started his special version of ex. Then he typed :v and visual mode started!
Being very experienced with vi(m) you'd think I'd prefer it. But when I started working in Silicon Valley I asked someone if there was a better editor than the line editor we had. The senior developer said he had one that I could use if I would send him bug reports to help him make it better. Of course I said yes and soon others were wondering how to get a copy of it too. It was an early version of Emacs running on a Data General Eclipse machine.
From that time forward I have seen the power of Emacs. The ease of extending it and configuring it goes way beyond vi(m). Sure vi(m) has come a long way since its beginnings too, but there are inherent limitations in the vi(m) design that can't be overcome.
I find that anyone who is comfortable with both vi(m) and Emacs will almost always use Emacs as their first choice. Devotees of vi(m) usually have little or no experience with Emacs so their ability to compare them is poor at best.
In my experience the progression of useful programs to view and / or edit files looks something like the following:

cat
more
less
sed
awk
vi(m)
emacs

After Emacs you get into a number of typesetting programs up from nroff all the way to FrameMaker.

Bottom line is I use GNU Emacs daily. I use vi(m) for quick edits only as needed.

I agree with Mike Erwin on 21 Jul 2016, emacs is much more than an editor. It seems to be much bigger and more complex than it really needs to be. Of course, the new VIM is now quite large and complex, but the focus is stil on editing.

When I first started with UNIX systems, vi was what came with the OS, so I learned it. Later, I did try out emacs, but could not get past the seemingly esoteric sequences of keystrokes needed to input a seemingly simple command.

The dual mode of vim (vi) meshes well with being a touch typist, which makes command input simpler and, as Slogan on 23 Jul 2016 said, creates a simple language for commands.

i still use VI.

I prefer emacs but I use vim because i learned it before and I don't have the courage to learn emacs.

I like both.

For Vim:
* I absolutely adore its modes and keybinding.
* I enjoy its simplistic and naive way of handling strings and buffer. It is easy to handle, and it does what you want with so little overhead.
* I love the fact that no matter which *nix server I remotely logged into, or which colleague want me to help them on their *nix machine, I always have Vim at my disposal for simple operations.
* I can invoke it whereever and whenever I want, each time it will give me a simple and straightforward buffer rather than opening some random tab in an ill organized, convoluted interface (ahem, I am talking about you, notepad++)

For Emacs:
* I love the fact that it support multiple font size in a buffer can can render images (after all, this is why I decided to use Emacs in the first place, org-mode. And Emacs's GUI based design made them look so much better than in Vim)
* Although its default key binding is a pain (at the very least for your pinky), you can always configure it to using Vim keybinding (yah, I am a fan)
* I can do EVERYTHING in Emacs, coding, document writing, scheduling, even email writing (Hello, mu4e!). Though Emacs's solution is usually more convoluted than Vim, so many operations are slower than using Vim.

So yah, I love both editors, Vim being the most straightforward, reliable, powerful command line based editor I ever know; Emacs being the only GUI based editor I can tolerate and even come to love.

I use Emacs for daily coding and work/life organizing. And I use Vim for temporary script writing, binary hacking and single document regexp based editing.

Vim, I tried nano and couldn't use it. never did emac, and have no interest to

Emacs, not because of the keybindings (I use evil), but because of the functionality. I like using emacs as a pdf viewer (evil-collection and pdf-tools), and like the the ability to go to whatever file you want by typing C-x C-f in that order (C is Control) and with a little config SPC-f (evil-leader). Unlike some, I don't hate vim ,but I can't say the same about vi (I'm 12, if you're wondering).