-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.vimperatorrc
More file actions
49 lines (40 loc) · 1.4 KB
/
.vimperatorrc
File metadata and controls
49 lines (40 loc) · 1.4 KB
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
autocmd LocationChange .* js modes.passAllKeys = /.*(mail\.google\.com|www\.google\.com\/reader|codeschool\.com).*/.test(buffer.URL)
autocmd LocationChange .* echo ""
" remove the right and bottom scrollbars
nnoremap K 30k
nnoremap J 30j
set noscrollbars
colorscheme zenburn
" Open current url as an argument to quvi
nmap <S-q> :js openwithquvi()<CR>
nmap <S-l> :js openwithytdl()<CR>
" Custom url hints
js <<EOF
hints.addMode("q", "Launch video (quvi) from hint", function(elem, loc)
io.system('quvi dump -b mute "'
+ loc.replace(/([$`"\\])/g, "\\$1") + '" &'));
hints.addMode("u", "Launch video (youtube-dl) from hint", function(elem, loc)
io.system('yt-dl "'
+ loc.replace(/([$`"\\])/g, "\\$1") + '" &'));
EOF
" Functions
:js <<EOF
function toggleStatusbar() {
var bb = document.getElementById('liberator-bottombar');
if (!bb)
return;
bb.style.height = (bb.style.height == '') ? '0px' : '';
bb.style.overflow = (bb.style.height == '') ? '' : 'hidden';
}
function openwithquvi() {
io.system('quvi dump -b mute "'
+ content.location.href.replace(/([$`"\\])/g, "\\$1") + '" &');
}
function openwithytdl() {
io.system('yt-dl "'
+ content.location.href.replace(/([$`"\\])/g, "\\$1") + '" &');
}
EOF
set! pdfjs.disabled=true
set! middlemouse.paste=false
set! middlemouse.contentLoadURL=false