root/dotfiles/vimperator/otsune-vimperatorrc

Revision 15037, 4.3 kB (checked in by otsune, 2 days ago)

* some update for trunk

Line 
1 " otsune .vimperatorrc
2 " 0.6pre (created: 2008/04/02 07:30:09)
3 " Mappings
4
5 echo "loading..."
6 " css
7 "map ! :set invum<CR>
8
9 " set mark-a, jump mark-a
10 noremap _ ma
11 noremap } `a
12
13 "
14 noremap j 5j
15 noremap k 5k
16 noremap J <C-d>
17 noremap K <C-u>
18
19 " select next/previous tab
20 noremap <Right> gt
21 noremap <Left> gT
22 noremap <C-l> gt
23 noremap <C-h> gT
24 noremap <C-w>l gt
25 noremap <C-w>h gT
26
27 " move current tab left/right
28 "map <S-Right> :tablast<CR>
29 "map <S-Left> :tabfirst<CR>
30 "map <C-L> :tabmove! +1<CR>
31 "map <C-H> :tabmove! -1<CR>
32
33 " ex mode
34 cmap <C-d> <Tab>
35 "cmap <Down> <Tab>
36 "cmap <Up> <S-Tab>
37 cmap <C-n> <Tab>
38 cmap <C-p> <S-Tab>
39
40 "
41 "map <A-b> :set guioptions+=b<CR>
42 ""map ,b :set guioptions+=b<CR>
43 "map <A-B> :set guioptions-=b<CR>
44 ""map ,B :set guioptions-=b<CR>
45 ""map ,t :toggleToolbar<CR>
46 "noremap ,t :mb tumblr.reblog<CR>
47 "noremap ,p :pukka<CR>
48
49 " Unhidden and hidden the menubar and the toolbar
50 "map <A-Up> :set guioptions+=mT<CR>
51 "map <A-Down> :set guioptions-=mT<CR>
52
53 javascript <<EOM
54   toggle_element = function (name){
55     document.getElementById(name).collapsed ^= 1;
56   }
57 EOM
58
59 "http://unsigned.g.hatena.ne.jp/Trapezoid/20080620/1213961754
60 javascript <<EOM
61 [
62     ['!', ':set invum'],
63     [',s', ':buffer!'],
64     ['<S-Right>', ':tablast'],
65     ['<S-Left>', ':tabfirst'],
66     ['<C-L>', ':tabmove! +1'],
67     ['<C-H>', ':tabmove! -1'],
68     ['<A-b>', ':set guioptions+=b'],
69     ['<A-B>', ':set guioptions-=b'],
70     [',b', ':bentry'],
71     [',c', ':copy'],
72     [',p', ':pukka'],
73     [',r', ':proxy'],
74     [',e', ':eijiro'],
75 ].forEach(function([key, command]){
76     liberator.mappings.addUserMap([liberator.modes.NORMAL], [key],
77         "User defined mapping",
78         function () { liberator.execute(command); },
79         {
80             rhs: key,
81             noremap: true
82         });
83 });
84 EOM
85
86 " Options
87 set guioptions+=b
88 "set titlestring=Vimperator
89 set verbose=9
90 set visualbell
91 set history=1000
92 set complete=sl
93 set wildoptions=auto
94 set suggestengines=google
95 set newtab=all
96 set hintstyle+=font-size:15px;
97 "]]
98 set nextpattern+=次(の)?ページ,→\b,下一頁,Следующая,다음
99 "[[
100 set previouspattern+=prev, 前(の)?ページ,\b←
101 "
102 set editor=/opt/local/bin/gvim -f
103
104 " sbm
105 "let g:direct_sbm_use_services_by_tag = "d"
106 "let g:direct_sbm_use_services_by_post = "d"
107
108 " pukka plugin variable
109 let g:pukka_normalizelink = "true"
110
111 " ime_control.js
112 "let g:ex_ime_mode = "disabled"
113 let g:ex_ime_mode = "inactive"
114 let g:textarea_ime_mode = "inactive"
115
116 " ldr_cooperation.js
117 let g:ldrc_captureMappings = "['t', 'T', 'h', 'l', 'j', 'k', 'p', 'o', '?']"
118 let g:ldrc_hints = "true"
119 let g:ldrc_intelligence_bind = "true"
120
121 "
122 autocmd LocationChange .* :js modes.passAllKeys = /^https?:\/\/mail\.google\.com/.test(buffer.URL)
123 autocmd LocationChange .* :js modes.passAllKeys = /^https?:\/\/fastladder\.com/.test(buffer.URL)
124
125 " copy.js
126 javascript <<EOM
127 liberator.globalVariables.copy_templates = [
128    { label: 'titleAndURL',    value: '%TITLE% %URL%' },
129    { label: 'title',          value: '%TITLE%' },
130    { label: 'hatena',         value: '[%URL%:title=%TITLE%]' },
131    { label: 'hatenacite',     value: '>%URL%:title=%TITLE%>\n%SEL%\n<<' },
132    { label: 'markdown',       value: '[%SEL%](%URL% "%TITLE%")' },
133    { label: 'htmlblockquote', value: '<blockquote cite="%URL%" title="%TITLE%">%HTMLSEL%</blockquote>' }
134 ];
135 EOM
136
137 " Add Mapping `C-c' copy or stop loading
138 javascript <<EOM
139 liberator.mappings.addUserMap([liberator.modes.NORMAL], ['<C-c>'],
140     'Copy selected text or ',
141         function () {
142                 var sel = liberator.buffer.getCurrentWord();
143                 if (sel) {
144                         liberator.copyToClipboard(sel, true);
145                         echo('Yanked: ' + liberator.util.escapeHTML(sel) );
146                 } else {
147                         BrowserStop();
148                         liberator.echo('Stopped loading !');
149                 }
150         } , {}
151 );
152 EOM
153
154 " Show feed-button to statusbar
155 javascript <<EOM
156 (function () {
157 var feedPanel = document.createElement('statusbarpanel');
158 var feedButton = document.getElementById('feed-button');
159     feedPanel.setAttribute('id','feed-panel-clone');
160     feedPanel.appendChild(feedButton.cloneNode(true));
161     feedButton.parentNode.removeChild(feedButton);
162     document.getElementById('status-bar')
163         .insertBefore(feedPanel,document.getElementById('security-button'));
164 })();
165 EOM
166
167 " disable accesskey
168 javascript <<EOM
169 liberator.options.setPref('ui.key.generalAccessKey', 0);
170 EOM
171
172 " Abbreviations
173
174 "source! ~/.vimperatorrc.local
175
176 echo "done"
177 " vim: set ft=vimperator:
Note: See TracBrowser for help on using the browser.
Hosted by INFOMARKS Corporation
infomarks