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

Allow toggling multiple selections with multiple cursors #73

Open
Kronuz opened this issue Nov 30, 2021 · 1 comment
Open

Allow toggling multiple selections with multiple cursors #73

Kronuz opened this issue Nov 30, 2021 · 1 comment

Comments

@Kronuz
Copy link
Contributor

Kronuz commented Nov 30, 2021

I'd be really useful if we could have multiple selections and toggle all of them at once.

How to reproduce

  1. Select multiple lines with text
  2. Highlight parts of each line
  3. Use toggle highlight command to turn on the highlights

Desired behavior

All selections should be added as a highlights

What we see instead

Only first selected text is highlighted, all others are ignored.

Proposed solution

Add selections to TextEditor (lib/vscode/text-editor.ts) and use it in ToggleHighlightCommand (lib/commands/toggle-highlight.ts) to iterate through all active selections in execute().

@LoanCaecke
Copy link

Hello,

I would like to suggest one sub-feature for multiple cursors too :

  1. Select multiple lines with text
  2. Highlight parts of each line
  3. Use toggle highlight command to turn on the highlights and make the multicursor selected text a single regex group

So it avoid to spread the hightlights on all the file if one selected text area is one char only (hightlight all "d" of the file for exemple.)

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

2 participants