view pentadactylrc @ 280:6eb4ceca4d99

Ignore pyc files.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 27 Jan 2015 15:31:38 -0800
parents 6c1ae937ad66
children
line wrap: on
line source

" Config for Pentadactyl

" Scroll faster
nmap -builtin h 3h
nmap -builtin j 3j
nmap -builtin k 3k
nmap -builtin l 3l

" Scroll easier
nmap -builtin d <C-d>
nmap -builtin e <C-u>

" Close tab with `x` since `d` is for scrolling down now
nmap -builtin x :bd<cr>

" Don't close the window with the last tab.
set! browser.tabs.closeWindowWithLastTab=false

" Change tabs without awkward `CTRL` combinations
nmap -builtin J :tabprevious<cr>
nmap -builtin K :tabnext<cr>

" Reorder tabs
nmap -builtin > :tabmove! +1<cr>
nmap -builtin < :tabmove! -1<cr>

"New tab using the old classic way
nmap -builtin <C-t> :tabnew<cr>

" Use `i` to get into pass-through mode,
" `I` for temporary pass-through mode,
" and `c` for the 'caret' mode.
nmap -builtin i <C-z>
nmap -builtin I <C-v>
nmap -builtin c i

" Shortcuts for common extensions
nmap -builtin ,f i<D-\>
nmap -builtin ,p <S-Esc><A-D-\>
nmap -builtin ,b I<A-b>

" Use and quickly hide search highlighting
set hlfind
nmap -builtin ,<Space> :noh<cr>

" Aw come on, copy/pasting is ridiculous by default.
map -builtin -modes=i,c,v <C-c> <C-v><C-c>
map -builtin -modes=i,c   <C-x> <C-v><C-x>
map -builtin -modes=i,c   <C-v> <C-v><C-v>

" Quickly open some dialogs
nmap -builtin ,b :downloads<cr>

" On keyboards like the Leopold FC660C, for some obscure reason, the
" <Insert> key sends the <Help> ID. WTF.
noremap <Help> <Insert>

" DDG FTW
set defsearch=duckduckgo

" Super minimal UI
"set toolbars=noaddons,nobookmarks,nomenu,nonavigation,notabs

" Websites with useful keyboard shortcuts already
set passkeys+=fastmail.com:jkomxeyga#.rupn,/,<S-g>m,<S-g>c,<S-g>a
set passkeys+=feedly.com:jkgvnpm
set passkeys+=feedbin.com:hjklesmvVFcf123456789rgAa?<Space><Esc>,/
set passkeys+=groups.google.com:jkuonp

" Website-specific groups
" Feedbin
group! feedbin -loc feedbin.com
javascript <<EOF
function feedbinScrollUp() {
    el = content.document.getElementsByClassName('entries');
    if (el != undefined && el.length > 0) {
        el[0].scrollTop -= el[0].clientHeight/2;
    } else {
        content.console.error("Can't find the entries list. Got: ", el);
    }
}
function feedbinScrollDown() {
    el = content.document.getElementsByClassName('entries');
    if (el != undefined && el.length > 0) {
        el[0].scrollTop += el[0].clientHeight/2;
    } else {
        content.console.error("Can't find the entries list. Got: ", el);
    }
}
EOF
nmap -builtin -js <PageUp> feedbinScrollUp()
nmap -builtin -js <PageDown> feedbinScrollDown()

" vim: ft=vim