You may already have met one of those extremists which have explained to you how productive VIM is compared to newbie editors like vscode or other modern useless shit.
To me, this always have sounded like some sort of hell-yea-i-am-a-real-geek nonsense. In perticular, they often hightlight the fact that VIM is highlly customizable. Weeeelll, yes. That's right. Or at least that was right: vscode (or other modern alternatives), is also highly customizable, in a way more user friendly fashion.
However, if like me you have been writing code for decade(s), you might have noticed (or not?) that one of the things that break your flow is to constantly switch between keyboard, arrow keys, and/or your mouse. When you have a burst, you may feel like hell-yea-my-hands-are-flying, but in the end, you spend a lot of time not typing actual code. That is one of the arguments of VIM-extremists, and I must say, this is the one that seduced me the most.
I'll share with you the two ways I achieved that.
Vscode shortcuts customization is awesome. You can do almost anything with it.
Here is a link to my key bindings, so you can pick what's best for you (⚠ my keyboard is AZERTY).
A config like this one allows you to navigate your code without moving your hands even slightly:
ALT+I/J/K/L/U/O/Y/H/M/ùto move around
- same shortcuts with
SHIFTpressed to select code
ALT+Q/S/D/Zto switch between panes
ALT+SHIFT+Q/S/D/Zto move code panes around
ALT+,/;to switch between tabs
- ... it also contains some other useful stuff check it out.
It takes several hours to get used to not touching your mouse, but there is no going back: It really worthes it.
However, when you configure this kind of shortcuts, it can feel a bit frustrating to edit text elsewhere "the old way" (notepad, word, or even in your browser).
That is the why of this next section:
If you dont know autohotkey, it is a small software that allows you to write scripts that you can bind to keyboard shortcuts. It has a quite ugly syntax, but it makes it really easy to remap keys and interact with windows.
This autohotkey script will allow you to have almost the same experience moving around text as briefly described in the previous section, but system-wide.
(nb: It also contains a remapping of the F1 key that hides/shows Windows Terminal)
Moving around code using keyboard is nice, but you may feel like it is frustrating not to jump directly at a precise location visible on your screen (you'll want to click on this location).
For this, I highly recomend the jumpy vscode extension, which does just that using your keybard.
ALT+Tab is quite frustrating... try switcheroo: Press
ALT+Enter, then just type the window name you want to jump to 🎉
There are several extensions that will turn your vscode experience in something like VIM. Read this article to know more about it.
It has plenty of shortcuts allowing you to browse pages, navigate bookmarks, open tabs or click links using your keyboard