Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

CM Code Editor

gapmissgapmiss4k downloads

Code file editor with syntax highlighting and code folding.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates11

Edit code files in your Obsidian vault with syntax highlighting, code folding, search and replace, and autocompletion. Built on CodeMirror 6.

Editor and create file dialog Settings
demo settings UI

[!NOTE] Requires Obsidian 1.13.0 or later.

Features

  • Syntax highlighting for 24 languages, from Python and TypeScript to Rust, Go, and Swift
  • 45 color themes, or colors that follow your Obsidian theme
  • Search and replace with match case, regex, and whole word options
  • Code folding, indent guides, line numbers, and word wrap
  • Autocompletion, bracket matching, and auto-closing brackets
  • Multiple cursors and rectangular selection
  • Zoom with Ctrl/Cmd+scroll
  • Create code files from the command palette or file explorer
  • Rename a file including its extension, which Obsidian's own rename can't do
  • Full file names in tabs, so app.ts and app.js are easy to tell apart

New here? Read the user guide. It covers every feature, setting, and shortcut.

Installation

From Obsidian

  1. Open Settings → Community plugins → Browse.
  2. Search for "CM Code Editor".
  3. Select Install, then Enable.

Or install it from community.obsidian.md.

Manually

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Create the folder .obsidian/plugins/cm-code-editor inside your vault.
  3. Move the three files into it.
  4. In Settings → Community plugins, reload the installed plugins list and enable CM Code Editor.

Quick start

Files with these extensions open in the code editor right away:

c cpp css go html java js json lua php py rb rs sh sql toml ts xml yaml

To add more, edit File extensions in the plugin settings, then turn the plugin off and on again. The user guide lists every extension with highlighting.

Contributing

See CONTRIBUTING.md.

License

MIT

HealthExcellent
ReviewPassed
About
Edit code files inside Obsidian with a CodeMirror 6 editor offering syntax highlighting for 20+ languages and 45+ themes. Use autocompletion for JavaScript, TypeScript, CSS, HTML, SQL and Python plus code folding, indent guides, multiple cursors, bracket matching, search/replace and line numbers. Create new code files from a command or context menu.
CodeAutocompleteSyntax
Details
Current version
0.1.11
Last updated
2 months ago
Created
5 months ago
Updates
11 releases
Downloads
4k
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
gapmissgapmiss
github.com/gapmiss
GitHubgapmiss
  1. Community
  2. Plugins
  3. Code
  4. CM Code Editor

Related plugins

VSCode Editor

Edit Code Files like VSCode.

Shiki Highlighter

Highlight code blocks with Shiki.

Argument Map with Argdown

Write Argdown code blocks and view the maps in reading mode.

Code Editor

Edit non-markdown text files (code, config, data) directly with syntax highlighting, line numbers, and word wrap.

Code Viewer

View and edit code files with native syntax highlighting.

CodeBlock Language Detector

Automatically detects and adds language tags to code blocks without specified language for proper syntax highlighting.

Code File Embed

Embed the contents of a vault file as a syntax-highlighted code block via a codefile fenced block.

Masking as MD

Open non-markdown files (.py, .html, .txt, .js, .css, etc.) as editable text documents directly in Obsidian.

Code Suite

Execute code inside your notes: Shiki syntax highlighting with 65+ themes, live streaming output, inline Matplotlib and Plotly graphs, shared variables, and styled HTML and PDF export with outputs.

Templater

Create and use dynamic templates.