-
Notifications
You must be signed in to change notification settings - Fork 451
支持命令行切换中英文模式 #797
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
base: master
Are you sure you want to change the base?
支持命令行切换中英文模式 #797
Conversation
| } | ||
|
|
||
| -(void)changeToAsciiPrev { | ||
| if (_prev) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_prev does not sync with the current status from the rime session.
Between last call to changeToAscii and this one, the ascii_mode value could have changed by the user.
| return 0; | ||
| } | ||
|
|
||
| if (argc > 1 && !strcmp("--ascii_mode", argv[1])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a one-way setting ascii_mode to true, I think we need both ways, by supplying a value:
--ascii_mode=true|fales or numeric value --ascii_mode=0|1, to be coherent with the swtich option's reset values.
| return 0; | ||
| } | ||
|
|
||
| if (argc > 1 && !strcmp("--ascii_mode_prev", argv[1])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the caller keep track of which state should be put back in?
4346417 to
111e615
Compare
|
大佬这个merge还有下文吗,非常需要这个功能。。 |
|
同非常需要这个功能。 |
|
从 #123 到这个pr ,不知道还有没有下文( UPDATE: 似乎代码已经迁移到swift上去了 有空我考虑重新实现一下吧( |
/Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --ascii_mode切换到 ascii 模式/Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --ascii_mode_prev切换到之前的模式通过这个 feature 可以做到在 neovim 中更精确的控制输入法模式