akhodakivskiy / VimFx

Vim keyboard shortcuts for Firefox
https://addons.mozilla.org/firefox/addon/vimfx
Other
1.42k stars 175 forks source link

Popup to cycle through opened tabs? #420

Closed orschiro closed 9 years ago

orschiro commented 9 years ago

Hi there,

I very much like the T: Search through your open tabs feature of Vimium for Chrome.

It opens a simple search popup bar that looks as follows:

screenshot

I know I can roughly achieve the same in VimFx by using o to put the focus on the address bar. However, this will not only search through my opened tabs but history and bookmarks alike.

Thus, what is your opinion on adding such a feature to VimFx?

Thanks for your replies,

Robert

d125q commented 9 years ago

I know I can roughly achieve the same in VimFx by using o to put the focus on the address bar. However, this will not only search through my opened tabs but history and bookmarks alike.

You can restrict the address bar to search through the open tabs only. See this article.

orschiro commented 9 years ago

Generally I appreciate the default feature of Firefox to search through all of them, except for the situation when I specifically want to switch to another tab.

Would the following be possible?

  1. Press |T|
  2. Temporarily restrict the address bar to search through the open tabs only (about:config switch)
  3. Cycle through open tabs only and change to the desired tab
  4. On completion switch back to the default behaviour in about:config

Robert

On 19.11.2014 19:30, d125q wrote:

I know I can roughly achieve the same in VimFx by using o to put
the focus on the address bar. However, this will not only search
through my opened tabs but history and bookmarks alike.

You can restrict the address bar to search through the open tabs only. See this article http://kb.mozillazine.org/Browser.urlbar.match.url.

— Reply to this email directly or view it on GitHub https://github.com/akhodakivskiy/VimFx/issues/420#issuecomment-63688704.

Sharing my passion & inspiration for

Sustasty

SustainableConsumption

SufficiencyLifestyles

ResourceEfficiency

Flying is old-school and the world cannot be saved part-time

Co-Creator of #MindfulMeerkats

www.robert.orzanna.de twitter.com/@orschiro

bohrshaw commented 9 years ago

This feature is also beneficial to me. I usually keep the number of tabs less than 9 and arrange them from time to time to be able to access quickly. But I would arrange tabs less often if search through tabs becomes available. (I use < and > to move tabs quickly.)

orschiro commented 9 years ago

(I use < and > to move tabs quickly.)

Interestingly, this does nothing on my system. The tabs' position should change accordingly?

bohrshaw commented 9 years ago

@orschiro Probably hijacking this thread, but anyway, < and > are not the defaults, thus you need to configure them to work. If still unresponsive, than there could exist some conflicts between your addons.

orschiro commented 9 years ago

@bohrshaw

Thanks for explaining and expressing your interest in my proposed feature request.

lydell commented 9 years ago

You can already achieve what you're asking for by typing o``%``<Space> (as @d125q tried to explain). Being able to bind that to a single keystroke is a planned feature. (Feel free to reopen if this solution doesn't cut it.)

bohrshaw commented 9 years ago

Oh! I didn't read the linked article and @lydell you astonished me with your little example. For a quick reference for others, I put a chart here: (but the article has more info)

Preference names in about:config default key action
browser.urlbar.match.title # Returns results that match the text in the title.
browser.urlbar.match.url @ Returns results that match the text in the URL.
browser.urlbar.restrict.bookmark * Returns only results that are from the bookmarks.
browser.urlbar.restrict.history ^ Returns only results that are from the browser’s history.
browser.urlbar.restrict.tag + Returns only results that have been tagged.
browser.urlbar.restrict.typed ~ Returns only results that have been typed.
browser.urlbar.restrict.openpage % Returns only open tabs (visible tabs, not active tab), available in Firefox 4 (SeaMonkey 2.1) and later

And you could put a key anywhere in your query like foo ~ bar, foo bar *, etc.

orschiro commented 9 years ago

@lydell @bohrshaw

This is brilliant. Thanks for outlining!

Totally sufficient to just press o -> % -> search term.

Thanks!