-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathvimperatorrc
116 lines (100 loc) · 3.71 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
" clear all key mappings
" to avoid troubles from loading rc file several times
mapclear
cmapclear
imapclear
" clear user-defined commands
comclear
" default search/suggest engine: google
set defsearch=google
set suggestengines=google
set! browser.bookmarks.showRecentlyBookmarked=false
ignorekeys clear
ignorekeys add mail\\.google\\.com -except b,<C-n>,<C-p>,<C-j>,<C-k>,<Space>,<Leader>,:
ignorekeys add inbox.google.com -except b,<C-n>,<C-p>,<C-j>,<C-k>,<Space>,<Leader>,:
ignorekeys add docs.google.com -except <C-n>,<C-p>,<C-j>,<C-k>
ignorekeys add www.pathery.com -except b,<C-n>,<C-p>,<C-j>,<C-k>,<Space>,<Leader>,:
ignorekeys add beta.pathery.net -except b,<C-n>,<C-p>,<C-j>,<C-k>,<Space>,<Leader>,:
ignorekeys add blue.pathery.net -except b,<C-n>,<C-p>,<C-j>,<C-k>,<Space>,<Leader>,:
ignorekeys add localhost:3000 -except <C-n>,<C-p>,<C-j>,<C-k>,:
ignorekeys add vimflowy.bitballoon.com -except <C-n>,<C-p>,<C-j>,<C-k>,:
ignorekeys add youtube.com -except b,<C-n>,<C-p>,<C-j>,<C-k>,<Space>,<Leader>,:
ignorekeys add workflowy.com -except <C-n>,<C-p>,<C-j>,<C-k>
" don't focus any "input" elements automatically when open pages.
" sadly, this messes with new tab
" set focuscontent
"javascript to hide statusbar
" http://stackoverflow.com/questions/21053262/vimperator-autohide-statusline
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 b :js toggle_bottombar('on')<CR>b
noremap f :js toggle_bottombar('on')<CR>f
noremap F :js toggle_bottombar('on')<CR>F
noremap / :js toggle_bottombar('on')<CR>/
cnoremap <CR> <CR>:js toggle_bottombar('off')<CR>
cnoremap <Esc> <Esc>:js toggle_bottombar('off')<CR>
nnoremap <Esc> <Esc>:js toggle_bottombar('off')<CR>
js << EOF
function toggle_bottombar(p) {
var bb = document.getElementById('liberator-bottombar');
if (!bb) { return; }
if (!p) { p = (bb.style.height == '') ? 'off' : 'on'; }
if (p == 'on'){
bb.style.height = '';
bb.style.overflow = '';
} else if (p == 'off') {
bb.style.height = '0px';
bb.style.overflow = 'hidden';
}
}
toggle_bottombar();
EOF
map , <Leader>
" map <Space> <Leader>
" NOTE: this doesnt work
" https://github.com/vimperator/vimperator-labs/issues/10
" has an inline javascript solution, but it causes problems with other remappings (e.g. statusbar toggle)
" tab operation {{{2
nnoremap <C-b> b
" nnoremap <C-h> gT
" nnoremap <C-l> gt
nnoremap <Leader>bp gT
nnoremap <Leader>bn gt
nnoremap <Leader>bl :b#<CR>
nnoremap <C-j> gt
nnoremap <C-k> gT
" reorder tabs
noremap <C-p> :tabmove! -1<CR>
noremap <C-n> :tabmove! +1<CR>
" new tab
nnoremap g o
nnoremap G t
" jump to previous tab
nnoremap <C-l> <C-6>
" not working
" nnoremap <A-q> <C-6>
nnoremap <Leader>fed :source ~/.vimperatorrc<cr>
" TODO cant... :echo "Configuration reloaded."<cr>
command! dev -description "Toggle developer tools" :emenu Tools.Web Developer.Web Console
nnoremap <Leader>gd :dev<CR>
" doesn't work, problems with space remapping: http://superuser.com/questions/704015/hide-status-line-bottom-bar-in-vimperator
nnoremap ui :set gui!=addons,menu,navigation<CR>
nnoremap <Leader>ta :set gui=invaddons,invmenu,invnavigation<CR>
" set gui=nobookmarks,noaddons,nomenu,nonavigation,tabs
" nnoremap ; :
" nnoremap : ;
" Scroll faster.
" nnoremap j 10j
" nnoremap k 10k
let g:smoozy_scroll_impulse="1500"
let g:smoozy_scroll_interval="10"
source ~/.vimperator/plugin/smoozy.js
set editor='bash -lc "mvim -f \$*" mvim '
" TODO:
" - Calling up Vim itself with C-i in a textarea?
" set editor=/usr/local/bin/vim
" - USEFUL TO LOOK AT: https://github.com/januswel/dotfiles/blob/master/.vimperatorrc