
Thinking about another idea while working in my favorite program for programming Sublime Text I realized I really like the feature where you can press CTRL+P, write first few letters of a name of an opened file and press enter to open it. And because we should quite soon have a new API in Blink Opera which allows developers to map a keyboard shortcut to open extension popup I decided to make an extension that would do something similar like Sublime Text does except I will be doing it with tabs and theirs titles/urls.
The shortcut to open the pop is is CTRL+M
https://addons.opera.com/en/extensions/details/the-switcher/
Source code: https://github.com/BS-Harou/The-Switcher

Enjoy and let me know what you think

- Favicons in the list thanks to Lukasz Wiktor (There is an option to disable them if anyone wants to)
- More compact list (dimensions are more like in ST3 now)
- Sublime-text like scrollbar
- Fixed bug when active tab wasn't changed if you switched browser windows
- Popup loading time improved a tiny bit
Originally posted by mtaki14:
Something happened and in the latest developer build I can access the extension through the keyboard shortcut only when on the Speed Dial page. Any ideas?
Hi and thanks for the report! I can reproduce the problem in Opera 25 and I can reproduce the same problem in at least one other extension so the keyboard shortcuts seems to be broken. I will report this to Opera devs.
Edit: Turns out the bug is already reported as DNA-24471 and confirmed by Opera Devs.
Edit: done, the update is waiting for review
Edit 2: published
- Option to set number of remember closed tabs
- Selected tab will be closed if you press delete
http://static.martinkadlec.eu/TheSwitcher.2014-05-31.1.nex
I implemented few of the suggested improvements:
- Tabs are sorted in most recent order when search field is empty
- Last max 10 closed tabs are in the list
- Currently selected tab is not in the list
- First (the most recent) tab is automatically selected
- The list contains all tabs (from all windows)
I will appreciate any feedback
Suppose for example your second keyboard shortcut was Ctrl+k, if I pressed Ctrl+k and released both keys it switched to the last focussed tab. If I pressed Ctrl+k(release k)+k and then released both keys it would move back two in my most recently used history. Additionally Ctrl+Shift+k could go through the list in reverse.
This would effectively allow the list to also function as an actual tab cycler. ;)
P.S. You may wish to exclude the closed tabs in the cycling.
Originally posted by BS-Harou:
More than fair.I will take all the ideas into consideration but it might take some time before I'll actually get to it and I don't want to make any promises.
Firstly, the author does a couple of things to make the list (prior to searching) useful right away:
1. The default list of tabs is in MRU (most recently used) order, meaning the last tabs you looked at are near the top. For me at least these are usually the ones I am most interested in. It also makes it somewhat similar to the old Presto Opera tab cycler.
2. He does not show the currently selected tab in the list, since you don't need to switch to it. ;)
3. The first entry is preselected. When combined with 1. and 2. this means pressing CTRL+M and Enter quickly switches to last selected tab (the most common tab I am trying to get back to).
Another feature is keeping track of limited number of closed tabs and displaying them faded out at the bottom of the list (as metude requested above). This means the user can search these as well and reopen them by clicking them or pressing enter if they are selected. It is also possible to close tabs from inside the extension itself (something you hinted at adding).
A nice final touch is that the extension's icon lists the number of currently open tabs, which helps give you a visual warning on if you are starting to have too many open (It also reminds me of Remco's old tab counter extension for Opera Presto).
Now, I'm unsure what the best way to proceed is.
P.S. His version is not without issues. Some of the keyboard shortcuts he defines within the extension do not work on Mac.
Originally posted by BS-Harou:
I would have guessed it would be possible as I am also using Recent Tabs and hide its button and it is still able to show its tab cycler UI.
Then again I have not really looked into this topic in any detail.
Originally posted by ruario:
https://files.myopera.com/BS-Harou/files/switcher.2013-12-10.1.nexI'm uploading it to addons catalog now.
The escape key will close the windows unless you did search with zero results. In that case, pressing esc will clear the input box first.
P.S. "Martin Kadlec is cool"
Originally posted by BS-Harou:
It might help with performance to limit to searching the first few hundred (or thousand) characters of the page. This is what Stash searching does.
Originally posted by alf5000:
And this extension is meant for keyboard guys
could you make it work even when the extension-button is hidden? (I'm a keyboard guy)
Originally posted by mubaidr:
Last time I checked, it works in O17 when the extension is installed from *.nex file, but not when it is installed from unpacked directory.
Originally posted by BS-Harou:
Commands API works for sure :cheers
Originally posted by BS-Harou:
Both Omni bar API and Commands API works fine in Opera
(BTW I have tested both myself, I am using commands API in my extension and a bookmark extension from Chrome store that uses omni bar API worked fine for me, though I don't remember its name)
Originally posted by ZAHEK:
I'd like to make this configurable in options page.Originally posted by ZAHEK:
I think when you start typing into addressbar bar you get already all the history/speeddial results. I'd like to keep my extension related only to tabs. One of the reasons is also performance, because the Damerau–Levenshtein is quite expensive operation.Originally posted by ZAHEK:
I'm afraid this is not possible :(-I think it would be better if it remembers last 10/15 pages instead 5
Becouse if we open 10-20 pages yes it is so usefull but pls think that Opera is open but no any open tab. Afterthat we are pusching Ctrl+M and start to type, all regarding websites coming us
It would be awesome.
Or should it be possible to search in bookmarks or speed dials :)
- Is it possible to open popup in the middle of top ,below adress bar, instead under button?
Thanks.
How about adding latest 5 closed tabs in the list and if it's selected opening it in new tab?
https://files.myopera.com/BS-Harou/files/The%20Switcher.crx
Originally posted by cvm:
Ono se těžko bude hledat něco, co už pro Chrome neexistuje, ale dovolím si říct, že pro přepínání tabů funguje moje rozšíření mnohem lépe. Blitz nijak nefiltruje a nejde používat šipky nahoru a dolu pro vyběr tabu. Nehledě na to, že je ošklivější
https://chrome.google.com/webstore/detail/blitz-full-screen-url-lau/eaemaefgnoddejclbjbkdjhnejojlnda
https://chrome.google.com/webstore/detail/extensions-manager-aka-sw/lpleipinonnoibneeejgjnoeekmbopbc?hl=en
Originally posted by ZAHEK:
Yeah, I was thinking about adding some more features like closing tabs with delete key and searching in content of the tabs (though the second idea would be a bit complicated for performance reasons).