I set all 376 Vim options and I'm still a fool
83 points by EvanHahn
83 points by EvanHahn
I've personally worked with the author around 2014 and later and can say that they were already much better at vim than the article may suggest. The self-deprecating humor and approachable writing style help make the shared experience of gradually getting better with vim more relatable.
I don't think I've ever looked up every option myself. Maybe I will now! I know that I still discover new motions or movements every now and then after 20+ years. Vim docs are famously good if you already know what you are looking for. The discoverability of features to don't know about yet, however, can be quite lacking
You aren't alone!
I think I have a higher tolerance for tedium (or a lower motivation to improve) than the "vim wizards" of the world. I showed a friend of mine Doom Emacs (my preferred vehicle for vim), and watched them zooming around a file a week later. "Didn't you think there'd be a better way to do XYZ?" they asked, and my reply was "no?" I have tried vimgolf from time to time, but I never feel like I learn much there; more like I learn to painstakingly craft a macro and repeat that several times (which is not something I enjoy doing when programming normally).
I swear I saw something like this before, but if it doesn't exist I want it: "editor lints" for vim. By that I mean you save a small buffer of the last few commands + the text it was operating on and write lints for them. e.g. I very often do di which a lint could suggest as c. I'm sure it might get annoying in a session, but it could also be given as a summary at the end, e.g. "you typed di 20 times, you can save 20 keystrokes by typing c instead." Obviously this isn't so easy with navigation --- often the right move is something like vim-snipe or go-to-def or a plain old /, but it would be very hard to say which is the right move just from your editor history (perhaps instead the lint could say something like "x% of your movement was hjkl, next time try <option>."
This really is to say that with the breadth of advanced editing, discovery of what is possible is important and lacking IMO.
I swear I saw something like this before, but if it doesn't exist I want it: "editor lints" for vim. By that I mean you save a small buffer of the last few commands + the text it was operating on and write lints for them. e.g. I very often do di which a lint could suggest as c. I'm sure it might get annoying in a session, but it could also be given as a summary at the end, e.g. "you typed di 20 times, you can save 20 keystrokes by typing c instead."
Maybe you're thinking of hardtime.nvim? It seems to do some of what you want and your description reminded me of it.
Nice! Yeah, that's what I'm looking for. Seems there's an emacs port too (https://github.com/ichernyshovvv/hardtime.el) but not sure how many features are implemented by default.
This really is to say that with the breadth of advanced editing, discovery of what is possible is important and lacking IMO.
which-key in Emacs is great for at least partially addressing this problem. as well as the casual package https://github.com/kickingvegas/casual
the general pattern they use is the transient menu originally developed for magit. I hope we can see more transient menus in applications outside of Emacs.
I once set all Emacs variables and then I realized I was 100 years old.
I once set all Emacs variables and then I realized I was 100 years old.
I guess the question here is: did it take you that much time to go through all of them, or did one of the variables accidentally adjust your age? 🤣
If you're hitting q: all the time, you need to slow down to go faster.
The diagraph and command-line window tips alone solve long-time Vim issues of mine. Thanks for writing this up.
I was still accidentally opening menus I didn’t recognize. I would do silly things like converting the whole file to lowercase
To be doing this kind of stuff after 13 years of using vim is very odd. I wish I could offer some advice to help, but I don't understand how this is possible, unless the author is just a particularly sloppy typist. I'm not a always-on-home-row super-high-words-per-minute knows-every-single-vim-command master or anything, and yet I'm very comfortable in vim and can't recall ever accidentally opening menus or accidentally converting a whole file to lowercase.
Further, expecting to learn vim by setting all the options seems strange to me. I'm not sure there's any software out there where that'd work. It might help you find some features you forgot about (or didn't know in the first place), but it never teaches you how to actually use the software. In the same way, setting all the options in a videogame doesn't teach you how to actually play the game.
To be doing this kind of stuff after 13 years of using vim is very odd. I wish I could offer some advice to help, but I don't understand how this is possible, unless the author is just a particularly sloppy typist. I'm not a always-on-home-row super-high-words-per-minute knows-every-single-vim-command master or anything, and yet I'm very comfortable in vim and can't recall ever accidentally opening menus or accidentally converting a whole file to lowercase.
Congratulations: you carry the weight of your excellence very lightly. You also have a lovely bedside manner. No notes.
To the OP, typing mistakes happen. Nearly everyone (other than joemi) accidentally ends up in the command-line window sometimes. I've been using Vim for 20+ years and I still accidentally start recording a macro at least once a month. ¯\(ツ)/¯
I wasn't trying to be haughty or harsh and I apologize to everyone if I came across that way. But the author explicitly said that after 13 years they were still accidentally opening menus they didn’t recognize. After 13 years, they'd definitely recognize things like the command-line window. In fact, I'd argue by that point they'd recognize most anything that they might easily find by making a mistake. And what's the shortest way you can come up with to convert the entire file to lowercase? Of the top of my head I can come up with ggVGu which seems unusual to type by mistake.
I don't know. Perhaps their words weren't meant to be taken literally?
I don't think they were trying to be so harsh, they probably just use ZZ instead of :q!
I am in :q camp and I still don't know what q: does (perhaps I should learn as the OP suggests...).
(although I stopped using :q when I started using emacs and I stopped ever closing my editor)
I still don't know what q: does (perhaps I should learn as the OP suggests...).
It is worth checking out: https://vimhelp.org/cmdline.txt.html#cmdline-window. (Though you seem to use emacs, and I doubt their vi modes implement this sort of thing.)
Though you seem to use emacs, and I doubt their vi modes implement this sort of thing.
Evil does! q:, q/, and q? all pull up the command-line window like in Vim.
Evil does! q:, q/, and q? all pull up the command-line window like in Vim.
TIL, thanks. Remarkable dedication by those devs.
I’m sensing config fatigue from a small chunk of the terminal editor ecosystem. I spent months tweaking my neovim config in an effort to keep it to the essentials: https://erock-git-dotfiles.pgs.sh/tree/main/item/dot_config/nvim/init.lua.html
I also run https://neovimcraft.com a place to quickly find nvim plugins. When it started there were maybe 150 plugins that were reasonably well known. Now we are reaching 1200. On one hand it’s awesome because it’s now a massive ecosystem with endless options for hacking.
Then I found kakoune and have been daily driving it for a few weeks. It has made me realize that what I want from an editor is actually very simple. I don’t need window splits inside my editor, I have a wm for that. I don’t need treesitter, regex is faster and doesn’t encourage rainbow puke.
What I want is something like vim with saner defaults and better key bindings. Kakoune has checked all those boxes for me: https://erock-git-dotfiles.pgs.sh/tree/main/item/dot_config/kak/kakrc.html
Omg, I’m totally yoinking that copy-github-permalink function! Thanks!
Here’s mine in vim: https://github.com/llimllib/personal_code/blob/master/homedir/.config/nvim/lua/keymap.lua#L143
Which opens it in a browser - I copy the URL if that’s what I want
I’ve been using vim for 25 years but I’ve not stopped to consider how I use it. It would have been very worthwhile for me to have stopped and looked at that decades ago and compounded the improvements
Ironically reconfigurations often cause more stress for me because I'm bad at remembering things and especially when I change a config I seldom use, it can be confusing to me the first time I use it again - or when I use the feature on a stock-configuration system much later. That's the reason I haven't touched my vim config for a few years (except for highlighting/lsp stuff and testing astronvim right now), whereas my emacs config (which I never used on servers) has been very lively during the time I used it.
At least to me the keyboard / typing skill has been much more relevant than knowing my editor. I've used swiss german, german, french (azerty), american and now international american keyboard layouts and I've switched between thinkpad laptop keyboards (still my favorite), cheap IBM/HP , an ergodox and a 40% ortholinear keyboard. Every single switch made me temporarily more nervous in the editor because I had a hard time to reason about what I typed when I mistyped. BUT it also made me more aware of my typing style and I think I've got very good at touch typing by now so that I can reason about typos very easily (except the 40% ortholinear which I started using a few months back - and with the multiple layers it can still cause super weird results, especially e.g. after typing for a while on the thinkpad keyboard in the train).
There are also games like nvim-be-good to train specific vim patterns. :-)
This prompted a thought about really knowing your tools. Sure you shouldn't have to read the entire manual to get started. But I spend hours in vim every day. Should I read the whole manual? I'm sure there are tons of features that I could take advantage of that I don't even know exist.