Skip to content

Instantly share code, notes, and snippets.

@troyp
Created July 30, 2015 19:20
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/70faaec7d97f67477e86 to your computer and use it in GitHub Desktop.
Save troyp/70faaec7d97f67477e86 to your computer and use it in GitHub Desktop.
" Pentadactyl ex file: add to .pentadactylrc or source with :source command
" Defines commands to open new tab to right of current tab
" Example keybinding: xt
map -g user -ex xt :newtabright
command! newtabright
\ -description "Open new tab to right of current tab"
\ -nargs=1
\ -js <<EOF
var origOrd = gBrowser.selectedTab.dactylOrdinal;
var numTabs = tabs.count;
dactyl.open(args[0], dactyl.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