root/dotfiles/vimperator/otsune-vimperatorrc

Revision 26371, 4.1 kB (checked in by otsune, 7 months ago)

Update for current

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