.vimperatorrc
changeset 13 aa22c1ad0007
child 14 16fe27af1a8b
equal deleted inserted replaced
-1:000000000000 0:b4e3447c527c
       
     1 set guioptions+=mT
       
     2 set titlestring=Firefox
       
     3 set hlsearch
       
     4 set wildoptions=auto
       
     5 set complete=sl
       
     6 set visualbell
       
     7 set visualbellstyle=display:none;
       
     8 set showstatuslinks=2
       
     9 
       
    10 map <C-c> Y
       
    11 map <C-9> :tablast<CR>
       
    12 map ,R :source ~/.vimperatorrc
       
    13 
       
    14 inoremap <C-v>  <C-v><C-v>
       
    15 inoremap <C-q>  <C-v>
       
    16 cnoremap <C-v>  <C-v><C-v>
       
    17 cnoremap <C-q>  <C-v>
       
    18 cmap <Up> <S-TAB>
       
    19 cmap <Down> <TAB>
       
    20 
       
    21 javascript <<EOM
       
    22 (function(){
       
    23  var feedPanel = document.createElement('statusbarpanel');
       
    24  var feedButton = document.getElementById('feed-button');
       
    25  feedPanel.setAttribute('id','feed-panel-clone');
       
    26  feedPanel.appendChild(feedButton.cloneNode(true));
       
    27  feedButton.parentNode.removeChild(feedButton);
       
    28  document.getElementById('status-bar').insertBefore(feedPanel,document.getElementById('security-button'));
       
    29 })();
       
    30 EOM
       
    31 
       
    32 
       
    33 " plugin/ime_controller.js 
       
    34 let g:ex_ime_mode = "inactive"
       
    35 let g:textarea_ime_mode = "inactive" 
       
    36 
       
    37 " plugin/copy.js
       
    38 map ,c :copy <SPC>
       
    39 javascript <<EOM
       
    40 (function(){
       
    41 function get_tus(w, d) {
       
    42     var win = new XPCNativeWrapper(w.content.window);
       
    43     var s = win.getSelection().getRangeAt(0).toString();
       
    44     var t = liberator.buffer.title;
       
    45     var u = liberator.buffer.URL;
       
    46     return [t, u, s];
       
    47 }
       
    48 liberator.globalVariables.copy_templates = [
       
    49    { label: 't',         value: '%TITLE%' },
       
    50    { label: 'tu',        value: '%TITLE% - %URL%' },
       
    51    { label: 'asin', custom: function(){
       
    52        return content.document.getElementById('ASIN').value;
       
    53    }}, 
       
    54    { label: 'wiki', custom: function() {
       
    55        var [t, u, s] = get_tus(window, document);
       
    56        s = s.replace(/\n/, "\n> ");
       
    57        return t + "\n- " + u + (s? ("\n> " + s): '');
       
    58    }},
       
    59    { label: 'my',  custom: function() {
       
    60        var [t, u, s] = get_tus(window, document);
       
    61        s = s.replace(/\n/, "\n  ");
       
    62        return t + ":\n  - " + u + (s? ("\n  >>\n  " + s + "\n  <<"): '');
       
    63    }},
       
    64    { label: 'datestr',  custom: function() {
       
    65        return '[' +  liberator.buffer.URL.match(/\d\d\d\d-\d\d-\d\d-\d+/) + ']';
       
    66    }},
       
    67 ];
       
    68 })();
       
    69 EOM
       
    70 
       
    71 " plugin/feedSomeKeys.js
       
    72 autocmd LocationChange .* :fmapc
       
    73 js <<EOF
       
    74 autocommands.add('LocationChange',/reader\.livedoor\.com\/reader\//,
       
    75   'js plugins.feedKey.setup("j k s a p v c <Space> <S-Space> z Z < > q w b i".split(/ +/));');
       
    76 autocommands.add('LocationChange',/mail\.google\.com\/mail\//,
       
    77   'js plugins.feedKey.setup("j k p n e u o / <C-c>".split(/ +/));');
       
    78 EOF
       
    79 
       
    80 echo ".vimperatorrc loaded."