• ChaosSpectre@lemmy.zip
    link
    fedilink
    arrow-up
    12
    ·
    5 days ago

    After diving in and learning it this year, I fully believe learning Vim makes you a better developer and it should be commonly taught to developers. It has done far more for my dev skills than any single AI tool ever has, and I dont have to worry about it hallucinating.

    Personally, I think Vim should be made into standard knowledge for anyone who consistently uses a keyboard for their work. A lot more software than I expected supports it, and it makes any form of text editting tremendously better.

    • JustARegularNerd@aussie.zone
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 days ago

      I’d be curious to know why. I know just enough about vim that I can use it if I’m forced to (perhaps a barebones Linux system) but usually my default text editor is nano - what makes vim that much better for development?

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

        For me, its the massive range of editting manipulation it provides, and the reduction of dependence on using a mouse. For context, I have some level of wrist injury, so my complaints around mouse usage mostly stem from that.

        I would love to explain in detail what makes Vim great, but I think noboilerplate on youtube did it best with this video: https://youtu.be/sqm4-B07LsE

        But if I had to explain one of my favorite parts of vim, its the fact that I keep finding new solutions to improve my ability to edit code with an ease I had never felt before. Using ‘vf’ in order to easily highlight from where my cursor is to whatever character I want to get to has saved me so much time when rewriting variables or cleaning up code. Ive barely learned about what EX mode can do, but being a lot of work involves correcting other code or duplicating it for use with a different part of the code base, being able to use the substring command is drastically more helpful than your standard ctrl+H will do. Easy example :.,+5s/foo/bar/g Colon is what puts you in EX mode. Period is the current line, comma indicates this is a range, +5 means the next five lines, s means substring which is the command that we are using. “foo” is the word to search for, “bar” is what “foo” will be replaced with, and g means to replace all instances. Drastically more robust and useful than what ctrl+H does.

        Vim just makes it easier to manipulate text. Its drastically reduced strain on my wrists, and puts me in a flow state far more often than I ever experienced before I used it. Its kind of like aiming in a first person shooter with a mouse instead of an analog stick. Both will get the job done, but a mouse is drastically more capable at being accurate. Thats what vim feels like for coding for me.

      • ChaosSpectre@lemmy.zip
        link
        fedilink
        arrow-up
        3
        ·
        5 days ago

        I am either misunderstanding your post or you might be misunderstanding mine.

        Vim is not the command line. It can be used in a command line, which is a nice feature, but I use Vim because it makes editting text a far smoother and more reliable experience than most text editting GUIs have provided.

        I also would not say command line is superior to GUI. Both have their trade offs, and like you said, use the tool that works best for you.

        As a developer though, I do fully believe devs should be taught how to use command line, and I believe they should be taught how to use Vim. Command line is near mandatory, because sometimes you cannot easily do something using a GUI, especially if that GUI is just buttons that run command line prompts like a lot of Git tools are. Solving Git issues without using command line frankly feels like a horrid scenario because you dont have the finer level of control required to unfuck yourself out of a Git issue.

        Vim should be taught because it improves navigation and editting of text in much more efficient and faster ways than a GUI generally can. This is very useful in development, as editting code is often a bit tedious with a mouse and common keyboard shortcuts, and not needing to take your hands off your keyboard really lends itself to keeping focused on your code. It improves productivity while also being a useful skill to learn, as a lot of apps support Vim bindings that don’t necessarily involve code, such as Obsidian.

        For other keyboard based professions, Vim would be useful but not mandatory.

        If I misunderstood your post as bashing my post, then thats my bad. The way I read it felt like it was bashing my view of Vim by connecting it to the viewpoint of command line being better than GUI, which is not how I view Vim or command line at all.