Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to bookmark code in a Visual Studio project?

In various projects there are certain parts I will keep jumping to. Is there a way to effectively "bookmark" these parts, so I can quickly jump back to a certain line in a certain file (or a certain method)?

I keep getting lost navigating the solution or doing a "find in whole project/solution".

like image 271
joshcomley Avatar asked May 29 '09 13:05

joshcomley


People also ask

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.

How do I add a bookmark in Visual Studio 2019?

To create a bookmark, you must first position the text cursor on the line that you wish to mark. Next, open the Edit menu, select the Bookmarks sub-menu and click "Toggle Bookmark". You can also press Ctrl-K,K to toggle a bookmark. The bookmark appears as a square-shaped glyph in the margin at the left of the code.

How do I use bookmarks extension in VS code?

Bookmarks extension: Ctrl+K+S (or Ctrl+Shift+P to open Keyboard Shortcuts) and search for Bookmarks to assign/change hotkeys. Also nice: it adds a new tab to the left side so you can view your bookmarks. They persist between sessions.


1 Answers

In Visual Studio, you can set Bookmarks in the code.

To jump between Bookmarks:

Ctrl + K + N (for next)

and

Ctrl + K + P (for previous)

To toggle a Bookmark on/off for a line:

Ctrl + K + K

like image 60
Jordan Parmer Avatar answered Sep 19 '22 19:09

Jordan Parmer