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
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Code Editor

saltyfireballsaltyfireball342 downloads

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

Add to Obsidian
  • Overview
  • Scorecard
  • Updates13

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

Features

  • Edit 50+ file types directly in Obsidian (JS, TS, Python, Go, Rust, JSON, YAML, HTML, CSS, SQL, and more)
  • Syntax highlighting with 5 built-in color themes (Monokai Pro, GitHub Dark, GitHub Light, Dracula, Nord)
  • Line numbers with active line highlighting
  • Word wrap toggle
  • Bracket matching
  • Undo/redo history
  • Tab indentation support
  • Binary file detection (prevents editing binary files)
  • Add custom file extensions

Installation

Obsidian Community Plugin

This plugin is available in the official Obsidian community plugin directory. Install it from Settings > Community plugins > Browse and search for "Code Editor" or "Code Editor by saltyfireball".

Usage

Once enabled, the plugin automatically handles supported file types. Simply open any supported file and it will open in the code editor.

Supported File Types

Code: js, ts, jsx, tsx, py, rb, go, rs, java, c, cpp, h, cs, php, swift, kt, scala, lua, pl, r, m, mm

Config/Data: json, yaml, yml, toml, xml, ini, env, conf

Web: html, htm, css, scss, sass, less

Shell/Scripts: sh, bash, zsh, fish, ps1, bat, cmd

Other: sql, graphql, dockerfile, makefile, gitignore, txt, log

Settings

  • Enable code editor - Toggle the plugin on/off (restart required)
  • Color theme - Choose from 5 syntax highlighting themes
  • Show line numbers - Toggle line number gutter
  • Word wrap - Toggle line wrapping
  • Additional file extensions - Add custom extensions (comma-separated)

Command

  • Open current file in Code Editor - Available from the command palette for non-markdown files

Acknowledgments

This plugin uses highlight.js for syntax highlighting, licensed under the BSD 3-Clause License. Copyright (c) 2006, Ivan Sagalaev.

License

MIT

99%
HealthExcellent
ReviewPassed
About
Edit non-markdown text files in Obsidian with syntax highlighting for 50+ languages, line numbers with active-line highlighting, bracket matching, word wrap, tab indentation, and undo/redo history. Choose from five built-in color themes, detect binary files to avoid accidental edits, and add custom extensions.
CodeEditingSyntax
Details
Current version
1.1.6
Last updated
16 hours ago
Created
3 months ago
Updates
13 releases
Downloads
342
Compatible with
Obsidian 1.0.0+
License
MIT
Report bugRequest featureReport plugin
Author
saltyfireballsaltyfireball
GitHubsaltyfireball
  1. Community
  2. Plugins
  3. Code
  4. Code Editor

Related plugins

VSCode Editor

Edit Code Files like VSCode.

Code Space

Professional code file management with visual dashboard, syntax highlighting editor, and Markdown embedding.

Shiki Highlighter

Highlight code blocks with Shiki.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Templater

Create and use dynamic templates.

Outliner

Work with your lists like in Workflowy or Roam Research.

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.

Various Complements

Complete words similar to auto-completion in an IDE.

Creases

Tools for effectively folding Markdown sections.

LanguageTool Integration

advanced spell/grammar checks with the help of language-tool.