top | item 43734375

(no title)

arbitrandomuser | 10 months ago

This imo is a shortcoming of vim on modern systems, the action precedes the selection.

I would like to select first have a visual feedback of what I selected before taking action on it . Helix and kakuone have got this right .

I often find myself going to visual mode to emulate this.

discuss

order

teo_zero|10 months ago

I don't think it's fair to talk about "shortcomings" and "getting it right": it's a different approach and we must agree that personal preference will diverge.

Personally, I tend to use action-selection for small changes (1 to 3 objects), and selection-action for larger ones (as my brain, I've learned, becomes slower at counting above 3). So "delete 2 words" will be "2dw", but to delete the next 5 words I'll reach out for "v".

codesnik|10 months ago

it's not "emulating", it's exactly what you describe. And it's just one additional "v" away, can't be shorter than that.

Izkata|10 months ago

It's the same for selections, but motions are a little different. To use an example from above, d) is "up to" the next sentence (excludes the first character of the next sentence), while v)d moves the cursor onto that first character and so includes it when deleting.

WuxiFingerHold|10 months ago

As someone who started modal editing with Helix and then moved to NeoVim (LazyVim):

After a very short transitioning period (a week or so), I don't have this issue anymore (at all). Keeping coming back to visual mode is probably counterproductive for your transition. So maybe you should stop doing this for some time. Then you'll hopefully find yourself using the visual mode rarely.

tasuki|10 months ago

> I often find myself going to visual mode to emulate this.

It's just an extra key press. And you can choose which visual mode you'd like!