Hey everyone!

I was just wondering why one would use any of the programs I mentioned above instead of VS Code to write Code.

Can someone give me a brief overview of the advantages?

Thanks in advance!

  • If you frequently work on remote systems you frequently only get command line access, where you can still use vim/nano/emacs but not a full IDE like VS Code. In that case you might find it more convenient to learn one text editor well and forgo the IDE.

      • There’s a long list of caveats when running VS Code over SSH. By comparison, text editors:

        • Work on Alpine remotes
        • Work on older distributions, and other *NIX systems
        • Have no problems with SSH key passphrases or security keys
        • Only require a few MB of memory
        • When run in tmux are largely resilient to SSH connection issues
      • Yea, no. It doesn’t work with ssh agent and it cannot read includes and other configuration options. I believe it also tries to install some components remotely which is bad enough, but causes additional issues in environments with proxies or without internet access at all. Iirc also plugins must be installed remotely to work.

        In a normal professional context it just does not work and it is a hassle to deal with. It might work in a home lab, but nowhere beyond that.

  • From the perspective of someone who uses Visual Studio Code, but also knows how to exit vim, there are a couple reasons that most developers who prefer one of the three, at least those I’ve spoken to.

    1. VS Code is a Microsoft product, and while “open source” it isn’t really open source. The core utility is but Microsoft ships the final application with some proprietary features. If this is your main gripe, then you can try VSCodium instead, which is a “fork” that doesn’t have the Microsoft additions.
    2. VS Code uses Electron, which is essentially browser emulation and isn’t exactly optimized. CLI editors like the above take up far fewer resources than a Visual Studio Code instance would. Unlike point (1), I don’t think there’s really a way around this in all practicality. It’s just an unavoidable fact. You can chose to still use VS Code of course, most personal computers can easily handle the load. But many see that as unnecessary when they get the same amount of “power” from a CLI editor.
    3. Plugins for the CLI applications are very powerful, and the ability to navigate using only the keyboard is by design. Many swear by keyboard-only operation of a computer because it’s faster and promotes more optimal methods of doing tasks. It forces discovery of new features and hotkeys by making things annoying to do otherwise. VS Code (and most editors) include a “vim keybindings” specifically for this reason. You’ll find that it’s a very popular method of working.

    Really it comes down to personal preferences and what you “grew up” using. It’s really hard to transition into something like vim and it takes a concerted effort to switch by most users. You have to want to switch, otherwise you’ll find it too difficult a learning curve or find yourself wandering back to more “featured” applications.

    There are likely more reasons out there, but these are, in my experience, the primary reasons.

    • +1: ed/vi/vim is on every system with a shell, if you can ssh into it, you can edit files using those tools, it’s worth knowing them.

      Nano is adorable, and EMACS is notoriously huge, both in capabilities and learning curve.

  • For me NVIM has several really cool advantages: NVIM is really fast. With a good terminal emulator I can open enormous log files and be able to navigate around/search immediately. I have recently pivoted to DevOps, and using VSCode to interact with large log files made me realize how slow and sluggish it actually is.

    Motions and modal editing. Plenty of people have already said how fast it is, I will just add that it is also very fun and, if you dig around a bit, not that hard to learn.

    Configuration using Lua - I like it because my configs are simple git repos, so the file structure and the logic of configuration is easy for me to work with. I always thought VSCode to be quite awkward to configure. Also, using Lua instead of JSON makes it incredibly flexible, and as a tinkerer I find a lot of joy in customizing things.

    NVIM (or VIM) is ubiquitous. You can expect it everywhere, and every other IDE has VIM-like bindings. Learn VIM = be comfortable anywhere.

    A personal perk for me personally is that NVIM is designed to be used without a mouse. Mice give me wrist pain, and switching to NVIM made my work a lot more bearable.

    If you’re thinking about trying it out, I would recommend going for a community-maintained distributions like AstroNvim or ChadNvim. It’s also quite cool to go back to your preferred editor, knowing your preferences are now more refined after trying alternatives.

    Anyway, good luck

  • One thing I haven’t heard others mention is fun. The better I get with vim, the more fun I have applying my skills to work efficiently.

    I also love that I can use it with a phone keyboard and still remain highly efficient. Being able to SSH into my server on the go and not be terribly hampered in my admin and editing is pretty amazing.

    Ubiquitous, powerful, flexible, lightweight, fun: it’s a pretty good mix of positives in the tradeoff for vim.

  • Different tasks. VSCode is littered with half-baked spaghetti code from various projects. My terminal window is for system-level non-project interactions.

    I stick with terminals and vi for various day-to-day administrative things, because you never know when you’ll have to log into a different machine which doesn’t have all your software and preferences set up. I would prefer not struggle to recall keyboard shortcuts I last used 100 years ago when that happens.

    It’s bad enough having ADHD and long covid to completely obliterate my working memory, without the added irritation of googling “man vi move to section”, knowing you have definitely used the command many times in the past.

    • I do this too. I refuse to change the keyboard shortcuts in any application I use, except to mimic the shortcuts of a more popular application

      For example, I use GNOME Terminal’s keyboard shortcuts in kitty

  •  ctr1   ( @ctr1@fl0w.cc ) 
    link
    fedilink
    English
    8
    edit-2
    10 months ago

    As a Vim/NeoVim user my number one reason is speed. There’s a pretty steep learning curve, but it doesn’t take long to see noticeable improvements.

    Aside from terminal applications generally running faster than GUI ones, there is a tremendous amount of flexibility that it offers when it comes to actual text editing. For example, you learn how to type things like _f(vi(cfoo _f(ci(foo which goes to the beginning of the line, finds the first open parens, selects everything inside of the parens expression, then replaces that text with “foo”. After a while these kinds of inputs become second nature, and you can start using them to construct macros on the fly that can be applied to different places in your code.

    One major downside is that it can take some configuration to get working the way you want it, especially if you want an IDE-like environment. NeoVim comes with a built-in LSP interface, which I’ve been able to get working pretty well for all of the languages that I use the most, but it’s still kind of a pain to configure.

    I’m sure Emacs is similar, but I’ve never used it. I don’t think many people use Nano unless they need to edit something in a terminal but don’t know how to use Vim. On that note, being comfortable with a terminal editor means that you’ll have no problem if you’re SSH-ing into a server or using the TTY console.

    _f(ci(foo avoids an unnecessary mode change, see comment below

  • If you actually understand the programming language, libraries, problem, and think about your solution first, you can code just fine in ed, the standard text editor. Sometimes I do, I’m the third real programmer

    In practice, I mostly code in Vim, which launches instantly, is completely customizable, and I can type and edit faster than in anything else. IDEs are excruciatingly slow, with all the highlighting and analysis stuff on, waiting for code completion instead of just typing it out because you know things.

    You don’t need any of that.

    There’s also the issue that VSCode is spyware created by Microsoft, and both things should send you running away.

  • People have a weird obsession with typing speed it seems haha

    When I’m coding I tend to do more thinking than typing so I don’t see the benefit. Being able to reason about code is much easier with syntax highlighting and go to definition etc.

    Vi is the default for Linux and you’re essentially forced to learn it as it may be the only editor on a server you’re working on. Then it feels like Stockholm syndrome.

    • The appeal of vim is actually the opposite of just fast typitg speed. Vim’s default mode is one where you can’t type, you can only edit. The reasoning is that when coding as you said, you tend to think more and edit existing code, rather than writing completely new code. I find that vim has a lot more features for navigating and editing code than any other editor

        •  Lauchmelder   ( @Lauchmelder@feddit.de ) 
          link
          fedilink
          Deutsch
          2
          edit-2
          10 months ago

          In my neovim setup I have basically the same functionality as vscode. with the added benefit of not having to reach for my mouse to navigate the cursor to a certain location. Vim has a steep learning curve, but all the hotkeys let you navigate way more quickly than you could with a mouse (or with arrow keys)

          Edit: By “same functionality as vscode” I mean file tree, quickly finding files by searching, fuzzy finding terms in the project, syntax highlighting, linting, intelli sense, and all the qol features the modern developer wants like auto-closing brackets etc. Really the main reason I use vim is just the hotkeys. I’ve gotten used to them and wouldn’t wanna go back to using my mouse that much. And ofc vim is a lot more lightweight than vscode

  • For me personally it’s probably mostly just momentum or habit at this point. I got into Linux on the late 90s or early 00s. Vim was the best option at the time so I figured it out mostly out of necessity. Now I’m just so comfortable with it and I’ve tweaked it to high hell it’s like a perfectly broken in pair of shoes… Everything fits me just right. I don’t see any real benefit to switching to vs code. I’ve tried it but didn’t like it. Things like filesystem navigation were so clunky and slow compared to what I was used to.

    Whatever… No judgement. There are obviously great developers out there using vs code. This just works for me.