| 1 | " Vimperator 1.2pre |
|---|
| 2 | |
|---|
| 3 | set visualbell |
|---|
| 4 | set verbose=0 |
|---|
| 5 | set wildoptions=auto |
|---|
| 6 | set complete=sfl |
|---|
| 7 | set defsearch=g |
|---|
| 8 | set suggestengines=w,g |
|---|
| 9 | set nextpattern+=next,次(の)?ページ,\b次.*,→\b,\b,下一頁 |
|---|
| 10 | set previouspattern+=prev,前(の)?ページ,\b前.*,\b← |
|---|
| 11 | |
|---|
| 12 | noremap j 5j |
|---|
| 13 | noremap k 5k |
|---|
| 14 | |
|---|
| 15 | " コマンドライン、テキストエリア内では<C-v>で貼り付け |
|---|
| 16 | cnoremap <C-v> <S-Insert> |
|---|
| 17 | " inoremap <C-v> <S-Insert> |
|---|
| 18 | |
|---|
| 19 | noremap I <C-q> |
|---|
| 20 | |
|---|
| 21 | map <Left> <C-p> |
|---|
| 22 | map <Right> <C-n> |
|---|
| 23 | map <S-Left> :tabmove! -1<CR> |
|---|
| 24 | map <S-Right> :tabmove! +1<CR> |
|---|
| 25 | |
|---|
| 26 | " autoIgnoreKey.js |
|---|
| 27 | javascript <<EOM |
|---|
| 28 | liberator.globalVariables.autoignorekey_pages = uneval([ |
|---|
| 29 | /^http:\/\/reader\.livedoor\.com\/reader/, |
|---|
| 30 | /^https?:\/\/www\.rememberthemilk\.com\// |
|---|
| 31 | ]); |
|---|
| 32 | EOM |
|---|
| 33 | " gmail_biff.js |
|---|
| 34 | let g:gmbf_check_intervals = "300" |
|---|
| 35 | " stylechanger.js |
|---|
| 36 | let g:styles = "vimperator,tab,bookmarkstoolbar" |
|---|
| 37 | " copy.js |
|---|
| 38 | js <<EOF |
|---|
| 39 | liberator.globalVariables.copy_templates = [ |
|---|
| 40 | { label: 'hatenaAnchor', value: '[%URL%:title=%TITLE%]' }, |
|---|
| 41 | { label: 'hatenaQuote', value: '>%URL%:title=%TITLE%>\n%SEL%\n<<' }, |
|---|
| 42 | { label: 'getASIN', value: 'get ASIN Code from amazon', custom: function() content.document.getElementById('ASIN').value }, |
|---|
| 43 | { label: 'titleAndURL', value: '%TITLE%\n%URL%' }, |
|---|
| 44 | { label: 'title', value: '%TITLE%', map: ',y' }, |
|---|
| 45 | { label: 'anchor', value: '<a href="%URL%">%TITLE%</a>' }, |
|---|
| 46 | { label: 'selanchor', value: '<a href="%URL%" title="%TITLE%">%SEL%</a>' }, |
|---|
| 47 | { label: 'htmlblockquote', value: '<blockquote cite="%URL%" title="%TITLE%">%HTMLSEL%</blockquote>' } |
|---|
| 48 | ]; |
|---|
| 49 | EOF |
|---|
| 50 | " Add Mapping <C-c> copy or stop loading |
|---|
| 51 | javascript <<EOF |
|---|
| 52 | mappings.addUserMap([modes.NORMAL,modes.VISUAL],['<C-c>'], 'Copy selected text or stop loading', |
|---|
| 53 | function(){ |
|---|
| 54 | var sel = window.content.window.getSelection().toString(); |
|---|
| 55 | if (sel){ |
|---|
| 56 | copyToClipboard(sel,true); |
|---|
| 57 | } else { |
|---|
| 58 | BrowserStop(); |
|---|
| 59 | echo('Stopped loading !'); |
|---|
| 60 | } |
|---|
| 61 | } |
|---|
| 62 | ); |
|---|
| 63 | EOF |
|---|
| 64 | |
|---|
| 65 | " Show feed-button to statusbar |
|---|
| 66 | javascript <<EOF |
|---|
| 67 | (function(){ |
|---|
| 68 | var feedPanel = document.createElement('statusbarpanel'); |
|---|
| 69 | var feedButton = document.getElementById('feed-button'); |
|---|
| 70 | feedPanel.setAttribute('id','feed-panel-clone'); |
|---|
| 71 | feedPanel.appendChild(feedButton.parentNode.removeChild(feedButton)); |
|---|
| 72 | document.getElementById('status-bar').insertBefore(feedPanel,document.getElementById('security-button')); |
|---|
| 73 | })(); |
|---|
| 74 | EOF |
|---|
| 75 | |
|---|
| 76 | javascript <<EOF |
|---|
| 77 | (function(){ |
|---|
| 78 | var tabs = getBrowser().mTabs; |
|---|
| 79 | for (var i=0; i<tabs.length; i++){ |
|---|
| 80 | ['width','maxwidth','minwidth','flex'].forEach(function(attr)tabs[i].removeAttribute(attr)); |
|---|
| 81 | } |
|---|
| 82 | document.getElementById('content').addEventListener('TabOpen',function(e){ |
|---|
| 83 | var t = e.originalTarget; |
|---|
| 84 | ['width','maxwidth','minwidth','flex'].forEach(function(attr)t.removeAttribute(attr)); |
|---|
| 85 | },false); |
|---|
| 86 | })(); |
|---|
| 87 | EOF |
|---|
| 88 | |
|---|
| 89 | echo ".vimperatorrc sourced" |
|---|
| 90 | " vim:sw=2 ts=2 sts=0 et filetype=vimperator: |
|---|