Bagikan melalui


Bookmark Window

While you are working in a code editor, use the Bookmarks window to create bookmarks in your code. You can display the Bookmarks window from the View menu.

To create and navigate through bookmarks, click the buttons located on the Text Editor toolbar and at the top of the Bookmarks window. You can add and remove bookmarks, activate or disable bookmarks, and organize bookmarks into folders. Certain commands are also available from the Bookmarks window shortcut menu.

Tip

Use the UP ARROW and DOWN ARROW keys to move among entries in the Bookmarks window. Press ENTER on an entry to switch focus to the location of the bookmark in the editor.

To add or remove a bookmark, place the insertion point on the desired line in the Editor, and then click the Toggle a bookmark on the current line button. To activate a bookmark, select its check box in the Bookmarks window; to disable (but not remove) a bookmark, clear its check box.

You can delete all bookmarks in all files by clicking the Clear all bookmarks in all files button on the Text Editor toolbar.

Warning

There is no Undo for this procedure. Afterward, you must use Toggle a bookmark on the current line to create new bookmarks.

  • Bookmark
    Displays the name of the bookmark. Default names are created as Bookmarkn where n is a number. You can create custom bookmark names by right-clicking on the bookmark entry and selecting Rename from the context menu.

    Each bookmark has its own check box. To activate an existing bookmark, select its check box in the Bookmarks window. To hide (but not remove) an existing bookmark, clear its check box in the Bookmarks window.

  • File Location
    Lists the fully qualified path for the file.

  • Line Number
    Lists the number of the line of code where the bookmark is located.

Bookmarks Window Toolbar

The following buttons are available at the top of the Bookmarks window. These buttons also appear on the Text Editor toolbar when a document is open in the editor.

  • Move the caret to the previous bookmark
    Selects the previous bookmark that is enabled in the Bookmarks window. When the first bookmark is reached, jumps ahead to the last one. As needed, opens the file where the selected bookmark occurs in the Editor. Scrolls that document to the bookmarked line, and places the insertion point there.

  • Move the caret to the next bookmark
    Selects the next bookmark that is enabled in the Bookmarks window. When the last bookmark is reached, jumps back to the first one. As needed, opens the file where the selected bookmark occurs in the Editor. Scrolls that document to the bookmarked line, and places the insertion point there.

  • Move the caret to the previous bookmark in the current folder
    Selects the previous bookmark that is enabled within the same folder in the Bookmarks window. When the first bookmark is reached, jumps ahead to the last one in that folder. As needed, opens the file where the selected bookmark occurs in the Editor. Scrolls that document to the bookmarked line, and places the insertion point there.

  • Move the caret to the next bookmark in the current folder
    Selects the next bookmark that is enabled within the same folder in the Bookmarks window. When the last bookmark is reached, jumps back to the first one in that folder. As needed, opens the file where the selected bookmark occurs in the Editor. Scrolls that document to the bookmarked line, and places the insertion point there.

  • Disable/Enable All Bookmarks
    Disables or enables the check boxes for all bookmarks in the Bookmarks window. Does not remove bookmarks, or alter the lines of code that they mark.

  • Toggle a bookmark on the current line
    Adds or removes a bookmark on the selected line of the document in the active Editor. Does not alter the line of code bookmarked.

  • New folder
    Adds a folder to the Bookmarks window.

    Tip

    In a lengthy code file, it can be helpful to organize bookmarks into task-related folders. Selecting a folder enables the Go to previous bookmark in folder and Go to next bookmark in folder buttons.

  • Delete
    Removes the currently selected bookmark from the Bookmarks window, and from the document where the bookmark occurred. Does not remove the line of code that was bookmarked.

Bookmarks Window Shortcut Menu

When you right-click on an entry in the Bookmarks window, the following commands are available from the shortcut menu.

  • Delete
    Removes the currently selected bookmark from the Bookmarks window, and from the document where the bookmark occurred. Does not remove the line of code that was bookmarked.

  • Rename
    Rename a bookmark or folder.

  • Disable/Enable Bookmark
    Disables or enables the check box for the selected bookmark in the Bookmarks window. Does not remove the bookmark, or alter the line of code that it marks.

  • Disable/Enable All Bookmarks
    Disables or enables the check boxes for all bookmarks in the Bookmarks window. Does not remove bookmarks, or alter the lines of code that they mark.

See Also

Tasks

How to: Bookmark Code

How to: Use Task List Shortcuts

How to: Create Task List Comments

How to: Navigate Code and Text

How to: Go To a Line of Code

Reference

Code and Text Editor

Task List (Visual Studio)

Concepts

Editor Convenience Commands and Features

Other Resources

Setting Bookmarks in Code

Finding and Replacing