Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to move cursor position within selections #3033

Open
gerardroche opened this issue Oct 30, 2019 · 2 comments
Open

Ability to move cursor position within selections #3033

gerardroche opened this issue Oct 30, 2019 · 2 comments

Comments

@gerardroche
Copy link

gerardroche commented Oct 30, 2019

Problem description

In plugins like Vintage and NeoVintageous there is mode called Visual-line mode. This is when visual selections are linewise oppose to characterwise.

In characterwise selections the left and right keys extend the selection. However, in linewise selections only up and down extend the selection.

Note that Sublime itself doesn't distinguish characterwise and linewise selections. The pugins keep track of the selection mode i.e. characterwise or linewise.

In linewise mode there is a need to allow the left and right keys to move within the linewise selection.

Preferred solution

I want to suggest to implement a feature that allows plugins to mark a selection as charaterwise or linewise and when set to linewise allow the cursor to move within the selection oppose to extending it.

Additional Information

@Thom1729
Copy link

Currently, Sublime does not have separate notions of selection and cursor. The selection consists of oriented regions [a, b], and the cursors are at point b. To have a cursor not at the boundary of a selection would require a significant change to the API, and likely to Sublime's internals.

@FHTheron
Copy link

FHTheron commented Nov 3, 2019

PowerCursors might give you something, but I definitely don't fully grasp your use case.

You can make a normal selection, then power_cursor_add will add the whole selection as if it's just one more cursor. You can then move your real caret around while the selection is in a sort of "mark" state and then when you want to leave cursor limbo and get back to real selections you use power_cursor_activate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants