← Back to context

Comment by nineteen999

6 hours ago

I consider my vi/vim skills to be extremely minimalist subset, and probably horribly inefficient, since they were developed to work accross a broad range of UNIX systems (SCO, Solaris, HP-UX, OSF, AIX) and I rarely add anything to my vim configs on top of that other than syntax highlighting.

But I'd still rather use it than just about any other text editor, just for the simplicity of that muscle memory alone. I have way more stuff to keep in my head than I have room for and I can't afford to expend more than about 0.0001% of context on a text editor.

> I have way more stuff to keep in my head than I have room for and I can't afford to expend more than about 0.0001% of context on a text editor.

I can't say I agree. To me this is equivalent to saying "I have way more music in my head than I have room for and I can't afford to expend more than about 0.0001% of context on a piano". The tool you use for 8+ hours a day is extremely important and even small gains will pay dividends over the long run. The more efficiently the text editor allows you to do tasks, the more time you have to think about other tasks.

  • He IS saying that. Vi is more efficient for him every hour every day because he has been able to learn it to the point where there is nearly zero effort in using it. To learn something else would be to throw away all that hardcoded memory and try to rebuild it.

    • Learning how to use a proper IDE is a change in workflow.

      I never made that switch. The muscle memory of 2 decades of using a software is under appreciated.

      For me, it is about preference for what to optimize for.

      3 replies →

  • To continue the musical instrument analogy, I already master the piano and I am happy with it solving my requirements. Learning the guitar will be a great undertaking, and provide me no new songs to play.

    Hence, I will stick to my piano.

    • They didn't say they mastered the piano, though.

      > I consider my vi/vim skills to be extremely minimalist subset, and probably horribly inefficient

      Likewise, "I don't configure anything from the default" could be likened to playing an out-of-tune piano because you just can't be bothered. If you genuinely switch machines so often that configuration becomes a burden, sure, stick with the defaults -- but I think it's doing yourself a bit of a disservice if your reason is instead "I don't think it's worth spending time or mental energy on my tools".

      1 reply →

I think that it's wrong to assume that vi is the only route to deep muscle memory. Heavy mouse users develop blindingly fast Fitts’ Law targeting. And if you need essential simplicity, they have far fewer commands.

Bill Joy, the original author of vi, saw the vi commands as a problem, not a solution [1]:

    The fundamental problem with vi is that it doesn't have a mouse and therefore you've got all these commands. In some sense, its backwards from the kind of thing you'd get from a mouse-oriented thing.

[1]: https://web.archive.org/web/20120210184000/http://web.cecs.p...

  • well, i've got this in my muscle memory too for a reason (that linuxes tend to use vim instead of vi and enable mouse there by default):

    :set mouse-=a

  • > Heavy mouse users develop blindingly fast Fitts’ Law targeting. And if you need essential simplicity, they have far fewer commands.

    Even if you remember the general placement of things? You still have to consciously track where the pointer is and when it will be on target. I was better with old applications where everything was accessible, bit in this era of low density interface and deep navigation, it’s not great.

    The Acme editor is a great example on how to use the mouse. Every click results in an action. And a customizable interface so that you can have what you need at the ready.

Yeah; I have a minimal vimrc with cursorline, wrap, line number, some other option to make arrow keys jump to next line from end. I set a different colorscheme on each machine when I have to deal with multiple machines. That's it.

I never edited the default config much.

But then I discovered https://www.lazyvim.org/. Turns your copy of NeoVim into an IDE.

I still haven't edited the default config much, actually. But now I'm probably 2x to 3x as productive in vim (nvim, now) as before.

P.S. If you decide to check out the LazyVim config, I highly recommend reading https://lazyvim-ambitious-devs.phillips.codes/ all the way through. There's a lot of new keybindings to learn, but Dusty Phillips's book gives you a gentle on-ramp to learning most of them.

  • I should mention what is becoming my favorite thing about LazyVim's default config, which is the "flash" or "seek" command (LazyVim maps it to `s` so I think of it as "seek") from https://news.ycombinator.com/item?id=48118585 so I won't repeat that here. But if I had to pick my favorite feature from LazyVim's config... well, actually it would probably be something else, but `s` is definitely in the top three by now.

    • Flash is amazing, and what made me drop VSCode. Flash feels like an innovation and basically lets me move my cursor at almost the speed of thought. Highly recommend people try it out and play with it!

      BTW: The Vimium extension [1] for Firefox has a similar mode for links called "linkHinting" which I've mapped to s[2] for a similar experience in the browser :)

      [1]: addons.mozilla.org/en-US/firefox/addon/vimium-ff/

      [2]: `map s LinkHints.activateMode`

  • The demos of LazyVim looks really nice, and people seem to get a benefit/joy out of it. I gave it a try, but it's a little to much for me.

    Right now I think my .vimrc is two lines. That's also sort of silly as I benefit very little from all the things Vim can do.

  • I similarly thank the stars I ran into AstroNVim, which itself is based on LazyVim. Out of the box it has a lot of well integrated/just works pieces. It has a bunch of leader key things setup, and, crucially, a little visual navigator at the bottom of the screen. Going from powerful but invisible to having something I could see was such a help! I'd compare it to moving from tmux to zellij but I'm a pretty happy tmux user. https://astronvim.com/

    What really seals the AstroNVim deal for me though is the community packs. People have very thoughtfully integrated support for a huge range of nvim plugins. And it's super easy to install, and they often fit in nicely to the existing out of box experience of nvim. https://github.com/AstroNvim/astrocommunity

    • Hey, AstroNvim core maintainer here! Just wanted to clear something up. AstroNvim is in no way based on LazyVim, AstroNvim existed for almost 2 years before LazyVim existed...

    • Yeah, I have also been really impressed with AstroNVim. I tried using LazyVim for quite some time but I kept having a hard time getting used to it. Somehow I kept tripping up when trying to do things.

      On one of my servers I needed to disable icons which AstroNVim handles very conveniently (https://docs.astronvim.com/recipes/icons/#disable-icons). After switching I noticed that using AstroNVim feels so much more natural to me. It's been a joy to use.

      I think it might be because the defaults are less bespoke and it's just a bit leaner. The community packs have also been great for customization.

> that muscle memory

Once in a while I will mistakenly dump a string of keystrokes into insert mode or another application. That literal output always amazes me because the construction of those strings is so far removed from my brain's "main thread".

The inverse is if I try to write a helper function or explain to someone else how I did something they observed and I need to methodically document each action. It's like trying to describe how to walk or something.

I functionned this way for a very long time, plain vim with 5-6 options in .vimrc, no plugin (aside for the very occasionnal syntax highlighting like jinja.vim iirc). I kept this setup for more than 10 years mainly to stay compatible with multiple systems (in my case Solaris/Illumos, Linux, MacOS and even Windows).

But I made the switch to nvim / LazyVim. And it is actually pretty good. I had in mind those endless hours of config and lua scripting. At the end of the day all I needed actually was to remove a plugin (folke, which messes with my 's' key) and learn to use the package manager to setup the languages I wanted.

Having things like GrugFAR or lazygit at the tip of my finger is actually a quality of life improvement. I could do without those for sure but they fit my workflow and muscle memory well.

Still wish there was something better for ansible ; I should have gone with pyinfra with my current job's project but I only learned about it after writing 12k LoCs of ansible :'(

Likewise, I'm also not very demanding of my text editor. I used vi on any *nix systems and Notepad (the original one, not the new bloated monstrosity) on Windows for most of my work. Navigation, basic editing, and searching are probably all I need.