I’ve tried vim on and off during college but never really had the time to fully get working with it. As it turns out the stress of two degrees is not conducive to “fun activities”. Now that I have a real job ™️, I’ve decided to finally try and use it this week full stop and I genuinely feel like a programming chad. There’s still a lot I’ll need to learn and probably overtime I’ll discover some inefficiency in how I’m using it now but it really does just feel good. I understand the hype now.

  • Mr. Satan@lemmy.zip
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    1 day ago

    So I keep trying vim and now neovim, I kind of like it as a good allrounder for one off syntax highlighted editing. It’s just that for me, quick and simple editor.

    For a true IDE I need proper symbol navigation. What I have in my JetBrains setup: ctrl+click - go to definition, ctrl+shift+click - search for references, alt+ctrl+click - go to implementation, alt+ctrl+shift+click go to declaration (specific to going to an interface). Then there’s symbol renaming and good multi carret / selection support with keyboard and mouse bindings (alt+up/down arrows, alt+single/double/tripple click). Also, multicarret copy pasting is a major feature.

    Let’s not forget about live static analysis and autocomplete with support for fuzzy search and documentation.

    I don’t even know where to start to make vim or neovim do all that. If it can’t do that seamlessly and just as well, vimlike editors will never be a replacement for a proper IDE. It’s fast, capable single file and small scope editor for me.


    I do also like all the alt and ctrl combinations with arrow keys to move lines, blocks and jump over words.

    • AldinTheMage@ttrpg.network
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      Do you use vim motions in your JetBrains IDE? We use Webstorm at work and I installed the vim motions plugin because I want to get more fluent with using Vim but I haven’t really given it a fair shot yet.

    • namingthingsiseasy@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      5 hours ago

      I don’t even know where to start to make vim or neovim do all that. If it can’t do that seamlessly and just as well, vimlike editors will never be a replacement for a proper IDE. It’s fast, capable single file and small scope editor for me.

      If you’re interested in learning how to do it, I found this guide extremely helpful for getting started. it’s in both blog and video format, and it shows how to install Lazy (a package manager for vim), and which plugins to install to get LSP working (which is what would provide all the hotkeys that you were mentioning above).

      It’s definitely not a task for the faint of heart, but I found it very rewarding once I figured out how to work with the plugin systems because it’s so powerful and easy to customize. I found it helpful to just watch the video a few times to see everything working, then slowly started building up my own configuration (which was a bit more minimal than the linked guide I provided - I only installed about 30-40% of the plugins he listed on that page).

      Another alternative is Lazyvim, which provides an out-of-the-box configuration experience for you. It installs a lot of plugins and most things should work out of the box with very little configuration. It is a massive beast though, but still pretty good for a first start.

      • Mr. Satan@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        22 hours ago

        I understand that they exist, the problem is they aren’t naturally discoverable. With normal IDEs and context menus, I see keyboard shortcuts as I look for functionality. Neovim doesn’t have that. Having to read docs or google for every little action I want to do is very unproductive and annoying. Features need to be discoverable through usage.

    • BartyDeCanter@lemmy.sdf.org
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      1 day ago

      Give Helix a try. It comes with everything you are asking for built in, plus discovery for the commands, plus a selection first approach so you can see what you’re doing.

    • Mikina@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      1 day ago

      I do also like all the alt and ctrl combinations with arrow keys to move lines, blocks and jump over words.

      That’s what I love the most about VIM, that it has dozen little tricks like these. Need to jump over a word? Jump to next occurance of letter L? Jump five words? Jump to second parameter of a function definition? Jump to matching bracket? There’s a motion for all of that, and more. Including “go to definition” or “go to references”, if you set up your vim correctly.

      I don’t even know where to start to make vim or neovim do all that.

      What I did was simply install IdeaVIM into my Rider, so I can start learning the motions while also keep the features of the IDE I’m used to, but also more importantly installed LazyVim, which is a pre-made config for nvim that can do most of that by default, or has a simple addon menu (LazyExtras) that automatically download and install plugins relevant for a language you are working on. I.e I need to work in Zig, I just open LazyExtras menu, find zig-lang, and it install LSP, debugger, linter, etc that’s specific for that language.

      • Mr. Satan@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        22 hours ago

        Well, having vim in an IDE might be good way to get the hang of it. I do see the potential of vim, but skill floor is too high for comfort. I don’t mind learning something, but I need to be productive out of the box.

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      I completely agree. Also almost all of the fancy editing you can do with Vim can be done just with multiple cursors, and it’s less annoying because you do it incrementally (rather than typing a long sequence of commands and then seeing the result), and you much less to memorise.

      • Mr. Satan@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        22 hours ago

        The main barrier for me is discoverablity of features. I don’t know what I can and can’t do in an IDE. That’s where context menus shine, pair that with some documentation and settings exploration. Now we have a system to surface features and capabilities through natural usage.

    • Gonzako@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      oh, you do have fuzzy search with neovims kick-start. I have go to def on g>r>d. The rest I use way less so I don’t remember offhand, the normal one button search just works for me so far.

      Yes, I will not say it doesn’t take extra effort but at least for me it has payed off.

      • Mr. Satan@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        22 hours ago

        The thing is I need to know before hand that there’s such capabilities. The editor has no way (besides docs) to surface stuff via usage. That makes the skill floor to productivity generate way too much friction.

        I love the mouse for navigation. If I’m jumping through references chances are I’m just reading and analyzing so I don’t need to shift from mouse to keyboard in that scenario.