Bookmarks is an extension created for Visual Studio Code. If you find it useful, please consider supporting it.
|
|
|
It helps you to navigate in your code, moving between important positions easily and quickly. No more need to search for code. It also supports a set of selection commands, which allows you to select bookmarked lines and regions between bookmarked lines. It's really useful for log file analysis.
Here are some of the features that Bookmarks provides:
Bookmarks: Toggle Mark/unmark positions with bookmarksBookmarks: Toggle Labeled Mark labeled bookmarksBookmarks: Jump to Next Move the cursor forward, to the bookmark belowBookmarks: Jump to Previous Move the cursor backward, to the bookmark aboveBookmarks: List List all bookmarks in the current fileBookmarks: List from All Files List all bookmarks from all filesBookmarks: Clear remove all bookmarks in the current fileBookmarks: Clear from All Files remove all bookmarks from all filesBookmarks: Export Export all bookmarks to a Markdown document with customizable formatBookmarks (Selection): Select Lines Select all lines that contains bookmarksBookmarks (Selection): Expand Selection to Next Expand the selected text to the next bookmarkBookmarks (Selection): Expand Selection to Previous Expand the selected text to the previous bookmarkBookmarks (Selection): Shrink Selection Shrink the select text to the Previous/Next bookmarkYou can easily Mark/Unmark bookmarks on any position. You can even define Labels for each bookmark.

Quicky move between bookmarks backward and forward, even if located outside the active file.
List all bookmarks from the current file/project and easily navigate to any of them. It shows a line preview and temporarily scroll to its position.

The Bookmarks extension has its own Side Bar, with a variety of commands to improve you productivity.
| Single Folder | Multi-root Workspace |
|---|---|
![]() |
![]() |
When you work with multi-root workspaces, the extension can manage the bookmarks individually for each folder.
Simply define saveBookmarksInProject as true on your User Settings or in the Workspace Settings, and when you run the Bookmarks: List from All Files command, you will be able to select from which folder the bookmarks will be shown.

The extension now fully supports Remote Development scenarios.
It means that when you connect to a remote location, like a Docker Container, SSH or WSL, the extension will be available, ready to be used.
You don't need to install the extension on the remote anymore.
Better yet, if you use bookmarks.saveBookmarksInProject setting defined as true, the bookmarks saved locally will be available remotely, and you will be able to navigate and update the bookmarks. Just like it was a resource from folder you opened remotely.
You can use Bookmarks to easily select lines or text blocks. Simply toggle bookmarks in any position of interest and use some of the Selection commands available.
Select all bookmarked lines. Specially useful while working with log files.

Manipulate the selection of lines between bookmarks, up and down.
Export all bookmarks to a new Markdown document with a customizable format. This is especially useful for documentation and sharing bookmarks with others.
The default format exports bookmarks as a Markdown table, grouped by file and sorted by line number:
| File | Line | Column | Label | Content |
|---|---|---|---|---|
| src/example.ts | 10 | 5 | Important | function calculateTotal() { |
| src/utils.ts | 25 | 1 | TODO | // TODO: Implement error handling |
You can customize the export format using the bookmarks.export.pattern setting with the following variables:
* $file - File path (relative to workspace)
* $line - Line number
* $column - Column number
* $label - Bookmark label
* $content - Line content
Example custom formats:
CSV format:
$file,$line,$column,"$label","$content"
Simple list:
$file:$line - $label
true by default) "bookmarks.navigateThroughAllFiles": false
true by default) "bookmarks.wrapNavigation": true
false by default) "bookmarks.saveBookmarksInProject": true
"bookmarks.gutterIconPath": "c:\\temp\\othericon.png"
Deprecated in 13.3: Use
bookmarks.gutterIconFillColorandbookmarks.gutterIconBorderColorinstead
"bookmarks.gutterIconFillColor"
"bookmarks.gutterIconBorderColor"
"bookmarks.backgroundLineColor"
Deprecated in 10.7: Use
workbench.colorCustomizationsinstead. More info in Available Colors
true by default) "bookmarks.showCommandsInContextMenu": true
true by default) "bookmarks.experimental.enableNewStickyEngine": false
false by default) "bookmarks.keepBookmarksOnLineDelete": true
Limitation: It does not support
Undooperations. It means that, once you delete a line and the bookmark is moved to the next available line, theUndooperation won't move the bookmark back to the previous line. The next line is now the new location of the bookmark.
false by default) "bookmarks.useWorkaroundForFormatters": true
This workaround can be turned off if you are using the new Sticky Engine (setting above)
false by default) "bookmarks.sideBar.expanded": true
Controls the count badge on the Bookmark icon on the Activity Bar (all by default)
all: Show the sum of bookmarks from all files
files: Show the sum of files that contains at least one bookmarkoff: Disable the Bookmarks count badge "bookmarks.sideBar.countBadge": "files"
false by default) "bookmarks.sideBar.hideWelcome": true
Choose how multi cursor handles already bookmarked lines (allLinesAtOnce by default)
allLinesAtOnce: Creates bookmarks in all selected lines at once, if at least one of the lines don't have a bookmark
eachLineIndependently: Literally toggles a bookmark in each line, instead of making all lines equal "bookmarks.multicursor.toggleMode": "eachLineIndependently"
Specify when a confirmation message should be displayed before clearing bookmarks (never by default)
never - No confirmation (current behavior)
always - Confirm all clear operationscommandPalette - Confirm only when invoked from Command PalettesideBar - Confirm only when invoked from Side Bar "bookmarks.confirmClear": "always"
Choose how labels are suggested when creating bookmarks (dontUse by default)
dontUse: Don't use the selection (original behavior)
useWhenSelected: Use the selected text (if available) directly, no confirmation requiredsuggestWhenSelected: Suggests the selected text (if available). You still need to confirm.suggestWhenSelectedOrLineWhenNoSelected: Suggests the selected text (if available) or the entire line (when has no selection). You still need to confirm "bookmarks.label.suggestion": "useWhenSelected"
Choose the location where the bookmarked line will be revealed (center by default)
top: Reveals the bookmarked line at the top of the editor
center: Reveals the bookmarked line in the center of the editor "bookmarks.revealLocation": "center"
Specifies the lane in the overview ruler where the bookmarked line will be shown (full by default)
none: Don't show the bookmarked line in the overview ruler
left: Show the bookmarked line in the left lane of the overview rulercenter: Show the bookmarked line in the center lane of the overview rulerright: Show the bookmarked line in the right lane of the overview rulerfull: Show the bookmarked line in the full height of the overview ruler "bookmarks.overviewRulerLane": "left"
$file, $line, $column, $label, and $content to customize the output format (table format by default) "bookmarks.export.pattern": "| $file | $line | $column | $label | $content |"
Example patterns:
CSV format:
"bookmarks.export.pattern": "$file,$line,$column,\"$label\",\"$content\""
Simple list:
"bookmarks.export.pattern": "$file:$line - $label"
"workbench.colorCustomizations": {
"bookmarks.lineBackground": "#157EFB22"
}
"workbench.colorCustomizations": {
"bookmarks.lineBorder": "#FF0000"
}
"workbench.colorCustomizations": {
"bookmarks.overviewRuler": "#157EFB88"
}
The bookmarks are saved per session for the project that you are using. You don't have to worry about closing files in Working Files. When you reopen the file, the bookmarks are restored.
It also works even if you only preview a file (simple click in TreeView). You can put bookmarks in any file and when you preview it again, the bookmarks will be there.
GPL-3.0 © Alessandro Fragnani
$ claude mcp add vscode-bookmarks \
-- python -m otcore.mcp_server <graph>