Home

Awesome

<img width="200" alt="get in touch with Consensys Diligence" src="https://user-images.githubusercontent.com/2865694/56826101-91dcf380-685b-11e9-937c-af49c2510aa0.png"><br/> <sup> [ 🌐 📩 🔥 ] </sup><br/><br/>

Inline Bookmarks

<img width="350" alt="inline_bookmarks_icon" src="https://user-images.githubusercontent.com/2865694/69679883-91366500-10a9-11ea-8e36-ba3e799127b3.png">

Code navigation for inline bookmarks made easy.

Other extensions allow you to set bookmarks with some clicks in the IDE. With Inline Bookmarks you specify custom trigger words inside your documents that are automatically turned into VSCode Bookmarks. They will show up with a customizable gutter icon next to the code lines and are highlighted within the code. Decorations can be customized. An Inline Bookmarks View in the Explorer Panel helps you keep track of all your bookmarks. Navigating to the bookmark location is as easy as clicking on an item in the view.

The extension can be used to keep track of development notes and todo's, for document review, as well as log analysis and auditing purposes. Since bookmarks are stored with your documents you can easily share your notes and bookmarks with others.

Tour

<img width="350" alt="inline_bookmarks_icon" src="https://user-images.githubusercontent.com/2865694/69009240-d5ac5d00-0953-11ea-811e-f7fded9c6ecb.png">

vscode-inline-bookmarks-2

Customizable Inline Bookmarks

Note: Additional bookmark types with custom colors/decoration styles can be added in the extension settings. See FAQ.

Note: Words can be fully customized in: code → preferences → Extensions: Inline Bookmarks. Note: Keyboard shortcuts can be assigned in: code → preferences → keyboard shortcuts.

<img width="350" alt="inline_bookmarks_icon" src="https://user-images.githubusercontent.com/2865694/69680065-1457bb00-10aa-11ea-853b-c36fdfc68b96.png">

Filterable Bookmarks Finder

command: inlineBookmarks.showSelectBookmark

<img width="350" alt="inline_bookmarks_icon" src="https://user-images.githubusercontent.com/2865694/81169692-8b6a7700-8f99-11ea-9ab2-8b121154c99a.gif">

Bookmarks View

Buttons (left to right):

<img width="350" alt="inline_bookmarks_icon" src="https://user-images.githubusercontent.com/2865694/103533925-44b57f80-4e8e-11eb-8602-8fda358c8961.png">

Optionally, hide items from the bookmarks view that are excluded by a downstream .gitignore file (inline-bookmarks.view.exclude.gitIgnore; default: false; requires reload).

<img width="541" alt="image" src="https://user-images.githubusercontent.com/2865694/194845897-2146a70f-ac11-4ba9-8406-a1b582e9bf3c.png">

FAQ

Q: Where do I find more settings?

Go to code → preferences → Extensions: Inline Bookmarks.

Q: How can I reset the extensions bookmark cache in case of permanent errors?

Bookmarks are cached in the vscode workspace. In case of permanent "ghost entries" or other errors you might want to try to execute the command: inlineBookmarks.debug.state.reset. This is going to reset the cache and allow the extension to populate it from scratch. Bookmarks are typically added as you go when opening new files in the editor. You can also make the extension scan the workspace for files containing Bookmarks. We don't do this automatically as it is quite resource intensive.

Q: How can I control which paths/file-extensions are being processed by the extension?

By default all paths are included (inline-bookmarks.search.includes) except the ones defined with inline-bookmarks.search.excludes (supports wildcard path globs).

Additionally, file-extensions configured with inline-bookmarks.exceptions.file.extensions.ignore will be excluded as well (prefer this over search.excludes).

Q: How do I temporarily exempt certain trigger-words from being decorated?

See inline-bookmarks.exceptions.words.ignore (matches the beginning of the word).

Q: How can I define custom bookmark trigger-words/labels and colors?

The extension will search for all the default trigger-words configured with the extension. Note that these default trigger-words can be overriden (or removed). In addition, we give you complete freedom over any custom trigger-words you would want to configure. See example.

Note

Example word mapping: (accepts regular expressions; \ needs to be encoded as \\)

"inline-bookmarks.expert.custom.words.mapping": {
    "blue": ["@audit\\-info[ \\t\\n]"],
    "purple": ["@audit\\-issue[ \t\\n]"],
    "green": ["@audit\\-ok[ \\t\\n]"],
    "red": ["@audit[ \\t\\n]"],
    "warn": ["@warn[ \\t\\n]"] 
}

Example style definition: (all vscode style properties are allowed)

"inline-bookmarks.expert.custom.styles": {
    "default": {
        "gutterIconColor": "#157EFB",
        "overviewRulerColor": "rgba(21, 126, 251, 0.7)",
        "light": {
            "fontWeight": "bold"
        },
        "dark": {
            "color": "Chocolate"
        }
    },
    "red": {
        "gutterIconColor": "#F44336",
        "light": {
            "fontWeight": "bold"
        },
        "dark": {
            "color": "Chocolate"
        }
    },
    "blue": {
        "gutterIconColor": "#157EFB",
        "light": {
            "fontWeight": "bold"
        },
        "dark": {
            "color": "Chocolate"
        }
    },
    "green": {
        "gutterIconColor": "#2FCE7C",
        "light": {
            "fontWeight": "bold"
        },
        "dark": {
            "color": "Chocolate"
        }
    },
    "purple": {
        "gutterIconColor": "#C679E0",
        "light": {
            "fontWeight": "bold"
        },
        "dark": {
            "color": "Chocolate"
        }
    },
    "warn": {   // example custom style with yellow color
        "gutterIconColor": "#F4F400",
        "overviewRulerColor": "#F4F400B0",
        "light": {
            "fontWeight": "bold"
        },
        "dark": {
            "color": "Chocolate"
        }
    }
}

Q: How can I bind keys to jumpToNext and jumpToPrevs bookmark?

See https://code.visualstudio.com/docs/getstarted/keybindings.

Q: How can I change the bookmark-view's follow mode?

inline-bookmarks.view.followMode allows you to specify if you want to select the nearest bookmark relative to the current editor selection (default) or the next one (chapter mode).

Q: How can I make the bookmark-view's jumpToNext and jumpToPrevs behavior use the current selected line instead of the last selected bookmark?

inline-bookmarks.view.lineMode can be configured to current-line. Also see #40.

Q: How can I scan the workspace for bookmarks?

For performance reasons we do not automatically scan the complete workspace for bookmarks. They are instead added whenever a bookmark is encountered in a file opened in the editor. Bookmarks are then cached in the workspace and revalidated when a file is opened in the editor. In order to allow you to scan the complete workspace for bookmarks we have added a command inlineBookmarks.scanWorkspace that is also exposed as a button in the bookmark-view. Note that this will temporarily load files matching the search path into the editor to check for bookmarks which may demand some resources.

Release Notes

see CHANGELOG