-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot.tridactylrc
135 lines (115 loc) · 4.85 KB
/
dot.tridactylrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
" -*- vimrc-generic -*-
"
" Base on
" https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrc
" See that for more advanced examples.
" Installing Tridactyl:
"
" * Put this config in ~/.tridactylrc (or $XDG_CONFIG_DIR/tridactyl/tridactylrc).
"
" * Install the native messenger by running :installnative in Tridactyl
" and then running the shell command it copies to clipboard.
"
" * Run :source in the browser or just restart.
" NB: If you want "vim-like" behaviour where removing a line from
" here makes the setting disappear, uncomment the line below.
"
"sanitise tridactyllocal tridactylsync
" WARNING: THERE IS A BUG WHEREBY SOMETIMES SOME LINES IN THE CONFIG GET IGNORED :/
" https://github.com/tridactyl/tridactyl/issues/1409
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" Search Urls
"
" These work in the 'o' -> ':open ' dialog, but not in the regular
" address bar.
"
" In addition to using %s for a single query param, you can use %1,
" %2, etc, for multiple query params.
set searchurls.hackage http://hackage.haskell.org/package/%s
set searchurls.hayoo http://hayoo.fh-wedel.de/?query=%s
set searchurls.h4 https://www.haskell.org/hoogle/?hoogle=%s
set searchurls.h5 https://hoogle.haskell.org/?hoogle=%s&scope=set%3Astackage
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" Quickmarks
"
" Use go<key>/gn<key>/gw<key> to open quickmark for <key> in
" current/new tab/new window
quickmark g https://mail.google.com/mail/u/0/#inbox
quickmark G https://mail.google.com/mail/u/1/#inbox
""""""""""""""""
"
" Disable on some sites
"
blacklistadd calendar.google.com
blacklistadd docs.google.com
blacklistadd drive.google.com
blacklistadd keep.google.com
blacklistadd mail.google.com
blacklistadd youtube.com
blacklistadd tomatoes2.herokuapp.com
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" Binds
"
" Some defaults:
" - :help
" - :tutor
" - b : buffers/tabs navigation
" - yy : yank url
" - gg : top of page
" - G : bottom of page
" - insert, shift+insert, ctrl+alt+`, shift+escape : toggle pass thru
" - d/D : close current tab and move focus right/left
" - p/P : open url in clipboard or search for clipboard content in current/new tab
" - zi/zo/zz : zoom in/out/reset
" - \[\[ / \]\] : guess previous/next page (seems smart, e.g. works when
" url does not end in a number, but "next" occurs in link text)
" - ;; : focus an element. Useful if you want to scroll something non-default with up/down or j/k
" - ;p : copy element (e.g. link, paragraph) to clipboard
" - ;k : kill element (e.g. a big "please disable your ad blocker" banner)
" - :viewconfig nmaps : see all key bindings (but how to delete?)
" - f/;t/F: follow hint in current tab/new foreground tab (switch focus)/new background tab (don't switch focus)
" - C-o : run a single command (in normal mode) when in ignore mode, then switch back to ignore mode
" Make 'd' switch to previous active tab after close
bind d composite tabclose | buffer #
" Don't bind paste to ignore mode. Can use 'S-Esc' or 'C-A-Esc' instead.
unbind <S-Insert>
" Bind <Insert> to toggle normal/ignore mode. I use <Insert> to toggle
" Ctrl-lock in Emacs, so hopefully this will be memorable. We leave
" insert mode, but don't enter it. The insert mode bind doesn't work,
" but <C-,> still allows escape.
bind --mode=normal <Insert> mode ignore
bind --mode=ignore <Insert> mode normal
"bind --mode=insert <Insert> mode normal
" Bind <C-o> to toggle normal/ignore mode for one command. Already
" bound to C-o in normal mode, make it work everywhere. I'm rebinding
" the existing normal mode bind for completeness/clairity. We leave
" insert mode, but don't enter. The insert mode bind doesn't work, but
" <C-,> still allows escape.
bind --mode=normal <C-o> nmode normal 1 mode ignore
bind --mode=ignore <C-o> nmode ignore 1 mode normal
"bind --mode=insert <C-o> nmode insert 1 mode normal
" Workaround bug on web.whatsapp.com that prevents focus from leaving
" message entry
" box. https://github.com/tridactyl/tridactyl/issues/3070
bindurl web.whatsapp.com --mode=normal <Escape> composite hint -f m2 ; fillcmdline ; ex.hide_and_clear
bindurl web.whatsapp.com --mode=insert <Escape> composite hint -f m2 ; fillcmdline ; ex.hide_and_clear
bindurl web.whatsapp.com --mode=input <Escape> composite hint -f m2 ; fillcmdline ; ex.hide_and_clear
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" Misc settings
"
" Vimperator-style hinting, using numbers to select and letters to
" narrow, instead of just letters to select.
set hintfiltermode vimperator-reflow
set hintnames numeric
" Include numbers in tab names, to make 'b' and '<A-<number>>'
" switching easier.
guiset tabs numbers
" Make Tridactyl work on more sites at the expense of some security
" set csp clobber
fixamo_quiet
" This will have to do until someone writes us a nice syntax file :)
" vim: set filetype=vim: