switchim READMESwitchIm is used for providing a vscode command to switch input method on MacOS. The main purpose is to make a workaround to disable input method when exiting intert mode when using vim extension. Say you want to switch to English input method when you leave insert mode, you can add the following vim plugin configuration:
With this configuration, the switch input method command will fire when you type jj to leave insert mode. The argument require an input method ID, see the following section for how to get it. swimI don't know how to change input method by using JS inside vscode directly. To switch input method, this plugin uses a command line tool named swim. You must download this repository and build the swim binary to make this plugin work. Please following the "Installation" section of swim project. You could add swim binary to your $PATH, or you need to add the path of swim binary in the configuration like below:
Input Method IDsTo get input method IDs, you could run
You could supply '--name' to get input method name, which presents:
We normally want "com.apple.keyboardlayout.all" to be added in vscode vim plugin configuration above. RequirementsYou must have swim installed, check above sections for how to. Extension SettingsThis plugin has a configuration item for setting swim binary path. You could ignore this if you have added swim binary in your PATH. Release Notes1.0.0Initial release Enjoy! |