Skip to content

Instantly share code, notes, and snippets.

@fernandotakai
Created April 30, 2014 15:22
Show Gist options
  • Select an option

  • Save fernandotakai/11430057 to your computer and use it in GitHub Desktop.

Select an option

Save fernandotakai/11430057 to your computer and use it in GitHub Desktop.
" it seems i need this so pentadactyl stops hanging
set! toolkit.storage.synchronous=0
" let me use some shortcuts ffs
set passkeys+=digg.com:jks|<CR>
" disable some dumb defaults
nmap d <Nop>
nmap a <Nop>
nmap w <Nop>
" Disable some regular-Firefox old habits
nmap <M-F12> <Nop>
nmap <M-t> <Nop>
nmap <M-e> <Nop>
nmap <M-b> <Nop>
nmap <M-S-h> <Nop>
nmap <M-k> <Nop>
nmap <M-f> <Nop>
nmap <M-g> <Nop>
nmap <M-l> <Nop>
" some maps that are cool
nmap <Leader>u :emenu Tools.Web Developer.Page Source<CR>
nmap <Leader>w :emenu Tools.Web Developer.Web Console<cr>
nmap <Leader>d :tabclose<cr>
nmap <Leader>e :open
nmap <Leader>c ;c
" now we can change tabs the nice way
nmap <Leader>1 :b 1<CR>
nmap <Leader>2 :b 2<CR>
nmap <Leader>3 :b 3<CR>
nmap <Leader>4 :b 4<CR>
nmap <Leader>5 :b 5<CR>
nmap <Leader>6 :b 6<CR>
nmap <Leader>7 :b 7<CR>
nmap <Leader>8 :b 8<CR>
nmap <Leader>9 :b 9<CR>
nmap <Leader>0 :tablast<CR>
" easier to open url
nmap <Leader>g ivy<esc><esc>\P<cr>
" easier to copy things. just select with the mouse and voila.
nmap <Leader>Y ivy<esc><esc><cr>
nmap <Leader>n :tabdetach<CR>
command popupWindow -js <<EOF
var location = "";
var url = buffer.uri.spec;
if(url.indexOf("watch?") != -1){
location = buffer.uri.spec.replace("watch", "watch_popup");
} else if (url.indexOf("twitch.tv") != -1){
location = url + "/popout"
}
if(location != ""){
dactyl.execute("tabdetach");
dactyl.open(location);
}
EOF
command gfycatIt -js <<EOF
var url = buffer.uri.spec;
if (url.indexOf(".gif") != -1){
dactyl.open("http://gfycat.com/fetch/" + url);
}
EOF
command couchpotato -js <<EOF
(function(d){var e=d.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://localhost:5050/api/453e71fb564d42ddb7caf6a250518410/userscript.bookmark/?host=http://localhost:5050/api/453e71fb564d42ddb7caf6a250518410/userscript.get/emESuO8K/&r='+Math.random()*99999999);d.body.appendChild(e)})(content.document);
EOF
nmap -builtin <leader>P :popupWindow<CR>
nmap -builtin <leader>C :couchpotato<CR>
nmap -builtin <leader>G :gfycatIt<CR>
" dont mess with gdocs motherfather
autocmd LocationChange docs.google.com :normal! <C-z>
autocmd LocationChange drive.google.com :normal! <C-z>
" vim: ft=pentadactyl:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment