IMSwitch in Math Block
approvedby XXM
Automatically switch input method in math block
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
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.