mirror of
https://github.com/cailurus/imswitch_mathblock_obsidian.git
synced 2026-07-22 12:10:26 +00:00
No description
| .gitignore | ||
| ime_switch_demo.gif | ||
| LICENSE | ||
| main.js | ||
| manifest.json | ||
| README.md | ||
| style.css | ||
Auto IME Switch for Math Block in Obsidian
This Obsidian plugin automatically switches input methods when writing mathematical formulas to improve writing efficiency. When the cursor enters a math formula area (between $ symbols), it automatically switches to English input; when the cursor leaves the formula area, it switches back to the previous input method.
Features
- Automatic detection of math formula areas (between $ symbols)
- Automatically switches to English input when entering formula areas
- Automatically returns to the previous input method when leaving formula areas
- Customizable input method switching commands
Installation
- Open Obsidian Settings
- Go to "Third-party plugins" and disable "Safe mode"
- Click "Browse" and search for "Auto Switch Input"
- Click Install
- Enable the plugin
Configuration
The plugin provides three configurable commands:
- English input method
- Default value:
com.apple.keylayout.ABC
- Default value:
- Previous input method (usually an IME for non English writer, like CJK)
- Default value:
com.tencent.inputmethod.wetype.pinyin
- Default value:
- Path to the IME switch command:
- Default value:
/opt/homebrew/bin/macism
- Default value:
You can modify these commands in the plugin settings according to your system and input method preferences.
System Requirements
- macOS: Requires macism to be installed
- Other systems: Requires appropriate command-line tools for switching input methods
Important Notes
- Default configuration is for macOS
- For other operating systems, modify the commands in settings accordingly
- Ensure input method switching tools are properly installed and configured
Troubleshooting
Q: Why isn't the plugin switching input methods correctly?
A: Please ensure:
- macism other input method switching tool is properly installed
- Correct commands are configured in plugin settings
- The command-line tool works properly in terminal
Q: How to know the IME name? A:
- Install macism first
- Use
macismin any terminal app
Contributing
Issues and Pull Requests are welcome to help improve this plugin.
License
MIT License
