Chinese Punctuation Converter
approvedby 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
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
| From | To |
|---|---|
, | , |
。 | . |
: | : |
; | ; |
! | ! |
? | ? |
【 】 | [ ] |
( ) | ( ) |
《 》 | < > |
" " | " |
' ' | ' |
… | ... |
、 | , |
「 」 | { } |
· | . |
~ | ~ |
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
- Open Settings → Community Plugins
- Disable Safe mode
- Click Browse and search for "Chinese Punctuation Converter"
- Install and enable the plugin
BRAT
- 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
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 (
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.```
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.