martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.25k stars 258 forks source link

How to place cursor at the left part of multiple selection? #1004

Closed lbvf50mobile closed 2 years ago

lbvf50mobile commented 2 years ago

Greetings.

Second day I try to repeat actions from https://asciinema.org/a/41361 that I found in this pdf.

Time code is: 00:24.

After selection :x/^static .* cmd_[a-z]+\(.*; cursor moves inside the selection from the right part to the left.

I carefully read the help, even try to use :y/^static bool to remove left par of the selection, but in the demo there are some keys. What are they?

May be it is vis-selection-flip Flip selection, move cursor to other end or something else? Then how to bind this action to a hot-key?

Here I found that _ flip selection direction, swap cursor and anchor, but when look in the :help this symbol used for trimming from white spaces.

Thank you.

thinlines commented 2 years ago

I believe what you're looking for is o. From the help:

  o                     Flip selection, move cursor to other end

This is what it says in the man page on my computer, too, but maybe the formatting is messed up in the link you posted.

lbvf50mobile commented 2 years ago

thinlines, thank you a lot. It is that feature.