<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] ## vim 在退出輸入模式的時候切換為原來的輸入法 在敲代碼的時候使用我們使用的英文,當遇到問題,我們需要搜索引擎的時候需要中文輸入法,這個時候,自動切換輸入法可以幫助我們節省手動切換輸入法的時間。 跟編輯器結合,主要是兩種編輯器,一個是 `idea` 一個是 `vscode` ## 在idea中使用 vim 插件: * IdeaVim * IdeaVimExtension 我們需要在 用戶目錄下創建 `.ideavimrc` 文件, 并輸入以下內容 ```shell set keep-english-in-normal set keep-english-in-normal-and-restore-in-insert ``` ``` $ source ~/.ideavimrc ``` 重啟 `idea` 可以看到效果了。 IdeaVimExtension插件的文檔: 為`IdeaVim`插件增加自動切換為英文輸入法的功能 輸入法自動切換功能不會默認啟用 編輯器中normal模式下輸入輸入下面的指令以啟用自動切換輸入法功能: ``` :set keep-english-in-normal 開啟輸入法自動切換功能 :set keep-english-in-normal-and-restore-in-insert 回到insert模式時恢復輸入法 :set nokeep-english-in-normal-and-restore-in-insert 保留輸入法自動切換功能,但是回到insert模式不恢復輸入法 :set nokeep-english-in-normal 關閉輸入法自動切換功能 ``` 也可以通過將`set keep-english-in-normal[-and-restore-in-insert]`加入到`~/.ideavimrc`文件中并重啟IDE來啟用插件功能。 注意:支持MacOS和Windows, 通過fcitx-remote支持Linux MacOS需要開啟英語美國鍵盤或ABC鍵盤 Windows需要開啟英語美國鍵盤 Linux需要使用fcitx輸入法,通過fcitx-remote切換 在macOS中,normal模式的輸入法可以通過`keep_input_source_in_normal` 來設置,例如`let keep_input_source_in_normal="com.apple.keylayout.ABC"` ## 在vscode中使用 vim 參考 vscode 插件: https://github.com/VSCodeVim/Vim#input-method ### 環境 * mac * 下載 vscodevim插件 * im-select ### 安裝 im-select ``` $ git clone https://github.com.cnpmjs.org/daipeihust/im-select.git $ mv im-select/im-select-mac/out/im-select /usr/local/bin/ $ chmod 777 /usr/local/bin/im-select ``` 查看當前輸入法 ``` $ /usr/local/bin/im-select com.apple.keylayout.ABC ``` ### 全局配置 settings.json ``` "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 {im}" ``` settings.json 參數解析: |參數| 解析 | |--|--| | vim.autoSwitchInputMethod.enable| 控制是否自動切換| | vim.autoSwitchInputMethod.defaultIM| 默認的輸入法,其實就是在Normal模式下需要輸入法| | vim.autoSwitchInputMethod.obtainIMCmd| 獲得當前輸入法的命令| | vim.autoSwitchInputMethod.switchIMCmd| 切換輸入法的命令,{im}代表要切換到輸入法名,其實就是設置的defaultIM| 至此 vscode vim 自動切換輸入法就完成了。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看