-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimperatorrc
68 lines (62 loc) · 1.97 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
65
66
67
68
set gui=none
set history=5000
set smartcase
# open suggests from
# - search engines and keywords
# - bookmarks
# - tabs
# - local files
set complete=sbtf
colorscheme solarized
" ,navigation,tabs
" remove menu and tabs
autocmd LocationChange .* set toolbars=nomenu
autocmd LocationChange .* set gui=tabs
" unless certain sites where vimperator needs to be disabled
" Pass through all keys (like CTRL-Z) for DESY Mail
autocmd LocationChange .* :js modes.passAllKeys = /mail\.desy\.de|\.google\..*|.*\.de\/record\/edit.*/.test(buffer.URL)
" autohide menue for each new page, gets back with F10
noremap <F10> set toolbars=menu
"javascript to (auto)hide statusbar
" http://stackoverflow.com/questions/21053262/vimperator-autohide-statusline
noremap <silent> <F8> :js toggle_bottombar()<CR>
noremap : :js toggle_bottombar('on')<CR>:
noremap ; :js toggle_bottombar('on')<CR>;
noremap f :js toggle_bottombar('on')<CR>f
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>/
noremap <F4> :buffer!
noremap <BS> :ba<CR>
"" cnoremap <CR> <CR>:js toggle_bottombar('off')<CR>
"" cnoremap <Esc> <Esc>:js toggle_bottombar('off')<CR>
: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
" Load local changes to the above to adopt to user specific local
" needs
if filereadable(expand("$HOME/.vimrc.local"))
source $HOME/.vimperatorrc.local
endif
" Synchronize selection with unite
cmap <UP> <S-Tab>
cmap <DOWN> <Tab>