Bookmarks in visual studio, Like //TODO, does Bookmarks have an incode remark "command"

Zoidboom 21 Reputation points
2021-01-18T08:23:45.053+00:00

Hi,

My team and I spend so much time navigating code - shortcuts and bookmarks doesn't seem to persist across git commits. Is there a way, like the //TODO "remark", to persist bookmarks in the code.

Thanks

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 34,456 Reputation points Microsoft External Staff
    2021-01-19T03:27:23.493+00:00

    Hello @Zoidboom ,

    The bookmarks and tokens in Visual Studio(VS) are related to VS settings and are bound with the specific VS which you used(also can be bound with your account). So if you set the tokens, for example, //TODO, the settings for this token will not work, if you or others edit this project in another VS or using other accounts. (As you can see, you need to set the Custom tokens in Visual Studio settings)

    The better way to make this settings work on other team members‘ side, I think, is exporting the specific, already set, VS settings from one PC(VS) and then import this VS settings to other PCs(VS).

    You can try these steps(I suggest you save the settings before you export and import them, and you can follow the wizard guide):

    1). Configure all custom tokens from Tools > Options > Environment > Task List.(refer to this document: Custom tokens)

    2). Go to Tools > Import and Export Settings… > Export selected environment settings > Next > uncheck the All Settings (Sensitive information warning) > expand Options(Sensitive information warning) > Environment (Sensitive information warning) > check the Task List Options checkbox > Next > browse and choose a directory > Finish.

    3). On other members’ side, launch VS > Tools > Import and Export Settings… > select Import selected environment settings > Next > follow the wizard to choose one option > Next > browse and select the exported VS settings file > Next > Finish.

    4). You will then see the tokens from Task List window(View > Task List) for the project which you pull from Git repo with the token added…

    Best Regards,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

1 additional answer

Sort by: Most helpful
  1. David Lowndes 4,726 Reputation points
    2021-01-18T08:28:54.117+00:00

    I believe bookmarks are per-user, stored in the .suo file, so aren't normally stored under source control.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.