-
Notifications
You must be signed in to change notification settings - Fork 137
Add c-n, c-j, c-p, c-k, c-m to console keybind #162
Conversation
Add `c-n`, `c-j` for select next item. Add `c-p`, `c-k` for select previous item. Add `c-m` for select item. Above console keybinds are same as Vim(Vimperator)'s completion selector.
This is great, I was wondering how to use that list, I didn't notice that you had to use the tab key. |
ah, right. I'll add later 👍 |
Also refactor methods.
Add |
src/console/components/console.js
Outdated
e.stopPropagation(); | ||
e.preventDefault(); | ||
return this.onEntered(e.target.value); | ||
this.doEnter(e); |
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.
Does this need a return
as well?
I think returning anything from a listener function (the ones passed to addEventListener
) is deprecated behavior, so probably no need to change anything.
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.
nice catch! thx!
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.
oh, I added it and missed to read your fixed comment :-p
Original code have return
.
I think we should confirm to @ueokande .
@heavenshell Thanks for your PR. |
@ueokande Thank you for review my PR!
|
Because these are not Vim's default behavior.
Drop |
Arrow keys seem completion from command-line history in Vim. I have a plan to implement is in the future. Please drop arrow keys from key maps. |
This is so nice and make sense! |
@heavenshell In my environment (Linux, Firefox 58 developer edition), |
@ueokande Thank you for telling me this. It's better to do followings
IMHO, this is very difficult(I'm sorry, I'm WebExtensions newbie). I'll continue to investigate this, but do you have any idea? P.S. |
@heavenshell I would merge your PR, and register known problem in issues. I wish Mozilla will resolve it. 🙏 |
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 works
Thank you so much including this!! |
Hi, first thank you for create nice and useful extension!
I add following behaviors to Vim-vixen.
c-n
,for select next item.c-j
c-p
,for select previous item.c-k
c-m
for select item.These console keybinds are same as Vim(Vimperator)'s completion selector.
Please check and review this and it's very pleasure to give me advices.
Thank you.