jingmengzhiyue87 downloadsCollect, organize, format, search, and explain code snippets in Markdown.
code-snippet-manager is a Markdown-first code snippet manager for Obsidian. It helps you collect, organize, search, copy, and insert reusable code snippets without moving your source data into a private database.
Markdown files remain the source of truth. A single collection file contains snippets for one language, and each snippet uses a level-2 heading, optional tags, and one fenced code block. The heading is only an internal Markdown boundary; inserting a snippet inserts code only, not the heading. Snippets may omit a visible title.
This is an early stable release intended for manual installation, testing, and community review.
Implemented in this release:
Not included in this release:
Install dependencies:
npm install
Build the plugin:
npm run build
Create the plugin folder in your vault:
<Vault>/.obsidian/plugins/code-snippet-manager/
Copy these files into that folder:
manifest.json
main.js
styles.css
Reload Obsidian.
Enable code-snippet-manager from Settings -> Community plugins.
Use the watch build while developing:
npm run dev
Use the production build before packaging a release:
npm run build
Run lint checks with:
npm run lint
code-snippet-manager indexes Markdown files whose frontmatter contains:
type: code-snippet-collection
A collection file can contain multiple snippets, but it should contain only one language. Each level-2 heading is treated as a snippet section when that section contains a fenced code block.
---
type: code-snippet-collection
title: Oracle 11g Common SQL
default_language: sql
tags:
- code/sql
- collection/oracle11g
created: 2026-07-07
updated: 2026-07-07
---
# Oracle 11g Common SQL
## Query by time range ^snip-sql-time-range
#code/sql/oracle11g #code/sql/time-range
```sql
-- Query records by start time and end time with second-level precision.
SELECT *
FROM FCE.F4_DATA
WHERE COLLECT_TIME >= TO_DATE(:startTime, 'YYYY-MM-DD HH24:MI:SS')
AND COLLECT_TIME <= TO_DATE(:endTime, 'YYYY-MM-DD HH24:MI:SS');
```
code-snippet-manager uses the following Markdown model:
One Markdown file = one snippet collection
One default_language value = the language for that file
One level-2 heading = one snippet
One fenced code block inside that section = the snippet code
One compact Obsidian tag line = snippet-level searchable code tags
One optional first-line language comment = snippet description (supported languages only)
One Obsidian block ID = stable jump target
Only the lightweight format shown above is indexed. snippet-meta comments are treated as ordinary Markdown comments and are not read.
To create a snippet from selected code:
code-snippet-manager will create the target collection file if it does not already exist, append the new snippet section, and rebuild the index for that file.
Generated snippets include:
## ^snippet-id without a visible title.#code/sql/oracle11g #code/sql/time-range.The title field is optional. When it is blank, code-snippet-manager keeps only the block ID in the Markdown boundary and does not create a fake title such as Untitled snippet. The heading is not inserted into notes.
The description field is optional. For languages with reliable comment syntax, code-snippet-manager saves it as the first comment, for example -- for SQL, # for shell-like languages, /* ... */ for CSS, and <!-- ... --> for HTML or Markdown. Formats without reliable comment syntax, such as JSON, CSV, and plain text, ignore the description so the saved snippet remains valid code.
Code tags are always saved under the selected language. Enter only comma-separated tag bodies such as oracle11g and time-range; code-snippet-manager saves them as #code/sql/oracle11g and #code/sql/time-range when SQL is selected. If the tag field is empty, the language root tag such as #code/sql is saved instead.
Version 1.0.4 does not add compatibility aliases or migrate legacy #code/<tag> tags. Update old snippet tags manually if you want the stored Markdown to follow the new language-scoped contract. Dashboard tag filtering continues to accept partial tag-body text such as oracle or time-range for canonical tag paths.
Run Open snippet search to open the code-snippet-manager search view.
The dashboard includes:
oracle without #.Each result card shows:
The Insert action inserts only the snippet code from inside the fenced code block. It does not insert the snippet heading, title, tags, or description metadata.
code-snippet-manager is local-first. Markdown files in your vault remain the source of truth, and the plugin does not use a remote database, cloud sync, analytics, telemetry, ads, automatic update mechanism, or network API.
File access is limited to the Obsidian vault:
Clipboard access is explicit:
code-snippet-manager includes settings for:
CodeSnippets is always available, and the current saved path remains selectable even if that folder no longer exists. Only Markdown files inside the selected folder are indexed.The current release version is:
1.0.4
Release assets should include:
manifest.json
main.js
styles.css
Release tags are built by GitHub Actions. The workflow uploads the release assets and creates artifact attestations for provenance verification.
GitHub release tags must use the exact version number:
1.0.4
Do not use a leading v such as v1.0.4.
#code/<language>/<tag>, or #code/<language> when no tag body is entered.!important from dropdown styling.## ^snippet-id.#code/sql/oracle11g.#.Vault.process.authorUrl to the author's GitHub profile.code-snippet-manager.Licensed under the BSD Zero Clause License (0BSD).