> My experience with modality is that almost every time I want to do something I'm in the wrong mode.
The key is to almost always be in command mode. I am only in insert mode briefly to add or change text. The power of Vim comes from its terse command language, so you want to be in command mode most of the time. I find myself reflexively hitting Esc or Ctrl-[ in other programs because I have drilled this into my mind.
> I just can't see where this "efficiency" is supposed to be at all.
I did not see the efficiency myself until I witnessed a Vim master do some extremely complicated bit of text editing in seconds. I think that most people will not see the value of Vim until they witness something like that.
> If you tell me I'm supposed to spend 4 weeks reading VimTutor to gain efficiency in Vim, I could probably become more efficient faster in VS Code by learning all of its keyboard shortcuts. Btw Ctrl+/ comments the current line.
I personally found Vimtutor boring, if I recall correctly, so I did not use it to learn Vim. I just started to use Vim for all of my coding for several weeks during a slow period at work. I had a printout [1] with all of the keys next to my monitor for several weeks. That was necessary to get muscle memory for every action. I also read a lot of "Learning the vi and Vim Editors". That helps you get into the mindset about how to use the Vim command language. My point is that there are many ways to learn Vim and you can pick which way works best for yourself.
> I did not see the efficiency myself until I witnessed a Vim master do some extremely complicated bit of text editing in seconds. I think that most people will not see the value of Vim until they witness something like that.
I love Vim, and agree with this, but using this as a reason to learn Vim feels silly to me. How often do truly complicated text editing tasks come up for most programmers? Vim is really handy for when I maybe need to cut and paste some data from a web page and get it into CSV, but that's just not a common enough task for me that I'd actually recommend anyone else learn it for that purpose.
I wish I knew what this Vim mastery looks like. I have seen people do things in VS code I don't know how to do, so I wonder if you can be really productive in Vim, or you simply never realized how productive you can be in VS code.
Do people know they can use regex substitutions in VS code, for example? I'm sure Vim can do this as well, even Notepad++ has it, but it's the sort of feature most people don't know about because they just don't use regex very often.
Vim mastery is not just regex. Regex is basically the same as using sed or grep in Vim.
The key to Vim mastery is realizing that every key you press is a command in the language of Vim. Once you realize this, you can construct complicated sequences of commands that do exactly what you want without having to do it yourself manually. This is why I say that it is difficult to see how much more efficiency you can get without witnessing it yourself. It is a fundamentally different way of doing text editing.
Let's just focus on navigation for a second. Yes, you can type things like "10j" to go down 10 lines. Yes, you can type "10}" to go down 10 "paragraphs" (could be functions, etc.). Or you can type "/text" to find the next instance of "text", and then type "10n" to go to the 10th instance. Once you realize all of these things, you start to think about navigating the code a lot differently, since you realize that you can make your code very structured and make it incredibly easy to navigate with just the keyboard.
Let's now focus on something that would be really tedious to type but would happen instantly in Vim. Let's you you want to make an array of 100 elements for some reason. If you had to type that manually, you could have an off-by-one error or something. It's really tedious and not something you want to do yourself.
Instead, you can type this in Vim:
i
array = [
Esc
99A
0,
Esc
A
0]
Esc
and you have an array with exactly 100 zeros. This is a simple example. You can continue this to much more complicated structures. That is the power of Vim.
(Yes, if this is Python you can do the same thing with "array = [0] * 100". My point is to illustrate Vim's command language and how it changes how you approach text editing.)
The key is to almost always be in command mode. I am only in insert mode briefly to add or change text. The power of Vim comes from its terse command language, so you want to be in command mode most of the time. I find myself reflexively hitting Esc or Ctrl-[ in other programs because I have drilled this into my mind.
> I just can't see where this "efficiency" is supposed to be at all.
I did not see the efficiency myself until I witnessed a Vim master do some extremely complicated bit of text editing in seconds. I think that most people will not see the value of Vim until they witness something like that.
> If you tell me I'm supposed to spend 4 weeks reading VimTutor to gain efficiency in Vim, I could probably become more efficient faster in VS Code by learning all of its keyboard shortcuts. Btw Ctrl+/ comments the current line.
I personally found Vimtutor boring, if I recall correctly, so I did not use it to learn Vim. I just started to use Vim for all of my coding for several weeks during a slow period at work. I had a printout [1] with all of the keys next to my monitor for several weeks. That was necessary to get muscle memory for every action. I also read a lot of "Learning the vi and Vim Editors". That helps you get into the mindset about how to use the Vim command language. My point is that there are many ways to learn Vim and you can pick which way works best for yourself.
[1] http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial...