Skip to content

Instantly share code, notes, and snippets.

@troyp
Created July 30, 2015 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troyp/2c0be7bbb646b3387909 to your computer and use it in GitHub Desktop.
Save troyp/2c0be7bbb646b3387909 to your computer and use it in GitHub Desktop.
" Vimperator ex file: add to .vimperatorrc or source with :source command
" Defines commands to open new tab to right of current tab
" Example keybinding: xt
nmap xt :newtabright<SPACE>
command! newtabright -nargs=1 -description "Open new tab to right of current tab" :js newTabRight("<args>");
:js <<EOF
function newTabRight(args) {
var origOrd = gBrowser.selectedTab._tPos;
var numTabs = tabs.count;
liberator.open(args, liberator.NEW_TAB)
var newTab = tabs.getTab();
tabs.move(newTab, origOrd+1);
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment