forked from make-github-pseudonymous-again/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimperatorrc
More file actions
52 lines (43 loc) · 1.77 KB
/
.vimperatorrc
File metadata and controls
52 lines (43 loc) · 1.77 KB
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
" Load configuration file into current browser, useful for updating after editing this file.
command! -description 'Source ~/.vimperatorrc' sourcerc :source ~/.vimperatorrc
" do not close with d on last tab
set! browser.tabs.closeWindowWithLastTab=false
" switch between two tabs
map x <c-^>
" restrict the set of hintchars to avoid confusion
set hintchars=abcdefghijkopqrstuvwxyz
" clean up the ui
set gui=nonavigation
set toolbars=noaddons,nobookmarks,nomenu,nonavigation,notabs
" Use sci-hub.org proxy
javascript <<EOF
function scihubify() {
// http://akameco.hatenablog.com/entry/2015/02/06/214913
var location = window.content.window.location ;
var url = location.origin +
".sci-hub.bz" +
location.pathname +
location.search +
location.hash ;
liberator.execute( ":open " + url ) ;
}
EOF
command! -description 'Reroute current page through sci-hub proxy' scihubify javascript scihubify()
" Make bar yellow when focused.
" From: http://www.reddit.com/r/linux/comments/99d55/i_could_use_a_little_vimperator_help_also/
javascript <<EOF
(function() {
var inputElement = document.getElementById('liberator-commandline-command');
function swapBGColor(event) {
inputElement.style.backgroundColor = event.type == "focus" ? "yellow" : "";
}
inputElement.addEventListener('focus', swapBGColor, false);
inputElement.addEventListener('blur', swapBGColor, false);
})();
EOF
" Fix for FF49
js services.services.autoCompleteSearch.class_="@mozilla.org/autocomplete/search;1?name=unifiedcomplete"
" short commands
command! -description 'Detach tab' td :tabdetach
command! -description 'Clear cache' cc :ClearCache
command! -description 'about:config' config :tabopen about:config