I’m relatively new to programming, I’ve been learning C on linux using nano and it’s been very fun. I’ve recently fallen into the emacs/vim rabbithole and I’ve been watching videos about emacs, Doom, spacemacs, neovim and reading comments about people switching from this or that to another config or editor, and I’ve been a bit lost on what to do. Then I realised that I haven’t done any coding and spent all of my time focusing on editors. So here is my question (which has probably been asked many times) : what is the point of investing so much time learning all of this when there are some IDEs that are preconfigured with all the functionality a programmer would need ? Does learning neovim or emacs actually save time in the long run? I know that they’re much more lightweight than IDEs and I’ve been really enjoying using the terminal much more than my time on IntelliJ, but having an easy out of the box visual debugger, refactoring and jump into functions can be really helpful in the long run I think, especially when starting to write actual large programs. Nano is fun, but not a time saver. Why did you chose your editor?

  • nous@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    what is the point of investing so much time learning all of this when there are some IDEs that are preconfigured with all the functionality a programmer would need ?

    Editors are a thing you use a lot. They are probably one of the most used tools you will ever use as a programmer. If anything deserve some time investment to learn it is the editor you use. Doing so will pay dividends in the long term. Even one that is preconfigured requires time to learn all those features and how to use them effectively. Time spent configuring is just time spent exploring the features the editor has to offer. Vim and Emacs force you to do this to become on par with other editors, but just because another editor has the tools built in does not mean you don’t still need to spend the time to learn those tools.

    Does learning neovim or emacs actually save time in the long run?

    Lots of people think so. I personally hate using normal editors these days, modal editors like vim are just far nicer to use and lets me jump around and edit code far faster than normal editors. I cannot comment on emacs though.

    I know that they’re much more lightweight than IDEs and I’ve been really enjoying using the terminal much more than my time on IntelliJ, but having an easy out of the box visual debugger, refactoring and jump into functions can be really helpful in the long run I think

    You can get all these things in terminal editors. Especially with the LSP (language server protocol) vim and similar editors can support all of the language servers that were created for vscode giving you the same refactoring tools as available in vscode. It is mostly a question of finding the right plug-ins that you require.

    Why did you chose your editor?

    I learnt vim in uni - cannot remember why exactly any more. But ever since I properly learnt it I have not been able to move back to normal editors anymore. They just feel far more clunky than modal ones. Yes you can get the vim input mode on vscode and other editors - but they are always lacking compaire to the real thing.

    Recently though I have switch to helix which is a modal terminal editor inspired by neovim and kakoune - takes the keybinding from kakoune but integrates LSP and treesitter in addition to a lot of the common plugins that you have in vim. I love that it requires basically no configuration to give you what is more of a fully functional IDE but still has all the power of a modal editor. It lacks a plugin architecture though (this is still a work in progress feature) but since it bakes in a lot of what you typically go to plugins for I have never felt it lacking by missing this feature.

    • clushh@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      As an alternative to helix, there are lots of preconfigured/opinionated vim/neovim setups. Lunarvim (my choice), chadvim (I think is the name), and more.

      All the benefits of the vim plugins etc. With sane defaults. You still have to take time learning everything, and I would probably recommend spending time with configuring a vanilla neovin config to understand how it works then jumping into one of these later, but I’ve found it saves a lot of time configuring and gives you a fantastic starting point.

      • nous@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I have tried some of these before - and they always felt a bit janky compared to something with everything built in like Helix. You still have to keep lots of plugins up to date and installation is IMO kinda dodgy on most of them - having to run some script to mess with your home directory settings. As someone that like to manage config via config managers I always found these install methods get in the way for me. And they are so complex that manually setting them up is also a huge pain.

        Where as helix just works as you would expect straight from your distros repo.

  • lascapi@jlai.lu
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I use intellij too. And I learn helix since few weeks.

    I feel that not the same usage and I can imagine that I could use both of them for what they are good for.

  • somegeek@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I use both vscode with the neovim, and neovim alone. I’m a huge linux geek (so a lot of config-ing), a syadmin (so a lot of config-ing), and a web dev (so I work with js frameworks and typescript/js)

    the short answer is yes, it’s totally worth it but I want to explain more in detail.

    I haven’t gotten myself to develop my projects with only neovim, so I do most of my web-dev stuff in vscode BUT with the neovim plugin. because once you learn working with vim keys, using a plain text editor without the key bindings that vim/neovim provide is like hell, so the vim movements are TOP TIER and I wish we had them in every single application in existence. But setting up plain vim/neovim/emacs for something like web-dev has been really hard for me, so I just prefer the more simple out of the box setup of vscode, where everything is easily available, plus neovim keybinds. And for editing config files, writing scripts, hobby projects in python, js , bash, rust, I use neovim and it’s really enjoyable. Learning vim/neovim is a HUGE asset for a computer person. firstly it’s really fun, second , once you learn it it’s really fast and productive, third, you look badass.

    • Teddly@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      This is exactly where I’m at. Learning vim binding has also opened me up to a lot of REALLY great TUI options. lazygit has become something I never want to work without again, and it’s only pleasant if you’re used to vim bindings. There’s also k9s and other great TUI tools out there that make learning vim bindings hugely worth it.

      But, after investing a week into heavily trying to get neovim working, I went back to VS Code w/ vim plugin. Still want to get neovim working for me at some point but will have to find time to do it without hurting my professional output.

      I will say so far the only pain point I’ve found running vim plugin in VS Code is missing ctrl/cmd + d… I used to use that a lot to do some really powerful multi-cursor editing and vim bindings ruins it. I actually went and disabled the vim plugin just to go do one thing with uninhibited multi-cursor a while ago, and turned it back on when I was done.