Live data from Hacker News

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

evanhahn.com

61–70 of 142 posts

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

#61
post #36

I'm using neovim all the time, but I don't find this "zipping through the code" to be very critical. Most of the time is spent on thinking and analyzing it, not on fast typing or jumping through it.

Depends on what you are doing. When it’s a large codebase, trying to debug or understand a implementation, hitting * to cycle through the occurrences in a file, “gd” to jump to the function definition, Ctrl+o to go to previous position are crucial.

I sure use Ctrl-O, Ctrl-I, * and N / Shift-N etc.

Though for definitions I rely on LSP and Ctrl-] most of the time. Never really used gd.

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

#62
post #18

This feels like the "wrong" direction today with the advent of AI? Just seems like in the realm of "bending yourself to the tool vs bending the tool to yourself," it's the LATTER that's about to get a whole lot easier, if it isn't already. So, sure, there are probably things you can learn, but e.g. I'm much more about "I think it should be THIS way so how do I make it do that."

Learning Vim has been one of the highest-longevity skill I picked up in University. With every new technology - autocomplete, IDEs, various GUI design interfaces - there's always a chorus of folks who say: "Well now you don't need to Vim, this new tool makes that obsolete." And every time I end up having to manipulate a mountain of text regardless - whether that's in logs, source code, configuration, or documentation…

But the thing is -- will it be?

Which is to say, let's take two extremes. The "vim" way vs. the ultra-Emacs way, right? The thing is, it will soon become trivially easy to modify your own "text editing environment," and by you I mean everyone?

The more I read this, the more I'm strongly predicting a resurgence in this sort of individualization.

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

#63
post #18

This feels like the "wrong" direction today with the advent of AI? Just seems like in the realm of "bending yourself to the tool vs bending the tool to yourself," it's the LATTER that's about to get a whole lot easier, if it isn't already. So, sure, there are probably things you can learn, but e.g. I'm much more about "I think it should be THIS way so how do I make it do that."

The problem is both (1) knowing what you want, and (2) specifying what you want. (1) is hard enough and a necessary prerequisite to (2) which, even so, is even harder than (1). Good, documented software is the accumulated knowledge of people who (1) knew what they wanted, (2) implemented it, and (3) communicated how it works. AI can ease the building of such software but does not make the process trivial.

I don't believe your last sentence at all -- especially if we're talking about "bespoke software for individuals."

I strongly predict it will be trivial.

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

#64
post #18

This feels like the "wrong" direction today with the advent of AI? Just seems like in the realm of "bending yourself to the tool vs bending the tool to yourself," it's the LATTER that's about to get a whole lot easier, if it isn't already. So, sure, there are probably things you can learn, but e.g. I'm much more about "I think it should be THIS way so how do I make it do that."

You are getting downvoted quite heavily but I do wonder what percentage of people are growing more and more accustomed to the latter. I say this someone who was dedicated to (neo)vim for a decade. With AI I spend a lot less time writing/editing pure code these days, and all the VSCode based IDEs have become so essential to my workflow/productivity that using vim only would be masochistic. I still enable the vim binds…

Exactly. My journey is similar, probably because I've never had to code for a living. I started learning Vim. I dedicated 2 years to Emacs + Org-Mode.

And eventually I left. I've come to realize (for me) anything that can't do CUA keybinding easily and well, usually out of the box, is useless to me because I use other software.

So now I'm riding this weird middle space between Vim and Geany mostly because I haven't had time to dig into making something different. But I'm just about 100% certain that I'll be able to make a perfect-for-me bespoke text editor very soon, thanks to AI. I know it would have been possible in Emacs, I just didn't have the time.

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

#65

Instead of having encyclopedic knowledge of every feature, I think editor fluency is being really good at the few features you need such that the editor is no longer the bottleneck. The few features you really need to know for VIM are mostly in `:help motion.txt`. Knowledge of other features is obviously helpful in actually editing text, but being able to navigate well should remove most of the bottlenecks, especiall…

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

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

#66
post #58

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.

Like the nth character in the current buffer? I believe vim has that built-in: ` go`. I think ` ` will do it relative to your current position.

Actually, `` ignores things like new lines.

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

#67
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 into something from my phone.

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

#68

I never understood the appeal of these command-line editors with a million commands for different edge-cases. Why not just use VSCode? It has every possible extension you already need and a simple GUI. No need to type commands just to edit text when there's a file manager... It has remote SSH and features for vm machines. To me the kinds of people using these editors are the kinds of people that love making everythin…

Since you asked:

* I’m old. I learned Vim many years before VSCode existed and I have good muscle memory for using it.

* Vim defines many editing commands are available in other places such as shells, db clients, REPLs so I can bring my way of working with me across OSs.

* Learn Vim once and you know it for all time as other editors come and go.

* Vim/NeoVim has even more plugins than VSCode both its own and via LSP, etc.

* Vim is true FOSS. No one can take it away from you, control how you use it or insist they are given ownership of your work including training rights.

* I’ve worked with many VSCode users since it launched. The way I see them using it seems slow to do simple tasks and unappealing.

* Vim is getting easier to use because LLMs are making it easier to learn some of the obscure features.

I don’t mind what editor anyone else wants to use so long as I can use NeoVim. I’ve worked some jobs where the boss insisted everyone has to use what they use and I’ve never stayed long when that happens.

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

#69

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)

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

#70

I think it took me about four months of daily use to know most of the editor basics without having to pause to look up things. Another eight for it all to feel natural. And, maybe about six years later, it remains my favorite text entry and code editing environment. I've been using the LazyVim https://www.lazyvim.org/ > neovim setup and a handful of extras, but not too many. I still have to look up some esoteric stuf…

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.
Post reply on HN