Skip to content
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

mac trick #6

Open
gobomb opened this issue Sep 10, 2019 · 0 comments
Open

mac trick #6

gobomb opened this issue Sep 10, 2019 · 0 comments

Comments

@gobomb
Copy link
Owner

gobomb commented Sep 10, 2019

vscode vim 进入 normal 模式自动切换英文输入法

  1. 安装 im-select

https://github.com/daipeihust/im-select#installation

  1. 在 vscode 按 F1,查找 open settings(JSON),插入以下设置:

Mac

"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "com.apple.keylayout.US",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/local/bin/im-select",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/local/bin/im-select {im}"

(以终端执行的 /usr/local/bin/im-select 的结果为准:com.apple.keylayout.US 可能要换成 com.apple.keylayout.ABC

Win

"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "1033",
"vim.autoSwitchInputMethod.obtainIMCmd": "C:\\im-select\\im-select.exe", 
"vim.autoSwitchInputMethod.switchIMCmd": "C:\\im-select\\im-select.exe {im}"

ref: https://www.zhihu.com/question/303850876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant