Hacker News new | ask | show | jobs
by _7tgr 893 days ago
A couple thoughts to add to the conversation:

I think I prefer visual mode when I'm doing a _really_ complicated edit and need to rely on visual feedback. I think having visual feedback as the default, though, (1) causes too much visual clutter (I don't want random things to be highlighted all the time when I'm moving around) and (2) wastes keys needlessly, and causes you to have to do weird stuff as a result. For instance, if I want to select 5 words in visual mode, it's just 5w. This is not (afaict? I may be wrong) the case for the Kak/Hx editing models, which have to rely a bit more on chording (pressing shift to extend a selection in the case of Kak; I guess in Helix you could enter its visual mode and do the same?). It's also difficult to replicate Vim's repeat command.

Switching verb+object to object+verb is great, and useful-- I just don't want it to be the default. Having it be a mode seems to be a very natural solution.

Or perhaps there's a way to get visual feedback that doesn't come with these drawbacks-- but these seem inherent to the concept. Visual feedback is super useful, but it definitely doesn't come for free.

And at least IME, I usually don't need this kind of visual feedback; the edit actions I'm using in normal mode scale with the complexity of the edit. So if I'm trying to delete to some specific place, I'll probably use f/t or search as a movement or <verb>i<delim> since those are a lot more precise than trying to figure out the number of words/characters/lines to delete. And on the rare occasion that this doesn't do what I wanted, the right thing is usually just a matter of pressing . away (or, rarer, u + the thing I meant to do. I'm never really scared of doing the wrong edit, since n/vim preserves your undo history as a tree).

1 comments

2) you do the same in Helix in its visual mode, so no waste. But also it's not needless, precision is the need, instant visual feedback is what serves it, showing you the target of your actions

1) have you tried it long enough (might stop bothering)? Also, maybe it could be improved by highlighting after some delay so on move you only get a highlight when you stop, not for each individual word you jump over

F/t is also a lot less precise with multiple cursors since you don't have a single unique mark, so you'd need to get there gradually (and you wouldn't count, it's also a waste with small numbers, pressing a "word forward" key 3 times is more ergonomic), and that's where seeing is better than imagining