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.

  • ExLisper@lemmy.curiana.net
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    13 hours ago

    Vim is great for editing in general and coding simple things but I kind of gave up on using it as an IDE. Too many plugins to configure, to many breaking changes, too many bugs. My current issue is that after couple hours or days code formatting simply breaks and starts mangling my code. Only full restart fixes the problem. It’s impossible to figure out were the issue is as there are so many plugins and external tools involved. I still think it’s amazing you can setup vim to work as a full IDE with code completion, refactoring, formatting and all but it’s just not stable enough. I reluctantly switched to Zed with vim mode. I miss smooth scrolling but other then that it’s really nice.

    • lepinkainen@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      9 hours ago

      I tried nvim with all the bells and whistles and it’s just too fiddly

      Moved to helix instead, it does the light editing I need with LSP support and themes

      • ExLisper@lemmy.curiana.net
        link
        fedilink
        arrow-up
        1
        ·
        9 hours ago

        I tried helix and it’s nice but it’s still not ready to be an IDE. Too many features missing. And I’m not learning completely new tool just to edit text. Vim is still great for that. Let’s hope it grows and gets all the features eventually.

        • lepinkainen@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          6 hours ago

          Yea its definitely not an IDE

          I use it mostly when I need to edit a config file quickly and don’t want to bother with a full IDE or VS Code

  • iByteABit@programming.dev
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    6 hours ago

    Helix is really fucking good too, it was really easy to pick up as a VIM user and it’s 99% batteries included. You still have to manually install the LSP for most of the languages, but it makes it really easy for you to do so, just run hx --health <language> and if the LSP is not installed it tells you the name and you can just look up how to install that on your system, which is usually just one command.

    Also it’s written in Rust so added bonus for that 🦀

  • Mr. Satan@lemmy.zip
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    24 hours 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.

    • BartyDeCanter@lemmy.sdf.org
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      21 hours 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.

      • Mr. Satan@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        14 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.

    • Mikina@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      22 hours 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
        ·
        14 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
      ·
      23 hours 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
        ·
        13 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
      ·
      23 hours 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
        ·
        13 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.

    • Beej Jorgensen@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      I was just going to say this. The modal part is the important part. Helix seems great, but I was unable to find a killer feature to draw me away.

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

        For me, the killer feature is the consistent selection->action grammar followed by the discoverability features. Being able to see what I am doing before I do it works much better for me and having those little pop ups for the space and g menus mean that I learned the bindings so much faster and use more of them that I ever did for either emacs or vim.

        • SlurpingPus@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          14 hours ago

          those little pop ups for the space and g menus

          Emacs has this with the Hydra plugin, iirc. Particularly, Doom Emacs already has this feature packaged.

      • liebach@discuss.tchncs.de
        link
        fedilink
        arrow-up
        1
        ·
        1 day ago

        Also, OP, realize you will always be nerd sniped. :-)

        I use Emacs BTW, and sometimes helix (after 20 years of vim).

  • rozodru@pie.andmc.ca
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    1
    ·
    1 day ago

    The thing about Vim is once you get the navigation down you’ll want it for everything and you’ll refuse to go back to anything else.

    I used Vim for so long that I can’t live without some form of vim style navigation. my Window Manager uses it, my web browser uses it, all my TUIs use it, hell I even switched to Emacs and installed Doom Emacs and THAT uses it. Now I only ever use a mouse for gaming because you realize that navigating around your PC purely with your keyboard is actually faster than using a mouse. I’ve disabled the touchpad completely on both my laptops.

    If you’re digging Vim check out NeoVim with LazyVim. makes plugins and theming and what have you easier. I use it as my backup to DOOM Emacs.

    • lad@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      13 hours ago

      I’m more interested in how do you navigate system menus and such, or does DE manage this? I’ve tried one Linux distro recently without a mouse attached and it was painful because some elements of the system UI are not accessible in any way

      • rozodru@pie.andmc.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 hours ago

        never really an issue with that either because most GUI menus will trigger via alt. even in something like KDE with the proper keybindings setup it’s not an issue. heck even discord now has keyboard navigation.

    • Mikina@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      22 hours ago

      I second this. I only started slowly switching to nvim few months ago, and I already can feel slightly annoyed when I have to take off my hands of the keyboard to reach for a mouse, or when I’m editting a text in i.e a browser, want to make an edit few words back, and I have to spam keys like a madman instead of just jumping where I need to be.

      It’s addicting and extremely comfortable, having a good keyboard navigation controls.

      I really need to look into tiled window managers and a browser.

      • SlurpingPus@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        14 hours ago

        Try Vimium if you use Firefox, Chrome, or something Chromium-based. Invoking links with ‘f’ and a couple letters is so comfortable that I now get mad when the addon doesn’t work on Mozilla’s sites (due to security concerns) or when a site has ‘links’ implemented with JS.

      • rozodru@pie.andmc.ca
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 day ago

        I use Qutebrowser. All links and interactions are keybound. so if for example I want to “click” on your user name I hit “F” which pops up a link hint and then hit whatever two letters are over the link. so for your profile it would be f + ll. that’s it. everything that it’s on a webpage that you would normally use a mouse to interact with can all be done with keybinds. It’s great, it’s quick.

        Browser navigation is also keybound. if I want to go back I hit shift+h. forward is shift+l. to switch tabs it’s shift+j or k. closing a tab is just pressing d.

        there’s also extenstions for chrome and firefox that will do the same thing like vimium and tridactyl.

        If you’ve used Vim for an extended period of time then navigating the same way in a browser is actually awesome. takes a bit to get used to but once you do you won’t go back and trying to use a browser with a mouse just feels slow.

  • cosmicrose@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    54
    ·
    2 days ago

    There are always more cool tricks and great plugins out there, have fun!

    Also I’d recommend Neovim, it’s exactly like vim except it supports Lua scripting, so there are lots of powerful plugins that aren’t available on vanilla vim.

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

      It’s not exactly like vim, and there are plenty of vim plugins that don’t work with it (anything vim8 onward). There has never been a 1-to-1 correspondence, the gulf widens as both develop different features with different philosophies.

      The most egregious offense on Neovim’s part that I can’t get past is the removal of access to the shell in which you run vim (via :!, :w !, etc.). Vim is so much more capable of being closely intertwined with the shell, whereas neovim requires everything to be done through terminal buffers (speaking of which, vim’s terminal buffers are a lot better than Neovim’s).

      Also, Lua is really overrated and worse for vim scripting than vim9script (which is both more native to vim and faster).

      • ma1w4re@lemmy.zip
        link
        fedilink
        arrow-up
        10
        ·
        2 days ago

        Can helix be fully controlled by keyboard? Does it have a 1-to-1 vim mode? Kind a interested in trying other editors, but I find vim controls are vastly more comfortable to anything that I tried so far

        • BartyDeCanter@lemmy.sdf.org
          link
          fedilink
          arrow-up
          11
          ·
          2 days ago
          1. Yes, Helix is a fully keyboard based editor. It does have some minor mouse support available but it is an afterthought.
          2. Nope! While the key map of Helix is fully configurable and by default similar to vi, it uses a select-verb grammar instead of a verb-select grammar.
            • Ŝan@piefed.zip
              link
              fedilink
              English
              arrow-up
              8
              arrow-down
              2
              ·
              1 day ago

              Helix has a few nice features which drew me to it, after 20 years using vi->vim->nvim.

              • Truly modal. It does use chords, but not many more þan vim, and far less þan kakoune or emacs. Most operations are modal, which is kinder to my RSI
              • Batteries included. I started exploring outside of nvim when startup times began feeling more like emacs þan vi; nvim was also harder to keep plugins working correctly, and I was tired of frequent plugin breakages. Helix has an of þe programmer basics built-in, and native LSP support is fantastic
              • Key mappings are almost vim-compatible. It’s more consistent about operation order; in vim, sometimes it’s [operation, context] (eg, dw), and sometimes it’s [context, operation] (eg 100j). In Helix, it’s always [context, operation], so its wd.
              • Helix has robust multiple disjoint selection support (as does kakoune). Once you get used to it, it is hard to do wiþout it.

              Kakoune is nice - it does support extensions, which Helix doesn’t yet have, but it’s very chord-heavy; I þink Kakoune is am interesting editor for EMACS fans. Helix follows vim’s modal model more closely

          • ma1w4re@lemmy.zip
            link
            fedilink
            arrow-up
            1
            ·
            1 day ago

            Yeah sounds nice, hope it lives up to those words lol. I’mma go check it out right now.

    • galaxy_nova@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      ·
      1 day ago

      I’ll have to try neovim, and eMacs and all the derivatives. Honestly I just went straight to vim first because I wanted to try to OG experience first to see what it was like. I’ve also simultaneously been using vim mode in Zed which has been pretty nice too.

  • chasteinsect@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    1 day ago

    On a related note, try Vimium (FF / chrome extension) that brings vim motions into your browser. You will have a more complete experience.

    • galaxy_nova@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      Wait that’s awesome. Any chance that there’s a safari extension? I use safari and FF at home since I use both Linux and macOS

      • SlurpingPus@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        13 hours ago

        Just FYI, if you just use Firefox in both OSes, you can sync the tabs, history, and extension settings. Though I’ve seen the opinion that Safari works faster, but OTOH extension developers are unhappy with Apple’s publishing/vetting process, and some devs dropped support for Safari that they provided previously.

  • Aurenkin@sh.itjust.works
    link
    fedilink
    arrow-up
    24
    arrow-down
    1
    ·
    2 days ago

    I like to say that using Vim turns editing into an optimisation puzzle. That will either sound super fun to you in which case you’ll probably love it or it will sound like a nightmare in which case maybe it’s not for you.

    • four@lemmy.zip
      link
      fedilink
      English
      arrow-up
      14
      ·
      1 day ago

      I looove solving the optimization puzzles instead of actually doing my job :D

      “Yes boss, I am working on that feature. Right now I am installing a new plugin that will save me 5 seconds and 14 keypresses!”

  • lobut@lemmy.ca
    link
    fedilink
    arrow-up
    17
    ·
    2 days ago

    I’ve always liked vim but one thing that I really loved about it was when I started using vim mode in zsh.

    Being able to just navigate through commands in my terminal and easily highlight and edit and all that … it’s so good.

    • bradboimler@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      HOLY CRAP

      Let’s say I run a command that spews output. Are you saying that with Zsh I can use only the keyboard to navigate the spew, copy a bit of it, and paste it in a new command?

      If so I should try it out!

    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      11
      ·
      edit-2
      2 days ago

      when I started using vim mode in zsh.

      I’m an emacs user myself, but if you’re not aware, readline — which handles a considerable portion of the “prompt for text” stuff in many terminal programs, like input for bash and such — can be put into vi mode.

      https://tiswww.case.edu/php/chet/readline/rluserman.html#Readline-vi-Mode

      In order to switch interactively between emacs and vi editing modes, use the command M-C-j (bound to emacs-editing-mode when in vi mode and to vi-editing-mode in emacs mode). The Readline default is emacs mode.

      When you enter a line in vi mode, you are already placed in ‘insertion’ mode, as if you had typed an ‘i’. Pressing ESC switches you into ‘command’ mode, where you can edit the text of the line with the standard vi movement keys, move to previous history lines with ‘k’ and subsequent lines with ‘j’, and so forth.

      Or, in ~/.inputrc:

      set editing-mode vi
      

      To set the default.

  • marlowe221@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 day ago

    You probably already know this, but most IDEs have a setting to enable Vim keybinds or you can easily install an extension to add them.

    I really like Neovim but my job often requires some stuff that it doesn’t easily do. So, VSCode is what I use a lot of the time… with the Vim extension.

    Just something to consider if your stack isn’t super well supported in Vim/Neovim or you need tools it doesn’t have for your work.

    • msage@programming.dev
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      1 day ago

      I tried vim keybinds in an IDE, and it sucked.

      It wasn’t even that advanced usage, but it just didn’t work.

      Instead I know run language servers in neovim.

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

          Keybindings are OK, but anything beyond movement was way less ok.

          Don’t remember if macros or buffers were implemented correctly.

          • witness_me@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            24 hours ago

            Buffers do work in IntelliJ. Not sure about macros since I don’t use them. Haven’t checked VSCode. I found the IntelliJ plugin was better though.

      • Markuso213@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 day ago

        I agree with you. I figure you probably know this, but VS Code can act as a frontend for Neovim, providing one-to-one Neovim keybindings.

        Some parts I never got working, but movement was honestly flawless. But I use a lot of snippets with ultisnips, and I didn’t like the idea of translating all of that to hypersnips (or whatever the VS Code equivalent was called), so I stuck with Neovim.

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

          Movement is like 20% of why vim is amazing.

          Without macros I’m already out, registers are also mandatory, marks are very nice to have, etc.

          I have trouble even remembering what are some of the features called, it’s just musle memory now.

        • expr@programming.dev
          link
          fedilink
          arrow-up
          3
          ·
          1 day ago

          Most of vim is not emulated. It’s very surface-level and limited. The closest is evil mode for emacs, which is decent, but still lacks a fair bit. The emulators in Intellij and VsCode are paltry in comparison to what vim can do.

    • Nate Cox@programming.dev
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 days ago

      I went from vim to Emacs and loved it, right up until I found Helix. My “just trying it out” became “never opened emacs again”.

    • ma1w4re@lemmy.zip
      link
      fedilink
      arrow-up
      5
      ·
      2 days ago

      Tried emacs after vim and it made my pinkies hurt. If only it was exactly as vim…

    • limerod@reddthat.com
      link
      fedilink
      arrow-up
      4
      arrow-down
      2
      ·
      2 days ago

      Yeah. It was frustrating to use vim. Emacs on the other hand was so much fun. The amount of things you could tweak and change. I haven’t seen another software which can do this today.

  • SinTan1729@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    1 day ago

    Welcome to the club. Don’t worry too much about setting it up perfectly in your first attempt. You’re gonna rewrite your whole config every year-ish anyway. (Or is that just me? 😥) Also, try Neovim. It’ll be a drop-in replacement for your current config. But Lua is just a superior language compared to Vimscript, so you’ll have a much better performance in the future. You also get all the sweet LSP and treesitter features.

  • paequ2@lemmy.today
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    2 days ago

    Awesome! There’s a tooon of stuff to learn, but Vim is eternal, so it’ll be a good investment.