3 ms·
I've tried using vim plugins with different editors before, but they're always missing a few of the shortcuts that are in my muscle memory and drive me crazy.
by xur17 8y ago
I've tried using vim plugins with different editors before, but they're always missing a few of the shortcuts that are in my muscle memory and drive me crazy.
Also, being able to ssh into any machine and remotely edit code is pretty awesome.
- okbake 8y agoThe biggest thing for me when trying to switch from console vim is `alt + <key>` will send ESC and the key, so you can use alt to exit insert mode and send a command at the same time. Doing alt+j or alt+k has become the way I always leave insert mode (or command, or visual). Unfortunately most IDEs that have vim keybindings don't support this, and it has become such a baked in part of my muscle memory that it makes switching to anything else such a pain.
- JackCh 8y agoMany of them fail to implement macros in my experience. Though I've heard VSCode got this part right. The most productive vim keybinding I ever came across was: noremap <Space> @q Since the key to start a macro is q, you can quickly tap qq to record a macro to the q register (end it by pressing q again.) Then by whacking the space bar you can execute the q macro as many times as you'd like. Once you get into the rhythm of using it often even for small tasks, it can become a great optimization. Sometimes I use it with five or more different macros in a single minute. If you ever look forward in time and see that you're about to perform the same edit two or three times, pressing the q key three times total and the space bar once per execution (or only once with a count) will often be fewer keystrokes than had you performed the edit manually each time. Not to mention triumphantly smacking the space bar to repeat an edit is a great feeling. (Simple edits can be repeated using . which is another indispensable vim feature that sometimes gets missed by vi-plugins in other editors.)
- sodapopcan 8y agoSince <space> is some peoples' leader key (not mine, but I see it a lot), just throwing it out there that `Q` is a fine alternative for that mapping too. It's also a nice semantic companion to `qq`! ...unless you are a heavy ex-mode user, of course :)