alefragnani / vscode-bookmarks

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

[BUG] - Save As removes all bookmarks #759

Closed ThoughtPhotography closed 3 weeks ago

ThoughtPhotography commented 4 weeks ago

For most simple tasks I use Save As for source control, but this causes all bookmarks to be deleted. If this is intended, please make it optional.

When saving 'filename v2' as 'filename v3' etc. I want to keep the same bookmarks

Steps to reproduce

  1. Create bookmarks.
  2. FIle... Save As...
alefragnani commented 3 weeks ago

Hi @ThoughtPhotography ,

This is not intentional, and unfortunately, there is no fix for this issue. VS Code does not provide a way to know when a Save As command is being executed, and without that, there is no way to transfer the bookmarks to the new file. I could make handle the Rename command, but Save As, not.

I have opened a feature request for such API to the VS Code team, but the request didn't receive enough upvotes from the community, so it was closed.

I'm constantly looking for new APIs in VS Code, and if this one appears in the future, I could use it, but right now, there is nothing I can do.

Hope this helps

ThoughtPhotography commented 3 weeks ago

I appreciate the explanation. I figured as much since all bookmarked extensions I tried had the same limitation.