Shingo@12
|
1 |
set guioptions+=mT
|
Shingo@12
|
2 |
set titlestring=Firefox
|
Shingo@12
|
3 |
set hlsearch
|
Shingo@12
|
4 |
set wildoptions=auto
|
Shingo@12
|
5 |
set complete=sl
|
Shingo@12
|
6 |
set visualbell
|
Shingo@20
|
7 |
highlight Bell display: none;
|
Shingo@18
|
8 |
"set visualbellstyle=display:none;
|
Shingo@12
|
9 |
set showstatuslinks=2
|
Shingo@12
|
10 |
|
Shingo@12
|
11 |
map <C-c> Y
|
Shingo@12
|
12 |
map <C-9> :tablast<CR>
|
Shingo@12
|
13 |
map ,R :source ~/.vimperatorrc
|
Shingo@18
|
14 |
map d <C-w>
|
Shingo@12
|
15 |
|
Shingo@12
|
16 |
inoremap <C-v> <C-v><C-v>
|
Shingo@12
|
17 |
inoremap <C-q> <C-v>
|
Shingo@12
|
18 |
cnoremap <C-v> <C-v><C-v>
|
Shingo@12
|
19 |
cnoremap <C-q> <C-v>
|
Shingo@12
|
20 |
cmap <Up> <S-TAB>
|
Shingo@12
|
21 |
cmap <Down> <TAB>
|
Shingo@12
|
22 |
|
Shingo@12
|
23 |
javascript <<EOM
|
Shingo@12
|
24 |
(function(){
|
Shingo@12
|
25 |
var feedPanel = document.createElement('statusbarpanel');
|
Shingo@12
|
26 |
var feedButton = document.getElementById('feed-button');
|
Shingo@12
|
27 |
feedPanel.setAttribute('id','feed-panel-clone');
|
Shingo@12
|
28 |
feedPanel.appendChild(feedButton.cloneNode(true));
|
Shingo@12
|
29 |
feedButton.parentNode.removeChild(feedButton);
|
Shingo@12
|
30 |
document.getElementById('status-bar').insertBefore(feedPanel,document.getElementById('security-button'));
|
Shingo@12
|
31 |
})();
|
Shingo@12
|
32 |
EOM
|
Shingo@12
|
33 |
|
Shingo@12
|
34 |
|
Shingo@12
|
35 |
" plugin/ime_controller.js
|
Shingo@12
|
36 |
let g:ex_ime_mode = "inactive"
|
Shingo@12
|
37 |
let g:textarea_ime_mode = "inactive"
|
Shingo@12
|
38 |
|
Shingo@12
|
39 |
" plugin/copy.js
|
Shingo@18
|
40 |
map ,c :copy<Space>
|
Shingo@12
|
41 |
javascript <<EOM
|
Shingo@12
|
42 |
(function(){
|
Shingo@12
|
43 |
function get_tus(w, d) {
|
Shingo@14
|
44 |
var t = content.document.title;
|
Shingo@14
|
45 |
var u = content.location.href;
|
Shingo@14
|
46 |
var s = content.window.getSelection().getRangeAt(0).toString();
|
Shingo@12
|
47 |
return [t, u, s];
|
Shingo@12
|
48 |
}
|
Shingo@12
|
49 |
liberator.globalVariables.copy_templates = [
|
Shingo@12
|
50 |
{ label: 't', value: '%TITLE%' },
|
Shingo@12
|
51 |
{ label: 'tu', value: '%TITLE% - %URL%' },
|
Shingo@12
|
52 |
{ label: 'asin', custom: function(){
|
Shingo@12
|
53 |
return content.document.getElementById('ASIN').value;
|
Shingo@12
|
54 |
}},
|
Shingo@12
|
55 |
{ label: 'wiki', custom: function() {
|
Shingo@12
|
56 |
var [t, u, s] = get_tus(window, document);
|
Shingo@12
|
57 |
s = s.replace(/\n/, "\n> ");
|
Shingo@12
|
58 |
return t + "\n- " + u + (s? ("\n> " + s): '');
|
Shingo@12
|
59 |
}},
|
Shingo@12
|
60 |
{ label: 'my', custom: function() {
|
Shingo@12
|
61 |
var [t, u, s] = get_tus(window, document);
|
Shingo@12
|
62 |
s = s.replace(/\n/, "\n ");
|
Shingo@12
|
63 |
return t + ":\n - " + u + (s? ("\n >>\n " + s + "\n <<"): '');
|
Shingo@12
|
64 |
}},
|
Shingo@12
|
65 |
{ label: 'datestr', custom: function() {
|
Shingo@14
|
66 |
return '[' + content.location.href.match(/\d\d\d\d-\d\d-\d\d-\d+/) + ']';
|
Shingo@12
|
67 |
}},
|
Shingo@12
|
68 |
];
|
Shingo@12
|
69 |
})();
|
Shingo@12
|
70 |
EOM
|
Shingo@12
|
71 |
|
Shingo@12
|
72 |
" plugin/feedSomeKeys.js
|
Shingo@12
|
73 |
autocmd LocationChange .* :fmapc
|
Shingo@18
|
74 |
autocmd LocationChange http://(reader\.livedoor\.com|fastladder\.com|0\.0\.0\.0\:3000)/reader/ :fmap j k s a p v c z Z b i r < > o,vj J,<Space> K,<S-Space> q w g u
|
Shingo@21
|
75 |
autocmd LocationChange mail\.google\.com/(mail|a)/ :fmap c / j k n p o u e x s r a # [ ] z ? gi gs gt gd ga gc <C-c>
|
Shingo@18
|
76 |
|
Shingo@18
|
77 |
"js <<EOF
|
Shingo@18
|
78 |
"autocommands.add('LocationChange',/reader\.livedoor\.com\/reader\//,
|
Shingo@18
|
79 |
" 'js plugins.feedKey.setup("j k s a p v c <Space> <S-Space> z Z < > q w b i".split(/ +/));');
|
Shingo@18
|
80 |
"autocommands.add('LocationChange',/mail\.google\.com\/mail\//,
|
Shingo@18
|
81 |
" 'js plugins.feedKey.setup("j k p n e u o / <C-c>".split(/ +/));');
|
Shingo@18
|
82 |
"EOF
|
Shingo@12
|
83 |
|
Shingo@21
|
84 |
let g:no_reading_on_statusline = 1
|
Shingo@21
|
85 |
let g:no_reading_statusline_limit = 2000
|
Shingo@21
|
86 |
|
Shingo@12
|
87 |
echo ".vimperatorrc loaded."
|