This extension provides syntax highlighting for McBopomofo data.txt and excluded-phrases.txt files.
- Syntax highlighting for comments (starting with
#). - Validation for data lines (
Phrase Bopomofo-Sequence). - Marking invalid lines.
- Comments: Lines starting with
#. - Valid Data:
Phrasefollowed by a space and aBopomofo-Sequence(syllables connected by-) or an English macro (starting with_). - Invalid Lines: Any line that doesn't follow the above rules.
-
Install dependencies:
npm install
-
Package the extension:
npx @vscode/vsce package
-
This creates a
.vsixfile in the project root, for example:mcbopomofo-vscode-extension-0.1.0.vsix -
Install the
.vsix:-
In VS Code: run Extensions: Install from VSIX... from the Command Palette.
-
Or via CLI:
code --install-extension mcbopomofo-vscode-extension-0.1.0.vsix
-
-
Reload VS Code after installation.
-
Create a publisher and get a Personal Access Token (PAT):
- Publisher: https://marketplace.visualstudio.com/manage
- PAT: https://dev.azure.com
-
Login with
vsce:npx @vscode/vsce login <publisher-name>
-
Publish the current version:
npx @vscode/vsce publish
-
Or bump and publish in one command:
npx @vscode/vsce publish patch
-
After publishing, users can install it from the Extensions Marketplace by searching:
McBopomofo Data Editor
- Open this repository in Visual Studio Code.
- Press
F5to open a new window with the extension loaded ("Extension Development Host"). - In the new window, open the provided
test_data.txtfile (or create a file nameddata.txtorexcluded-phrases.txt). - You should immediately see the syntax highlighting applied.
- Making Changes: If you modify the
syntaxes/mcbopomofo-data.tmLanguage.jsonfile, you need to reload the Extension Development Host window to see the changes. You can do this by opening the Command Palette (Cmd+Shift+Pon macOS,Ctrl+Shift+Pon Windows/Linux) in the test window and selecting Developer: Reload Window, or simply by pressingCmd+R(Ctrl+R).
This extension is built for Visual Studio Code, but because it is a standard TextMate grammar extension, it is fully compatible with various editors and IDEs forked from or based on VS Code, such as:
- VSCodium: A community-driven, telemetry-free distribution of VS Code.
- Cursor: An AI-powered code editor built on top of VS Code.
- Windsurf: Another modern AI-driven IDE based on the VS Code architecture.
- Antigravity: Google's AI-first agentic IDE, built as a fork of VS Code.
- Trae: An adaptive AI IDE built on VS Code.
- GitHub Codespaces / Gitpod: Web-based VS Code environments.
