首页 > 其他分享 >vscode_vim_im-select_obsidian

vscode_vim_im-select_obsidian

时间:2023-02-11 10:46:47浏览次数:54  
标签:autoSwitchInputMethod vscode vim im obsidian input method select

vscode vim 插件官方说明 Input Method

Disable input method when exiting Insert Mode.

SettingDescription
vim.autoSwitchInputMethod.enableBoolean denoting whether autoSwitchInputMethod is on/off.
vim.autoSwitchInputMethod.defaultIMDefault input method.
vim.autoSwitchInputMethod.obtainIMCmdThe full path to command to retrieve the current input method key.
vim.autoSwitchInputMethod.switchIMCmdThe 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.

  1. Install im-select (see installation guide)

  2. 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.
KeyDescription
com.apple.keylayout.USU.S.
com.apple.keylayout.ABCABC
com.apple.keylayout.BritishBritish
com.apple.keylayout.IrishIrish
com.apple.keylayout.AustralianAustralian
com.apple.keylayout.DvorakDvorak
com.apple.keylayout.ColemakColemak
  • 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.

  1. 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}.

vscode vim

img

obsidian的配置

img

标签:autoSwitchInputMethod,vscode,vim,im,obsidian,input,method,select
From: https://www.cnblogs.com/zhuoss/p/17110971.html

相关文章