root/dotfiles/vimperator/teramako-vimperatorrc

Revision 14676, 3.5 kB (checked in by teramako, 5 months ago)

autoIgnoreKeyからfeedSomeKeysに移行

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