.vimperatorrc
author Shingo W. Kagami
Tue, 15 Feb 2011 23:09:07 +0900
changeset 19 bec059009ba7
parent 14 16fe27af1a8b
child 20 d9bc81689061
permissions -rw-r--r--
LESSOPEN has been used.
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@18
     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@18
    13
map d <C-w>
Shingo@12
    14
Shingo@12
    15
inoremap <C-v>  <C-v><C-v>
Shingo@12
    16
inoremap <C-q>  <C-v>
Shingo@12
    17
cnoremap <C-v>  <C-v><C-v>
Shingo@12
    18
cnoremap <C-q>  <C-v>
Shingo@12
    19
cmap <Up> <S-TAB>
Shingo@12
    20
cmap <Down> <TAB>
Shingo@12
    21
Shingo@12
    22
javascript <<EOM
Shingo@12
    23
(function(){
Shingo@12
    24
 var feedPanel = document.createElement('statusbarpanel');
Shingo@12
    25
 var feedButton = document.getElementById('feed-button');
Shingo@12
    26
 feedPanel.setAttribute('id','feed-panel-clone');
Shingo@12
    27
 feedPanel.appendChild(feedButton.cloneNode(true));
Shingo@12
    28
 feedButton.parentNode.removeChild(feedButton);
Shingo@12
    29
 document.getElementById('status-bar').insertBefore(feedPanel,document.getElementById('security-button'));
Shingo@12
    30
})();
Shingo@12
    31
EOM
Shingo@12
    32
Shingo@12
    33
Shingo@12
    34
" plugin/ime_controller.js 
Shingo@12
    35
let g:ex_ime_mode = "inactive"
Shingo@12
    36
let g:textarea_ime_mode = "inactive" 
Shingo@12
    37
Shingo@12
    38
" plugin/copy.js
Shingo@18
    39
map ,c :copy<Space>
Shingo@12
    40
javascript <<EOM
Shingo@12
    41
(function(){
Shingo@12
    42
function get_tus(w, d) {
Shingo@14
    43
    var t = content.document.title;
Shingo@14
    44
    var u = content.location.href;
Shingo@14
    45
    var s = content.window.getSelection().getRangeAt(0).toString();
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@14
    65
       return '[' +  content.location.href.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@18
    73
autocmd LocationChange http://(reader\.livedoor\.com|fastladder\.com|0\.0\.0\.0\:3000)/reader/ :fmap j k s a p v c z Z b i r < > o,vj J,<Space> K,<S-Space> q w g u 
Shingo@18
    74
autocmd LocationChange mail\.google\.com/(mail|a)/ :fmap -d 4 c / j k n p o u e x s r a # [ ] z ? gi gs gt gd ga gc <C-c>
Shingo@18
    75
Shingo@18
    76
"js <<EOF
Shingo@18
    77
"autocommands.add('LocationChange',/reader\.livedoor\.com\/reader\//,
Shingo@18
    78
"  'js plugins.feedKey.setup("j k s a p v c <Space> <S-Space> z Z < > q w b i".split(/ +/));');
Shingo@18
    79
"autocommands.add('LocationChange',/mail\.google\.com\/mail\//,
Shingo@18
    80
"  'js plugins.feedKey.setup("j k p n e u o / <C-c>".split(/ +/));');
Shingo@18
    81
"EOF
Shingo@12
    82
Shingo@12
    83
echo ".vimperatorrc loaded."
Shingo@18
    84