vscode vim 插件官方说明 Input Method
Disable input method when exiting Insert Mode.
Setting | Description |
---|---|
vim.autoSwitchInputMethod.enable | Boolean denoting whether autoSwitchInputMethod is on/off. |
vim.autoSwitchInputMethod.defaultIM | Default input method. |
vim.autoSwitchInputMethod.obtainIMCmd | The full path to command to retrieve the current input method key. |
vim.autoSwitchInputMethod.switchIMCmd | The full path to command to switch input method, with {im} a placeholder for input method key. |
Any third-party program can be used to switch input methods. The following will walkthrough the configuration using im-select.
-
Install im-select (see installation guide)
-
Find your default input method key
- Mac:
Switch your input method to English, and run the following in your terminal: `/<path-to-im-select-installation>/im-select` to output your default input method. The table below lists the common English key layouts for MacOS.
Key | Description |
---|---|
com.apple.keylayout.US | U.S. |
com.apple.keylayout.ABC | ABC |
com.apple.keylayout.British | British |
com.apple.keylayout.Irish | Irish |
com.apple.keylayout.Australian | Australian |
com.apple.keylayout.Dvorak | Dvorak |
com.apple.keylayout.Colemak | Colemak |
- Windows:
Refer to the im-select guide on how to discover your input method key. Generally, if your keyboard layout is en_US the input method key is 1033 (the locale ID of en_US). You can also find your locale ID from this page, where the LCID Decimal
column is the locale ID.
- Configure
vim.autoSwitchInputMethod
.
- MacOS:
Given the input method key of com.apple.keylayout.US
and im-select
located at /usr/local/bin
. The configuration is:
"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}"
- Windows:
Given the input method key of 1033
(en_US) and im-select.exe
located at D:/bin
. The configuration is:
"vim.autoSwitchInputMethod.enable": true, "vim.autoSwitchInputMethod.defaultIM": "1033", "vim.autoSwitchInputMethod.obtainIMCmd": "D:\\bin\\im-select.exe", "vim.autoSwitchInputMethod.switchIMCmd": "D:\\bin\\im-select.exe {im}"
The {im}
argument above is a command-line option that will be passed to im-select
denoting the input method to switch to. If using an alternative program to switch input methods, you should add a similar option to the configuration. For example, if the program's usage is my-program -s imKey
to switch input method, the vim.autoSwitchInputMethod.switchIMCmd
should be /path/to/my-program -s {im}
.
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
2022-02-11 jQuery如何进行二次查找
2022-02-11 如何查看一个网站有没有使用jQuery
2022-02-11 开发依赖 生产依赖 区别
2022-02-11 JavaScript 数组中的常用方法 数组方法
2022-02-11 ngrok 实现内网穿透
2022-02-11 symbol作为key时的获取与遍历
2022-02-11 如何创建两个相同的symbol