-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvimperatorrc
More file actions
144 lines (121 loc) · 6.71 KB
/
vimperatorrc
File metadata and controls
144 lines (121 loc) · 6.71 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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
set gui+=nomenu,nonavigation
map j <Down>
map k <Up>
map <A-x> :
map <C-g> <Esc>
map <C-f> <Esc>/
imap <C-n> <Esc>j
imap <C-p> <Esc>k
map <C-n> <Down>
map <C-p> <Up>
imap <C-g> <Esc>
cmap <C-g> <Esc>
map <C-s> /
imap <C-s> <Esc>/
imap <C-f> <Esc>/
imap <C-s> <Esc>/
imap <C-o> <Esc><C-o>
cmap <C-o> <Esc><C-o>
cmap <A-m> <Home><C-Right><Right>
map D <C-g>:js content.window.onbeforeunload = undefined<CR>:tabclose!<CR>
set editor=/usr/local/bin/emacsclient
set defsearch=ddg
imap <A-}> <Esc>gt
imap <A-{> <Esc>gT
cmap <A-}> <Esc>gt
cmap <A-{> <Esc>gT
map <A-}> gt
map <A-{> gT
" Colors!
" ==VimperatorColorSchema==
" name: indigo
" author: mashiro
" ==/VimperatorColorSchema==
" Highlights {{{1
hi Boolean color: orchid;
hi Function color: skyblue;
hi Null color: cornflowerblue;
hi Number color: cornflowerblue;
hi Object color: khaki;
hi String color: orchid;
hi Mapping color: orchid;
hi Key font-weight: bold;
hi Enabled color: #d0ffd0;
hi Disabled color: red;
hi Normal color: #d0d0d0; background: #1c1c1c; font-size: 12px;
hi ErrorMsg color: #ffffff; background: #440000; font-size: 12px;
hi InfoMsg color: #d0d0d0; background: #1c1c1c; font-size: 12px;
hi ModeMsg color: #d0d0d0; background: #1c1c1c; font-size: 12px;
hi MoreMsg color: #d0ffd0; background: #1c1c1c; font-size: 12px;
hi WarningMsg color: #ff0000; background: #1c1c1c; font-size: 12px;
hi Message white-space: normal; min-width: 100%; padding-left: 2em; text-indent: -2em; display: block; font-size: 12px;
hi NonText color: #a0a0d0; min-height: 16px; padding-left: 2px; font-size: 12px;
hi Preview color: #a0a0d0; font-size: 12px;
hi Prompt background: url("chrome://liberator/skin/prompt.png"); width: 10px; background-position: center; background-repeat: no-repeat;
hi PromptText color: #1c1c1c; background: #d0d0f0; font-size: 12px;
hi CmdOutput white-space: pre;
hi CmdLine font-size: 14px; background: black; color: #d0d0d0; -moz-transition: all 0.25s;
hi CmdLine>* font-family: monospace;
hi ContentSeparator border: none; display: -moz-box;
"hi CompGroup
hi CompGroup:not(:first-of-type) margin-top: 1ex;
hi CompTitle font-size: 12px; font-weight: bold; background: -moz-linear-gradient(19% 75% 90deg, #2c2c2f, #2a2a2f, #2f2f2f 100%);
hi CompTitle>* color: #a0a0d0; border-bottom: 1px solid #3c3c3f; padding: 1px 0.5ex; text-shadow: 1px 1px 0px #0c0c0c;
hi CompMsg font-style: italic; margin-left: 16px;
hi CompItem font-size: 12px;
hi CompItem[selected] color: #dddddd; background: #3c3c3f;
hi CompItem>* height: 18px; min-height: 18px; padding: 0 0.5ex;
hi CompIcon width: 16px; min-width: 16px; display: inline-block; margin-right: .5ex;
hi CompIcon>img max-width: 16px; max-height: 16px; vertical-align: middle;
hi CompResult width: 500px; max-width: 500px; overflow: hidden;
hi CompDesc width: 500px; max-width: 500px; color: #a0a0d0;
hi Indicator color: #a0a0d0;
hi Filter color: #7090d0;
hi Keyword color: khaki;
hi Tag color: #a0a0d0;
hi LineNr color: #ffd0d0; background: #1c1c1c;
hi Question color: #a0a0d0; background: #1c1c1c; font-weight: bold;
hi StatusLine color: #7090d0; background: transparent; font-weight: normal; font-size: 12px;
hi TabNumber font-weight: bold; margin: 0px; padding-right: .3ex;
hi Title color: orchid; background: #1c1c1c; font-weight: bold;
hi URL text-decoration: none; color: #d0ffd0;
hi URL:hover text-decoration: underline; cursor: pointer;
hi FrameIndicator background-color: red; opacity: 0.5; z-index: 999; position: fixed; top: 0; bottom: 0; left: 0; right: 0;
hi Bell border: none; background-color: #d0d0d0;
hi Hint font-family: monospace; font-size: 14px; font-weight: normal; color: #dddddd; background-color: #1c1c1c; border: none; margin: -0.7em 0 0 -0.7em; padding: 0px 5px;
hi Hint::after content: attr(number);
hi HintElem background-color: rgba(208, 208, 240, 0.8); color: #1c1c1c;
hi HintActive background-color: rgba( 85, 102, 187, 0.8); color: #dddded;
hi HintImage opacity: .5;
" 影(重かったらコメントアウト) {{{2
hi -append Hint background-color: rgba(28, 28, 28, 0.8); border: 1px solid #1c1c1c; -moz-border-radius: 4px; -moz-box-shadow: 0px 0px 1px black; text-shadow: 1px 1px 2px black;
hi -append HintElem text-decoration: none; -moz-border-radius: 4px; -moz-box-shadow: 0 0 2px #0c0c0c;
hi -append HintActive text-decoration: none; -moz-border-radius: 4px; -moz-box-shadow: 0 0 2px #0c0c0c;
" }}}2
" }}}1
" Styles {{{1
style -name indigo-feed-button chrome://* <<EOM
#feed-button {
list-style-image: url("chrome://browser/skin/feeds/feedIcon16.png") !important;
-moz-image-region: auto !important;
border: none !important;
min-width: 0 !important;
}
EOM
style -name indigo-sbmcommentsviewer chrome://* <<EOM
.liberator-sbmcommentsviewer-content {
padding: 0 !important;
border: none !important;
}
EOM
" }}}1
" vim: ft=vimperator
js services.services.autoCompleteSearch.class_="@mozilla.org/autocomplete/search;1?name=unifiedcomplete"
map s :javascript (function () {var v = window.content.window.document.getElementsByTagName('video')[0] || window.content.window.document.getElementsByTagName('audio')[0]; if (!v) {liberator.echoerr('No video HTML5 element in this frame.'); return;}; if (v.paused) v.play(); else v.pause();})()<CR>
map }} :javascript (function () {var v = window.content.window.document.getElementsByTagName('video')[0] || window.content.window.document.getElementsByTagName('audio')[0]; if (!v) {liberator.echoerr('No video HTML5 element in this frame.'); return;}; v.currentTime += 10})()<CR>
map {{ :javascript (function () {var v = window.content.window.document.getElementsByTagName('video')[0] || window.content.window.document.getElementsByTagName('audio')[0]; if (!v) {liberator.echoerr('No video HTML5 element in this frame.'); return;}; v.currentTime -= 10})()<CR>
map Vp :javascript (function () {var cl = window.content.window.document.getElementById('movie_player').classList; if (cl.contains('ytp-autohide')) cl.remove('ytp-autohide'); else cl.add('ytp-autohide');})()<CR>
set nextpattern=^Next$,\\bnext\\b,^>$,^(>>|»)$,^(>|»),(>|»)$,\\bmore\\b
js hints.addMode('s', "Search field", function (e) {buffer.focusElement(e);}, function () {return "//input[contains(@placeholder,'earch')]"})
js hints.addMode('c', 'Yank <pre> or <code> block', function (e) {util.copyToClipboard(e.textContent, true);}, function () '//pre | //code')
javascript hints.addMode('e', 'Yank a title and the yar from doi as an org mode link', function (e) {try {year = "(" + liberator.plugins.libly.$U.getFirstNodeFromXPath("//a[contains(@href, 'doi.org')]").href.split('/').slice(-1)[0].split('.').filter(function (x) /^[0-9]+$/.test(x))[0] + ") ";} catch (e) {year = ""}; util.copyToClipboard(year + '[[' + window.content.window.location + '][' + e.textContent.trim() + ']]', true);}, function () '//h1 | //h2')