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

can not map only number keys? #40

Closed
doingnothing opened this issue May 12, 2019 · 6 comments
Closed

can not map only number keys? #40

doingnothing opened this issue May 12, 2019 · 6 comments

Comments

@doingnothing
Copy link

doingnothing commented May 12, 2019

It's ok to map special characters like !,@,#, or mixed group like q2,q1, but I can't figure out how to map only one number key like 1,2,
Could anybody help?
Thanks!

@gdh1995
Copy link
Owner

gdh1995 commented May 12, 2019

Not allowed in Vimium C currently.

Up to now, I think this feature is confusing and do not like it. If there's any idea to allow users to tell from count prefixes and number shortcuts easily, I may implement it.

PS: this issue was also mentioned in #10 (comment) .

@doingnothing
Copy link
Author

有点不懂你的意思,在Command Listing里,现在还没有任何命令有数字开头呀?像各种双键有g开头的命令就自动抵消了单独g键的命令(用户不能把单独g设定了)。那么开放设定单独数字键好像不会令用户误会吧?

@gdh1995
Copy link
Owner

gdh1995 commented May 12, 2019

比如"3x" 会关闭3个标签页,"11x" 则关闭11个,如果右边不够多还会往当前标签页的左边找。

绝大多数命令都有数字前缀来做更多/不同的事情。而且,Vimium C还支持负数的数字前缀,用来改变命令重复执行的方向或者别的什么,相当于一个更灵活的命令参数。

@doingnothing
Copy link
Author

哦原來如此複雜,明白了,謝謝🙏

@gdh1995
Copy link
Owner

gdh1995 commented May 17, 2019

设计如此,如果您没有新想法的话,请问可否关闭这个issue了?

Vimium C does this as intented, so may this issue be closed?

@gdh1995
Copy link
Owner

gdh1995 commented Mar 26, 2020

更新:最新版的用法是:

mapkey <1:n> <v-fake1>
mapkey <2:n> <v-fake2>
map <v-fake1> scrollDown
# or other commands
mapkey <-:n> <v-fake1>
mapkey <-:e> <v-fake2>
map <v-fake1> zoomOut
map F<v-fake2> zoomIn

也就是把2变成一个不是数字的虚拟键,然后绑定命令到这个虚拟出来的键上。

  • :n表示只在普通模式下、没有输入过前缀字母或数字时生效。
  • :e表示只在普通模式下、已经输入过前缀字母或数字时生效。

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

No branches or pull requests

2 participants