2021-04-05 15:22:53 +02:00
|
|
|
" Shamelessly taken from bovine3dom's example configuration file from the docs
|
|
|
|
|
|
|
|
" Basics {{{
|
|
|
|
" Use dark color scheme
|
|
|
|
colorscheme dark
|
|
|
|
|
|
|
|
" Make tridactyl open Vim in my prefered terminal
|
2023-02-12 18:33:45 +01:00
|
|
|
set editorcmd @editorcmd@
|
2023-02-19 15:10:14 +01:00
|
|
|
|
|
|
|
" Remove editor file after use
|
|
|
|
alias editor_rm composite editor | jsb -p tri.native.run(`rm -f '${JS_ARG[0]}'`)
|
|
|
|
bind --mode=insert <C-i> editor_rm
|
|
|
|
bind --mode=input <C-i> editor_rm
|
2021-04-05 15:22:53 +02:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Binds {{{
|
|
|
|
" Reddit et al. {{{
|
|
|
|
" Toggle comments on Reddit, Hacker News, Lobste.rs
|
2022-04-21 11:56:09 +02:00
|
|
|
bind ;c hint -Jc [class*="expand"],[class*="togg"],[class="comment_folder"]
|
2021-04-05 15:22:53 +02:00
|
|
|
|
|
|
|
" Make `gu` take me back to subreddit from comments
|
2021-05-13 10:19:10 +02:00
|
|
|
bindurl reddit.com gu urlparent 3
|
2021-04-05 15:22:53 +02:00
|
|
|
|
|
|
|
" Only hint search results on Google
|
2023-12-16 17:23:04 +01:00
|
|
|
bindurl www.google.com f hint -Jc #search a
|
|
|
|
bindurl www.google.com F hint -Jbc #search a
|
2021-04-05 15:22:53 +02:00
|
|
|
|
|
|
|
" Only hint search results on DuckDuckGo
|
2023-02-19 15:16:09 +01:00
|
|
|
bindurl ^https://duckduckgo.com f hint -Jc [data-testid="result-title-a"]
|
|
|
|
bindurl ^https://duckduckgo.com F hint -Jbc [data-testid="result-title-a"]
|
2021-04-05 15:22:53 +02:00
|
|
|
|
|
|
|
" Only hint item pages on Hacker News
|
|
|
|
bindurl news.ycombinator.com ;f hint -Jc .age > a
|
2021-05-13 10:19:10 +02:00
|
|
|
bindurl news.ycombinator.com ;F hint -Jtc .age > a
|
2021-04-05 15:22:53 +02:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Better bindings {{{
|
|
|
|
" Handy multiwindow binds
|
|
|
|
bind gd tabdetach
|
|
|
|
bind gD composite tabduplicate; tabdetach
|
|
|
|
|
2021-06-03 18:29:08 +02:00
|
|
|
" Duplicate a tab without detaching window
|
|
|
|
bind <Space>d tabduplicate
|
|
|
|
|
2021-04-05 15:22:53 +02:00
|
|
|
" Make yy use canonical links on the few websites that support them
|
|
|
|
bind yy clipboard yankcanon
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Search {{{
|
|
|
|
" Case insensitive only if fully lowercase
|
|
|
|
set findcase smart
|
|
|
|
|
|
|
|
" Search forward/backward
|
|
|
|
bind / fillcmdline find
|
|
|
|
bind ? fillcmdline find -?
|
|
|
|
|
|
|
|
" Go to next/previous match
|
|
|
|
bind n findnext 1
|
|
|
|
bind N findnext -1
|
|
|
|
|
|
|
|
" Because :nohls never works
|
|
|
|
bind <Space><Space> nohlsearch
|
|
|
|
|
|
|
|
" Use browser's native find when using Ctrl-F
|
|
|
|
unbind <C-f>
|
|
|
|
" }}}
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Redirections {{{
|
|
|
|
" Always redirect Reddit to the old site
|
2021-05-16 19:12:20 +02:00
|
|
|
autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
|
2021-04-05 15:22:53 +02:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Disabled websites {{{
|
|
|
|
blacklistadd netflix.com
|
2022-01-12 20:43:30 +01:00
|
|
|
blacklistadd primevideo.com
|
2021-04-05 15:22:53 +02:00
|
|
|
blacklistadd jellyfin.belanyi.fr
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" vim: set filetype=vim foldmethod=marker:
|