Chinese Punctuation Converter

approved

by enthusjast

This plugin has not been manually reviewed by Obsidian staff. 自动将中文标点转化为对应的英文标点. Automatically convert Chinese punctuation to corresponding English punctuation.

61 downloadsUpdated 3d agoMIT

Chinese Punctuation Converter

中文 | English

Obsidian Downloads

An Obsidian plugin that automatically converts Chinese punctuation to English punctuation as you type.

Features

  • Real-time conversion — converts Chinese punctuation marks to English equivalents as you type, only transforming newly entered text
  • Ribbon button — one-click conversion of the entire active file from the sidebar
  • Context menu — select text, right-click → Convert selected punctuation to convert only the selection
  • Command palette — all commands grouped under the Chinese Punctuation Converter prefix:
    • Enable/disable auto-conversion — toggle real-time conversion on/off
    • Convert current file punctuation — bulk convert the entire document
  • Customizable rules — enable, disable, add, or delete individual conversion rules in the plugin settings
  • i18n support — UI language can be set to Auto (follow Obsidian's language), English, or Chinese in plugin settings

Supported Punctuation Conversions

FromTo
,
.
:
;
!
?
[ ]
( )
< >
" ""
' ''
...
,
{ }
·.
~

Usage

  • After installing the plugin, type Chinese punctuation to have it automatically converted.
  • Click the ribbon icon (sidebar) to convert the entire active file.
  • Right-click selected text → Convert selected punctuation to convert only the selection.
  • Open the command palette, all commands are prefixed with Chinese Punctuation Converter:
    • Enable/disable auto-conversion — toggle real-time conversion
    • Convert current file punctuation — bulk convert the entire document
  • Individual conversion rules can be enabled, disabled, added, or removed in the plugin settings.
  • Set the interface language in plugin settings to Auto, English, or Chinese.

Installation

Community Plugins

  1. Open SettingsCommunity Plugins
  2. Disable Safe mode
  3. Click Browse and search for "Chinese Punctuation Converter"
  4. Install and enable the plugin

BRAT

  1. Install and enable the BRAT plugin
  2. Open the command palette and run BRAT: Plugins: Add a beta plugin for testing
  3. Enter Enthusjast/obsidian-punctuation-converter as the repository
  4. Enable the plugin in Community Plugins

Development

git clone git@github.com:Enthusjast/obsidian-punctuation-converter.git
cd obsidian-punctuation-converter
npm install
npm run dev      # watch mode with sourcemaps
npm run build    # production build (type-check + bundle + minify)
npm run lint     # run ESLint

Project structure

src/
├── main.ts       # Plugin entry, editor monitoring, commands, context menu
├── settings.ts   # Settings tab UI, rule types, defaults, validation
└── locale.ts     # i18n translations (zh/en) and language detection
  • Editor monitoring uses polling (setInterval at 150ms). A bidirectional diff locates only the changed region on each tick; editor.replaceRange() replaces just that portion.
  • Settings validation is defensive — every field type is checked on load and invalid values fall back to defaults.
  • Build — TypeScript is type-checked by tsc, bundled by esbuild to CommonJS (ES2018). All Obsidian/CodeMirror modules are externalized.```

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.