Giter VIP home page Giter VIP logo

Comments (15)

daipeihust avatar daipeihust commented on August 20, 2024 2

@liby
你现在重新下载一下im-select.exe,我刚刚改了一下代码,让它支持传入多个参数了
然后按照这个来配置应该就OK了:

"vim.autoSwitchInputMethod.switchIMCmd": "D:\\Run\\im-select.exe 1033 {im}"

from im-select.

daipeihust avatar daipeihust commented on August 20, 2024 1

我知道可以怎么做到了,你可以自己写一个简单的脚本封装im-select,然后只有检测到输入是com.apple.keylayout.ABC时去调用im-select,当输入为其他时就什么都不做。

from im-select.

transtone avatar transtone commented on August 20, 2024 1

"vim.autoSwitchInputMethod.switchIMCmd": "/usr/local/bin/im-select com.apple.keylayout.ABC {im}"

刚试了一下,这样就ok了。

因为我需要随时保证输入法是英文的。
在一个地方打完汉字之后,需要回到normal模式,移动到其他行继续打代码。如果进入Insert模式时输入法是中文,会需要切换回英文,非常不习惯。

from im-select.

daipeihust avatar daipeihust commented on August 20, 2024 1

@liby
com.windows.keylayout.ABC这个参数是有问题的,com.apple.keylayout.ABC是mac上参数,不是将apple改为windows就可以了。Windows上应该这样配置:

 "vim.autoSwitchInputMethod.switchIMCmd": "D:\\Run\\im-select.exe 1033 {im}"

这样就可以实现单向切换了

还有就是这个功能跟gitbash或者babun是无关的,使用babun只是为了让你在命令行中运行im-select.exe获取英文输入法的key,然后配置defaultIM

from im-select.

daipeihust avatar daipeihust commented on August 20, 2024

目前是做不到的,我会考虑后面怎么支持,但我想知道你为什么会有这种需求

from im-select.

daipeihust avatar daipeihust commented on August 20, 2024

然后配置里就改成你自己的脚本路径

from im-select.

liby avatar liby commented on August 20, 2024

@daipeihust

  • 如果在windows系统下是不是只用vscode里改成
    "vim.autoSwitchInputMethod.switchIMCmd": "D:\\Run\\im-select.exe com.windows.keylayout.ABC {im}",
    就可以

from im-select.

liby avatar liby commented on August 20, 2024

试了一下,可以的

from im-select.

daipeihust avatar daipeihust commented on August 20, 2024

这样的话无论是进入Insert模式还是退出到normal 都会将输入法切换为英文 感觉你探索出了一种新玩法

from im-select.

liby avatar liby commented on August 20, 2024

@daipeihust

  • 今天发现这个设置失效了,设置了这个com.windows.keylayout.ABC以后和没有开启im-select一样,可是我上次明明测试过了,是可以用的.
  • 我以为是GitBash的问题,我又把babun下载了回来,发现还是无效,待我再研究一下.
    demo11

from im-select.

liby avatar liby commented on August 20, 2024

@daipeihust

  • 因为我以为GitBash无法识别com.apple.keylayout.ABC这个命令
  • 我一开始是试过1033和2052的,因为没有效果,才想到把apple换成windows试试看,当时我清楚的记得是有效果的,而且我发现将defaultIM设置为"2052"并不会默认切换到中文输入法.
    demo

from im-select.

daipeihust avatar daipeihust commented on August 20, 2024

@liby
你也是想要达到在normal和insert模式下都保持英文输入法的效果吧

from im-select.

liby avatar liby commented on August 20, 2024

@daipeihust

  • 我想要的效果大概是:
    • insert模式下,以下图这种输入法状态(中文输入法下的英文输入模式)切换到normal模式
      1
    • 这时候输入法被切换为英文输入法(如下图),而我在这时进入insert模式
      2
    • 进入insert模式以后,输入法不会切换到中文输入法的中文模式,或者就是还原之前进入normal模式之前的输入法状态(如下图),不做什么切换(似乎im-select也只能切换输入法,而不能控制中文输入法的中英文输入模式)
      Snipaste_2019-05-22_15-11-00
    • 而不会说,我在insert模式下手动将中文输入法的输入模式切换为英文,这时候进入normal模式,再之后进入insert模式,却自动变回了中文输入法的中文模式(如下图)
      Snipaste_2019-05-22_15-14-37

from im-select.

daipeihust avatar daipeihust commented on August 20, 2024

@liby
确实控制不了中文输入法的不同中英输入模式,你可以将你的中文输入法的默认模式设置为英文

from im-select.

liby avatar liby commented on August 20, 2024

@daipeihust

  • 是的,将默认模式设置为英文也是一开始想到的解决方案
  • 更新接收多个参数以后,进入insert模式或者退回到normal模式都会将输入法切换到英文
  • 不管怎么样,还是很感谢您能在工作时间回复我

from im-select.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.