-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimperatorrc
51 lines (46 loc) · 1.9 KB
/
.vimperatorrc
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
noremap <c-s-a> :set toolbars=invnavigation<cr>
noremap <c-s-b> :set toolbars=invbookmarks<cr>
noremap <c-s-t> :set toolbars=invtabs<cr>
noremap <c-s-l> :js toggle_bottombar()<cr>
noremap <c-s-s> :set toolbars=navigation,bookmarks,tabs<cr>:js toggle_bottombar('on')<cr>
noremap <c-s-h> :set toolbars=nonavigation,nobookmarks,notabs<cr>:js toggle_bottombar('off')<cr>
set hintchars=jklfdsweiogh
set scrollbars=false
" javascript to hide statusbar
noremap : :js toggle_bottombar('on')<CR>:
noremap o :js toggle_bottombar('on')<CR>o
noremap O :js toggle_bottombar('on')<CR>O
noremap t :js toggle_bottombar('on')<CR>t
noremap b :js toggle_bottombar('on')<CR>b
noremap w :js toggle_bottombar('on')<CR>w
noremap T :js toggle_bottombar('on')<CR>t
noremap / :js toggle_bottombar('on')<CR>/
cnoremap <CR> <CR>:js toggle_bottombar('off')<CR>
cnoremap <Esc> <Esc>:js toggle_bottombar('off')<CR>
cnoremap fd <Esc>
" Add an extended hint mode to open an image in smplayer. Could potentially use youtube-dl to obtain url of videos here also
javascript <<EOS
hints.addMode("P", "Open with smplayer:", (elem, loc) => liberator.execute("silent !smplayer " + elem.src + " &", null, true), () => "//*[@src]");
" TODO: trying to copy a link into an empty line in a new urxvt session
hints.addMode("U", "Copy to new urxvt session:", (elem, loc) => liberator.execute("silent !urxvt -e zsh -c 'rlwrap -a -P \'" + loc + "\' zsh -s' &", null, true));
EOS
:js << EOF
function toggle_bottombar(p) {
var bb = document.getElementById('liberator-bottombar');
if (!bb)
return;
if (p == 'on'){
bb.style.height = '';
bb.style.overflow = '';
return;
}
if (p == 'off'){
bb.style.height = '0px';
bb.style.overflow = 'hidden';
return;
}
bb.style.height = (bb.style.height == '') ? '0px' : '';
bb.style.overflow = (bb.style.height == '') ? '' : 'hidden';
}
EOF
js toggle_bottombar('off');