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 Blocks commands

dragonishdragonish1k downloads

Provide commands to insert code blocks with markup, and support triggering commands with backticks.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates9

English | 简体中文 | 繁體中文

Introduction

This is a plugin for Obsidian. Provide commands to insert code blocks with markup, and support triggering commands with backticks.

Features

Triggering commands with backticks

You can trigger the markup selection menu by using backticks:

trigger-suggestions

Insert code blocks with markup

You can insert code blocks with markup using the command:

list-languages

Other features

  • The plugin will sort the markup list based on usage habits. Each markup's usage weight halves every 30 days without being used, so recently used markups are suggested first.
  • Optionally show suggestions that start with the search term before other matches, ignoring their usage weight. Enabled via "Prefer prefix matches" in the plugin settings; disabled by default.
  • Allow custom syntax highlighting markups. For each language:
    • Markup: Required, the markup of the language.
    • Language name: Optional, the name of the language.
    • Markup title: Optional, for markup that is not derived from the language name, a related title can be provided for easy retrieval.
    • Show in after-space suggestions: Optional, allows this markup to appear in the markup selection menu triggered after a space to the right of the backticks. Only takes effect when "Allow triggering the markup selection menu at empty spaces" is enabled in the plugin settings.
  • Optionally include the parameters of the Codeblock Customizer plugin in the markup list. Enable it in the plugin settings if you have that plugin installed.
  • Optionally store usage records in usage.json inside the plugin folder instead of data.json, so sync tools can exclude usage records on their own. Enable "Store usage records separately" in the plugin settings; it is disabled by default. Disabling moves the records back to data.json and deletes the file.

Credits

  • PrismJS/prism

License

MIT license

HealthExcellent
ReviewSatisfactory
About
Insert code blocks with markup directly into notes. Trigger the markup selection menu by typing backticks. Sort and customize language markups, adding custom syntax, names, and titles for quick retrieval.
Markdown
Details
Current version
1.6.1
Last updated
6 days ago
Created
Last year
Updates
9 releases
Downloads
1k
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
Ko-fi
Author
dragonishdragonish
github.com/dragonish
GitHubdragonish
  1. Community
  2. Plugins
  3. Markdown
  4. Code Blocks commands

Related plugins

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

Custom Frames

Turn web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.

Text Format

Format selected text upper/lower/capitalize.

Consistent Attachments and Links

Move note attachments and update links automatically.

Typewriter Mode

Typewriter scroll, writing focus, current line highlight, paragraph dimming, and more!

Flashcards

Anki integration.

Various Complements

Complete words similar to auto-completion in an IDE.

Image Captions

Add captions to images with inline Markdown and link support. The caption format is compatible with the Commonmark spec and other Markdown applications.

Heading Shifter

Easily Shift and Change Markdown headings.

Chat View

Chat View lets you quickly and easily create elegant Chat UIs in your Markdown Files.