16 votes

What is your personal preference and why: vim or emacs?

This is of course the age old debate, which on other sites has been known to quickly devolve (one of the Internet ‘holy wars’ of yore). Nonetheless, I am curious.

I personally use vim. Part of the reason is surely that it is just the first one of the two that I happened to use, and thus by the time I tried emacs I was used to vim. But more broadly, I enjoy using vim because once you get over the hump of ‘weird’ commands and modes, I feel that vim most closely emulates the feelings and thought process that you have when building something with your hands. You can pick up different tools, yank pieces out and rearrange them, turn the object around in your hands to see different parts, etc etc. Once you internalize the movement and editing you really start flying around. At that point the interface seems less like a barrier between you and the text and more like a way to ‘hold’ it.

Of course, people have different preferences.

50 comments

  1. [13]
    Bishop Link
    VSCode – the hell with your weird keyboard commands. 😄

    VSCode – the hell with your weird keyboard commands. 😄

    18 votes
    1. [8]
      cadadr Link Parent
      There is VSCodium, I strongly suggest using that instead. It is the same thing, minus the spying.

      There is VSCodium, I strongly suggest using that instead. It is the same thing, minus the spying.

      8 votes
      1. babypuncher Link Parent
        You can disable the telemetry in the official build. The official build is also necessary if you want to do dotnet debugging.

        You can disable the telemetry in the official build. The official build is also necessary if you want to do dotnet debugging.

        5 votes
      2. [6]
        Bishop Link Parent
        Pardon – spying? 👀

        Pardon – spying? 👀

        4 votes
        1. [2]
          cadadr Link Parent
          VSCode has various telemetry and communicates with outer world in some undesirable ways. Admittedly, calling it spying is kinda hyperbolic given it is FOSS and everything is out there, but still...

          VSCode has various telemetry and communicates with outer world in some undesirable ways. Admittedly, calling it spying is kinda hyperbolic given it is FOSS and everything is out there, but still it is good riddance, and VSCodium does exactly that: make a pristine build of VSCode w/o the unnecessary stuff.

          10 votes
          1. hhh Link Parent
            if you just use their binaries it’s not any more trustworthy. you have to build it yourself.

            if you just use their binaries it’s not any more trustworthy. you have to build it yourself.

            1 vote
        2. [3]
          tomf Link Parent
          You can disable it. https://code.visualstudio.com/docs/supporting/FAQ#_how-to-disable-telemetry-reporting
          4 votes
          1. [2]
            cadadr Link Parent
            I recall reading it can't be completely disabled, but I'm not sure if my memory is playing me games there.

            I recall reading it can't be completely disabled, but I'm not sure if my memory is playing me games there.

            3 votes
            1. tomf Link Parent
              yeah, I wouldn't be surprised. An old thread posted the following for various ways it 'calls home' "extensions.autoCheckUpdates": false, "extensions.autoUpdate": false,...

              yeah, I wouldn't be surprised. An old thread posted the following for various ways it 'calls home'

              "extensions.autoCheckUpdates": false,
              "extensions.autoUpdate": false,
              "extensions.showRecommendationsOnlyOnDemand": true,
              "workbench.settings.enableNaturalLanguageSearch": false,
              "workbench.enableExperiments": false,
              "telemetry.enableCrashReporter": false,
              "telemetry.enableTelemetry": false,
              "update.channel": "none",
              "update.showReleaseNotes": false,
              "npm.fetchOnlinePackageInfo": false,
              "git.autofetch": false,
              "update.enableWindowsBackgroundUpdates": false,
              

              I switched to VSCodium a while ago as a precaution / 'might-as-well', but it does look like there are ways to completely lock down MS's rls.

              There were reports that VSCode was reenabling telemetry on updates, but I'm not sure if that's still the case.

              3 votes
    2. [2]
      markh Link Parent
      I can’t live without VSCode’s git diff view.

      I can’t live without VSCode’s git diff view.

      6 votes
      1. Bishop Link Parent
        VSCode: Keep Original || Keep Changes Me: 😩

        VSCode:

        Keep Original || Keep Changes

        Me:

        😩

        4 votes
    3. [2]
      time Link Parent
      I've recently switched from Vim to VSCode with vim keybindings. Best of both worlds, in my opinion. I get the macros, navigation, and editing features of vim combined with the plugins, version...

      I've recently switched from Vim to VSCode with vim keybindings. Best of both worlds, in my opinion. I get the macros, navigation, and editing features of vim combined with the plugins, version control, and better UI of VSCode.

      5 votes
      1. Micycle_the_Bichael Link Parent
        I've been trying this for a week or so now. It's taking some getting used to to remember I have to use VIM and can't just start typing but I'm sure that'll improve with time

        I've been trying this for a week or so now. It's taking some getting used to to remember I have to use VIM and can't just start typing but I'm sure that'll improve with time

        1 vote
  2. Somebody Link
    nano. It's the real unsung hero when it comes to simple text editors. It's stupid simple, isn't confusing as crap, isn't overloaded with a bazillion features, and has the full help dialogue right...

    nano.

    It's the real unsung hero when it comes to simple text editors. It's stupid simple, isn't confusing as crap, isn't overloaded with a bazillion features, and has the full help dialogue right on the bottom of the screen.

    14 votes
  3. [6]
    cstby Link
    Have you tried spacemacs, which gracefully combines vim and emacs? ;) Emacs and Vim have a lot in common. They both optimize for the "power user" experience and therefore have a very steep...

    Have you tried spacemacs, which gracefully combines vim and emacs? ;)

    Emacs and Vim have a lot in common. They both optimize for the "power user" experience and therefore have a very steep learning curve. For users who are able to get over that hump, both editors are incredibly powerful.

    The Emacs vs Vim question doesn't seem as relevant these days. More relevant would be Emacs/Vim vs easy-to-use-GUI-editors. I would expect that you'd see a fairly large divide across those lines in term so of age/experience and programming ability.

    8 votes
    1. [4]
      Micycle_the_Bichael Link Parent
      Do you actually use spacemacs? I started using vim about 6 months ago but no matter how many tutorials I do and how many situations I try to force myself to use vim in, I never get comfortable...

      Do you actually use spacemacs? I started using vim about 6 months ago but no matter how many tutorials I do and how many situations I try to force myself to use vim in, I never get comfortable with it and I don't really feel like I have improved all that much. I'm going to look into spacemacs and am curious what your thoughts are if you use it.

      And I agree I think the Command Line vs GUI editor is going to be the new divide. I definitely see that divide in the operations team I work for now. Seems like there are 2 camps:
      (1) Don't feel comfortable with vim/emacs/nano/etc. They go check out repo on their laptop, edit in IDE of their choice, push branch to remote, check out on a random server, run script and see if it works, if not edit in IDE and repeat, once it works push to master and merge.
      (2) Check out repo on remote server and create a new branch, edit on server using vim/emacs/nano/etc. run there to see if it works, push to master and merge request.

      I don't know that I think one is better than the other, but it has been interesting to see that divide.

      3 votes
      1. [3]
        DMBuce Link Parent
        Have you tried going through vimtutor, the tutorial that's distributed with vim? I had a similar block with vim for months after I first started using it and vimtutor helped a lot to get me up the...

        Have you tried going through vimtutor, the tutorial that's distributed with vim? I had a similar block with vim for months after I first started using it and vimtutor helped a lot to get me up the learning curve.

        5 votes
        1. mjangle1985 Link Parent
          Vimtutor is an argument in and of itself for vims superiority.

          Vimtutor is an argument in and of itself for vims superiority.

          3 votes
        2. Micycle_the_Bichael Link Parent
          Sorry for the delayed response! I thought I responded but I guess I didn't. Whoops! I need to do it again I think. My problem is I know some of the very very basics of vim which make the first 20...

          Sorry for the delayed response! I thought I responded but I guess I didn't. Whoops! I need to do it again I think. My problem is I know some of the very very basics of vim which make the first 20 minutes or so of the tutorial very tedious and I want to give up and do something else. I need to buckle down and do it again.

    2. loto Link Parent
      Can confirm, Spacemacs is wonderful - I've been sticking with neovim lately for simplicity though, as spacemacs loads a ton of extra things I don't need on a daily basis but it's definitely useful...

      Can confirm, Spacemacs is wonderful - I've been sticking with neovim lately for simplicity though, as spacemacs loads a ton of extra things I don't need on a daily basis but it's definitely useful every once in a while.

      1 vote
  4. [3]
    mrbig Link
    I'm a somewhat advanced user of both Vim and Emacs. I use Neovim for my quick command-line needs, but Emacs is my main, multipurpose editor. I use it for prose, productivity (with Org) and coding....

    I'm a somewhat advanced user of both Vim and Emacs. I use Neovim for my quick command-line needs, but Emacs is my main, multipurpose editor. I use it for prose, productivity (with Org) and coding. I'm very comfortable with it, like second nature. It's where I'm writing this comment.

    5 votes
    1. [2]
      switchy Link Parent
      Are you using one of those browser extensions to export textfields to your editor?

      Are you using one of those browser extensions to export textfields to your editor?

      3 votes
      1. mrbig Link Parent
        Nah, just copy and paste back and forth. I used to have custom scripts for that, but they were not worth the trouble. I only write longer stuff on Emacs, though. Quick replies are usually done...

        Nah, just copy and paste back and forth. I used to have custom scripts for that, but they were not worth the trouble.

        I only write longer stuff on Emacs, though. Quick replies are usually done directly on the browser. It also varies according to my mood.

        5 votes
  5. [2]
    asoftbird Link
    Windows user that's dabbling with linux and server management here. Only ever used vim (and thought emacs was a food brand). What's up with all the weird shortcuts and unexpected behavior? Why is...

    Windows user that's dabbling with linux and server management here. Only ever used vim (and thought emacs was a food brand).

    What's up with all the weird shortcuts and unexpected behavior? Why is it so different from whatever else l'm used to? Is emacs better or worse? So far l at least managed to learn how to save, write, exit and do the cool ctrl-z "to background" thing.

    4 votes
    1. gpl Link Parent
      Vim's history is a little quaint, and was developed with a very different design philosophy than most of the dominant text editors today. So, if you're coming from any of those (which is pretty...

      Vim's history is a little quaint, and was developed with a very different design philosophy than most of the dominant text editors today. So, if you're coming from any of those (which is pretty much everyone) vim seems very alien at first. One of the best things I ever read about vim was this post on Stack Overflow, which I guess is considered a bit of a classic since it was posted:

      Your problem with Vim is that you don't grok vi

      There's a lot to take in there, but reading that answer at least conceptually improved my understanding of vim's philosophy, if not practically improving my usage. Every answer in that thread is great though, particularly this one.

      Whether or not emacs is "better or worse" depends on context and on preference. It's worth trying out to see how you like it, as it is incredibly powerful and you can get it to do pretty much whatever you want. I will note that one (minor) advantage of learning vim is that vi, which shares many features ('vim' stands for 'vi improved', after all), comes already included on pretty much any base linux install you ever use. So if you ever find yourself on a foreign system you have access to a pretty powerful tool for editing text.

      11 votes
  6. Clint Link
    I've tried to leave emacs a number of times and it never works, particularly now that I org. Emacs is my mothership, which lives in primary-dev tmux. Having said that, I assume that vi/vim is...

    I've tried to leave emacs a number of times and it never works, particularly now that I org. Emacs is my mothership, which lives in primary-dev tmux. Having said that, I assume that vi/vim is installed on every single host I use, and it's light and very fast, so I do common/quick operations in it and I love it for that.

    I also keep sublime text open on my local machine as a better notepad. I keep trying to learn IDEA and can't get productive.

    4 votes
  7. Ephemere Link
    I'm an emacs user, though I can't really say how I got started with it. I was a senior in high school, and it might have just been what was suggested by a guide I was following, or perhaps it was...

    I'm an emacs user, though I can't really say how I got started with it. I was a senior in high school, and it might have just been what was suggested by a guide I was following, or perhaps it was featured in a novel I was reading. I was big into Vernor Vinge at the time, and talking up a text editor seems like the kind of thing he might be into.

    More contemporarily, I've stayed as I like how I can do file operations / play with a shell via eshell / edit text / track my life via org-mode / send email all with a consistent set of key bindings.

    The biggest issue, of course, is that you get used to all of those things, and they're not really usable via the mobile interfaces which come to fill our lives.

    3 votes
  8. NeoTheFox Link
    NeoVim is the thing I've settled on. It's modern, it has a good UI (nvim-qt), it has the best completion and it's amazing. Once I've learned to use Vim commands there were no going back, even for...

    NeoVim is the thing I've settled on. It's modern, it has a good UI (nvim-qt), it has the best completion and it's amazing. Once I've learned to use Vim commands there were no going back, even for Android Studio I have to use a fakevim plugin.

    3 votes
  9. aphoenix Link
    I love Vim. One of my BFFs is an avid emacs user. They're both good answers. It depends on how you approach what you do. Emacs is more of a lifestyle choice than vim, but vim is ubiquitous on...

    I love Vim. One of my BFFs is an avid emacs user.

    They're both good answers. It depends on how you approach what you do.

    Emacs is more of a lifestyle choice than vim, but vim is ubiquitous on servers, so it's good to know as well.

    I've transition mostly into an IDE for development, but I still love vim.

    3 votes
  10. acdw Link
    I've used Vim for like, 10 years, but recently tried getting back into Emacs. So far, it's rocky. I've gotten some help from the Fediverse and others, but it's still slow going. When I want to...

    I've used Vim for like, 10 years, but recently tried getting back into Emacs. So far, it's rocky. I've gotten some help from the Fediverse and others, but it's still slow going. When I want to actually edit something (as opposed to playing around), I go to (neo)vim. It's just comfortable, I guess.

    3 votes
  11. Apos Link
    I use Vim, or whatever Vim flavor I get in various text editors. My main text editor right now is vscode with the vscodevim extension. It works quite well. I have my eyes set on Oni2. Can't wait...

    I use Vim, or whatever Vim flavor I get in various text editors.

    My main text editor right now is vscode with the vscodevim extension. It works quite well.

    I have my eyes set on Oni2. Can't wait for that to be usable. It will be the best of vscode, neovim and sublime.


    I tried Emacs for a bit but I wasn't sold on the idea. It seems to do too much or at least way more than what I need. For me, Vim is just the editing layer. For the rest, I'd rather use vscode than Emacs.

    3 votes
  12. krg Link
    I'm a neophyte coder, but I find micro to be easy enough to reason about.

    I'm a neophyte coder, but I find micro to be easy enough to reason about.

    2 votes
  13. [6]
    Grand0rbiter Link
    Kakoune. So if i have to choose between vim and emacs, it's vim.

    Kakoune. So if i have to choose between vim and emacs, it's vim.

    2 votes
    1. [3]
      user2 Link Parent
      Does kakoune have snippets, autocomplete, git-gutter and stuff like that?

      Does kakoune have snippets, autocomplete, git-gutter and stuff like that?

      2 votes
      1. Grand0rbiter (edited ) Link Parent
        I have no idea what you are talking about hahaha I do simple things for my use case. Bash scripts, some code here and there, but nothing big. When i need to write a previously used variable,...

        I have no idea what you are talking about hahaha

        I do simple things for my use case. Bash scripts, some code here and there, but nothing big.

        When i need to write a previously used variable, function or a path in my filesystem, it shows a dropdown menu that i can choose with ctrl+n/p

        2 votes
      2. ntgg Link Parent
        It has snippets although I am not sure how well they work as I do not use them, autocomplete (with lsp support), and built in git-gutter support. There is a guide on the github for migrating from...

        It has snippets although I am not sure how well they work as I do not use them, autocomplete (with lsp support), and built in git-gutter support. There is a guide on the github for migrating from vim and for vim plugin alternatives.

        2 votes
    2. [2]
      ntgg Link Parent
      Kakoune has absolutely ruined vim for me. It is just so much better and I can't go back.

      Kakoune has absolutely ruined vim for me. It is just so much better and I can't go back.

      1 vote
      1. Grand0rbiter Link Parent
        Me too. I made a little bash script to bulk rename files. Coupling that with kakoune multiple cursors gives me a really good workflow.

        Me too. I made a little bash script to bulk rename files. Coupling that with kakoune multiple cursors gives me a really good workflow.

        1 vote
  14. christoffer Link
    I use emacs + vim(evil). I used vim for almost 10 years inside a terminal emulator (usually tmux). Then I read about org-mode for the hundredth time, decided to give it a try, and found it so...

    I use emacs + vim(evil).

    I used vim for almost 10 years inside a terminal emulator (usually tmux). Then I read about org-mode for the hundredth time, decided to give it a try, and found it so powerful that I thought there must be something amazing in a platform that allows someone to build something like that. So naturally, I started using learning lisp and using vim inside emacs (evil), and have been much happier ever since.

    Emacs the environment (not the text editor) is the most amazing creative place inside a computer I have ever experienced. Paired with evil, you got a winner, in my experience!

    2 votes
  15. mbc Link
    vi because it comes on the computers I have to SSH into to do work. Also, because it is very similar to ed which friggin' BETTER be on the computers I SSH into because it's the standard Unix...

    vi because it comes on the computers I have to SSH into to do work. Also, because it is very similar to ed which friggin' BETTER be on the computers I SSH into because it's the standard Unix editor. I don't like dicking around with super-complex config files because then I'd get dependent on them. I stick with what works.

    I've never encountered any of the bugs that vim supposedly fixes over vi, so that's why my answer is not vim.

    2 votes
  16. cadadr Link
    I use Emacs because I enjoy writing solutions to stuff in Elisp. Editing text in vim is better, but Emacs gives me much more than that. For example, I recently started using hledger. To be able to...

    I use Emacs because I enjoy writing solutions to stuff in Elisp. Editing text in vim is better, but Emacs gives me much more than that. For example, I recently started using hledger. To be able to view different reports with a single click, all I had to do was to add a bunch of links to my start.org file, which is my little dashboard. Each link has some Elisp attached, which runs the necessary hledger command in a shell, and displays it neatly. Or, when I need to refer back to an email, I just run org-store-link in the Rmail buffer, and hit C-c C-l in my planner.org, which is my agenda, and again, it is one click away. I wanted to automate writing git commit messages, all I needed to write was a single Elisp function (gk-git-commit-mode-hook), and now I don't have to type rudimentary stuff again and again. These stuff are of course possible with other systems, but I like the way I can implement them in Emacs, with extensive docs at my fingertips and integrated, incremental, interactive development which makes it so easy to write.

    2 votes
  17. [4]
    mrbig Link
    Just another thought: comparing Vim with Emacs is absurd. It's like comparing Sublime Text with Itellij Idea. Two great programs in very different categories.

    Just another thought: comparing Vim with Emacs is absurd. It's like comparing Sublime Text with Itellij Idea. Two great programs in very different categories.

    2 votes
    1. [3]
      moocow1452 Link Parent
      Okay, but which one of those is better?

      Okay, but which one of those is better?

      3 votes
      1. mrbig (edited ) Link Parent
        You mean Vim vs Emacs? Depends on the needs. Silly to compare. They’re both awesome for different situations. That’s the entire point of my comment :P

        You mean Vim vs Emacs? Depends on the needs. Silly to compare. They’re both awesome for different situations. That’s the entire point of my comment :P

        2 votes
  18. banned Link
    Vim, as it is MUCH easier to use IMO.

    Vim, as it is MUCH easier to use IMO.

    2 votes
  19. mftrhu Link
    Emacs all the way. I tried vim, but modal editing just doesn't jibe with me. I like it a bit because it has everything and the kitchen sink built-in, but mostly because it makes it easy to do that...

    Emacs all the way. I tried vim, but modal editing just doesn't jibe with me.

    I like it a bit because it has everything and the kitchen sink built-in, but mostly because it makes it easy to do that - and to tweak what others have built, and to extend it. It has org-mode, yes, but it also allows you to mess around with it: you can rewrite parts of the exporters, define or re-define new link types, and you can do all of that by just switching to the *scratch* buffer, and you can do all of that for basically all of Emacs.

    The fact that it's one of the most lightweight applications running on my laptop doesn't hurt, for all the "Eight Megabytes And Constantly Swapping" of yesteryear.

    2 votes
  20. NecrophiliaChocolate Link
    Emacs, it just seems a bit better to me in terms of UI. But honestly I hate both, and in uni when we had to partner up, I would lose my mind if my partner was using Vim. It's just 10x harder to...

    Emacs, it just seems a bit better to me in terms of UI. But honestly I hate both, and in uni when we had to partner up, I would lose my mind if my partner was using Vim. It's just 10x harder to follow than VS Code. So I will go with VS Code any freaking day.

    1 vote
  21. yama Link
    I've discovered over time that it's useful learning the bindings for both emacs and vim. Beyond the editors, did you know that macOS has "emacs" bindings across its OS:...

    I've discovered over time that it's useful learning the bindings for both emacs and vim.

    Beyond the editors, did you know that macOS has "emacs" bindings across its OS: https://jblevins.org/log/kbd. There are browser extensions such as Vimium which allows you to use vim bindings to navigate the web. Knowing all this, I can navigate through my OS, editor and browser without taking my hands off the keyboard.

    1 vote
  22. actionscripted Link
    (Neo)Vim all day. Nothing else makes sense the way I think it should like Vim. It's always on any server I connect to and with things like ale, deoplete, gutentags...it's just enough of an IDE-ish...

    (Neo)Vim all day. Nothing else makes sense the way I think it should like Vim. It's always on any server I connect to and with things like ale, deoplete, gutentags...it's just enough of an IDE-ish setup that I feel super productive coding.

    1 vote