MacVimSwitch is a utility for macOS that automatically switches input sources, designed specifically for Vim users and those who frequently switch between CJKV(Chinese/Japanese/Korean/Vietnamese) input methods. Thx to macism for the input method switching solution.
- Automatically switches to ABC input method when pressing ESC
- Built-in Shift key switching feature (enabled by default), switch between ABC English input method and Chinese/Japanese/Korean/Vietnamese input method
- Important: Before using, please disable the "Use Shift to switch between English and Chinese/Japanese/Korean/Vietnamese" option in your input method settings
- Can be disabled in the status bar menu if needed
- If you don't want to use Shift key switching, on Mac, CapsLock short press to switch input method, long press for caps lock
- Runs in the background with a status bar icon
- Auto-starts on system login (can be disabled from menu bar)
- Recommend: Use inputsource.pro to automatically switch input method for each application. You can set a default input method for each application, for example, set the default input method to English in the browser and to Chinese in Vim.
Download from GitHub Releases and install it manually.
-
First Launch:
- Unzip and open MacVimSwitch
- Grant Accessibility permissions when prompted
- Go to System Preferences → Security & Privacy → Privacy → Accessibility
- Add and enable MacVimSwitch
- Restart the app
-
Important first-time setup:
- Disable the "Use Shift to switch between English and Chinese" option in your input method settings
- You can select your preferred Chinese input method from the status bar menu
- You must enable the MacOS keyboard shortcut for "Select the previous input source", which can be found in "Preference -> Keyboard -> Shortcuts -> Input Source".
- The shortcut can be anything as your wish, macism will read the shortcut from that entry and trigger it by emulation when needed. Just to make sure you have already enabled the shortcut.
-
Menu Bar Options:
- Click the keyboard icon in the menu bar to:
- View instructions
- Select your preferred Chinese input method
- Enable/Disable Shift key switching
- Select the applications that you want to enable
Escto switch input source, by default, vscode, terminal, obsidian, cursor, windsurf, warp are enabled. - Enable/Disable launch at login
- Quit the application
- Click the keyboard icon in the menu bar to:
MacVimSwitch offers several advantages over other input source switching solutions:
-
Universal Compatibility
- Works across all applications (VSCode, Terminal, Obsidian, Cursor, etc.)
- No need for application-specific configurations
- No plugins required for different editors
-
Input Method Agnostic
- Works with any Chinese/Japanese/Korean/Vietnamese input method
- Supports popular input methods like Sogou, iFlytek, WeChat Input, etc.
- Easy to switch between different input methods
-
Flexible Switching Options
- Use Shift key for quick switching (enabled by default)
- Or use CapsLock if you prefer (macOS built-in feature)
- ESC key always switches to ABC input method (perfect for Vim users)
-
Using Shift (Default)
- Quick and convenient
- Similar to CapsLock behavior
- Can be disabled if not needed
-
Using CapsLock (Built-in macOS Feature)
- System-level feature
- Short press to switch input methods
- Long press for caps lock
- Works alongside MacVimSwitch
Choose the method that best suits your workflow!
- Create GitHub Repository Create a new repository at github.com/jackiexiao/macvimswitch
- Clone and initialize the repository
git clone https://github.com/jackiexiao/macvimswitch.git
cd macvimswitch
- Release
Tag the release
git tag -a v1.0.0
git push origin v1.0.0
- Formula
bash
1. Create a new repository: github.com/jackiexiao/homebrew-tap (if not exists)
2. Clone the repository
git clone https://github.com/jackiexiao/homebrew-tap.git cd homebrew-tap
3. Update the SHA256 in macvimswitch.rb with the one from GitHub Release
4. Commit and push the formula
git add macvimswitch.rb
git commit -m "Update MacVimSwitch formula to v1.0.0"
git push origin main
- Apply for a tap
To build and test locally:
./build.sh
pkill -f MacVimSwitch
./dist/MacVimSwitch.app/Contents/MacOS/MacVimSwitch
# first, open MacVimSwitch, delete permissions
open dist/MacVimSwitch.app
# second, open MacVimSwitch, allow permissions
open dist/MacVimSwitch.app
# third, open MacVimSwitch, now it works
open dist/MacVimSwitch.appBuild for release
./build.sh --create-dmg
tccutil reset All com.jackiexiao.macvimswitch # Reset permissions
# open MacVimSwitch.dmg- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- macism for the input method switching solution
