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