An Obsidian plugin that automatically converts Chinese punctuation to English punctuation as you type.
- 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
| From | To |
|---|---|
, |
, |
。 |
. |
: |
: |
; |
; |
! |
! |
? |
? |
【 】 |
[ ] |
( ) |
( ) |
《 》 |
< > |
" " |
" |
' ' |
' |
… |
... |
、 |
, |
「 」 |
{ } |
· |
. |
~ |
~ |
- 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.
- Open Settings → Community Plugins
- Disable Safe mode
- Click Browse and search for "Chinese Punctuation Converter"
- Install and enable the plugin
- Install and enable the BRAT plugin
- Open the command palette and run BRAT: Plugins: Add a beta plugin for testing
- Enter
Enthusjast/obsidian-punctuation-converteras the repository - Enable the plugin in Community Plugins
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 ESLintsrc/
├── 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 (
setIntervalat 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.```