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.
> lowercase a whole buffer,
Happens a lot to me actually!
That and accidentally incrementing a numeric value haha..
> " 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 incsearchThe very idea there is a 'right mindset' is weird to me.
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.
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.
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 strongly predict it will be trivial.
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.
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.
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.
Then again, I'm an emacs user.
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.
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.
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.
for eg: Keep right hand free for writing/eating by reserving left hand for mouse. (keep same settings for right handed mouse) Brrrr... :p
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.
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 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.
I've tried to use VScode, especially since people said that it could emulate vi... it can't. Some of the basics are there, but then you forget you are in a different program, and use something that works in vim... and it fails. A couple of times with catastrophic results: I lost a file completely after typing a command.
I actually repeat the experiment every year or so, but I do not see much improvement.
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.
It’s not to look smart or because I like making things complex. I am not the one to tinker too much (hence the jump between editors, if I get too invested, I move). The benefits of VIM motions have nothing to do with the editors themselves. If you have never tried it, I would strongly recommend giving vim mode a go, in whatever editor you fancy.
* 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.
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.
Though for definitions I rely on LSP and Ctrl-] most of the time. Never really used gd.
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.
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
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.
{ [count] paragraphs backward. exclusive motion.
} [count] paragraphs forward. exclusive motion.