Open az-pz opened 6 years ago
You could try using global marks. See also here.
Thank you smblott for your response.
The problem with global marks is that it does not switch to the tab if the url of the tab changes after mark creation. It opens a new tab with tab url when the mark was created. In slack, every channel and thread has different url.
Vomnibar.activateTabSelection with keyword argument switch to the tab if we give tab title as keyword argument.
The problem with global marks is that it does not switch to the tab if the url of the tab changes after mark creation.
Yes it does. It switches to the first tab for which the URL of the mark is a prefix of the URL of the tab. And if no such tab exists, then it creates a new tab.
I created a mark on 'https://github.com/philc/vimium' page. I can switch to the mark.
Now, I clicked on issues button. The url of the page is "https://github.com/philc/vimium/issues". When I try switching to the mark, it opens a new tab with "https://github.com/philc/vimium" url. It doesn't behave the way you are saying it should. Or, am I doing something wrong here?
My custom key mapping for mark:
map m Marks.activateCreateMode swap
map M Marks.activateGotoMode swap
Or, am I doing something wrong here?
Not that I can tell.
What I describe (and the behaviour you want) works here for me.
There's another requirement, which slipped my mind.
It only works if the scroll offset is 0 (when you create the mark). So scroll to the top of the page first.
Scroll to top before creating global mark works for me. But in my case, I want to switch to slack with one key and global mark can't help me since I can not create mark on root url (foo.slack.com). Slack opens with one of the threads (foo.slack.com/messages/bar).
I don't know how widespread this usecase would be, but I think there should be keyword argument for Vomnibar.activateTabSelection in preferences. Thank you for response, smblott.
Currently, you can use keyword option only for Vomnibar.activate and Vomnibar.activateInNewTab (https://github.com/philc/vimium/wiki/Tips-and-Tricks#keyboard-shortcuts-for-custom-search-engines ). keyword option should be available for other vomnibar commands like Vomnibar.activateTabSelection. This way, user can map keyboard shortcut to a bookmark or a tab. Example: map s Vomnibar.activateTabSelection keyword=slack Pressing 's' opens first result of 'slack' input in Vomnibar.activateTabSelection .