-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimperatorrc
64 lines (56 loc) · 1.72 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
52
53
54
55
56
57
58
59
60
61
62
63
64
map <silent> <C-F8> :js toggle_bottombar()<CR>
"javascript to hide statusbar
"noremap <silent> <F8> :js toggle_bottombar()<CR>
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 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>
noremap gg <Home>
noremap gG <End>
noremap D u<CR>
set! javascript.options.jit.chrome=true
: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';
}
toggle_bottombar();
EOF
"JP next/previous binds
set nextpattern=\bnext\b,\bmore\b,next,^次(の)?ページ,\b次.*,→\b,^>$,^(>>|≫)$,^(>|≫),(>|≫)$
set previouspattern=\bprev|previous\b,prev,^前(の)?ページ,\b前.*,\b←,^<$,^(<<|≪)$,^(<|≪),(<|≪)$
":js << EOF
"function toggle_bottombar() {
" var bb = document.getElementById('liberator-bottombar');
" if (!bb)
" return;
" bb.style.height = (bb.style.height == '') ? '0px' : '';
" bb.style.overflow = (bb.style.height == '') ? '' : 'hidden';
"}
"EOF
nnoremap J :tabprevious<CR>
nnoremap K :tabnext<CR>
nnoremap j 9j
nnoremap k 9k
nnoremap h 3h
nnoremap l 3l
nnoremap d :tabclose<CR>
nnoremap w :tabdetach<CR>
colorscheme indigo