1. 37
    1. 21

      Every “vim mode” I have tried is only ever a good facsimile, but never a replacement. You can implement the motions, but you can’t emulate how my configuration builds on those. All my customizations over the years to improve my workflow can’t come with me.

      1. 17

        If you’re used to vim, you have your own subset of features which you consider valuable out of the vast set that vim offers. Vim-modes can capture the gist of it, but it’s unrealistic to expect them to be complete.

        For example, ex commands. I can select a range of lines with V and then type : (which vim will turn into :'<,'>, referring to the visual selection). Then I can type g/^ /d to delete lines that start with whitespace. (Or any other linewise action that I would like to filter with regex.)

        Can I do :pu to paste text linewise? Can I do :pu+ to paste from the system clipboard? How about :-1pu to paste at the start of the file? (Even Evil fails that.) :%y+ to copy the whole file?

        The rabbit hole of vim, especially with ex commands, is deep…

        1. 1

          It was like that for me when I tried evil inside emacs, around 20 years ago. There were small differences in how things behaved that threw me off. I don’t remember exactly, but it was things like leaving insert mode and the cursor being one character over from what would happen with vim.

          Heck there are still things that bother me with GNU screen’s vi mode that bother me, and the vi edit mode for bash diverges from vim even more than that.

        2. 6

          Zed has an integrated terminal based on alacritty, you can always run nvim to make a quick edit while editing.

          1. 5

            Stay in Flow

            Productive coding starts with a tool that stays out of your way. Zed combines the power of an IDE with the responsiveness of a lightweight editor for productivity you can feel under your fingertips.

            Uh, no? Productive coding in most environments is about 70-80% understanding the mess that is your code-base.

            1. 10

              Yes and…having learned VIM later in my career there’s a certain joy to being able to do things efficiently that I don’t think is really well expressed.

              The hard thing to describe is the feeling. If you’ve played music with a group and there’s a piece you like and you nail it and everything just feels right. That’s the flow I think they’re talking about. Yes, they’re selling productivity because that’s how people talk about it. But it’s not about the efficiency of keystrokes, it’s about the joy of the flow.

              I dont feel I was a worse coder before learning vim, and I don’t look down on anyone based on their editor preferences. I wish there was an easier way to say “this tool brings me joy” without also accidentally (or intentionally) implying those that don’t also get joy out of the same tool are lesser or worse.

              1. 8

                “Vim is like an instrument” is absolutely the right take imo

                I’m not sure I’ll ever switch because I consider it such a core aspect of my interaction with the computer… it’s like I’ve spent decades learning guitar and someone tells me “you can play all the same notes on the piano!” It’s like yeah of course but I don’t play the piano! But could learn and get the benefits of it, and in fact I use vscode as a debugger for this reason… but i feel like I can express myself using vim in a way that it’s just out of my way completely most f the time

                1. 2

                  Thanks! I took inspiration from the movements being called “chords”

                  I think the problem in these conversations is interesting. It’s a microcosm of all other tech topics.

                  • People who invest time/energy in a skill want to feel good about it, they want the investment to have paid off.
                  • People who don’t want to invest in that skill (but will invest elsewhere) feel the need to justify their own investments.

                  Unfortunately the first reaction of the investors is “I must evangelize this as an unmitigated good.” In NVC terms the (unspoken) need is often “I need everyone to do this too” and the request is “I want you to love it too” (which is more a demand than a request.

                  Also unfortunately the first reaction of abstainers is “to counter such a strong positives I must not acknowledge their lived experiences and in fact must prove that their argument is wrong” when they really mean to say “cool story bro/broette, I’m happy this thing is for you, it’s not for me.”

                  So anyway, I dug deep to find a thing that I think is cool, and true and a real reason I love using VIM bindings without it also subtly/accidentally implying I’m better than the abstainers. Am I a better dev because I know VIM, I think so actually, yes. Is VIM a requirement to leveling up? Absolutely not. I could have invested those skill points on something else.

            2. 3

              I’ve been using a Linux build of Zed with its vim mode for a couple of weeks after more than 20 years on Vim/Neovim. The vim mode is surprisingly good. More often than not things in my muscle memory just work. There are two notable exceptions that trip me up now and then though: = to reindent and gq to hard wrap. For the most part it’s been pretty seamless though.

              Edit: Oh also there seems to be no support for reading command output :r! or filtering through a command, I have hit both of those too.

              1. 2

                Do they support text objects?

                1. 2

                  Inner and outer text objects on quotes, brackets, and words work. Doesn’t seem to support sentence and paragraph objects though.

                  1. 1

                    Mmm, still better than most.

              2. 2

                Now I’m wondering if someone has tried embedding neovim in Emacs

                1. 2

                  I use VSCode with the vim-mode plugin and it’s been working okay for years. But I’m different from a lot of people: I don’t use much beyond the most common movement/editing commands and my vim configuration is just a few lines. I don’t customize my editors within an inch of their life. I’ve found that going whole-hog on deep configuration eventually leads to disappointment as something you really like eventually breaks or gets removed by the developers under the rationalization, “No one uses this.”

                  That said, VSCode crossed the threshold from “lightweight code editor” to “full-fledged IDE with a modern interface” quite some time ago. For the kind of programming I do (purely hobbyist stuff), I neither need nor want an IDE. I’d love to replace it with something similar but at the moment, nothing is quite as smooth as vscode + vim.

                  Zed looks cool, I look forward to being able to run it on Linux someday. I’m happy to see it has a vim mode, and I hope they keep hacking away at it.

                  1. 3

                    It already works on Linux. I’ve been using it off and on almost every other day to try and simultaneously pair down my neovim config and build up my zed config. I haven’t hit any instability that I can recall, all while hacking on a decent sized Rust project.

                    1. 1

                      Hmm. When I tried to build it, it crashed when I tried to run it. I either opened or commented on an issue for it and didn’t see any follow-ups. But I am seeing quite a lot of Linux-related activity in the issues, so I guess there is lots of work going on.

                  2. 1

                    So apparently I’m not using enough vim features because from the top of my head I don’t remember any problems with using IdeaVim on IntelliJ or the VS Code vim mode .

                    1. 1

                      I totally grok why they don’t “just embed Neovim” and instead write their own vim emulation layer. But it also makes switching that much more work, as it’s not hard to hit that invisible wall. Worse, you don’t know exactly if the invisible wall you just hit is due to a “not implemented (yet or ever?)” or perhaps just a keybinding issue, etc. It breaks the illusion quickly.

                      And it’s not that these things can’t be worked around, new keybindings added, or even relearned; it’s just that this is all time taking away from the actual coding task I was originally trying to accomplish.

                      That all being said, Zed is amazing editor and I keep coming back to it and would very much like to get to a point where I could use it full time (on Linux) due to the improvements it brings.