| 1 | " suVene .vimperatorrc |
|---|
| 2 | " for Vimperator 1.2 |
|---|
| 3 | |
|---|
| 4 | echo "loding" |
|---|
| 5 | |
|---|
| 6 | " Mappings |
|---|
| 7 | """""""""""""""""""""""""""""""""""""""""" |
|---|
| 8 | " scroll |
|---|
| 9 | map j 3<C-e> |
|---|
| 10 | map k 3<C-y> |
|---|
| 11 | map J <C-d> |
|---|
| 12 | map K <C-u> |
|---|
| 13 | " tab |
|---|
| 14 | map h <C-p><Esc> |
|---|
| 15 | map l <C-n><Esc> |
|---|
| 16 | |
|---|
| 17 | " http://unsigned.g.hatena.ne.jp/Trapezoid/20080620/1213961754 |
|---|
| 18 | javascript <<EOM |
|---|
| 19 | [ |
|---|
| 20 | ['!', ':set invum'], |
|---|
| 21 | ['<S-Right>', ':tablast'], |
|---|
| 22 | ['<S-Left>', ':tabfirst'], |
|---|
| 23 | ['<C-L>', ':tabmove! +1'], |
|---|
| 24 | ['<C-H>', ':tabmove! -1'], |
|---|
| 25 | ['<A-b>', ':set guioptions+=b'], |
|---|
| 26 | ['<A-B>', ':set guioptions-=b'], |
|---|
| 27 | ['<A-t>', ':set guioptions+=T'], |
|---|
| 28 | ['<A-T>', ':set guioptions-=T'], |
|---|
| 29 | [',b', ':bentry'], |
|---|
| 30 | [',c', ':copy'], |
|---|
| 31 | [',s', ':buffer!'], |
|---|
| 32 | [',v', ':viewSBMComments'], |
|---|
| 33 | ].forEach(function([key, command]){ |
|---|
| 34 | liberator.mappings.addUserMap([liberator.modes.NORMAL], [key], |
|---|
| 35 | "User defined mapping", |
|---|
| 36 | function () { liberator.execute(command); }, |
|---|
| 37 | { |
|---|
| 38 | rhs: key, |
|---|
| 39 | noremap: true |
|---|
| 40 | }); |
|---|
| 41 | }); |
|---|
| 42 | EOM |
|---|
| 43 | |
|---|
| 44 | " ex mode |
|---|
| 45 | cnoremap <C-a> <C-v><C-a> |
|---|
| 46 | cnoremap <C-z> <C-v><C-z> |
|---|
| 47 | cnoremap <C-x> <C-v><C-x> |
|---|
| 48 | cnoremap <C-c> <C-v><C-c> |
|---|
| 49 | cnoremap <C-v> <C-v><C-v> |
|---|
| 50 | cmap <C-b> <Left> |
|---|
| 51 | cmap <C-f> <Right> |
|---|
| 52 | cmap <C-p> <Up> |
|---|
| 53 | cmap <C-n> <Down> |
|---|
| 54 | |
|---|
| 55 | " edit |
|---|
| 56 | inoremap <C-a> <C-v><C-a> |
|---|
| 57 | inoremap <C-z> <C-v><C-z> |
|---|
| 58 | inoremap <C-x> <C-v><C-x> |
|---|
| 59 | inoremap <C-c> <C-v><C-c> |
|---|
| 60 | inoremap <C-v> <C-v><C-v> |
|---|
| 61 | imap <C-b> <Left> |
|---|
| 62 | imap <C-f> <Right> |
|---|
| 63 | imap <C-p> <Up> |
|---|
| 64 | imap <C-n> <Down> |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | " Options |
|---|
| 68 | """""""""""""""""""""""""""""""""""""""""" |
|---|
| 69 | " タブバーを常に表示 |
|---|
| 70 | set stal=2 |
|---|
| 71 | " Speed up first time history/bookmark completion |
|---|
| 72 | set preload |
|---|
| 73 | " |
|---|
| 74 | set verbose=9 |
|---|
| 75 | " visualbell有効 |
|---|
| 76 | set visualbell |
|---|
| 77 | set visualbellstyle+= opacity:.5; |
|---|
| 78 | " ex mode increment |
|---|
| 79 | set wildoptions=auto |
|---|
| 80 | " :[tab]open コマンドで補完する候補と順番 |
|---|
| 81 | set complete=sl |
|---|
| 82 | " ページロード時にテキストボックスにフォーカスが入らないように |
|---|
| 83 | set focuscontent |
|---|
| 84 | " ]] |
|---|
| 85 | set nextpattern+=次(の)?ページ,→\b, |
|---|
| 86 | " [[ |
|---|
| 87 | set previouspattern+=prev, 前(の)?ページ,\b← |
|---|
| 88 | |
|---|
| 89 | " |
|---|
| 90 | autocmd LocationChange .* :js modes.passAllKeys = /^https?:\/\/(?:www\.)?rememberthemilk\.com/.test(buffer.URL) |
|---|
| 91 | autocmd LocationChange .* :js modes.passAllKeys = /^https?:\/\/mail\.google\.com/.test(buffer.URL) |
|---|
| 92 | autocmd LocationChange .* :js modes.passAllKeys = /^https?:\/\/(?:www\.)?google\.com\/reader/.test(buffer.URL) |
|---|
| 93 | |
|---|
| 94 | " for browser |
|---|
| 95 | """""""""""""""""""""""""""""""" |
|---|
| 96 | " 単語選択時の右側のスペース選択を行わない |
|---|
| 97 | set! layout.word_select.eat_space_to_next_word=false |
|---|
| 98 | " ポップアップ許可数を拡張 cf.http://la.ma.la/blog/diary_200611171115.htm |
|---|
| 99 | set! dom.popup_maximum=999 |
|---|
| 100 | |
|---|
| 101 | " for plugins |
|---|
| 102 | """""""""""""""""""""""""""""""" |
|---|
| 103 | " direct_bookmark.js |
|---|
| 104 | let g:direct_sbm_use_services_by_tag = "h" |
|---|
| 105 | let g:direct_sbm_use_services_by_post = "h" |
|---|
| 106 | |
|---|
| 107 | " copy.js |
|---|
| 108 | javascript <<EOM |
|---|
| 109 | liberator.globalVariables.copy_templates = [ |
|---|
| 110 | { label: 'titleAndURL', value: '%TITLE% %URL%' }, |
|---|
| 111 | { label: 'title', value: '%TITLE%' }, |
|---|
| 112 | { label: 'anchor', value: '<a href=\"%URL%\" title=\"%TITLE%\">%TITLE%</a>' }, |
|---|
| 113 | { label: 'anchorWithHatena', value: '<a href=\"%URL%\" title=\"%TITLE%\">%TITLE%</a> <a href=\"http://b.hatena.ne.jp/entry/%URL%\" title=\"はてなブックマーク数\" alt=\"はてなブックマーク数\"><img src=\"http://b.hatena.ne.jp/entry/image/%URL%\" title=\"はてなブックマーク数\" alt=\"はてなブックマーク数\" border=\"0\"></a>' }, |
|---|
| 114 | { label: 'htmlblockquote', value: '<blockquote cite="%URL%" title="%TITLE%">%HTMLSEL%\n<a href=\"%URL%\" title=\"%TITLE%\">%TITLE%</a> <a href=\"http://b.hatena.ne.jp/entry/%URL%\" title=\"はてなブックマーク数\" alt=\"はてなブックマーク数\"><img src=\"http://b.hatena.ne.jp/entry/image/%URL%\" title=\"はてなブックマーク数\" alt=\"はてなブックマーク数\" border=\"0\"></a></blockquote>' }, |
|---|
| 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 | ]; |
|---|
| 119 | EOM |
|---|
| 120 | |
|---|
| 121 | " multi_requester.js |
|---|
| 122 | javascript <<EOM |
|---|
| 123 | liberator.globalVariables.multi_requester_siteinfo = [ |
|---|
| 124 | { |
|---|
| 125 | name: 'lo', // required |
|---|
| 126 | description: 'local', // required |
|---|
| 127 | url: 'http://localhost/index.html?%s', // required, %s <-- replace string |
|---|
| 128 | resultXpath: '//*', // optional(default all) |
|---|
| 129 | encode: 'SHIFT-JIS', // optional(default UTF-8) |
|---|
| 130 | ignoreTags: 'img', // optional(default script), syntax tag1,tag2,…… |
|---|
| 131 | }, |
|---|
| 132 | ]; |
|---|
| 133 | liberator.globalVariables.multi_requester_mappings = [ |
|---|
| 134 | [',ml', 'lo'], // <-- :mr lo |
|---|
| 135 | [',ma', 'alc'], // <-- :mr alc |
|---|
| 136 | [',mg', 'goo', '!'], // <-- :mr! goo |
|---|
| 137 | ]; |
|---|
| 138 | EOM |
|---|
| 139 | |
|---|
| 140 | |
|---|
| 141 | " JavaScript |
|---|
| 142 | """""""""""""""""""""""""""""""""""""""""" |
|---|
| 143 | " Show feed-button to statusbar |
|---|
| 144 | javascript <<EOM |
|---|
| 145 | (function () { |
|---|
| 146 | var feedPanel = document.createElement('statusbarpanel'); |
|---|
| 147 | var feedButton = document.getElementById('feed-button'); |
|---|
| 148 | feedPanel.setAttribute('id','feed-panel-clone'); |
|---|
| 149 | feedPanel.appendChild(feedButton.cloneNode(true)); |
|---|
| 150 | feedButton.parentNode.removeChild(feedButton); |
|---|
| 151 | document.getElementById('status-bar') |
|---|
| 152 | .insertBefore(feedPanel,document.getElementById('security-button')); |
|---|
| 153 | })(); |
|---|
| 154 | EOM |
|---|
| 155 | |
|---|
| 156 | " Abbreviations |
|---|
| 157 | """""""""""""""""""""""""""""""""""""""""" |
|---|
| 158 | |
|---|
| 159 | |
|---|
| 160 | """""""""""""""""""""""""""""""""""""""""" |
|---|
| 161 | source! ~/.vimperatorrc.local |
|---|
| 162 | |
|---|
| 163 | echo "done" |
|---|
| 164 | " vim: set ft=vimperator: |
|---|