30 votes

Is Emacs or VIM worth learning in today's day and age?

I'm a full stack webdev and gotten through almost everything in life without using these legendary editors. For Linux work, I mostly use the nano CLI editor which does the job fine and while on desktop, there are superior ones like gedit and geany. On Windows, my preferred code editor is Notepad++ though I've experienced Eclipse, Visual Studio and Android Studio in various situations. Guess there isn't any substitute to AS when it comes to Android APK development?

But these two legendary editors (Emacs/VIM) come highly recommended and a programmer is considered incomplete in the long beard circles until they learn one of them, isn't it? But I want to understand what can I hope to gain by learning them in terms of utility or usefulness? Can I somehow bring efficiency to my workflow by reducing my development time or adding a feature?

42 comments

  1. [12]
    gary
    Link
    As a competent but not expert vim/helix user, I'd say less the editors themselves and more their keybinds. The editors are powerful, but my enjoyment comes from flying around the editor and vim...

    As a competent but not expert vim/helix user, I'd say less the editors themselves and more their keybinds. The editors are powerful, but my enjoyment comes from flying around the editor and vim keybinds are practically universal at this point. Try it out! Force yourself to use it for a while and manipulate text with it beyond just inserting.

    I mentioned helix because I like helix more these days. Their keybinds aren't supported in many editors though.

    26 votes
    1. [8]
      cfabbro
      (edited )
      Link Parent
      Speaking of trying it out, a good way to do that is by using a related browser extension. E.g. Firefox: (see below) or Tridactyl Chrome: (see below)

      Speaking of trying it out, a good way to do that is by using a related browser extension. E.g.
      Firefox: Vimium (see below) or Tridactyl
      Chrome: Vimium (see below)

      4 votes
      1. [7]
        updawg
        Link Parent
        I mostly just found Vimium annoying, and then even after I removed it I still sometimes see cursors in my browser when I click somewhere.

        I mostly just found Vimium annoying, and then even after I removed it I still sometimes see cursors in my browser when I click somewhere.

        2 votes
        1. [6]
          cfabbro
          Link Parent
          Ah. Yeah, looking at the Vimium FF reviews, some people have mentioned that being an issue. That really sucks, and I'm surprised it can even happen. Supposedly the Chrome version doesn't have the...

          Ah. Yeah, looking at the Vimium FF reviews, some people have mentioned that being an issue. That really sucks, and I'm surprised it can even happen. Supposedly the Chrome version doesn't have the same issue though. And I personally use Tridactyl and it doesn't have that issue, AFAIK.

          4 votes
          1. [5]
            updawg
            Link Parent
            I have actually only used it on Chrome.

            I have actually only used it on Chrome.

            1 vote
            1. [4]
              cfabbro
              Link Parent
              Oh damn... okay. I'm gonna just remove the links to Vimium then, since that's a pretty bad bug.

              Oh damn... okay. I'm gonna just remove the links to Vimium then, since that's a pretty bad bug.

              2 votes
              1. [3]
                lou
                (edited )
                Link Parent
                For what's worth I have used Vimium for almost a decade in several browsers and never encountered anything like that. I can't even recall any bug at all.

                For what's worth I have used Vimium for almost a decade in several browsers and never encountered anything like that. I can't even recall any bug at all.

                6 votes
                1. [2]
                  greyfire
                  Link Parent
                  Same, it's never given me any trouble at all and I hate when I don't have it available. But I spend most of my time in vim, so....

                  Same, it's never given me any trouble at all and I hate when I don't have it available. But I spend most of my time in vim, so....

                  4 votes
                  1. lou
                    Link Parent
                    Oh, the seconds of rage I have everyday when my browser is doing something addons cannot touch...

                    Oh, the seconds of rage I have everyday when my browser is doing something addons cannot touch...

                    4 votes
    2. [3]
      expikr
      Link Parent
      As a vim enjoyer, I'm curious to know how far is Helix from vim. How do you like it? What's better in Helix over vim?

      As a vim enjoyer, I'm curious to know how far is Helix from vim. How do you like it? What's better in Helix over vim?

      3 votes
      1. tauon
        (edited )
        Link Parent
        Preface: While I’m too young to ever have seriously given vim a try before finding Helix, and not using it as my main editor/IDE all the time (yet?), but for sure as my new go-to place for “scrap...

        Preface: While I’m too young to ever have seriously given vim a try before finding Helix, and not using it as my main editor/IDE all the time (yet?), but for sure as my new go-to place for “scrap note taking” and server-side edits – from what I can tell, and by reading reviews online, it’s still fairly similar. There is definitely a difference, however, and not just in the details. Some people seem to struggle more, some less, in getting used to the new keybinds after decades of daily vi-ing.

        how far is Helix from vim

        Some of the common commands are practically identical (:q!, :wq, /), or very similar/reasonably picked (g{g,e,h,l,42g}, others are a bit more removed from the original. As my first modal editor, their included tutorial file really helped in getting started.

        What’s better in Helix over vim?

        • Sane defaults: you can actually decide to install it, walk through the hx --tutor and start using the editor as a daily driver after that. While language servers will still be missing, syntax highlighting is mostly going to be there, as well as line numbers. I’d say it’s on a level comparable to or just under Sublime Text out of the box (in contrast to just a simple note-taking program). No endless configuration required, I to this day only have a small config file for the default color theme (I prefer light mode!), auto-save and line soft-wrap rules
        • User (beginner) friendlyness: all commands show in a sort of autocomplete, also applicable for other menus (e.g. when pressing space bar) with either the long form name or a short description next to them. About as discoverable as it gets
        • (Can’t judge too well, obviously, but) supposedly better question support/feature request handling/not being stuck with some of the more questionable design decisions left over from vim
        6 votes
      2. gary
        Link Parent
        @tauon answered better than I could. I agree with everything they said, and would like to add that adding in LSP stuff is way easier on helix (just install the language server; no config needed...

        @tauon answered better than I could. I agree with everything they said, and would like to add that adding in LSP stuff is way easier on helix (just install the language server; no config needed most of the time).

        The biggest reason I use helix is the polish. It lacks in features, notably no plugin system yet, but what it does have works better than vim plugins I've used. Global file search, a picker window for those results, and also fuzzy finding files are components I rely on constantly at work. Telescope and fzf worked on vim but there was often a slight lag that would drive me crazy. I would mess with configuration and waste time without fixing the issue. It just works on helix without the lag.

        The LSP stuff I mentioned earlier? Yeah I got it working in vim with a bunch of config. They make it "easier" now but the damn steps are so boilerplate that they might as well bake it in with an easy install option rather than have you copy paste config you're not really reading until something is broken and you have no idea why. They have batteries included "distros" of vim now and maybe they solve the above problems.

        My helix config file minus empty newlines is 14 lines long, of which 5 of those lines is setting the section the setting applies to. I haven't touched it since the first week I started using helix; it just works.

        Every release brings substantial improvements and I feel a lot of joy reading these changelogs 2 or so times a year. The features probably all exist in vim through a plugin, but the curation and polish aspect make me happier than hunting for something I'm not even aware exists.

        Vim is great! I will always love vim and use vi/vim on a system that isn't mine. I'm just too busy these days to tinker with my config files and like things with sane defaults, fast, and good enough.

        5 votes
  2. [2]
    stu2b50
    Link
    It can be worthwhile, but it's not going to be lifechanging or anything. Pretty much every modern editor has vim keybindings; some even go further, e.g on VSCode there's a neovim plugin where it...

    It can be worthwhile, but it's not going to be lifechanging or anything. Pretty much every modern editor has vim keybindings; some even go further, e.g on VSCode there's a neovim plugin where it actually just replaces the entire editor with an actual running copy of neovim, as opposed to just being bindings.

    One advantage is that text editors that aren't emacs and vim on the command line just suck. You can get by on nano or whatever, but you're going to groan every time you have to edit a textfile on the command line. An advantage particular to vim is that vi is practically a default install, whereas emacs usually isn't.

    They can maybe make you faster in general at editing text. But that's not usually the bottleneck when it comes to writing code anyway. So I don't think it matters all that much.

    22 votes
    1. jess
      (edited )
      Link Parent
      This is what I use. It lets me use neovim plugins in vscode, and means my config is synced between vscode and terminal. I use vscode + nvim for projects, and nvim on the terminal for editing...

      on VSCode there's a neovim plugin where it actually just replaces the entire editor with an actual running copy of neovim, as opposed to just being bindings.

      This is what I use. It lets me use neovim plugins in vscode, and means my config is synced between vscode and terminal.

      I use vscode + nvim for projects, and nvim on the terminal for editing loose/solo files. I leave the basic vim keybinds as their defaults so that if I've SSHed onto a machine or using an unfamiliar computer I can use vi(m) instead of nano without issue.

      I don't think it is 'superior', but I do prefer not having to touch the mouse and find it a little smoother. It does make me a little faster, though I'm rarely bottlenecked by that when programming.

      5 votes
  3. [3]
    mat
    Link
    No. I say that as a lifelong vim user. If you're involved in sysops at all, then yes - but you'd already be using one or the other if you were. Editing the occasional config file in nano is fine...

    No.

    I say that as a lifelong vim user. If you're involved in sysops at all, then yes - but you'd already be using one or the other if you were. Editing the occasional config file in nano is fine but if you're spending any significant amount of time in the cli, it's worth the effort to learn something more powerful.

    It's perhaps a little inaccurate to say gedit is "superior" to vimacs, it's just easier to use. Gedit doesn't have anything like the features, but if they're not features you need, then that doesn't matter.

    17 votes
    1. [2]
      Joshua
      Link Parent
      As someone involved in sysops but not very experienced. What are some things I could be learning in vim? I’ve literally just used it for changing text manually in config files. I know i hit i to...

      As someone involved in sysops but not very experienced. What are some things I could be learning in vim? I’ve literally just used it for changing text manually in config files.

      I know i hit i to start editing, hit escape when I’m done, and type :wq! to save and quit or :q to quit without saving.

      Are there more useful things i could be doing?

      2 votes
      1. mat
        Link Parent
        Find and replace is useful, especially combined with REGULAR EXPRESSIONS!. Or just find. Being able to change a word, rather than pressing delete x times then type a new one, is neat. :cw (c is...

        Find and replace is useful, especially combined with REGULAR EXPRESSIONS!. Or just find. Being able to change a word, rather than pressing delete x times then type a new one, is neat. :cw (c is the 'change' command and it's more powerful than just changing words). But I dunno, what's useful for me might not be for you.

        What I found very helpful when I was starting out was googling "vim cheat sheet" and finding one which was simple enough to print on a single page and leave propped against my monitor, but in depth enough that I had stuff to learn from it, and included stuff I might need. Your requirements will be different to mine, but have a look around and see what looks good to you. It might just be half a side of a few very simple commands at first, but having it right there by my screen all day was really useful.

        Also remember it's going to be slower at first to look up and use the new commands rather than just hitting i and treating vim like gedit. But once you get used to it, it'll be a LOT faster. Especially over a slightly dodgy ssh connection. Being able to hit cc to delete a whole line and switch to insert mode is much easier and safer than pressing delete x times and hoping you counted right.

        3 votes
  4. lou
    (edited )
    Link
    As Vim itself, Vim keybindings are ubiquitous and may come in handy. Whenever you ask yourself "can I get Emacs to do that?", the answer is usually yes. Emacs is inadvisable for tinkering addicts....

    As Vim itself, Vim keybindings are ubiquitous and may come in handy.

    Whenever you ask yourself "can I get Emacs to do that?", the answer is usually yes.

    Emacs is inadvisable for tinkering addicts. That is true for Vim as well, but few can resist Elisp's narcotic embrace. You may spend more time messing with your car than actually driving it. Emacs is too interesting for someone with poor impulse control such as myself. However, if you're capable of resisting the urge to tinker, you can get a lot of benefit from it.

    EDIT: forgot to mention that I find Vim keybindings immensely pleasurable. I don't care about any elusive gains in productivity I just think they feel really nice so I use them whenever supported. Including my time with Emacs.

    11 votes
  5. Happy_Shredder
    Link
    I'm a happy neovim user. I've customised my vim with exactly the functionality I need, without compromising speed. And well, the vim philosophy (composibility+macros+programability) results in...

    I'm a happy neovim user. I've customised my vim with exactly the functionality I need, without compromising speed. And well, the vim philosophy (composibility+macros+programability) results in very efficient text-manipulation workflows. I can't live without it. It's not necessarily about typing or coding faster, rather about relieving tedious text manipulation.

    9 votes
  6. 3d12
    Link
    As others have mentioned, speed. I'll add to this a practical example. I switched my default note-taking app from Notepad++ to Neovim once I felt comfortable enough with the keybinds. And in the...

    As others have mentioned, speed. I'll add to this a practical example. I switched my default note-taking app from Notepad++ to Neovim once I felt comfortable enough with the keybinds. And in the fast pace of a quick-fire meeting, even the simple time-save of being able to use 'w' and 'b' to move forward and backward on word boundaries feels light-years faster than the process of: take my right hand off of home row, hold Ctrl with left, press left/right arrow, bring right hand back.

    I realize this sounds like a superfluous example, but I can't stress enough how much quicker the notes can flow when your hands almost never need to leave home row.

    9 votes
  7. kej
    (edited )
    Link
    I think it's similar to touch typing. You don't have to be able to do it, but it will make it easier to program because you can enter text without having to think about which individual keys to...

    I think it's similar to touch typing. You don't have to be able to do it, but it will make it easier to program because you can enter text without having to think about which individual keys to press. Vim is the same way; it reduces more complicated editing steps to muscle memory or a handful of keypresses, and leaves my brain more time to think about the actual code.

    8 votes
  8. Boojum
    (edited )
    Link
    It seems like a lot of replies here have answered from either the Vi/Vim perspective, either from the pure thing, or from its emulation in Emacs or other tools. As a long-time user of pure Emacs,...

    It seems like a lot of replies here have answered from either the Vi/Vim perspective, either from the pure thing, or from its emulation in Emacs or other tools. As a long-time user of pure Emacs, I'll just give you a run down of why I still use it and you can make of that what you will.

    Customizability: At its core, Emacs is essentially a Lisp interpreter with a bunch of builtin functions and datatypes for manipulating buffers of text. There's a relatively small core of C code to it, and a much larger layer of Lisp on top of that. Every time you type a key, you're running a Lisp function. Even just to insert letters into a buffer!

    That Lisp code can be introspected, wrapped, replaced, etc. And not just at the plug-in level like in something like VS Code. I can type in a new Lisp function, evaluate the definition to add it to the running Emacs session, and then bind keys to it all on-the-fly without restarting Emacs. I've sometimes done this with one-off functions for task-specific purposes.

    I can also interpose my own code to run before or after (or both) some other predefined function runs. Much of the existing code will invoke callbacks called "hooks", which can be customized. And if I like the results of that new code, I can just add it to my config to make it permanent for future use.

    So to me, Emacs is less of an editor and more of a toolkit for building an editor. You get a decent starter editor out-of-the-box, but you're encouraged to really make it your own. That toolkit like approach is also why you probably see less emulation of its key bindings than vi in other IDEs.

    (Many people point out that this customizability can be a bit of a tinkering quagmire. My view is to just make note of the odd rough spots when I'm busy with a project and then come back and address them later when I have some downtime. I've used Emacs long enough now that major changes to my config are quite rare.)

    Efficiency: I've never been a Vi/Vim user, but from what I've seen of it, its adherents value a slightly different kind of efficiency. From what I can see of things like Vim golf, they seem to value minimizing the number of keystrokes needed to efficiently maneuver around in a file and make surgical changes to it. The keystrokes in Vi/Vim seem to operate as a DSL for manipulating text in a fine-grained way. It seems to value editing efficiency at a micro-level.

    I'd argue that Emacs is about efficiency on a different level. It tends to put more value on efficient bulk manipulation or doing things in a smart way. There are many, many functions in Emacs for doing bulk changes to a file. For example, it can even do stuff like evaluate a Lisp expression in a search and replace to determine the replacement!

    Also, my config has a lot of DWIM ("do what I mean") functions that customize keys to respond in a contextualized way that suits me personally. For example, I have things customized so that if I hit the delete key anywhere in the middle of a line then it deletes the character on the cursor as normal. But if I hit the delete key at the end of the line, it deletes the newline and then all but one space of the indentation on the next line. (I visualize this sort of thing as like polishing off all the sharp edges of a stone to make it silk smooth in the hand.)

    Composability: Emacs likes to represent almost everything as a text buffer -- whether or not it is backed by a file, or just a temporary buffer in memory. This can even get somewhat meta when the list of open buffers is itself just another buyffer.

    And the majority of its operations are aimed at manipulating those text buffers.

    Together, this leads to a narrow waist architecture, with multiplicative effects that are more than just the sum of its parts.

    For example, Dired is a built in package that represents the contents of a file directory as a buffer. And it has keys that can put that into a writable state and then commit any changes made to the buffer back to the file system. That means that I can use all my usual means for search and replace, key macros, custom Emacs Lisp functions, etc., to efficiently rename files. Or I can use key macros to mark every Nth file for deletion.

    I can also do something similar with the results of a grep across my project or open buffers to do wildly powerful bulk edits across matching lines in dozens or hundreds of files.

    It gets pretty powerful once you begin to see the editor as hosting a stable of tools that all operate on this common datatype of a text buffer.

    Screen Space: A small point, but at this point I run Emacs with nearly all the GUI chrome turned off. This means that nearly all of my screen space is devoted to just showing me the stuff I'm editing. Many years ago, for example, I was perfectly fine editing documents and code with it on a tiny little netbook. I just made Emacs full screen and got on with things. I think with a typical IDE or text editor, a good fraction of the screen would have been devoted to the GUI chrome and I'd have been looking at my files through a little periscope.

    (I'll also note that at one point, I was able to effectively use that little netbook to edit code hosted on a desktop on the other side of the Atlantic while abroad for a conference. The wifi was flaky and slow, but Emacs's display system from the low-baud era handled it just fine.)

    Longevity: I've used Emacs for 25+ years now, and I've seen the new hotnesses in editors come and go. What with the Lindy effect, I fully expect Emacs will last me for the rest of my life (on whatever platform I may use in the future) and for its development to outlast me.

    Tools: Emacs has a lot of cool tools and packages available. I used to hate Git, for example, because of its CLI, but Magit makes it downright pleasant in many ways. And how many editors ship with a builtin programmer's calculator that can do symbolic calculus, linear algebra, and arbitrary-precision arithmetic?

    8 votes
  9. text_garden
    Link
    I don't regret getting started with Vim and using it for the past 15 years, but I am also wary of recommending it to anyone already content with the way they write code. Especially when motivated...

    I don't regret getting started with Vim and using it for the past 15 years, but I am also wary of recommending it to anyone already content with the way they write code. Especially when motivated by what the "long beards" think.

    For me, the most important gain is in ergonomics. The mouse is extremely powerful as a kind of generalized interface for pointing at things precisely, and editors I'd used before leaned heavily on this. You can click and pull a selection precisely over the text you want to select or place the cursor exactly where you want it with relative ease and basically no cognitive load because it's so intuitively analogous to the exact motion of your hand. Vim was the first editor I'd used that felt like it offered a viable alternative to the precision and expressiveness of mouse motions using just the keyboard. That means less reliance on the mouse which is a great thing in terms of ergonomics, especially in the context of typing.

    The cost is that I had to build an intuition around the Vim commands, but since I write code several hours a day and intend to do that until I retire, it would easily pay off even if I spent weeks figuring it out to a comfortable level of understanding. Once it's there is there: I now speak a language of motions and commands that apply to motions confidently and without much thought.

    8 votes
  10. [2]
    unkz
    Link
    I spend most of my time in vim, and the rest in Jupyter. If you spend most of your time developing on remote servers, it’s a big benefit. If you for some reason do mostly local development, you...

    I spend most of my time in vim, and the rest in Jupyter. If you spend most of your time developing on remote servers, it’s a big benefit. If you for some reason do mostly local development, you might not have much of a need, although I still prefer vim for local development as well over vscode/pycharm/eclipse/other IDEs.

    6 votes
    1. teaearlgraycold
      Link Parent
      I develop mostly remotely but use VSCode over SSH. However, I wear many hats (sys admin, web dev, dev ops) and even got formal vim education with my degree in CS. So I know enough vim to prefer it...

      I develop mostly remotely but use VSCode over SSH. However, I wear many hats (sys admin, web dev, dev ops) and even got formal vim education with my degree in CS. So I know enough vim to prefer it over nano.

      3 votes
  11. BeanBurrito
    (edited )
    Link
    You can get by fine with Nano ( no learning required ) for editing text files for system administration. You can even use a GUI editor like Gedit, just by typing gedit <filename> in the shell. The...

    You can get by fine with Nano ( no learning required ) for editing text files for system administration. You can even use a GUI editor like Gedit, just by typing gedit <filename> in the shell.

    The people who go on about EMACS or Vim have learned them already, learned them long time ago, have a sentiment for them, and have keyboard shortcuts burned into their reflexes.

    There are many great free and non-free IDEs for development that are better than either EMACS or Vim.

    Disclosure: back in the day I belonged to alt.religion.emacs.

    6 votes
  12. [2]
    zenen
    Link
    I've been a vim user since pretty much the first time I logged onto a UNIX system. I have zero regrets about dedicating time towards learning how to use it, specifically because it's always...

    I've been a vim user since pretty much the first time I logged onto a UNIX system. I have zero regrets about dedicating time towards learning how to use it, specifically because it's always available to me. I don't consider myself an expert, I've pretty much learned to the extent that I've found useful. Sometimes I write a macro and then mash @@ until I'm content.

    To me, part of the appeal is that full-service IDEs are slow and clunky unless you have a decent computer. They take a lot of resources to install and run, and if I find myself working on an old system with 1GB of RAM then I'd rather be working without a desktop environment and Electron taking up 90% of my resources before I even run the code.

    I also try to use stuff like awk and sed when I can, so it's possible that we just have entirely different priorities. I would rather use and master tools that are already available to me rather than install new ones. UNIX has been around for a long time, there's no shortage of learning for me to do.

    5 votes
    1. vord
      (edited )
      Link Parent
      I've never used macros in vim, but even this simple trick justifies using vim over many others: :10 <Enter> d5d G p Translation: Jump to line 10. Cut 5 lines (delete to buffer, hence d). Jump to...

      I've never used macros in vim, but even this simple trick justifies using vim over many others:

      :10 <Enter>
      d5d
      G
      p
      

      Translation:
      Jump to line 10. Cut 5 lines (delete to buffer, hence d). Jump to the end of the file, Paste.

      It very much is like spellcasting against text, the way you can chain operators together.

      If you're using vim, using set number to see line numbers will help so incredibly much for small operations. I blame bad defaults on many distros for vim seeming so bad.

      I think vim (the keybinds in particular) is worth learning if only because it exposes the power of a UI that is considered dead and useless by many.

      11 votes
  13. [2]
    zazowoo
    Link
    I just love using Vim. It regularly gives me little moments of joy throughout the day when I get to solve mini-puzzles like how to write a macro that lets me automatically change a bunch of lines...

    I just love using Vim. It regularly gives me little moments of joy throughout the day when I get to solve mini-puzzles like how to write a macro that lets me automatically change a bunch of lines that I'd otherwise need to do manually. It absolutely takes a lot of investment to learn it, and on top of learning the basics of how to use Vim, you also need to figure out how you want to configure it (unless you go with some turn-key config like LunarVim). For me, the journey has been tough but ultimately worth it. I feel like I'm flying when I'm working in Vim.

    If you're interested in learning it, you could try out Vim Adventures, which is a little browser game designed to get you familiar with the keystrokes. I also really like this cheatsheet for discovering what various keys do. And my biggest piece of advice to people learning vim is to try to avoid using the arrow keys. It's really hard in the beginning to learn the navigation keys, but if you are hanging out in Insert Mode and using the arrow keys to get around, Vim is just going to be a difficult-to-use text editor without much benefit to make up for the struggle. The fun/power in Vim comes from what you can do when you're hanging out in Normal mode by default.

    These days, ChatGPT is also really good at being a Vim tutor when you have questions about how to do something or how to configure plugins that you'd like.

    This probably won't apply to many people here, but I work at a place where we pair program remotely all day, and I find the combo of vim and tmux makes pairing super low-latency (since you're sharing a shell, not anything graphical) and easy to organically switch driver/navigator similar to how you would in person. At my last full-time pairing job, everyone used vim and tmux and it was wonderful. At my current job, not everyone wants to learn/use vim, which is fine, so I use vim/tmux with some coworkers and screensharing or VSCode LiveShare with others. The vim/tmux pairing sessions are noticeably smoother and more focused on just coding and being in the flow state vs the meta aspects of remote pairing orchestration.

    5 votes
    1. zenen
      Link Parent
      pair programming over tmux is a personal favorite of mine. also, +1 on vim being appealing for the sake of solving mini-problems all the time - it keeps my dopamine receptors firing on the more...

      pair programming over tmux is a personal favorite of mine. also, +1 on vim being appealing for the sake of solving mini-problems all the time - it keeps my dopamine receptors firing on the more complicated refactors

      2 votes
  14. UP8
    Link
    I used ed-family editors that were predecessors to vi when I ran OS-9 on a TRS-80 Color Computer and met GNU Emacs in college. Emacs was my favorite editor from 1989 to maybe 2005 but I decided to...

    I used ed-family editors that were predecessors to vi when I ran OS-9 on a TRS-80 Color Computer and met GNU Emacs in college. Emacs was my favorite editor from 1989 to maybe 2005 but I decided to switch to vi for a few reasons:

    (1) I was cutting-and-pasting text from web browsers, using IDEs like Eclipse, etc and found it was easier to use vi side by side with modern editors because (a) damn that ^S in emacs is inconsistent with most of the applications I use, and (b) the continuation characters in emacs when you wrap around a line mess up "cutting"

    (2) Often when you have to log into a Linux machine to do some admin it is in a bad state and you want to make some edits without having to install an editor (often I don't expect to log in often, just have permission to resolve a problem as opposed to install software, ...): vi is always there so you can be 100% productive right away.

    When I edit text I mostly use the editor built into JetBrains tools: if I am editing source code it could be in PyCharm, WebStorm or IntelliJ IDEA, but sometimes I need an editor for some random thing (or a remote machine) and then I reach for vi.

    Even if you use Windows you can install vim on your computer and use it instead of Notepad just to keep in the habit.

    5 votes
  15. devilized
    Link
    I use vim key bindings wherever I can - IDE (Jetbrains), the text editor itself if I need to edit via SSH or console, and I even use the bindings on my command line itself. It does save me time...

    I use vim key bindings wherever I can - IDE (Jetbrains), the text editor itself if I need to edit via SSH or console, and I even use the bindings on my command line itself. It does save me time not having to switch between a mouse and keyboard.

    I learned it back when I was a Unix sysadmin because you were kinda forced to. It was the only way to edit files. But I've found it to be very useful even with modern editors.

    4 votes
  16. [2]
    Banazir
    Link
    I'm biased because I use Vi/Vim/Neovim anywhere I can, but I say it's worth it especially if you have to do any system setup from a very simple base image. It's a huge advantage to have not just...

    I'm biased because I use Vi/Vim/Neovim anywhere I can, but I say it's worth it especially if you have to do any system setup from a very simple base image. It's a huge advantage to have not just an editor available, but a relatively complex one that can handle text manipulation commands. I've set up a few systems that only had Vi, not even full Vim or Nano. Granted you can install those quickly, but usually the point is to minimize actual time on server and reduce your personal footprint as much as possible.

    If you're only working on your own machine, then I'd say it's less required. However, the big strength of Vim and Emacs in that situation is the default keybinds and commands. Being able to move, delete, or reformat whole paragraphs of code with a few keystrokes (and no mouse!) is a huge efficiency boost. You spend less time thinking about how to edit and more time thinking about how to improve the code. Once the commands become muscle memory, you'll find yourself missing having them.

    If you want to learn, there's no better tool than vimtutor to get started. Either way, have fun!

    4 votes
    1. overbyte
      Link Parent
      And it might be a joke, but this vimtutor speedrun shows how fast you can move with the editor once you get used to the keybindings.

      And it might be a joke, but this vimtutor speedrun shows how fast you can move with the editor once you get used to the keybindings.

      3 votes
  17. mftrhu
    Link
    Yes. Most of the comments in this thread seem to be focusing on Vi/Vim, saying things like "it's not the editor, it's the keybindings" - and yes, most editors can emulate the Vi keybindings, but...

    Yes.

    Most of the comments in this thread seem to be focusing on Vi/Vim, saying things like "it's not the editor, it's the keybindings" - and yes, most editors can emulate the Vi keybindings, but this doesn't apply to Emacs.

    It's default keybindings are less than optimal. You can get used to them, but the real beauty of Emacs is the fact you can modify pretty much everything: it's not an editor, as much as a LISP environment which happens to include an editor, which you can reprogram on the fly to do pretty much anything you can imagine.

    Even if you don't like LISP - there's no accounting for taste - it still has a pretty decent amount of third-party packages which you can use to e.g. read the news, browse gopher and Gemini, chat on Telegram, and poke around OpenStreetMap. You can bookmark and link to the resources exposed by these packages, which means you hardly ever need to leave Emacs.

    It's not for everyone, but give it a whirl - if it clicks, you'll understand what I meant by "beauty of Emacs".

    4 votes
  18. [2]
    donn
    Link
    I know just enough vim that I'm not entirely helpless (or resigned to nano editing speeds) on remote setups. I'd still say it's worth it, I'd learn more myself if there wasn't a huge learning curve

    I know just enough vim that I'm not entirely helpless (or resigned to nano editing speeds) on remote setups. I'd still say it's worth it, I'd learn more myself if there wasn't a huge learning curve

    3 votes
    1. lou
      Link Parent
      If you wanna learn just enough to feel comfortable, do the Vimtutor 10 times in ten consecutive days. That's what I did. I think it was like 30 minutes everyday but since you already know a bunch...

      If you wanna learn just enough to feel comfortable, do the Vimtutor 10 times in ten consecutive days. That's what I did. I think it was like 30 minutes everyday but since you already know a bunch of stuff you'll be much faster.

      2 votes
  19. crdpa
    Link
    For me, helix and kakoune are better than vim. It is worth if you use the terminal and edit text files a lot. If not, then don't.

    For me, helix and kakoune are better than vim.

    It is worth if you use the terminal and edit text files a lot. If not, then don't.

    3 votes
  20. wycy
    Link
    I learned vim maybe a year or two ago, and for me it was absolutely worth it. It was a complete game-changer in terms of the way I program and even just use the computer in general. Switching to...

    I learned vim maybe a year or two ago, and for me it was absolutely worth it. It was a complete game-changer in terms of the way I program and even just use the computer in general. Switching to it made me appreciate the terminal a lot more, and now I do almost all of my work with a full-screen terminal with vim+tmux.

    3 votes
  21. [2]
    sunshine_radio
    Link
    Oh gosh, there are a lot of "not really" answers in here. I dunno. I mean, yeah, to be honest a lot of the most effective developers I have EVER worked with are VS Code users who couldn't cd their...

    Oh gosh, there are a lot of "not really" answers in here. I dunno.

    I mean, yeah, to be honest a lot of the most effective developers I have EVER worked with are VS Code users who couldn't cd their way out of a paper bag. It's crazy and counterintuitive to me, because I got trained at an intense-ish Linux shop where vim and emacs and, most of all, the shell were placed on a pedestal as problem-solving tools.

    I started with vim and I really treasure its consistency and effectiveness. I used it for 4 or so years and never felt tempted to switch - any feature of PyCharm or VS Code that I learned of could easily enough be replicated in vim, and my navigating was so much more convenient to me. Never needing to leave the keyboard is super comfortable and it just feels like a harmonious state to exist in with your computer.

    And then I learned about Doom Emacs and I eventually gave it a try, and it's mind-blowingly good once you commit to "learning the emacs way" of doing something. (emacs users may say that I'm still not there yet, since I'm using "evil mode," which is the punnish name that emacs has for its vim keybinds, which Doom has on by default).

    Before I embraced these editors, coding was a constant rigamarole of "Okay, gosh, this is command-line output, but I need to copy and paste it to a file so I can pass it to my django-admin command... Oh, wait, was that an error response or OK? How do I check? Oops, an error is coming from X package, what subdir is that found in again? Jeez, it's a lot of clicking to open that..." I don't want to promise you the moon or anything, but if that kind of thing bothers you, vim and especially emacs have some really wild stuff to offer you.

    3 votes
    1. lou
      Link Parent
      The way Doom Emacs do configurations makes total sense. To the point that I would use it even if they removed all non-essential packages. Just to have a manageable init.

      The way Doom Emacs do configurations makes total sense. To the point that I would use it even if they removed all non-essential packages. Just to have a manageable init.

      3 votes
  22. ButteredToast
    Link
    In the ~24 years I’ve been tinkering with programming in some capacity, I haven’t had much need for vim or emacs. This is something that I’m sure varies a lot depending on a person’s background,...

    In the ~24 years I’ve been tinkering with programming in some capacity, I haven’t had much need for vim or emacs.

    This is something that I’m sure varies a lot depending on a person’s background, though — almost all code I’ve written has been under either Classic Mac OS or OS X/macOS, which has predisposed me toward GUI IDEs/editors. First REALBasic, then Project Builder (now known as Xcode), then SubEthaEdit (for writing HTML and PHP), then TextMate (for Ruby/Rails), and since 2015 or so a mix of Xcode and Sublime Text.

    One big difference with OS X/macOS which may have kept me away from vim/emacs are its system wide text navigation hotkeys [0] [1], which are a mix of mac-unique and emacs-inspired and are supported in nearly every standard text field and most non-modal editors and IDEs. They allow for similarly keyboard-dominant text manipulation without requiring a particular editor or plugin. For example, I used the shortcuts when writing this post in a browser, and I make heavy use of them in messaging apps too.

    2 votes