-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tridactylrc
executable file
·54 lines (45 loc) · 3.61 KB
/
.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
" This will have to do until someone writes us a nice syntax file :)
" vim: filetype=tridactyl
" *********************************
" *********** Settings ************
" *********************************
set theme dark
set hintchars 0123456789
set hintfiltermode vimperator-reflow
set hintnames numeric
" *********************************
" *********** Bindings ************
" *********************************
" Make yy use canonical / short links on the 5 websites that support them
bind yy clipboard yankshort
bind ,t tabdetach
" Delete tabs
bind <A-d> composite tabclosealltoleft | tabclosealltoright
bind <A-∂> composite tabclosealltoleft | tabclosealltoright " For OSX
bind <C-d> tabclosealltoright
bind ,d composite tabclosealltoleft | tabclosealltoright
" *********************************
" ********* Page-Specific *********
" *********************************
" Reddit
bindurl reddit.com gu urlparent 3 " Make gu take you back to subreddit from comments
unbindurl ^https://(www\.)?reddit\.com <esc> " Esc out of posts
unbindurl ^https://(www\.)?reddit\.com j " Leave j as reddit 'down'
unbindurl ^https://(www\.)?reddit\.com k " Leave k as reddit 'up'
unbindurl ^https://(www\.)?reddit\.com n " Leave n as reddit 'next post'
unbindurl ^https://(www\.)?reddit\.com p " Leave n as reddit 'prev post'
" If browsing a comment, only hint appropriate links
bindurl ^https://(www\.)?reddit\.com.*comments f hint -Jc [data-test-id=post-content] a,.Comment a
bindurl ^https://(www\.)?reddit\.com.*comments F hint -Jbc [data-test-id=post-content] a,.Comment a
bindurl ^https://(www\.)?reddit\.com.*comments ;i hint -ic [data-test-id=post-content] img
bindurl ^https://(www\.)?reddit\.com.*comments ;I hint -Ic [data-test-id=post-content] img
" Auto-focus on right div
autocmd DocLoad reddit.com hint -; -c '#SHORTCUT_FOCUSABLE_DIV'
" Only hint search results on Google and DDG
bindurl www.google.com f hint -Jc #rso .g a
bindurl www.google.com F hint -Jbc #rso .g a
" Highlight right content on DDG
bindurl ^https://duckduckgo.com f hint -Jc [data-nrn=result]
bindurl ^https://duckduckgo.com F hint -Jbc [data-nrn=result]
bindurl ^https://github.com/search f hint -Jc .search-title a
set searchurls { "google": "https://www.google.com/search?q=", "scholar": "https://scholar.google.com/scholar?q=", "arch": "https://wiki.archlinux.org/index.php?search=", "gh": "https://github.com/search?type=repositories&q=", "bing": "https://www.bing.com/search?q=", "duckduckgo": "https://duckduckgo.com/?q=", "youtube": "https://www.youtube.com/results?search_query=", "amazon": "https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=", "amazonuk": "https://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=", "cnrtl": "http://www.cnrtl.fr/lexicographie/", "gentoo_wiki": "https://wiki.gentoo.org/index.php?title=Special%3ASearch&profile=default&fulltext=Search&search=", "github": "https://github.com/search?utf8=?&q=", "googlelucky": "https://www.google.com/search?btnI=I'm+Feeling+Lucky&q=", "googleuk": "https://www.google.co.uk/search?q=", "mdn": "https://developer.mozilla.org/en-US/search?q=", "netsuite": "https://5547939.app.netsuite.com/app/common/search/ubersearchresults.nl?quicksearch=T&searchtype=Uber&frame=be&Uber_NAMEtype=KEYWORDSTARTSWITH&Uber_NAME=", "osm": "https://www.openstreetmap.org/search?query=", "qwant": "https://www.qwant.com/?q=", "searx": "https://searx.me/?category_general=on&q=", "startpage": "https://startpage.com/do/search?language=english&cat=web&query=", "twitter": "https://twitter.com/search?q=", "wikipedia": "https://en.wikipedia.org/wiki/Special:Search/", "yahoo": "https://search.yahoo.com/search?p=" }