alefragnani / vscode-bookmarks

Bookmarks Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
GNU General Public License v3.0
1.7k stars 163 forks source link

[FEATURE] - Create multiple labeled bookmarks out of individual multi-cursors selections #473

Open akharrou opened 3 years ago

akharrou commented 3 years ago

Would it be possible to create a command that could create a bunch of labeled bookmarks at once ? It would create one bookmark per cursor, the label of each being the selected text on the line that the cursor is on:

Screen Recording 2021-10-09 at 5 07 07 PM

This would create three labeled bookmarks, being:

  1. git push
  2. git fetch
  3. git pull
alefragnani commented 3 years ago

Hi @akharrou ,

Right now, the Bookmarks: Toggle Labeled command already support multi-cursor. The only difference is that it uses the first cursor/selection as suggested label, for all bookmarks.

Instead of creating a new command, I would simply update the bookmarks.label.suggestion setting (when defined as useWhenSelected), to support multi-cursor scenarios, using each selection as its own label.

Hope this helps