Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exporting and importing bookmarks in Visual Studio [duplicate]

Is it possible to export/import bookmarks from any Visual Studio?

like image 398
parzival Avatar asked Mar 05 '11 10:03

parzival


People also ask

How do I export bookmarks in Visual Studio?

The bookmarks are stored in the solution's SUO file. So in theory you can import/export them by copying that file around, or placing it in source control.

How do I bookmark code in Visual Studio?

To bookmark a line of code, place the cursor on the the line of code you intend to bookmark and use the Toggle Bookmark icon in the bookmark window. Another quick way to bookmark code is to use the keyboard shortcut Ctrl+K, Ctrl+K.


2 Answers

A better solution to standard bookmarks...

Go to Tools/Options/Environment/Task List and add a new tag to record them. I wanted to use the phrase MARK but this word is too common in my code, so I'm using BOOKMARK set as low priority.

Whenever I want to leave a bookmark I just type //BOOKMARK: this is a bookmark, and that's it, simple! To view them just open the Task List window and sort by priority or description and scroll down.

This is hugely better than standard bookmarks because they ...

  • are 'pinned' with the actual code and don't drift
  • can be shared with your own multiple environments and with other developers
  • are never lost if you suffer a problem with Visual Studio
  • are still searchable and readable in other editors eg notepad
  • you could create different tags to group different types of bookmarks together
like image 113
userSteve Avatar answered Sep 16 '22 15:09

userSteve


The bookmarks are stored in the solution's SUO file. So in theory you can import/export them by copying that file around, or placing it in source control. In practice, that would be a bad idea because that file is meant to be developer-specific and overwriting it will cause collateral damage in addition to importing the bookmarks.

However, if you have a specific scenario in mind where that is not a problem you can try doing it.

like image 25
Jon Avatar answered Sep 19 '22 15:09

Jon