News for hackers. Stuff that matters.
Re:Vim is touch-typing on steroids by p-e-w on Friday January 13, 2023 @12:53AM (#34364406)
Every 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].

Re:Vim is touch-typing on steroids by Panzer04 on Friday January 13, 2023 @01:02AM (#34364458)
How 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?

Re:Vim is touch-typing on steroids by p-e-w on Friday January 13, 2023 @01:21AM (#34364535)
> 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.

Re:Vim is touch-typing on steroids by xeyownt on Friday January 13, 2023 @01:45AM (#34364672)
> 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.

Re:Vim is touch-typing on steroids by kovac on Friday January 13, 2023 @02:30AM (#34364906)
> Can you make Firefox's form inputs use Vim keybindings?

Do you mean something like this: https://github.com/glacambre/firenvim?

Re:Vim is touch-typing on steroids by p-e-w on Friday January 13, 2023 @02:36AM (#34364949)
Yes, but I mean without an ugly hack that involves spawning a process every time you want to edit a browser text field.
Re:Vim is touch-typing on steroids by worksonmine on Friday January 13, 2023 @09:19AM (#34368047)
It'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.

Re:Vim is touch-typing on steroids by ablob on Friday January 13, 2023 @09:43AM (#34368345)
"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?

Re:Vim is touch-typing on steroids by Shorel on Saturday January 14, 2023 @03:56PM (#34384096)
> 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.

Re:Vim is touch-typing on steroids by unsignedchar on Friday January 13, 2023 @01:29AM (#34364581)
vim 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.
Re:Vim is touch-typing on steroids by worksonmine on Friday January 13, 2023 @09:08AM (#34367937)
Not 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.

Re:Vim is touch-typing on steroids by twobitshifter on Friday January 13, 2023 @04:46PM (#34374329)
All 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.
Re:Vim is touch-typing on steroids by rraghur on Saturday January 14, 2023 @02:04AM (#34377973)
You 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
Re:Vim is touch-typing on steroids by Shorel on Saturday January 14, 2023 @03:51PM (#34384053)
I 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.