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

Auto Spacer

fanthusfanthus

Wrap mixed English segments with inline code and insert CJK-adjacent spaces.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

English | 中文

Auto Spacer

Obsidian plugin for mixed CJK–English typography. Inserts spaces at CJK–Latin boundaries and wraps English segments in inline code.

Features

  • Detects mixed Chinese (including Japanese kana and kanji) and English text
  • Inserts spaces between CJK and Latin characters
  • Wraps English segments in `inline code`
  • Skips existing backticks, links, tags, and other Markdown structures
  • Formats the current selection, or the entire current line when nothing is selected
  • Optional toolbar button in the editor header

Usage

Command

Open the command palette and run 「中英混排:反引号包裹并补空格」 (Mixed CJK–English: wrap in backticks and add spaces).

Default shortcut: Cmd + Shift + S (macOS) / Ctrl + Shift + S (Windows / Linux).

Settings

Configure under Settings → Community plugins → Auto Spacer:

  • 显示顶部按钮 (Show header button): show the “中英混排格式化” action in the editor toolbar

Installation

Manual install from GitHub Release

  1. Download main.js, manifest.json, and styles.css from Releases
  2. Copy them into your vault:
YourVault/.obsidian/plugins/auto-spacer/
  1. Enable the plugin in Obsidian: Settings → Community plugins

Source files alone are not enough—you must build main.js or download the compiled artifacts from a Release.

Development

Requirements

  • Node.js 16 or later (18+ recommended)

Local development

git clone https://github.com/fanthus/obsidian-auto-spacer.git
cd obsidian-auto-spacer
npm install
npm run dev

npm run dev watches and compiles src/main.ts to main.js. Reload Obsidian after code changes to test.

Production build:

npm run build

Linting

ESLint is configured. Run:

npm run lint

You can also use the Obsidian rules package eslint-plugin-obsidianmd. A GitHub Action runs lint on pushes to all branches.

Releasing

This project uses release.mjs to build and create GitHub Releases. Obsidian downloads main.js, manifest.json, and styles.css from the release.

Repository: https://github.com/fanthus/obsidian-auto-spacer

Prerequisites

  1. Install Node.js (18+ recommended)
  2. Install GitHub CLI and sign in:
gh auth login
  1. Install dependencies:
npm install

First release

Set the target version in manifest.json (e.g. 1.0.0), then run:

npm run release -- --push

The script will:

  1. Run npm run build to produce main.js
  2. Create a git tag matching the version (e.g. 1.0.0—no v prefix)
  3. Push the branch and tag to GitHub
  4. Create a GitHub Release and upload main.js, manifest.json, and styles.css

Subsequent releases

Pick a bump type for your changes:

Command Version change When to use
npm run release:patch 1.0.0 → 1.0.1 Bug fixes, small changes
npm run release:minor 1.0.0 → 1.1.0 New features, backward compatible
npm run release:major 1.0.0 → 2.0.0 Breaking changes

These commands bump the version, sync manifest.json and versions.json, build, publish, and push.

Update minAppVersion in manifest.json before releasing if you require a newer Obsidian version.

Common options

Preview steps without publishing:

npm run release -- --dry-run

Custom release notes:

npm run release -- --bump patch --push --notes "Fix spacing around punctuation."

Read notes from a file:

npm run release -- --bump patch --push --notes-file CHANGELOG.md

Replace an existing release (e.g. after a failed publish):

npm run release -- --push --force

Full help:

node release.mjs --help

Manual release (optional)

Without the script:

  1. Update version in manifest.json
  2. Add "newVersion": "minObsidianVersion" to versions.json
  3. Run npm run build
  4. Create a GitHub Release whose tag exactly matches version (e.g. 1.0.0)
  5. Attach main.js, manifest.json, and styles.css

Submit to the Obsidian community catalog

After a GitHub Release, submit your plugin on community.obsidian.md with the repository URL. See Submit your plugin.

Funding links

Set fundingUrl in manifest.json to show sponsorship options:

{
    "fundingUrl": "https://buymeacoffee.com"
}

Multiple links as an object:

{
    "fundingUrl": {
        "Buy Me a Coffee": "https://buymeacoffee.com",
        "GitHub Sponsor": "https://github.com/sponsors",
        "Patreon": "https://www.patreon.com/"
    }
}

API documentation

Obsidian plugin development: https://docs.obsidian.md

98%
HealthExcellent
ReviewPassed
About
Insert spaces at CJK–Latin boundaries and wrap English segments in inline code to tidy mixed CJK–English typography. Detect Chinese (including Japanese kana/kanji) mixed with Latin, skip existing backticks, links, tags and other Markdown, and format the selection or current line.
FormattingMarkdownLanguages
Details
Current version
1.0.0
Last updated
11 hours ago
Created
11 hours ago
Updates
1 release
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
0BSD
Report bugRequest featureReport plugin
Sponsor
GitHub Sponsors
Buy Me a Coffee
Author
fanthusfanthusfanthus
GitHubfanthus
  1. Community
  2. Plugins
  3. Formatting
  4. Auto Spacer

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.

Easy Typing

Auto format when typing.

Columns

Create columns in Markdown.

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.

Markdownlint

Use markdownlint to make the contents of your files more consistent.

Importer

Import data from Notion, Evernote, Apple Notes, Microsoft OneNote, Google Keep, Bear, Roam, and HTML files.

Outliner

Work with your lists like in Workflowy or Roam Research.

Various Complements

Complete words similar to auto-completion in an IDE.

Simplified Chinese Word Splitting

Adds Simplified Chinese word splitting support for the editor and Vim mode.

Fantasy Statblocks

Create, manage and view a Fantasy Bestiary with Dungeons and Dragons style statblocks.