This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Undo-close-tab-in-background function for Vimperator | |
command! undob -description "Undo closed tab in background" :js undob(); | |
:js <<EOF | |
undob = function() { | |
var currT = gBrowser.selectedTab; | |
var altT = liberator.modules.tabs.alternate; | |
var ssService = Components.interfaces.nsISessionStore; | |
var ssClass = Components.classes['@mozilla.org/browser/sessionstore;1'] | |
var ss = ssClass.getService(ssService); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vimperator ex file: add to .vimperatorrc or source with :source command | |
" Defines commands to go back/forward in a duplicated tab (equivalent to middle-clicking the navigation buttons) | |
" Example keybindings: gh and gl (replacing the builtin gh binding): | |
nnoremap gh :backt<CR> | |
nnoremap gl :forwardt<CR> | |
command! backt -description "Duplicate tab and go back in the browser history" :js backt(); | |
:js <<EOF | |
backt = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Pentadactyl ex file: add to .pentadactylrc or source with :source command | |
" Defines commands to go back/forward in a duplicated tab (equivalent to middle-clicking the navigation buttons) | |
" Example keybindings: gh and gl (replacing the builtin gh binding): | |
unmap gh | |
map -g user -ex gh :backt | |
map -g user -ex gl :forwardt | |
command! backt | |
\ -description "Duplicate tab and go back in the browser history" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/5834741/raw/grablinks.js?x="+(Math.random());})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/6109434/raw/Bullseye.js?x="+(Math.random());})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
js <<EOF | |
closeAllToRight = function () { | |
var current = tabs.getTab(); | |
var currentIx = tabs.index(current); | |
var nexttab = current.nextElementSibling; | |
var N = tabs.count; | |
var numToClose = N - (currentIx + 1); | |
tabs.remove(nexttab, numToClose); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kbd+ (keyrep &optional need-vector) | |
(if (vectorp keyrep) keyrep (edmacro-parse-keys keyrep need-vector))) | |
(defun gmap (keyrep defstr) | |
"Vim-style global keybinding. Uses the `global-set-key' binding function." | |
(global-set-key (kbd+ keyrep) (edmacro-parse-keys defstr t))) | |
(defun fmap (keybind-fn keyrep defstr) | |
"Vim-style keybinding using the key binding function KEYBIND-FN." | |
(call keybind-fn (kbd+ keyrep) (edmacro-parse-keys defstr t))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Code taken from Emacs 25 source. GPL3. | |
;; http://repo.or.cz/emacs.git | |
(global-set-key (kbd "C-h o") 'describe-symbol) | |
;;;###autoload | |
(defun describe-symbol (symbol &optional buffer frame) | |
"Display the full documentation of SYMBOL. | |
Will show the info of SYMBOL as a function, variable, and/or face." | |
(interactive |
OlderNewer