Mercurial > dotfiles
comparison pentadactyl/pentadactylrc @ 297:9056a39ef016
Move `pentadactylrc` to a subfolder, update install scripts.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 21 Apr 2015 16:30:18 -0700 |
parents | |
children | 60222ba031b9 |
comparison
equal
deleted
inserted
replaced
296:875857ed8004 | 297:9056a39ef016 |
---|---|
1 " Config for Pentadactyl | |
2 | |
3 " Scroll faster | |
4 nmap -builtin h 3h | |
5 nmap -builtin j 3j | |
6 nmap -builtin k 3k | |
7 nmap -builtin l 3l | |
8 | |
9 " Scroll easier | |
10 nmap -builtin d <C-d> | |
11 nmap -builtin e <C-u> | |
12 | |
13 " Close tab with `x` since `d` is for scrolling down now | |
14 nmap -builtin x :bd<cr> | |
15 | |
16 " Don't close the window with the last tab. | |
17 set! browser.tabs.closeWindowWithLastTab=false | |
18 | |
19 " Change tabs without awkward `CTRL` combinations | |
20 nmap -builtin J :tabprevious<cr> | |
21 nmap -builtin K :tabnext<cr> | |
22 | |
23 " Reorder tabs | |
24 nmap -builtin > :tabmove! +1<cr> | |
25 nmap -builtin < :tabmove! -1<cr> | |
26 | |
27 "New tab using the old classic way | |
28 nmap -builtin <C-t> :tabnew<cr> | |
29 | |
30 " Use `i` to get into pass-through mode, | |
31 " `I` for temporary pass-through mode, | |
32 " and `c` for the 'caret' mode. | |
33 nmap -builtin i <C-z> | |
34 nmap -builtin I <C-v> | |
35 nmap -builtin c i | |
36 | |
37 " Shortcuts for common extensions | |
38 nmap -builtin ,f i<D-\> | |
39 nmap -builtin ,p <S-Esc><A-D-\> | |
40 nmap -builtin ,b I<A-b> | |
41 | |
42 " Use and quickly hide search highlighting | |
43 set hlfind | |
44 nmap -builtin ,<Space> :noh<cr> | |
45 | |
46 " Aw come on, copy/pasting is ridiculous by default. | |
47 map -builtin -modes=i,c,v <C-c> <C-v><C-c> | |
48 map -builtin -modes=i,c <C-x> <C-v><C-x> | |
49 map -builtin -modes=i,c <C-v> <C-v><C-v> | |
50 | |
51 " Quickly open some dialogs | |
52 nmap -builtin ,b :downloads<cr> | |
53 | |
54 " On keyboards like the Leopold FC660C, for some obscure reason, the | |
55 " <Insert> key sends the <Help> ID. WTF. | |
56 noremap <Help> <Insert> | |
57 | |
58 " DDG FTW | |
59 set defsearch=duckduckgo | |
60 | |
61 " Super minimal UI | |
62 "set toolbars=noaddons,nobookmarks,nomenu,nonavigation,notabs | |
63 | |
64 " Websites with useful keyboard shortcuts already | |
65 set passkeys+=fastmail.com:jkomxeyga#.rupn,/,<S-g>m,<S-g>c,<S-g>a | |
66 set passkeys+=feedly.com:jkgvnpm | |
67 set passkeys+=feedbin.com:hjklesmvVFcf123456789rgAa?<Space><Esc>,/ | |
68 set passkeys+=groups.google.com:jkuonp | |
69 | |
70 " Plugins | |
71 loadplugins '\.(js|penta)$' | |
72 set pintaboardToken="ludovicchabant:04A05605C553E70CDA2A" | |
73 | |
74 javascript <<EOF | |
75 function saveToPocket(){var%20e=function(t,n,r,i,s){var%20o=[5581053,5370545,3939863,5030563,6022735,2412811,4059305,6072550,4240340,2597059];var%20i=i||0,u=0,n=n||[],r=r||0,s=s||0;var%20a={'a':97,'b':98,'c':99,'d':100,'e':101,'f':102,'g':103,'h':104,'i':105,'j':106,'k':107,'l':108,'m':109,'n':110,'o':111,'p':112,'q':113,'r':114,'s':115,'t':116,'u':117,'v':118,'w':119,'x':120,'y':121,'z':122,'A':65,'B':66,'C':67,'D':68,'E':69,'F':70,'G':71,'H':72,'I':73,'J':74,'K':75,'L':76,'M':77,'N':78,'O':79,'P':80,'Q':81,'R':82,'S':83,'T':84,'U':85,'V':86,'W':87,'X':88,'Y':89,'Z':90,'0':48,'1':49,'2':50,'3':51,'4':52,'5':53,'6':54,'7':55,'8':56,'9':57,'\/':47,':':58,'?':63,'=':61,'-':45,'_':95,'&':38,'$':36,'!':33,'.':46};if(!s||s==0){t=o[0]+t}for(var%20f=0;f<t.length;f++){var%20l=function(e,t){return%20a[e[t]]?a[e[t]]:e.charCodeAt(t)}(t,f);if(!l*1)l=3;var%20c=l*(o[i]+l*o[u%o.length]);n[r]=(n[r]?n[r]+c:c)+s+u;var%20p=c%(50*1);if(n[p]){var%20d=n[r];n[r]=n[p];n[p]=d}u+=c;r=r==50?0:r+1;i=i==o.length-1?0:i+1}if(s==318){var%20v='';for(var%20f=0;f<n.length;f++){v+=String.fromCharCode(n[f]%(25*1)+97)}o=function(){};return%20v+'2018d4349a'}else{return%20e(u+'',n,r,i,s+1)}};var%20t=document,n=t.location.href,r=t.title;var%20i=e(n);var%20s=t.createElement('script');s.type='text/javascript';s.src='https://getpocket.com/b/r4.js?h='+i+'&u='+encodeURIComponent(n)+'&t='+encodeURIComponent(r);e=i=function(){};var%20o=t.getElementsByTagName('head')[0]||t.documentElement;o.appendChild(s)} | |
76 EOF | |
77 command -js pocket saveToPocket() | |
78 | |
79 " Website-specific groups | |
80 " Feedbin | |
81 group! feedbin -loc feedbin.com | |
82 javascript <<EOF | |
83 function feedbinScrollUp() { | |
84 el = content.document.getElementsByClassName('entries'); | |
85 if (el != undefined && el.length > 0) { | |
86 el[0].scrollTop -= el[0].clientHeight/2; | |
87 } else { | |
88 content.console.error("Can't find the entries list. Got: ", el); | |
89 } | |
90 } | |
91 function feedbinScrollDown() { | |
92 el = content.document.getElementsByClassName('entries'); | |
93 if (el != undefined && el.length > 0) { | |
94 el[0].scrollTop += el[0].clientHeight/2; | |
95 } else { | |
96 content.console.error("Can't find the entries list. Got: ", el); | |
97 } | |
98 } | |
99 EOF | |
100 nmap -builtin -js <PageUp> feedbinScrollUp() | |
101 nmap -builtin -js <PageDown> feedbinScrollDown() | |
102 | |
103 " vim: ft=vim |