annotate vimperatorrc @ 174:7b34721d0d3d

Fix UI problems in Firefox 29+.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 07 Jun 2014 18:14:56 -0700
parents a6ef05d484a4
children 095fb39b2096
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
133
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 " Config for Vimperator
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2
138
337a1bfbd50a Addon shortcuts for Vimperator.
Ludovic Chabant <ludovic@chabant.com>
parents: 137
diff changeset
3 let mapleader=","
337a1bfbd50a Addon shortcuts for Vimperator.
Ludovic Chabant <ludovic@chabant.com>
parents: 137
diff changeset
4
133
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5 " Scroll faster
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 nnoremap h 3h
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 nnoremap j 3j
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8 nnoremap k 3k
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9 nnoremap l 3l
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11 " Scroll easier
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
12 nnoremap d <C-d>
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13 nnoremap e <C-u>
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15 " Close tab with `x` since `d` is for scrolling down now
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 nnoremap x :bd<cr>
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18 " Change tabs without awkward `CTRL` combinations
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19 nnoremap J :tabprevious<cr>
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20 nnoremap K :tabnext<cr>
a9b32a49d0bd Added Vimperator config file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21
150
71ff712a6951 Move tabs
Ludovic Chabant <ludovic@chabant.com>
parents: 143
diff changeset
22 " Reorder tabs
71ff712a6951 Move tabs
Ludovic Chabant <ludovic@chabant.com>
parents: 143
diff changeset
23 nnoremap > :tabmove +1<cr>
71ff712a6951 Move tabs
Ludovic Chabant <ludovic@chabant.com>
parents: 143
diff changeset
24 nnoremap < :tabmove -1<cr>
71ff712a6951 Move tabs
Ludovic Chabant <ludovic@chabant.com>
parents: 143
diff changeset
25
137
c638bec5b663 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 136
diff changeset
26 "New tab using the old classic way
c638bec5b663 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 136
diff changeset
27 nnoremap <C-t> :tabnew<cr>
c638bec5b663 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 136
diff changeset
28
136
d38a489db202 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 133
diff changeset
29 " Use `i` to get into a persistent insert mode,
d38a489db202 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 133
diff changeset
30 " and `I` for the quick one.
d38a489db202 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 133
diff changeset
31 nnoremap i <S-Esc>
d38a489db202 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 133
diff changeset
32 nnoremap I i
d38a489db202 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 133
diff changeset
33
138
337a1bfbd50a Addon shortcuts for Vimperator.
Ludovic Chabant <ludovic@chabant.com>
parents: 137
diff changeset
34 " Shortcuts for common extensions
337a1bfbd50a Addon shortcuts for Vimperator.
Ludovic Chabant <ludovic@chabant.com>
parents: 137
diff changeset
35 nnoremap <leader>f i<D-\>
337a1bfbd50a Addon shortcuts for Vimperator.
Ludovic Chabant <ludovic@chabant.com>
parents: 137
diff changeset
36 nnoremap <leader>p <S-Esc><A-D-\>
337a1bfbd50a Addon shortcuts for Vimperator.
Ludovic Chabant <ludovic@chabant.com>
parents: 137
diff changeset
37 nnoremap <leader>b I<A-b>
337a1bfbd50a Addon shortcuts for Vimperator.
Ludovic Chabant <ludovic@chabant.com>
parents: 137
diff changeset
38
143
d94d6766fc9e More keyboard shortcuts.
Ludovic Chabant <ludovic@chabant.com>
parents: 138
diff changeset
39 " Quickly hide search highlighting
d94d6766fc9e More keyboard shortcuts.
Ludovic Chabant <ludovic@chabant.com>
parents: 138
diff changeset
40 nnoremap <leader><Space> :noh<cr>
d94d6766fc9e More keyboard shortcuts.
Ludovic Chabant <ludovic@chabant.com>
parents: 138
diff changeset
41
158
fad6de4a0252 More keyboard shortcuts.
Ludovic Chabant <ludovic@chabant.com>
parents: 150
diff changeset
42 " Quickly open some dialogs
fad6de4a0252 More keyboard shortcuts.
Ludovic Chabant <ludovic@chabant.com>
parents: 150
diff changeset
43 nnoremap <leader>b :downloads<cr>
fad6de4a0252 More keyboard shortcuts.
Ludovic Chabant <ludovic@chabant.com>
parents: 150
diff changeset
44
137
c638bec5b663 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 136
diff changeset
45 " Super minimal UI
174
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
46 "set toolbars=noaddons,nobookmarks,nomenu,nonavigation,notabs
137
c638bec5b663 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 136
diff changeset
47
152
08c501149115 Ignore keys for nice websites.
Ludovic Chabant <ludovic@chabant.com>
parents: 150
diff changeset
48 " Websites with useful keyboard shortcuts already
08c501149115 Ignore keys for nice websites.
Ludovic Chabant <ludovic@chabant.com>
parents: 150
diff changeset
49 ignorekeys add -except=:,J,K,b fastmail.fm
08c501149115 Ignore keys for nice websites.
Ludovic Chabant <ludovic@chabant.com>
parents: 150
diff changeset
50 ignorekeys add -except=:,J,K,b feedly.com
154
1edd50e592fd Updated sub-repos.
Ludovic Chabant <ludovic@chabant.com>
parents: 152
diff changeset
51 ignorekeys add -except=:,J,K,b mnmlrdr.com
152
08c501149115 Ignore keys for nice websites.
Ludovic Chabant <ludovic@chabant.com>
parents: 150
diff changeset
52
174
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
53 " The new Firefox fucked up vimperator's ability to hide
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
54 " things. Let's do it ourselves for now.
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
55 map <silent> <F2> :js toggle_ui()<CR>
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
56
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
57 :js << EOF
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
58 function toggle_ui() {
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
59 var nb = document.getElementById('nav-bar');
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
60 nb.style.visibility = (nb.style.visibility == '') ? 'collapse' : '';
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
61 nb.style.overflow = (nb.style.height == '') ? '' : 'hidden';
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
62
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
63 var tb = document.getElementById('TabsToolbar');
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
64 tb.style.visibility = (tb.style.visibility == '') ? 'hidden' : '';
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
65 }
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
66 toggle_ui();
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
67 EOF
7b34721d0d3d Fix UI problems in Firefox 29+.
Ludovic Chabant <ludovic@chabant.com>
parents: 167
diff changeset
68
136
d38a489db202 Vimperator config changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 133
diff changeset
69 " vim: ft=vim