by atrettel · 1y ago · 0 comments
I only bothered to learn Vim after seeing somebody do some wizardry with it and wondering how they did it. But I didn't have the time to learn it then. I later had some downtime at work and was able to learn it. I imagine the learning process is similar for many people.
(Personally it also competes with the working memory of changes I am trying to make, but I am willing to concede that could go away with years of practice).
Simpler abstractions like sublime-style multiple cursors have almost the same power without the complexity of programming your editor live. I wouldn’t recommend new people spend time on vim, unless you like, expect to find yourself in freshly initialized Linux boxes or developing on minimal hardware often.
I think there was a time when vim saved a lot of time over other editors, and it still feels like a powerful time saving when you kick off a macro, but I am not convinced it actually is saving time over modern editors with their far easier to use features and plugins.
Even with all that said, I think the type of productivity that Vim's edited language provides is overall pointless. E.g., it just doesn't optimize things that are actually hard and/or time consuming (at least relative to other similar solutions to the same problems, like multiple cursors). The one exception being really complex edits, per the macros you mentioned (e.g., `:cdo norm` is the most effective way to do a complex edit that isn't supported by a IDE refactoring command that I know of), but I don't think most folks in this thread are talking about that when they talk about Vim's productivity (e.g., stuff like `ci"` is cool, but come on who cares, it's not like making small edits like that have ever been a big deal).
I have seen an alarming number of programmers hunt-n-peck typing, and it's getting larger..
To them, vim is probably on-par or slower
And of course there is also search and replace and lots of excellent plugins, which crucially work today as well as they worked 15 years ago. Tabularize is a vim plugin that lets me do things like realign
foo: bar
fang: wizz
with a space before bar, to make bar and wizz aligned. This is very convenient, and it is designed around vim's powerful regular expressions so that you can use it to align all sorts of data even if it uses weird delimiters or the delimiters are totally contextual.This isn't programming your editor live, it is just composition of simple elements you learn gradually. At first it is just navigating from the home row (mice suck, especially on laptops), and dd to delete lines etc. Then you learn new text objects and new effects over time, and your O(m+n) work in learning them has O(mn) results.
That's usually the biggest motivator. It was for me too.