codemark
A VS Code extension for bookmarking lines of code: groups with colours,
labels and notes, numbered slots, bookmarked selections, a side bar with
your own order, and a bookmarks file you can keep in the project. It covers
what the popular "Bookmarks" extension does and the requests its users have
left open (see docs/research; the
item-by-item comparison is in parity.md).
Interface in English and Turkish. Runs in desktop VS Code, over Remote
Development, and is built for github.dev and vscode.dev.
Features
- Toggle bookmarks with Ctrl+Alt+K (⌘⌥K), from the line number context
menu, or for every cursor at once. A labelled toggle can take each
cursor's selected text as its label.
- Bookmark a selection to mark a range of lines.
- Stay on the right line while you type, move lines, paste, format or
undo (how). Renaming or moving files in
VS Code keeps their bookmarks.
- Navigate: next/previous (Ctrl+Alt+L / Ctrl+Alt+J), across files and
wrapping, by position, creation time or your own order; pickers for the
current file and all files with live preview.
- Numbered slots 1–9: Ctrl+Alt+B then Shift+n to assign, Ctrl+Alt+B
then n to jump. The number shows on the gutter icon.
- Groups with name, colour and icon. Hide a group, show only one (to
switch between sets), choose where new bookmarks go, share a group across
all workspaces.
- Labels and notes, shown in hovers, optionally after the line, and in
side bar tooltips with the surrounding code.
- Side bar: tree (group → file → bookmark) or list; sort by position,
label, creation or drag-and-drop order; drag to move between groups;
count badge; can follow the cursor.
- Selections: select all bookmarked lines, expand or shrink the
selection from bookmark to bookmark.
- Storage in VS Code's workspace state, in
.vscode/codemark.json, or
in a file of your choice. Files are watched and never overwritten without
asking. Export to Markdown or JSON, import JSON.
- Jupyter notebooks: bookmarks in cells follow their cell.
Keys
| Action |
Windows / Linux |
macOS |
| Toggle bookmark |
Ctrl+Alt+K |
⌘⌥K |
| Next / previous |
Ctrl+Alt+L / Ctrl+Alt+J |
⌘⌥L / ⌘⌥J |
| List all bookmarks |
Ctrl+Alt+B Ctrl+Alt+B |
⌃⌥B ⌃⌥B |
| Go to slot n |
Ctrl+Alt+B, n |
⌃⌥B, n |
| Assign slot n |
Ctrl+Alt+B, Shift+n |
⌃⌥B, Shift+n |
| Choose a slot |
Ctrl+Alt+B, S |
⌃⌥B, S |
| Expand selection to next / previous |
Shift+Alt+L / Shift+Alt+J |
⇧⌥L / ⇧⌥J |
| Shrink selection |
Shift+Alt+K |
⇧⌥K |
Every other action is in the Command Palette under codemark, in the
side bar, and in the editor and line number context menus.
Settings
All settings start with codemark. and are described in the Settings
editor (search for codemark). The main ones:
| Setting |
Default |
Meaning |
storage.location |
workspace |
workspace, project (.vscode/codemark.json) or file |
storage.file |
|
file for storage.location: file (~, ${workspaceFolder} allowed) |
navigation.order |
position |
position, creation or custom |
navigation.acrossFiles / navigation.wrap |
true |
how next/previous continue |
tracking.keepOnLineDelete |
false |
move a bookmark down instead of deleting it with its line |
sideBar.sortOrder |
position |
position, label, creation or custom |
inline.showLabel / inline.showNote |
false |
text after bookmarked lines |
onePerFile |
false |
at most one bookmark per file and group |
Colours of line backgrounds and inline text are theme colours
(codemark.lineBackground, codemark.rangeBackground,
codemark.inlineForeground, codemark.lineBorder) for
workbench.colorCustomizations.
The project file
With "codemark.storage.location": "project", each workspace folder gets
.vscode/codemark.json:
{
"format": "codemark",
"version": 1,
"activeGroup": "default",
"groups": [{ "id": "default", "name": "Bookmarks", "color": "#3b82f6", "icon": "bookmark", "visible": true, "scope": "workspace" }],
"bookmarks": [{ "id": "…", "path": "src/app.ts", "line": 41, "label": "entry point", "created": "2026-11-12T10:00:00.000Z" }]
}
Lines are zero-based; paths are relative to the folder. The same format is
used for JSON export and import.
Development
Requirements: Node 26 and npm. VS Code is used for integration tests (the
installed app on macOS, CODEMARK_VSCODE_PATH, or a downloaded build).
npm install
npm run check # typecheck, core purity, translations, unit tests, build, integration tests
npm run test:unit # core tests only, fast
npm run watch # rebuild on change; press F5 in VS Code with a launch config of your own
npm run package # codemark-<version>.vsix
Install the package with Extensions: Install from VSIX… or
code --install-extension codemark-bookmarks-0.1.0.vsix.
Layout
| Path |
Contents |
src/core/ |
Model, store, line tracking, navigation, sorting, file format, Markdown export. No vscode import. |
src/extension/ |
VS Code layer: main.ts wires everything; desktop.ts and web.ts are the two entry points. |
src/extension/commands/ |
Command implementations, one module per area. |
src/extension/storage/ |
Workspace state, project file, custom file, global groups, persistence. |
test/unit/ |
Core tests (node --test). |
test/integration/ |
Tests inside VS Code against test/fixtures/workspace. |
l10n/, package.nls*.json |
English and Turkish texts; npm run check:translations keeps them complete. |
media/ |
Icons and walkthrough pages. |
scripts/ |
Build, test runner and checks. |
docs/adr/ |
Architecture decisions. |
docs/ROADMAP.md |
Milestones and what is left. |
Licence
Apache License 2.0. Copyright 2026 Yankı Küçük; see NOTICE.
codemark is written from scratch (ADR 0004).
| |