Skip to content

Instantly share code, notes, and snippets.

@tetsutan
Created March 9, 2012 09:45
Show Gist options
  • Save tetsutan/2005869 to your computer and use it in GitHub Desktop.
Save tetsutan/2005869 to your computer and use it in GitHub Desktop.
(function(){
mappings.addUserMap([modes.NORMAL,modes.VISUAL],['<C-M-n>'], 'migiidou',
function(){
var n = gBrowser.mCurrentTab._tPos;
if( n == (gBrowser.mTabContainer.childNodes.length - 1)){
return
}
var tabs = gBrowser.mTabContainer.childNodes;
gBrowser.moveTabTo(gBrowser.mCurrentTab, n+1);
gBrowser.selectedTab = gBrowser.mTabs[n+1];
},{
rhs: 'migiidou'
}
);
mappings.addUserMap([modes.NORMAL,modes.VISUAL],['<C-M-p>'], 'hidariidou',
function(){
var n = gBrowser.mCurrentTab._tPos;
if( n == 0 ){
return
}
var tabs = gBrowser.mTabContainer.childNodes;
gBrowser.moveTabTo(gBrowser.mCurrentTab, n-1);
gBrowser.selectedTab = gBrowser.mTabs[n-1];
},{
rhs: 'hidariidou'
}
);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment