3 ms·
I've heard plenty of people say this and I just don't understand it. I use vim bindings in VS Code 95% of the time but the 5% of the time that I use real vim, i
by mcluck 4y ago
I've heard plenty of people say this and I just don't understand it. I use vim bindings in VS Code 95% of the time but the 5% of the time that I use real vim, it all works exactly the same
- nucleardog 4y agoHow deep have you gone into vim? Admittedly it's been a while since I tried vscode, but when I did my experience was that vim's functionality is a superset of what's available in the plugin. Especially if you learned on the plugin, vim would generally work the same as vscode. The issue was the other way--there was functionality missing in the plugin, or sometimes when you tried to compose more complex operations they didn't work or worked strangely, etc. Like, if you're used to working in C you won't see the advantage of a C++ compiler, but if you've spent 15 years working in C++, you're gonna feel pretty hamstrung by a C compiler.
- mcluck 4y agoCan you give me an example of something that doesn't work correctly? I'm not an expert but I'm pretty sure I know all of the movements and basic verbs and they all seem to work fine to me. I believe you that there are missing features but I'm wondering what I'm missing out on
- bee_rider 4y agoI've got the VSCodeVim extension installed, some other people have mentioned one that is backed by the neovim folks so maybe that one is better. imap/nmap don't seem to work -- I think I'm an intermediary vim user in the sense that I don't have all the shortcuts memorized. So it can be useful to just throw together a macro to encode an idea like "change the parentheses to brackets around this variable and then go to the next search result." I'm sure there's a built-in command for this sort of thing but I don't have it memorized, so what I'll sometimes do is just perform the transformation manually once, keep track of which keys I hit, and then nmap that to some random key. Before, my gripe was that visual mode didn't work, but they added that (yay!).
- mcluck 4y agoYou can do equivalent configuration with the extension settings but I can see how not having imap/nmap could be annoying. However, macros work just fine. I use them all the time. Press q and then another letter to start recording a macro for that register. Press q again to stop recording. Then you can type @<letter> to replay the macro
- WorldMaker 4y agoAre you familiar with vim q macros? It's a similar thing but you don't need to use maps/remaps to use them: q<letter> to start recording and q (in normal mode, so <Esc>q sometimes) to stop recording. Then you can rerun the macro with @<letter> (or @@ is rerun the last macro). (Even fun things like <count>@<letter> work to rerun the macro a number of times.) VSCodeVim seems to support q-macros just fine. The lone silly missing bit is that VSCodeVim makes it slightly tougher to save/reuse q-macros than proper Vim [1]. In Vim those letters are the exact same "registers" as copy/paste so that you can record a macro to register 'a' with `qa…<Esc>q` and then if you want to save that macro for later you can just paste it into a document somewhere `"a` (paste register a) and pull the macro back in with the right motion and yank to the register you want (`<motion>ya`). VSCodeVim unfortunately uses separate registers for now and it is a bit more work to save/restore q-macros. [1] https://github.com/VSCodeVim/Vim/issues/1658 https://github.com/VSCodeVim/Vim/issues/1658
- bee_rider 4y agoI should get used to q macros, they are the right way to do what I like to do. Unfortunately before hearing about them I mapped qq to 'quit' and I'm afraid the muscle memory is just stuck there now.
- WorldMaker 4y agoWhen I was a novice first starting vim I was given great advice that I followed for many years: avoid custom mappings. It's tough to learn vim if you confuse its mappings. When I was an intermediate user of vim for several years I had drastically custom mappings because I thought I knew enough and knew better. I thought I had a good excuse, too: I was using a different keyboard layout and I might as well remap everything. As an aged user of vim, I can't call myself "advanced" or an "expert" user I don't think, I've returned to the wisdom of the sages: avoid custom mappings. I still need some moderate remappings for my keyboard layout but have come back around to "the less I remap, the better".