-
Notifications
You must be signed in to change notification settings - Fork 137
added support for pinning/unpinning tabs #124
Conversation
@JiaboHou Thank you for your wonderful changes. I'll merge it on v0.5 release if no conflicts. |
README.md
Outdated
@@ -34,6 +34,7 @@ The default mappings are as follows: | |||
- <kbd>K</kbd>, <kbd>J</kbd>: select prev or next tab | |||
- <kbd>r</kbd>: reload current tab | |||
- <kbd>R</kbd>: reload current tab without cache | |||
- <kbd>p</kbd>: toggle pin/unpin current tab |
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.
Please use another keys, because p is normally used for paste. Vim Vixen does not support paste URL currently, but I wanna reserve 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.
Vimium uses <A-P>
, but Alt keys may conflicts on system bindings.
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.
While z is a prefix for zoom, I think z is natural prefix for change current state.
How about use zp to toggle pin/unpin?
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.
sure, I'm cool with that 👍
src/background/tabs.js
Outdated
return browser.tabs.query({ currentWindow: true, active: true }) | ||
.then(() => { | ||
let newPinned = pinned; | ||
if (newPinned !== true && newPinned !== false) { |
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.
An interface of this method "toggles when pinned
is not boolean" is confusing. Please define another method to toggle pin status, or set pinned
on method calling
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.
done
features: * pin tab * unpin tab * toggle pin/unpin tab
10f882a
to
c98ff7a
Compare
* change default keybinding for pin/unpin tab from 'p' to 'zp' * use toggleTabPinned to toggle the tab pinned state, instead of updateTabPinned
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.
That's great, thank you
Added
tabs.pin
)tabs.unpin
)tabs.pin.toggle
)default:
zp
toggles the pinning of the active tabDemo
https://www.youtube.com/watch?v=zlJskAqSwDI