When I was in high school I found Sublime Text and learned “multiple cursors”. Since then, I’ve transitioned to vscode, mainly because I need LSP (without too much configuration work) for my work.

I keep hearing about how modal editing is faster and I would like to switch to a more performant editor. I’ve been looking at helix, as the 4th generation of the vi line of editors. Is anyone using it? Is it any good for the main code editor?

The problem that I have is that learning new editing keybindings would probably take me a month of time, before I get to the same amount of productivity (if I ever get here at all). So I’m looking for advice of people who have already done that before.

My code editing does involve a lot of “ctrl-arrow” to move around words, “ctrl-shift-arrow” to select words, “home/end” to move to beginning/end of the line, “ctrl-d” for “new cursor at next occurrence”, “shift-alt-down” for “new cursor in the line below”, “ctrl-shift-f” for “format file” and a few more to move around using LSP-provided “declaration”/“usages”.

I would have to unlearn all of that.

Also, I do use “ctrl-arrow” to edit this post. Have you changed keybindings in firefox too?

  • AdamBomb@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 years ago

    I use JetBrains Rider for dotnet (with Vim emulation), VS Code for general misc code editing (with Vim emulation), and NeoVim for quick in-terminal edits and Git workflows. I even have vi-mode enabled in my terminals, but I haven’t bothered trying to do it in browser yet.

    My experience is that modal editing is only a little faster, but it’s much more comfy, even fun! I enjoy coding with modal editing much more so than modeless. Being able to zip around the code without having to move my fingers to the arrow cluster just feels nice.

  • LainTrain@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 years ago

    Not dev but I’m in IT/Cybersec mostly as it’s much easier to find jobs there and I use vim just about everywhere, usually with tmux and i3 with custom vim-like keybinds (super+j move focus right etc), I use vim even on my phone in termux, with gboard.

    I don’t use LSPs cause CBA but I only use Python and C and maybe occasionally bash for homelab stuff and I don’t have large projects (😭).

    If I’m doing any ML stuff from scratch (not refining or writing API for local llm model or integrating it with another API but just building classifiers etc) for fun I use Jupyter. Such a wildly different way of coding honestly ngl it’s wild, but great when you need to document what you’re doing.

    At uni I used to use fucking Visual Studio with C# and Netbeans with Java, but I learned it pretty well. I don’t think they ever even taught us how to run code outside those 😂

    At work I use gedit and gnome terminal for navigation cuz it’s company time unless I’m personally interested in what I’m doing.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    I’ve tried to learn Vim in the past but IMO it is not worth it at all. In a world without multiple cursors… sure, maybe. With multiple cursors? No way. I can can edit just as fast as I’ve seen any Vim user do it, and without having to remember a gazillion mnemonics and deal with the silly modal thing.

    Multiple cursor editing even has some significant advantages over Vim style, e.g. it’s interactive, so you can do your edit gradually and go back if you make a mistake. Rather than having to write a complex command and only finding out it if works at the end. (If you’ve used regex find & replace you’ll understand that problem.)

    I’ll probably get downvoted for this since Vim is kind of a cult, and Vim users get a sense of superiority from it. Kind of like audiophiles - they don’t appreciate it if you tell them their £10k valve amp doesn’t actually sound any better than your £1k digital amp.

    For editing on remote computers I use VSCode remote or Micro for quick tasks.

  • paequ2@lemmy.today
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 years ago

    I’ve been using Vim for over 10 years. The first few years I used it badly. Later I took time to really learn it. Now I can use it fairly decently, but I still learn new things every now and then.

    It feels like a really good investment. It’s been around forever, it’s gonna be around forever, it’s installed on almost all computers, and you’re going to be forced to use it at some point or another.

    I really enjoy being able to go to any computer and starting up a familiar editor, without installing or configuring stuff. I also use a very vanilla Vim. If a coworker’s laptop or some server has a different Vim config than mine, I can usually do vim -u NONE to get back to a familiar place.

    • wazoobi@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 years ago

      I took a look at Helix when I was trying to learn vim and found it very easy to get started with, but was concerned about missing out on learning more standard vim bindings and functionality.

      I found LazyVim + NeoVim got me pretty much the same experience without diverging as much from vim. Mostly I appreciate having access to a cheatsheet for commands.

      • verstra@programming.devOP
        link
        fedilink
        arrow-up
        0
        ·
        2 years ago

        was concerned about missing out on learning more standard vim bindings and functionality.

        What do you mean? Do the standard vim bindings have some specific quality that you are after? Or do you work with many different servers and would have to use what ever editor is installed there?

        • wazoobi@lemm.ee
          link
          fedilink
          English
          arrow-up
          0
          ·
          2 years ago

          Well I was mostly looking to learn vim and was trying to use Helix as a way to do that because it looked like vim, but with a commands window that popped up to help learn the commands. They’re upfront about making some breaking changes from vim though, and while I may not need to jump into a bunch of different machines that often I do like the flexibility of being able to hop into vi, vim, nvim, or some GUI editors with vim bindings relatively comfortably. So I found that LazyVim was more what I was looking for personally and nearly as easy to work with out of the box.

          I am glad to see the project seems to be going strong. That was another minor concern of mine, there’s little risk of vim going anywhere, but I remember being excited about the Atom editor a while back and that just kinda faded away. If it passes the test of time I’d be happy to try it again in the future. I figure it would be easier to go from vim -> helix than vice versa.

  • azolus@slrpnk.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 years ago
    cat << EOF
    # [[content here]]
    EOF > file.txt
    

    On a more serious note: Neovim for quick file-edits, doom-emacs as my IDE.

    Doom-emacs does most of the stuff you are already using out of the box, is highly configurable and it lets you use vim-keybindings. It’s also free (as in freedom) software!

  • yogsototh@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    Fresh from university I found a job with terrible keyboards. After about 4 months I started to feel constant pain in my wrists. I then switched to vim.

    And it solved my wrists issue. But also, I discovered a way to edit text that was so much optimized fat beyond my expectations.

    I wrote this article for people that would like to familiarize with vi keybindings.

    https://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/

  • Hawk@lemmynsfw.com
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    Neovim, Emacs, Helix and VSCode.

    Zed has been fun.

    VsCode and Pycharm are just too slow for me. You need a very fast machine with a lot of RAM.

  • QuizzaciousOtter@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    I use Neovim. It feels like a second nature after using it for years. I love how effortless the interaction with the editor is after you have spent hundreds of hours learning it. I have no reasonable arguments to convince anyone to do that though. I just do it because I enjoy the hell out of it 🤷‍♂️