(This is basically a copy-paste of previous comments I’ve made, I haven’t tried your tutorial beyond the first lesson.)
(This is basically a copy-paste of previous comments I’ve made, I haven’t tried your tutorial beyond the first lesson.)
If you're going to disable the mouse and the arrow keys and really commit to the home row, more power to you. That is probably the best way to master Vim. But I think a significant number of people looking at Vim tutorials have never used the editor, and I think they deserve to know that there is an easy way to make the editor more comfortable and more familiar.
Someone down-thread used a metaphor to say 'the best way to learn a new language is by immersion' which is something I would agree with. But opening Vim for the first time feels like being dropped into a foreign country where no one speaks your language. Imagine how frustrated you would be to find that the people there actually do speak a language that you know, they're just refusing to understand you because you haven't issued the magic words, "set mouse=a"
The people who seek out a "learn vim" course are just not that kind of people. In this case you've signed up for a course on how to speak Spanish only to ask the teacher to not speak Spanish.
Having mouse support gives you a superset of functionality. Often this can be useful, like if you have on your hand on the mouse using another application.
Saying "why even bother" using vim if you add features just makes no sense.
I felt the same way when first learning vim, since it was completely different from the code editors I'd used in the past, it was strange not being able to use the mouse in the way I was used to.
I find it much more useful to remove the ability to even do the wrong thing, than to simply try and will myself to do the right one.
Yes, exactly. This is analogous to travelling to another country and hoping to learn the local language by immersion. If you then meet people that speak your language you run the risk of only hanging out with your little expat group and never immersing yourself in the local culture. You can end up spending years there and never learning the language.
The remaining time I would edit code like normal with vscode, so it turned out that I wasn't really able to pick up vim and use it well.
It wasn't until I switched to a different keyboard layout that I decided to move over to vim cold turkey, and was actually able to learn vim and retain it.
I have done that briefly years ago but I find it a dead end.
After a while you just get used to the cursor keys being in a different place and if you’re touch typing it doesn’t mater much.
Also what you loose to cursor key placement you gain back on other navigation.
So in short just support qwerty and it’ll be fine.
IIRC dvorak even happens to split the vertical and horizontal movements between hands but while keeping them near each other, almost like RC car controls. Workman is comparatively a bit crazier with its placement, but it still doesn't bother me.
And while I'm diving into history here, vi (which stands for "visual") was a modification of "ex" to use the newfangled "video terminal" instead of the battle tested teletype machine.
Although, it would help to show beginners exactly why abandoning the mouse will be better in the long run. It wouldn't do well for them to always rely on it in place of more efficient commands. Some people might always use the arrow keys instead of hjkl, for example, when hjkl will be better in the long run since they are on the home row.
I don't believe I'd write usefully larger amounts of code by using hjkl instead of arrow keys, and personally I am always going to use the mouse when I want to move more than a couple of lines.
What changed my opinion was watching videos of people using vim on youtube that made me interested in learning it for real. It made me realize how much more efficient it could be.
A key ethos of Vim is that once you climb the initial learning curve, you're on a path of increased efficiency for the long haul. Moving the hand to the mouse, dragging the cursor to the spot you want, then moving the hand back to the keyboard, is objectively slower than key-based movement commands for someone who has climbed the learning curve and I'm confident that could be proven empirically though I'm not aware of any such proof. There may be certain exceptional cases where the mouse is faster, but for most editor usage it would not be. I'm not sure if you agree w/ that and are just criticizing how tutorials introduce people to Vim, that they should start w/ the mouse to lower the learning curve, which might be an okay argument.
I’ve been using Vim as my primary editor for 25 years and at this point the keyboard nav is burnt into me.
I still use two finger scrolling on my track pad though. If I’ve been in another window I might also start the cursor at a point with trackpad.
It works fine over ssh too.
I think most newbies that care enough to try Vim know there is a Vim Way. They know about Vim Golf.
That get tiring all the time when you’re starting out. Sometimes they just want to get the job done until they learn, I’m ok with that. Just have a go.
It’s absolutely fine to make use of all the features Vim provides and use it any way you want because you’re always going to me slowly learning more.
I tried to explain the benefits of vim in the "Why Vim?" section, but I should really go into why using and learning vim will be slower at first than using the editor you're already comfortable with, and how it might be worth it in the end.
Thanks for the feedback!
I bet I could untrain with sufficient work but it's no longer worth it.
Also, I think scaring people away from arrow keys is premature. It's not that big a deal.