-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
单向切换(中->英,Insert 后不切换回去)的设置方法 #2
Comments
目前是做不到的,我会考虑后面怎么支持,但我想知道你为什么会有这种需求 |
我知道可以怎么做到了,你可以自己写一个简单的脚本封装im-select,然后只有检测到输入是com.apple.keylayout.ABC时去调用im-select,当输入为其他时就什么都不做。 |
然后配置里就改成你自己的脚本路径 |
刚试了一下,这样就ok了。 因为我需要随时保证输入法是英文的。 |
|
试了一下,可以的 |
这样的话无论是进入Insert模式还是退出到normal 都会将输入法切换为英文 感觉你探索出了一种新玩法 |
@liby
这样就可以实现单向切换了 还有就是这个功能跟gitbash或者babun是无关的,使用babun只是为了让你在命令行中运行im-select.exe获取英文输入法的key,然后配置defaultIM |
@liby
|
@liby |
@liby |
|
mac设置 "vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "com.apple.keylayout.ABC",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/local/bin/im-select",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/local/bin/im-select com.apple.keylayout.ABC {im}" Linux 设置 "vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "1",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/fcitx5-remote",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/fcitx5-remote -c {im}", windows 设置 "vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "1033",
"vim.autoSwitchInputMethod.obtainIMCmd": "D:\\bin\\im-select.exe",
"vim.autoSwitchInputMethod.switchIMCmd": "D:\\bin\\im-select.exe 1033 {im}", 如果 windows 低版本(<10.0.17134.0)下不能运行的,可以试试 https://github.com/transtone/im-select/raw/master/im-select-win/im-select/x64/Release/im-select.exe 如果在 vscode ssh/wsl模式下不生效 ,可以换一个 vscodevim 版本:https://github.com/transtone/Vim/releases |
这样设置之后,输入法会在 normal 和 insert 之间切换,我想设置成单向,只在 insert --> normal 的时候切换到 ABC,而在 normal --> insert 之时不做任何切换。可以这样设置吗?
The text was updated successfully, but these errors were encountered: