Hacker News new | ask | show | jobs
by xigoi 1093 days ago
My problem with object-verb is that it requires much more keymaps for motions (you need to distinguish between “move selection” and “extend selection”).
1 comments

Extend selection is via the same select mode that vim already has, so that's 1 extra key prefix, and move selection is enabled by default, so regular move commands pre-select what they move over, so in some cases that's even saving you a keypress :)

Though it's not that it should be the only way to go (plenty of vim pros have adjusted), it's just visual feedback is very powerful, and lack thereof is a legitimate big challenge you shouldn't ignore in the "greatest" answer

I wonder how it would be if one attempted to make Vim’s verb-object system more visual instead? Imagine if say “dwww” would highlight the next three words in red to mark them for deletion - but until you press enter to execute the deletion, you remain in a visual-like mode where you can adjust the region you want to delete by pressing more motion keys. Similarly, pressing “yip}” could highlight two paragraph (in paragraph + next paragraph) in yellow and then yank them when you press enter.

This would kinda be the opposite of the idea in Helix/Kakoune: one automatically enters a visual-mode-like state after typing a verb that expects an object.

Interesting idea to try out and compare. Indeed the visual feedback provides the biggest value, though to me verbs "fork" from the objects, so it's more "natural" to have some selection then decide what exactly you want to do with it, delete, or replace, or ...