unlinearity5k downloadsProfessional code file management with visual dashboard, syntax highlighting editor, and Markdown embedding.
Code Space is available in the official Obsidian community plugin directory.🎉
Obsidian's native workflow is centered on Markdown notes, so its support for centralized code file browsing, management, editing, structural navigation, and exporting embedded code is limited. Code Space was created to fill that gap.
The four layers of "Space":
Provides a visual dashboard for unified indexing and management of code files within the vault.

Provides an IDE-like environment for code viewing and editing.

Embed and preview code in Markdown, including specific snippets from code files:
[[filename]].![[filename]].
Supported embed syntax:
| Syntax | Description |
|---|---|
![[test.py]] |
Embed the entire file |
![[test.py#20]] |
Display from line 20 to end of file |
![[test.py#L20]] |
Same as above (GitHub-style with L prefix) |
![[test.py#20-40]] |
Display lines 20 to 40 |
![[test.py#L20-L40]] |
Same as above (GitHub-style) |
![[test.py#L20-40]] |
Mixed format also supported |
Line range features:
Tip: When a note contains code file embeds, export it with Obsidian's official Export to PDF. Code Space keeps those embeds as real code blocks in the final PDF while preserving Obsidian's native layout and pagination.

Work across Vault boundaries to manage external project code.

Usage:
Important notes!
Access configuration via Settings > Community plugins > Code Space:
Note: External mounts allow access to files outside the Vault. Only mount folders you trust.
| Language | Extensions |
|---|---|
| Python | .py |
| C/C++ | .c, .cpp, .h, .hpp, .cc, .cxx |
| JavaScript/TypeScript | .js, .ts, .jsx, .tsx, .mjs, .cjs, .json |
| Web Technologies | .html, .htm, .xhtml, .css, .scss, .sass, .less |
| Systems Programming | .rs, .go, .java, .cs |
| Data/Config | .sql, .yaml, .yml, .xml |
| Scripting | .php, .r, .rb, .sh |
You can add more extensions in plugin settings. Code Space can manage files with custom extensions.

Add the following extensions in Settings > Code Space > Managed extensions to enable:
| Language | Extensions | Highlighting reused from |
|---|---|---|
| XML family | .xsd, .xsl, .xslt, .wsdl, .plist, .csproj, .vcxproj, .props, .targets, .config |
XML |
.urdf, .xacro |
XML | |
| C/C++ family | .ino, .pde, .nut |
C/C++ |
.cu, .cuh, .glsl, .vert, .frag, .hlsl, .mm, .swift |
C/C++ | |
| Java family | .kt, .kts, .scala, .groovy, .gradle |
Java |
| Frontend frameworks | .vue, .svelte, .astro |
JavaScript |
| JSON variants | .json5, .jsonc |
JavaScript |
| Python family | .pyx, .pxd, .pxi, .ipy |
Python |
| Config files | .toml, .ini, .cfg, .conf |
YAML |
| Shell scripts | .bash, .zsh |
Shell |
| PowerShell | .ps1, .psm1, .psd1 |
PowerShell |
| Other languages | .cmake, .dockerfile, .diff, .patch, .lua, .pl, .pm, .erb, .m |
Dedicated |
If you add the following extensions to the managed list, these files can also be managed in the Code Space dashboard (rename, move, delete, etc.). They are not opened by the Code Space editor; they use Obsidian's native viewer or the system default app.
| Type | Extensions |
|---|---|
| Images | .png, .jpg, .jpeg, .gif, .webp, .svg, .bmp, .ico, .tiff, .psd |
| Documents | .pdf |
| Audio | .mp3, .wav, .ogg, .flac, .aac, .m4a, .wma |
| Video | .mp4, .avi, .mkv, .mov, .wmv, .flv, .webm, .m4v |
| Archives | .zip, .rar, .7z, .tar, .gz, .bz2, .xz |
| Office | .doc, .docx, .xls, .xlsx, .ppt, .pptx |
| Other | .exe, .dll, .so, .dylib, .bin, .dat |

| Command path | Function |
|---|---|
Ctrl+P → "Open dashboard" |
Open the code management panel |
Ctrl+P → "Create code file" |
Create a new code file |
Ctrl+P → "Reload plugin" |
Reload the plugin |
Ctrl+P → "Toggle code outline" |
Toggle the code outline view |
Ctrl+P → "Search and replace" |
Open the search and replace panel in the current Code Space editor |
| Shortcut | Function |
|---|---|
Ctrl/Cmd+S |
Manually save the file |
Ctrl/Cmd+Mouse wheel |
Adjust font size |
Ctrl/Cmd+F |
Search |
Ctrl+H / Cmd+Option+F |
Replace |
Ctrl/Cmd+C |
Copy selection |
Ctrl/Cmd+X |
Cut selection |
Ctrl/Cmd+V |
Paste content |
Ctrl/Cmd+A |
Select all |
Ctrl/Cmd+Z |
Undo |
Ctrl+Y or Ctrl/Cmd+Shift+Z |
Redo |
Tab |
Increase indent |
Shift+Tab |
Decrease indent |
Enter |
New line and preserve indent |
| Cursor navigation | Selection and editing | ||
|---|---|---|---|
↑ ↓ ← → |
Move cursor up/down/left/right | Shift+Arrow Keys |
Extend selection |
Home |
Jump to line start | Ctrl+Shift+← |
Select to word start |
End |
Jump to line end | Ctrl+Shift+→ |
Select to word end |
Ctrl+← |
Move left one word | Ctrl+Shift+Home |
Select to file start |
Ctrl+→ |
Move right one word | Ctrl+Shift+End |
Select to file end |
Ctrl+Home |
Jump to file start | Backspace |
Delete character before cursor |
Ctrl+End |
Jump to file end | Delete |
Delete character after cursor |
Page Up |
Page up | Ctrl+Backspace |
Delete word before cursor |
Page Down |
Page down | Ctrl+Delete |
Delete word after cursor |
Code Space is available in the official Obsidian community plugin directory.
main.js, manifest.json, and styles.css. Place them in your vault plugin directory: .obsidian/plugins/code-space/. If the code-space folder does not exist, create it manually.Use BRAT only if you want to test a development or prerelease build. Install the BRAT plugin first, then add this repository as a beta plugin: https://github.com/UNLINEARITY/Obsidian-CodeSpace, and select the latest version. Most users should install the community plugin version.

npm install # Install dependencies
npm run dev # Development build (file watching)
npm run build # Production build
npm run lint # Run ESLint
obsidian-codespace/
├── src/
│ ├── main.ts # Plugin entry: command registration, view mounting, and lifecycle management
│ ├── code_view.ts # Editor core: CodeMirror 6 editing environment
│ ├── dashboard_view.ts # Dashboard view: file indexing and management UI
│ ├── outline_view.ts # Outline view: sidebar structured navigation
│ ├── code_parser.ts # Syntax parser: multi-language structure analysis
│ ├── code_embed.ts # Embed processing: reference and preview logic
│ ├── code_embed_markdown.ts # Code embed expansion for native PDF export and related flows
│ ├── native_pdf_export_patch.ts # Native Export to PDF integration and export-chain patch
│ ├── dropdown.ts # UI components: dropdown/multi-select
│ ├── folder_filter_modal.ts # Folder filter modal
│ ├── ignore_manager_modal.ts # Ignored file/folder manager modal
│ ├── external_mount.ts # External mounts: symlink/junction management
│ ├── settings.ts # Settings panel: plugin configuration
│ └── lang/
│ ├── helpers.ts # Localization helpers
│ └── locale/
│ ├── en.ts # English strings
│ └── zh-cn.ts # Chinese strings
├── styles.css # Styles entry
├── manifest.json # Plugin metadata
└── package.json # Dependencies and scripts
Contributions are welcome via Pull Request!
Please ensure:
For issues or suggestions, please use GitHub Issues.
Known limitations:
This project is built upon the following excellent projects:
Make code management simple and efficient in Obsidian!