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, especially considering how most VIM commands take motion into account.
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.
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 stuff, but for the most part, it's completely natural.
And for the first few years, I was a hardline keyboard-only absolutist, but lately I've been using the mouse where it makes sense, and sometimes it does.
I applaud this project, “setting all the options”. I think it’s a really good idea to become close friends with the software you use all the time, and getting acquainted through the lens of configuration is one way. Messing around with stuff is good.
I feel it’s worth mentioning that there is a sense in which I think it might be a bad idea. It could be that you’d now be fixating some value that may be optimal right now, rather than benefiting from future improvements to the default settings. But it all depends, of course, on how close friends you plan to be.
"Become close friends with the software you use all the time." That is a beautifully evocative phrase for a lovely idea, thank you for sharing.
If I may share an idea for which I don't have nearly as nice and succinct a summation, but I've come to view my personal computing environments through the lens of being a garden. I spend so much time within them, working, learning, playing and writing. I can see the different seasons of my life reflected through naming conventions, directory structures, scripts I've written and bookmarks I've long ignored. There are new things I want to try and explore in the spring when I hopefully have a bit more free time. I have planted seeds while children slept in my arms or in the next room, and I have enabled their dreams with the fruits of my labour. I would even say I have occasionally communed with the close and holy darkness on long, late nights.
In time everything I have created will return to dust, and probably no one will ever know this garden as I have. But it has still been a place of growth and blessing.
I've been using vim for over 20 years as my primary editor. I'm faster and more comfortable in it than I am in any other editor, but I still feel like a vim noob
I still have to look up how to do things I rarely do (like insert the contents of another file at the cursor position). And I don't really use many (if any) of vim's intermediate features, let alone advanced ones.
I've tried various ways to get more fluent, but nothing really stuck or kept my interest. This has always annoyed me a bit...
I've been using vim for 20 years as well, for everything other than Java code. I type my .vimrc by hand on each new machine to set a half dozen options.
Of the intermediate features, I use tabs and, more recently, split windows.
My favorite 'advanced' feature is visual block selection and replacement over multiple lines - super convenient.
> 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.
Perfection is not particularly attainable, or necessarily the point. Nor would it be that fun, I think? It's nice to have some aspect to improve upon. See this Casals quote:
> A reporter asked Casals, "You are 95 and the greatest cellist that ever lived. Why do you still practice six hours a day?" He answered, "Because I think I'm making progress".
> Although, also, perfection probably doesn’t come from adding options either.
No. However, the first step to _refinement_ is knowing about the thing you want to refine, so in that sense actively engaging and learning about the option lets you know whether to pursue it further.
I rerun vimtutor from time to time, because I still don't remember every trick from it. I've recently tried to read the whole embedded "introductory documentation" on a train, learned a lot, but probably need to do it again. Setting every option in the .vimrc seems a nice exercise, will need to do it some time! I like to nuke my config from time to time anyway. (My experience with Vim is about 14 years I think.)
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.
If you're at the top of the buffer, guG will lowercase the whole thing.
So if you open a file, go to type G to jump to a line, but accidentally hit g, then try to undo it with u out of habit, before hitting G again, you do the same thing.
While I had times discovering myself to accidentally putting 'i' accidentally into MS Word docs and having vim key binding ls in VS Code (and formally eclipse) as well for that reason, I still feel clumsy. I think this is because I mostly rely on muscle memory rather than understanding deeply what I am doing to also allow me to go beyond what I normally do ) which already makes me faster than in any other editor). I found VimSpeak [1] interesting because I somehow understood how to really compose vim commands in a way
Uh to be perfectly honest for the past … 30 years I’ve ran with a buddies vimrc and really never took the time to understand it; it was perfectly good lol and to this day I could not recreate it if I lost it.
> lowercase a whole buffer,
Happens a lot to me actually!
That and accidentally incrementing a numeric value haha..
Most of it is commented very well. Also I like it because it has a little bit of personal character.
> " Incrementally match the search. I orignally hated this
> " but someone forced me to live with it for a while and told
> " me that I would grow to love it after getting used to it...
> " turns out he was right :)
> set incsearch
I can see how that could work depends on the setup and the context. For example: People might use `. to jump to the last edit, or to a mark they set manually. Or simply `ciq` to edit inside the next quote without any manual cursor movements. I see people use plugin like harpoon to jump to their favorite location quickly. If you don't know about such setup, seeing people type <leader>1 to jump not just within a file, but across files, seems magical.
>> single keystroke could move the cursor halfway across the file to exactly the right spot.
> sorry what is this? exaggeration?
It is indeed. I need two keystrokes to move from an arbitrary positions in an arbitrarily long file to the exact spot I need to be.
I use it all the time, in fact. Multiple times an hour. It's muscle memory now for me, while reading/navigating code, to automatically do `ma` or `mb` etc.
At some later point I realise "let me read the function definition again" and then I do `'a` or `'b`, etc.
if someone really want to have single keystroke, there's always F<number> key that they can map to their frequently used movements, such as last edit, next function, special marker (such as `m`), etc.
Nope! "G" moves the cursor to the end of the file. Very useful. Inferior editors have ctrl-end or alt-end, but with Vim, 90% of your lazy fingers stay on the home row!
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.
Maybe but I often find the bottle neck between thoughts in my head is often the speed of which I can put them in motion, with that in mind vim motions are an absolutely amazing way to interact with a keyboard efficiently.
When using any new software my first thought is often how can I map these actions to vim motions and enable a full keyboard experience.
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 everything more complex to seem smart.
> To me the kinds of people using these editors are the kinds of people that love making everything more complex to seem smart.
If your instinct is to be denigrate people who do things differently than you, you will never understand them. However, you get the advantage of feeling superior.
Let me say why I continue using vi. I started using vi in the early 80s, then moved to vim in the mid 90s. Even people who aren't as old at me have more than a decade of using vi/vim/nvi. Those commands that seem like a burden to remember are completely transparent to me -- that is, I don't need to think about what keystroke to hit to achieve my ends. Why should I climb another learning curve?
If you tell me to just download a vi mode for vscode, I can tell you that the basic motions work, but that last 10% cause unending grief. It is like eating pasta where every 10th noodle is actually a rock disguised to look like a noodle -- completely disruptive.
I can edit quickly when I don't need to move my hands off the keyboard. Likely your dominant hand is flopping back and forth between the mouse and the keyboard when using your gui-centric editor.
> 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
I'd prefer to have a few dozen composable verbs and nouns than having to research and download "a million" extensions for the edge cases.
> No need to type commands just to edit text when there's a file manager
I have no idea what you mean by this. How does a file manager edit your text?
> It has remote SSH and features for vm machines
You can do that from vim as well. vim/nvi has a plugin ecosystem too. My own philosophy is to use as few of them as I can: one (the 'matchit' feature which ships with the editor).
The final thing you are missing is that nobody uses all the commands -- they find the ones that work for them and they use them without further thought once it becomes muscle memory. If the need ever arises to learn a new command or setting, I'll get around to it when the time comes. If I learn a bunch of things and don't use them, they get quickly forgotten anyway.
So would the use-case mostly be for people who edit lots of files over shells? I guess I was mostly thinking of coding stuff. Or do people use it for coding too?
I mostly use IDEs for day to day coding, and pretty much every IDE supports vim keybindings, which I always have enabled. I also use vim in the terminal for small edits and one-off files, so it's not either/or.
After the initial learning curve and fiddling with settings, it just becomes natural and you can edit code or other text at blazing fast speeds. I also find that it helps with RSI by reducing arm motions reaching for the mouse.
Of course, there are other good options out there, but if vim fits your brain, it can significantly boost your editing speed. For those who say programmers don't spend that much time typing, that's true sometimes, but there are periods after the design/planning phase where we type a lot, and I want that to go as fast as possible while I have an implementation loaded into short term memory.
As someone who used to be a vim skeptic myself, I'd suggest you either give it another look or just accept that it works well for other people and go on with your day.
"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
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.
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 in my editor and while they’re never a perfect 100% replacement I get so much value out of other tools I can’t see myself going back.
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. With the amount of text that AI outputs I don't see the need to manipulate text going away and Vim is one of the fastest and most flexible ways to do that.
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, especially considering how most VIM commands take motion into account.
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 stuff, but for the most part, it's completely natural.
And for the first few years, I was a hardline keyboard-only absolutist, but lately I've been using the mouse where it makes sense, and sometimes it does.
(MacOS, iTerm2, neovim, lazyvim, love this combo)
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.
Get off my lawn, hippie
I feel it’s worth mentioning that there is a sense in which I think it might be a bad idea. It could be that you’d now be fixating some value that may be optimal right now, rather than benefiting from future improvements to the default settings. But it all depends, of course, on how close friends you plan to be.
If I may share an idea for which I don't have nearly as nice and succinct a summation, but I've come to view my personal computing environments through the lens of being a garden. I spend so much time within them, working, learning, playing and writing. I can see the different seasons of my life reflected through naming conventions, directory structures, scripts I've written and bookmarks I've long ignored. There are new things I want to try and explore in the spring when I hopefully have a bit more free time. I have planted seeds while children slept in my arms or in the next room, and I have enabled their dreams with the fruits of my labour. I would even say I have occasionally communed with the close and holy darkness on long, late nights.
In time everything I have created will return to dust, and probably no one will ever know this garden as I have. But it has still been a place of growth and blessing.
I still have to look up how to do things I rarely do (like insert the contents of another file at the cursor position). And I don't really use many (if any) of vim's intermediate features, let alone advanced ones.
I've tried various ways to get more fluent, but nothing really stuck or kept my interest. This has always annoyed me a bit...
Of the intermediate features, I use tabs and, more recently, split windows.
My favorite 'advanced' feature is visual block selection and replacement over multiple lines - super convenient.
Perfection is not particularly attainable, or necessarily the point. Nor would it be that fun, I think? It's nice to have some aspect to improve upon. See this Casals quote:
> A reporter asked Casals, "You are 95 and the greatest cellist that ever lived. Why do you still practice six hours a day?" He answered, "Because I think I'm making progress".
I can use hjkl y and d perfectly! :set rnu and I can even throw some numbers in there!
No. However, the first step to _refinement_ is knowing about the thing you want to refine, so in that sense actively engaging and learning about the option lets you know whether to pursue it further.
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.
So if you open a file, go to type G to jump to a line, but accidentally hit g, then try to undo it with u out of habit, before hitting G again, you do the same thing.
[1] http://www.youtube.com/watch?v=TEBMlXRjhZY
> lowercase a whole buffer,
Happens a lot to me actually!
That and accidentally incrementing a numeric value haha..
sorry what is this? exaggeration?
> sorry what is this? exaggeration?
It is indeed. I need two keystrokes to move from an arbitrary positions in an arbitrarily long file to the exact spot I need to be.
I use it all the time, in fact. Multiple times an hour. It's muscle memory now for me, while reading/navigating code, to automatically do `ma` or `mb` etc.
At some later point I realise "let me read the function definition again" and then I do `'a` or `'b`, etc.
When using any new software my first thought is often how can I map these actions to vim motions and enable a full keyboard experience.
The learning curve can be steep but once you learn vi/Vim you can never go back to an IDE like VScode because it is so unbelievably limited.
When you get comfortable with vi it really begins to feel like you can type text in VScode but you can't edit it.
If your instinct is to be denigrate people who do things differently than you, you will never understand them. However, you get the advantage of feeling superior.
Let me say why I continue using vi. I started using vi in the early 80s, then moved to vim in the mid 90s. Even people who aren't as old at me have more than a decade of using vi/vim/nvi. Those commands that seem like a burden to remember are completely transparent to me -- that is, I don't need to think about what keystroke to hit to achieve my ends. Why should I climb another learning curve?
If you tell me to just download a vi mode for vscode, I can tell you that the basic motions work, but that last 10% cause unending grief. It is like eating pasta where every 10th noodle is actually a rock disguised to look like a noodle -- completely disruptive.
I can edit quickly when I don't need to move my hands off the keyboard. Likely your dominant hand is flopping back and forth between the mouse and the keyboard when using your gui-centric editor.
> 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
I'd prefer to have a few dozen composable verbs and nouns than having to research and download "a million" extensions for the edge cases.
> No need to type commands just to edit text when there's a file manager
I have no idea what you mean by this. How does a file manager edit your text?
> It has remote SSH and features for vm machines
You can do that from vim as well. vim/nvi has a plugin ecosystem too. My own philosophy is to use as few of them as I can: one (the 'matchit' feature which ships with the editor).
The final thing you are missing is that nobody uses all the commands -- they find the ones that work for them and they use them without further thought once it becomes muscle memory. If the need ever arises to learn a new command or setting, I'll get around to it when the time comes. If I learn a bunch of things and don't use them, they get quickly forgotten anyway.
Have you ever actually tried vim? You use the keyboard to move around and search for terms. You don't actually need to learn much.
Why not just use VSCode?
Because it's a bloated electron program that takes huge resources to edit text.
To me the kinds of people using these editors are the kinds of people that love making everything more complex to seem smart.
Seems like insecurity if you've never learned it yourself.
for eg: Keep right hand free for writing/eating by reserving left hand for mouse. (keep same settings for right handed mouse) Brrrr... :p
After the initial learning curve and fiddling with settings, it just becomes natural and you can edit code or other text at blazing fast speeds. I also find that it helps with RSI by reducing arm motions reaching for the mouse.
Of course, there are other good options out there, but if vim fits your brain, it can significantly boost your editing speed. For those who say programmers don't spend that much time typing, that's true sometimes, but there are periods after the design/planning phase where we type a lot, and I want that to go as fast as possible while I have an implementation loaded into short term memory.
As someone who used to be a vim skeptic myself, I'd suggest you either give it another look or just accept that it works well for other people and go on with your day.
I've been doing that since the early nineties. First vi, later Vim.
I like it better than Visual Studio, better than Eclipse and way better than VScode.
The very idea there is a 'right mindset' is weird to me.
Then again, I'm an emacs user.
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."
(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 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 in my editor and while they’re never a perfect 100% replacement I get so much value out of other tools I can’t see myself going back.