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

Code Folding

mr-poundsmr-pounds210 downloads

A lightweight plugin that adds smart folding functionality to code blocks.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

A lightweight plugin that adds smart folding functionality to code blocks.

中文文档

Core Principles

  • Minimal Changes: Focus solely on code block folding, no additional features
  • Performance First: Lean and efficient code implementation
  • Theme Compatible: Uses Obsidian native CSS variables, compatible with all themes

Features

Code Lines Behavior
≤ 5 lines Display full code with one-click copy
> 5 lines Auto-fold overflow, click to expand/collapse, supports one-click copy

Installation

Via Obsidian (Recommended)

  1. Open Obsidian Settings → Community Plugins
  2. Turn off Safe Mode
  3. Click Browse Community Plugins
  4. Search for "Code Folding"
  5. Click Install and Enable

Manual Installation

  1. Download the latest main.js, styles.css, and manifest.json
  2. Place files in your Vault's .obsidian/plugins/obsidian-code-folding/ directory
  3. Enable the plugin in Obsidian settings

Usage

  • Click the code block header to expand/collapse folded content
  • Click the 📋 button to copy code
  • Adjust the folding threshold in settings (default: 5 lines)

Settings

Option Description Default
Fold Threshold Auto-fold when exceeding this line count 5

Compatibility

  • Obsidian version: ≥ 0.15.0
  • Supports desktop and mobile
  • Compatible with all Obsidian themes
HealthExcellent
ReviewCaution
About
Add smart folding to code blocks and auto-collapse snippets that exceed the line threshold (default 5 lines). Click the code header to expand/collapse and use the one-click copy button; lightweight and theme-compatible.
CodeEditing
Details
Current version
1.0.1
Last updated
8 months ago
Created
8 months ago
Updates
1 release
Downloads
210
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
0BSD
Report bugRequest featureReport plugin
Sponsor
Support
Author
mr-poundsmr-pounds
github.com/mr-pounds
GitHubmr-pounds
  1. Community
  2. Plugins
  3. Code
  4. Code Folding

Related plugins

Code Space

Professional code file management with visual dashboard, syntax highlighting editor, Markdown embedding, external folder mounts, and terminal integration.

VSCode Editor

Edit Code Files like VSCode.

LanguageTool Integration

Advanced grammar and spell checking, powered by LanguageTool.

Meta Bind

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

Advanced Tables

Improved table navigation, formatting, and manipulation.

Thino

Quickly capture memos and display them in the sidebar with a heatmap. (Closed source)

Mermaid Tools

Improved Mermaid.js experience: visual toolbar with common elements and more.

Editing Toolbar

The Editing Toolbar is modified from cMenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.

Outliner

Work with your lists like in Workflowy or Roam Research.

Hover Editor

Transform the Page Preview hover popover into a fully working editor instance.