Live data from Hacker News

I set all 376 Vim options and I'm still a fool

evanhahn.com

71–80 of 142 posts

Re: I set all 376 Vim options and I'm still a fool

#71

Stuff like typing "10j" made sense when text editing was high latency. Nowadays you can just hold j and stop precisely where you wanted to, even if you're ssh'ing into a server on the other side of the country. There's nothing wrong with it (and in fact I prefer it because of the 0 finger movement required). The only times I use "precise" movement commands like that is when I'm in the odd situation of having to ssh i…

I found that moving between empty lines is the nicest way to navigate most code across all programming languages, markup languages and just regular text. I don’t have to think, I don’t have to count, I just move and select text big chunks at a time… (not in vim, but I first saw someone have key bindings for this in vim)

https://vimhelp.org/motion.txt.html#%7B

    { [count] paragraphs backward.  exclusive motion.
    } [count] paragraphs forward.  exclusive motion.

Re: I set all 376 Vim options and I'm still a fool

#72
post #70

Earlier quoted context omitted.

Have you tried WezTerm yet? It also uses lua for writing its configs which makes it highly customizable. I've switched to it from iTerm2 a couple of years ago and gradually added more and more to my config and it's super powerful.

I have various issues with it (e.g. wrapping on resize is just broken) and miss iTerm a little, but the built-in tabs aren’t too bad (unlike Kitty’s hardline stance) and it’s available cross-platform, so I can have the same config on many machines.

> unlike Kitty’s hardline stance

Are you maybe switching that up with alacritty? Kitty has built-in tabs and they work quite well.

Re: I set all 376 Vim options and I'm still a fool

#73

Stuff like typing "10j" made sense when text editing was high latency. Nowadays you can just hold j and stop precisely where you wanted to, even if you're ssh'ing into a server on the other side of the country. There's nothing wrong with it (and in fact I prefer it because of the 0 finger movement required). The only times I use "precise" movement commands like that is when I'm in the odd situation of having to ssh i…

Generally I'm using 'e' to go forward and 'b' to go backward

Re: I set all 376 Vim options and I'm still a fool

#74

Earlier quoted context omitted.

Does anyone have a motion jump plugin they use with neovim they can recommend? I used to use a plugin where you could just to a given character in a given buffer, but I can’t remember the name or if it even works with neovim.

leap.nvim you press a keybind and then press one or two characters , all instances of that character pair in the viewport will get get a hint (a characteror two in highlight) , hit those two hint keys and the cursor jumps to that location its incredibly fast to navigate around your viewport with this. https://codeberg.org/andyg/leap.nvim

+1 Leap takes a second to get used to but I love it so much. Even if you don't get to the precise character you want, you can get so close enough that normal motion commands get you the rest of the way.

I do change the bindings, tho. I have 's' leap forwards and 'S' leap backwards.

Re: I set all 376 Vim options and I'm still a fool

#75
That's because you should've fixed the foundation instead.

For example,

> I frequently opened this by running q: instead of :q, and didn’t know what I had done. Now I know:

But you still haven't fixed the typo-prone keybinds! And you still haven't set up a way to get this information so that next time something unexpected happens you can open your log of commands and see exactly what you've done and decide on the spot if you need to fix it. So you'd need to wait for the next chapter of the "let's read all the manuals" quest to when discover the issue

> Digraphs are an obscure feature for typing obscure characters. For example, you can enter “½” in Insert mode with CTRL-K 1 2. There’s a big list in :digraphs. I don’t use this much, except for typing fractions, but I use this more than I thought I would.

Of course, why would you commit that big list of obscure chars to memory??? The proper interface would be an avoidable visual feedback character picker so that if yo don't remember the "1 2" sequence you can even search for "fractions" But at this point, why bother with a bad vim component when you can invest in a more general symbol input solution and use it in vim and everywhere else.

Re: I set all 376 Vim options and I'm still a fool

#76

Stuff like typing "10j" made sense when text editing was high latency. Nowadays you can just hold j and stop precisely where you wanted to, even if you're ssh'ing into a server on the other side of the country. There's nothing wrong with it (and in fact I prefer it because of the 0 finger movement required). The only times I use "precise" movement commands like that is when I'm in the odd situation of having to ssh i…

It's slower to "stop precisely"on key hold/release, so 10j still makes more sense, only for a few lines tapping J a few times makes more sense, but not 10-20

Re: I set all 376 Vim options and I'm still a fool

#77
post #8

"The feeling of true Vim fluency—one where every keystroke is exact, I never make mistakes, and I’m exploiting every obscure feature—is a fantasy, at least for me." - that's a wrong mindset. bash that jk hundred times and adapt when it becomes a nuisance

That's a waste of time, you can use someone else's experience instead

Re: I set all 376 Vim options and I'm still a fool

#78

Stuff like typing "10j" made sense when text editing was high latency. Nowadays you can just hold j and stop precisely where you wanted to, even if you're ssh'ing into a server on the other side of the country. There's nothing wrong with it (and in fact I prefer it because of the 0 finger movement required). The only times I use "precise" movement commands like that is when I'm in the odd situation of having to ssh i…

That's because you aren't combining it with more advanced commands, or macros.

"10j" may sound useless. But "y10j50jp" is much more effective. Put that in a macro that does other stuff too, and suddenly you perform complex editions to a file containing thousands of lines of text in a few seconds.

Re: I set all 376 Vim options and I'm still a fool

#79
post #2

Kudos for reading all those docs and sharing some nuggets. Does anyone else feel vim clumsy like the author? I'm trying to understand how one could accidentally lowercase a whole buffer, or trigger scary messages or open unrecognized menus. Not condescending, just curious. I find the q: thing relatable, but not the rest.

I have been using it for 15+ years as my main editor and I still feel clumsy. I move doing jjjjjjjjjjj very often. I guess I have reached a local maxima and I don't want to invest the extra time on improving

Re: I set all 376 Vim options and I'm still a fool

#80
post #75

That's because you should've fixed the foundation instead. For example, > I frequently opened this by running q: instead of :q, and didn’t know what I had done. Now I know: But you still haven't fixed the typo-prone keybinds! And you still haven't set up a way to get this information so that next time something unexpected happens you can open your log of commands and see exactly what you've done and decide on the spo…

> But you still haven't fixed the typo-prone keybinds!

Which key bindings are you referring to?

It's not a trap, I promise! Just fishing for ideas.

Post reply on HN