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 export bookmarks #172

Open
kevinpeno opened this issue Jan 15, 2019 · 8 comments
Open

Ability to export bookmarks #172

kevinpeno opened this issue Jan 15, 2019 · 8 comments
Assignees
Labels
enhancement sponsor wanted Depends on sponsorship (PayPal / Patreon)

Comments

@kevinpeno
Copy link

Most of the time when I'm using this extension I am using it to mark points of interest during research. A task that I've had to perform lately is looking for hard coded text in various applications that needs to be moved to our CMS. This extension works great for that with one exception:

Generally after I have performed my research I need to document it. Using this extension I need to go to each bookmark and manually copy the file:line:column link. An export all option would greatly increase the speed at which I can do this. An option for markdown/wiki export would exponentially increase my efficiency. In addition, if the markdown export included the label and notes (#76) that'd be exceptional.

@alefragnani
Copy link
Owner

Hi @kevinpeno ,

You can choose to store the bookmarks inside the folder that you opened in VSCode. You just have to set bookmarks.saveBookmarksInProject to true in Workspace Settings, for the folders that you want this behavior, or in User Settings if you always want this behavior. The bookmarks are saved in JSON format in .vscode\bookmarks.json. Be aware that this setting does not work (yet) when using multi-folders or Worspaces, and all bookmarks are saved only in VSCode internals.

Do you still thinks an export command is necessary?

Hope this helps

@kevinpeno
Copy link
Author

kevinpeno commented Jan 16, 2019

I mean, I could write a separate tool that generates markdown from that (I assume) but, given the use case above I think a markdown export for documentation would be a nice to have. Also, that setting isn't very apparent to the user and is required to be changed for every workspace, while an export functionality within the bookmark pane would be apparent and work regardless of that setting.

@alefragnani
Copy link
Owner

Well, that's the only way (today) to have easy access to the bookmarks. Sure, it's not a real export feature.

An Export to ... command could be an interesting additional feature, really helpful for those that use Bookmarks as a documentation tool. I remember this somehow similar issue, which asked to change how bookmarks that stored because of a particular scenario. In that case, I thought it was #out-of-scope.

Right now, I'm on vacation, and I'm focused on other projects/features, so I can't promise you that this feature could be released anytime soon. If you are really interested, you could contribute with a Pull Request, or support the extension/patronize the feature.

Hope this helps

@alefragnani alefragnani added good first issue Good for newcomers sponsor wanted Depends on sponsorship (PayPal / Patreon) and removed need more info question labels Jan 17, 2019
@alefragnani alefragnani self-assigned this Mar 23, 2019
@thatcashcow
Copy link

bookmarks.saveBookmarksInProject feature is not working for me. Can you please check? Also can you make this default and enable it separately for each workspace? Thanks!

@alefragnani
Copy link
Owner

@thatcashcow Based on your request (save separately for each workspace), I guess you noted the error while using a workspace, right? This setting is not supported, yet. It’s being tracked in #193 .

Hope this helps

@GitHunter0
Copy link

An Export to ... command could be an interesting additional feature, really helpful for those that use Bookmarks as a documentation tool

Hey @alefragnani , indeed it would be a useful feature.

Another related truly handy feature: Automatically add bookmarks to lines that have some particular pattern of characters.
Example: In python scripts, every line started with #%% represents a new code section. So, if you can automatically add bookmarks to each one, you immediately have all your code sections documented and listed as bookmarks, something still not implemented but highly desired.
See somewhat related feature request: microsoft/vscode-jupyter#1348

Thank you

@alefragnani
Copy link
Owner

alefragnani commented Jan 4, 2021

Hi @GitHunter0 ,

This auto-detect bookmark request has already been made a few times, starting with #128, #194, #241 and #252, but as I commented there, this is not the idea of the extension. For that, there are other extension that load the file content and create bookmarks dynamically.

What the extension provides is the multi-cursor support (#77), which means that you can create bookmarks for each position your cursor is. So, you just have to select every line started with #%% (using Cmd + D or Cmd + Shift + L) and run the Bookmarks: Toggle command.

Hope this helps

@GitHunter0
Copy link

Hey @alefragnani , for sure helped a lot! I had tried to do that with "Comment Anchors" but it did not accept to map #%%, however with "Todo Tree" now I managed to get exactly what I wanted. Thanks man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement sponsor wanted Depends on sponsorship (PayPal / Patreon)
Projects
None yet
Development

No branches or pull requests

4 participants