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 Style Keys

Aiday Marlen KyzyAiday Marlen Kyzy90 downloads

Adds backtick shortcut for code blocks.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

Code Style Keys is an Obsidian plugin that makes wrapping selected text in backticks faster while editing notes.

When you press the backtick key with text selected:

  • Single-line selection becomes inline code: selected text.
  • Multi-line selection becomes a fenced code block

The plugin also prevents duplicate trailing backticks that can appear from the original keypress.

Why this plugin

This plugin is useful if you frequently format code snippets and want one quick key action instead of manually typing wrappers.

How it works

The plugin listens for the beforeinput event. If the typed character is a backtick and the active editor has a selection, it:

  1. Cancels the default input.
  2. Replaces the selection with inline or fenced code syntax.
  3. Performs a short cleanup pass to remove one extra trailing backtick when necessary.

Install for development

  1. Make sure Node.js 18+ is installed.
  2. Install dependencies:
npm install
  1. Start watch build:
npm run dev
  1. In Obsidian, reload the app and enable Code Style Keys in Community Plugins.

Build for production

npm run build

Manual installation

Copy these files into your vault at:

<Vault>/.obsidian/plugins/code-style-keys/

  • main.js
  • manifest.json
  • styles.css (if used)

Then reload Obsidian and enable the plugin.

Configuration

This version has no settings.

Compatibility

  • Desktop and mobile supported (isDesktopOnly: false).
  • Minimum app version is defined in manifest.json.

Development notes

  • Entry point: src/main.ts
  • Build tool: esbuild
  • Lint:
npm run lint

License

MIT

HealthExcellent
ReviewSatisfactory
About
Wrap selected text in backticks with a single keystroke: turn single-line selections into inline code and multi-line selections into fenced code blocks. Remove accidental duplicate trailing backticks to keep code formatting clean.
FormattingEditing
Details
Current version
1.0.1
Last updated
2 months ago
Created
2 months ago
Updates
2 releases
Downloads
90
Compatible with
Obsidian 1.0.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
Aiday Marlen KyzyAiday Marlen Kyzyaiday-mar
aidaymarlenkyzy.io
GitHubaiday-mar
  1. Community
  2. Plugins
  3. Formatting
  4. Code Style Keys

Related plugins

Sort and Permute lines

Sort and Permute lines in whole file or selection.

List Callouts

Create simple callouts in lists.

Symbols Prettifier

Prettify the symbols with actual symbols you commonly type, like arrows.

Smart Typography

Convert quotes to curly quotes, dashes to em dashes, and periods to ellipses.

Paste Reformatter

Reformats pasted text for precise control.

Number Headings

Automatically number or re-number headings.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Meta Bind

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

Outliner

Work with your lists like in Workflowy or Roam Research.

Admonition

Admonition block-styled content.