My tabs:
[1] [2] [3] [4] [5] [6] [7] [8] [9]
Scenario
I am working on the 5th tab on Firefox and looking for a way to open a tab between 5th and 6th and not after 9th which would be done by t or o
I do lots of research and while its going I tend to keep multiple (numinous) tabs open and sometimes I tend to keep the related ones close to each-other temporarily. In-case you were wondering why.
Best Answer
Method 1: General
The following code defines a command to open an URL in a tab next to the current tab. You can place it in your
.vimperatorrc
file or save it as a separate file and source it in.vimperatorrc
.I've uploaded this code as a gist, so you can download it and save it in your
.vimperator
directory if you like. Then you can source it from your rc file withThere's also a Pentadactyl version.
To open an URL in a tab to the right, just enter the following at the Vimperator command line:
...or, using the example keybinding, type:
xt
www.example.com
EnterMethod 2: requires about.config setting browser.tabs.insertRelatedAfterCurrent
Assuming you have the
about.config
settingbrowser.tabs.insertRelatedAfterCurrent
set totrue
, you can use a simpler method (which can even - conditionally - be used without Vimperator/Pentadactyl).Create a new bookmarklet. Name it whatever (eg. "new tab to right"), and in the
location
field, enter the following:In the
keyword
field, enter a convenient keyword, eg.r
.This is a combination or a bookmarklet and a "search" bookmark (although we're not using it to search). You can use it either from FF's location bar, or from Vimperator's open prompt. Simply type the keyword followed by the URL. So using Vimperator's keybindings, to open example.com, we'd just type:
oSpacerSpace
example.com
EnterWith the Firefox location bar (vanilla FF)...
We can use the bookmarklet with the FF location bar as well. Using the standard FF key binding, we'd open
example.com
by typing:Ctrl-LrSpace
example.com
Enter...which is actually marginally quicker than the Vimperator command line.
However, using this method from the location bar won't work if you have FF's popup-blocker active (menu ▷ Preferences ▷ Content ▷ Pop-ups). This is because javascript scheme URLs entered at the location bar (or from a bookmarklet) are treated the same as javascript executed by a web page, whereas Vimperator's command line
:javascript
command executes the code with it's extension privileges.