7 ms·
I think it's rarely a productivity bottleneck, but that doesn't mean that Vim keybindings and navigation aren't superior in the vast majority of cases to what m
by Panzer04 4y ago
I think it's rarely a productivity bottleneck, but that doesn't mean that Vim keybindings and navigation aren't superior in the vast majority of cases to what most people are doing - which is scrolling, mousing about, etc. Vim keybindings significantly accelerate the editing and browsing of existing code in-editor.
It also has the convenience of being a fairly common set of keybindings in editors nowadays, as many have an extension that gives Vim keybindings without having to go all-in on a CLI-style Vim editor.
- p-e-w 4y agoEvery modern code editor has character-, word-, subword-, line-, and page-based navigation, as well as "jump to symbol" functionality. Bookmarks, paragraph navigation, and similar are also very common. I fail to see how Vim is supposed to be superior to that. It has essentially the same navigation features, with different keybindings. And the idea that those different keybindings are somehow "better" is a big [citation needed].
- Panzer04 4y agoHow common are the keybindings used in existing editors? I must admit I haven't ever really noticed the hotkeys/keybindings in editors - until I started using Vim bindings instead. There's likely a large crossover between people who use a lot of hotkeys and people who look into learning something like Vim. If they change often across editors, it wouldn't surprise me that they aren't often used, so don't get much evangelism compared to Vim (which has been more or less the same for decades) I only use a small subset of Vim's shortcuts - but most text editors I've used I'd imagine don't have the breadth Vim does (or they do a really poor job of documenting it). Can you point out a doc page for some IDE with similar navigation capabilities to Vim?
- p-e-w 4y ago> How common are the keybindings used in existing editors? The whole point of widget toolkits is that the keybindings for input fields are the same everywhere. I use Linux and almost exclusively run GTK-based apps, and every text input across the whole system behaves the exact same way, with consistent keybindings for navigation, undo/redo, copy+paste etc. This is how good UI should work. Platform conventions are important, and it's the job of individual programs to adapt to them – not the other way round. Vim fails big time in this regard. Can you make Firefox's form inputs use Vim keybindings? If not, there's your inconsistency already.
- deleted 4y ago[deleted]
- xeyownt 4y ago> Platform conventions are important, and it's the job of individual programs to adapt to them – not the other way round. Vim fails big time in this regard. Can you make Firefox's form inputs use Vim keybindings? If not, there's your inconsistency already. I disagree with that. And the world doesn't have to be perfect. If you use Vim and you like it (it takes LOT of effort), you will adapt the platform to the Vim ways whenever possible. Everytime I encounter something I cannot vim-ize, I'm pissed but I have to put up with it. It's like working with Windows. For the browser, you can use Vim binding for navigation, and edit with Vim. But again, this is not mandatory per se to benefit from Vim as a developer.
- kovac 4y ago> Can you make Firefox's form inputs use Vim keybindings? Do you mean something like this: https://github.com/glacambre/firenvim https://github.com/glacambre/firenvim?
- p-e-w 4y agoYes, but I mean without an ugly hack that involves spawning a process every time you want to edit a browser text field.
- worksonmine 4y agoIt's not an ugly hack, it's about not reinventing the wheel. Pure js solutions also exist but they're a subset of the features, and using native vim gives you the benefits of plugins you already have on the system. It's a feature, and it follows the unix philosophy. But I get that not everyone needs or wants it.
- ablob 4y ago"Yes, but ..." is a great way to move your goalposts. On another note, do you expect your hotkeys from your Office program to work in a Firefox form field?
- Shorel 4y ago> There's likely a large crossover between people who use a lot of hotkeys and people who look into learning something like Vim. Please no. My keyboards have cursor keys. I really appreciate the freedom not to have to remember if I am in insert mode or in edit mode. And yes, many of my shortcuts involve the cursor keys and the rest of the extended keyboard keys. Also, the function keys. These keys exist for a reason.
- unsignedchar 4y agovim has had these keybindings/controls as primary features for decades, and people that have these in their muscle memory the benefits have accrued over a long time and a number of different platforms.
- worksonmine 4y agoNot a scientific source, but there's probably a reason behind the popularity of evil mode for emacs, and vim plugins for just about anything (yes I know emacs is often the default, but that's for practical reasons like Ctrl+a/e is easier to add than 0/$). My pinkies love me ever since I started using vim. For me it's not the specific keybindings, but the modal editing allow more uses for the same keys depending on context and less need for modifiers.
- twobitshifter 4y agoAll of those keybindings are not composable, vim is. you can find with a shortcut, but vim can “dtr” to delete all text up to r. or maybe you want to delete 3 lines, 3dd will do that. Once you recognize vim is like a language for editing, you’ll get it.
- rraghur 4y agoYou aren't wrong... But the base vim keybindings and modal nature make navigation extremely efficient instead of chorded keystrokes. Then, most editors(vscode, jetbrains) have decent vim binding support via plugins. Now, you're 80% efficient since muscle memory kicks in and you can just focus on the code better
- Shorel 4y agoI think the reason is that in VIM, you either learn the shortcuts or you just can't do anything. In other editors, you can learn the shortcuts, or you can just monkey around. But it is true, and I agree, that learning how to use YOUR editor gives great dividends. In my case, my editor is Sublime Text. I have extensions and configurations I really need, because now I am used to them. Yes, I know the commands to navigate by word, line, block of code, or even use the right side minimap (with git colors for new and edited code) to move faster through the code. Also: some users, even here in HN, underappreciate the mouse. But every single ex-StarCraft player knows that mouse+keyboard can be ridiculously fast when being used by trained hands. At least for me, I can select and move, or reindent, or whatever, a chunk of code much faster with the mouse than having to know how many lines it is and then typing the equivalent command. So yes, learn touch typing, and learn how to use your editor. It matters. What doesn't matter is if your editor is vim or not.