Automatically replace full-width Chinese punctuation with half-width English punctuation. This tool helps developers maintain consistent punctuation without frequently switching input methods.
Now supports VS Code 1.107.0 and later, macOS, Linux, and Windows.
- Context menu replacement: Right-click on selected text and choose "tlcsdm" → "Replace Chinese Punctuation" to replace.
- Replace entire document: Replace all Chinese punctuation in the current document via Command Palette.
- Configurable rules: Customize replacement rules (Chinese → English mapping) in VS Code settings.
- Undo/Redo support: All replacement operations support VS Code's undo/redo mechanism.
- Select the text you want to replace
- Right-click to open context menu
- Select "tlcsdm" → "Replace Chinese Punctuation"
- Open Command Palette (
Ctrl+Shift+P) - Search for "Fix Chinese Characters: Replace in Document"
Open VS Code Settings and search for "Fix Chinese Characters" to configure:
| Setting | Type | Default | Description |
|---|---|---|---|
tlcsdm.fixcnchar.rules |
object | See below | Custom replacement rules |
| Chinese | English |
|---|---|
| , | , |
| 。 | . |
| ; | ; |
| : | : |
| " | " |
| " | " |
| ' | ' |
| ' | ' |
| ( | ( |
| ) | ) |
| 【 | [ |
| 】 | ] |
| 《 | < |
| 》 | > |
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X) - Search for "Fix Chinese Characters"
- Click Install
- Download the
.vsixfile from Releases - In VS Code, open Command Palette (
Ctrl+Shift+P) - Search for "Extensions: Install from VSIX..."
- Select the downloaded
.vsixfile
Download from Jenkins
This project uses TypeScript and npm (Node.js 22).
# Install dependencies
npm install
# Compile
npm run compile
# Watch mode (for development)
npm run watch
# Lint
npm run lint
# Package
npx @vscode/vsce package
# Test
npm run test- eclipse-fixcnchar - Eclipse version of this plugin
MIT License - see LICENSE for details.