Skip to content
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

非常好用,不过 Mac 端方括号翻页无效 Orz #47

Closed
krimeshu opened this issue Feb 20, 2021 · 5 comments
Closed

非常好用,不过 Mac 端方括号翻页无效 Orz #47

krimeshu opened this issue Feb 20, 2021 · 5 comments

Comments

@krimeshu
Copy link

在配置文件里看到有相关配置,但是不知道为什么没有生效,有哪位遇到过这个情况吗?

  key_binder/bindings: # 设置哪些键可以翻页,需要哪个取消注释即可
    # - { when: composing, accept: Tab, send: Page_Up } # Tab 翻页
    - { when: composing, accept: Tab, send: Right } # Tab 移动光标向右
    - { when: composing, accept: Shift+Tab, send: Page_Up }
    - { when: paging, accept: minus, send: Page_Up }
    - { when: has_menu, accept: equal, send: Page_Down }
    - { when: paging, accept: bracketleft, send: Page_Up }
    - { when: has_menu, accept: bracketright, send: Page_Down }
@krimeshu
Copy link
Author

搜索项目代码,发现 lua/select_character.lua 里面有 bracketright 相关的代码,修改后居然生效了:

local function select_character(key, env)
   local engine = env.engine
   local context = engine.context
   local commit_text = context:get_commit_text()
   local config = engine.schema.config
-  local first_key = config:get_string('key_binder/select_first_character') or 'bracketleft'
-  local last_key = config:get_string('key_binder/select_last_character') or 'bracketright'
+  local first_key = config:get_string('key_binder/select_first_character')
+  local last_key = config:get_string('key_binder/select_last_character')

@wtaochina
Copy link

用楼上的方法解决

@wongdean
Copy link
Owner

是的,这个是我疏忽了,我引入了[、]选词的插件,原本的翻页功能就不能用了,我应该在说明里写一下的,抱歉

@wongdean wongdean pinned this issue Feb 28, 2021
@risingfred
Copy link

完美的解决 层主很细心 感谢

@wongdean
Copy link
Owner

wongdean commented Apr 5, 2021

已经修复,你提的pr把插件改掉了,这样想用这个方案的人是找不到的。我已经把分支中默认的“以词定字”关掉了,现在默认就是翻页了,请知晓~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants