Changeset 25846

Show
Ignore:
Timestamp:
12/04/08 14:56:53 (5 weeks ago)
Author:
hogelog
Message:
  • follow latest vimp 2.0pre.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dotfiles/vimperator/hogelog-vimperatorrc

    r24883 r25846  
     1cd ~ 
     2 
    13noremap h <C-p> 
    24noremap l <C-n> 
     
    1618noremap } <Tab><C-Enter> 
    1719 
    18 noremap z <PageDown> 
    19 noremap x <PageUp> 
     20noremap v <PageUp> 
    2021 
    21 noremap c :copy<CR> 
     22noremap c :copy titleAndURL<CR> 
     23noremap e :echo<Space> 
    2224 
    2325" commands 
     
    3234noremap ,G      :set go-=m<CR> 
    3335noremap ,t      :twitter<Space> 
    34 noremap ,h      :hatebu<CR> 
     36noremap ,h      :hateb<CR> 
    3537noremap ,2      :dialog foxage2ch<CR> 
    3638 
     
    4042 
    4143" incuri.js 
    42 noremap [j :decuri<CR> 
    43 noremap ]j :incuri<CR> 
     44noremap [j <C-x> 
     45noremap ]j <C-a> 
    4446 
    4547" Paste 
     
    4749imap <C-v> <S-Insert> 
    4850 
     51" zoom 
     52noremap <Minus> zO 
     53noremap <Plus> zI 
     54noremap < <Minus> 
     55noremap > <Plus> 
     56 
    4957set guioptions=m 
    5058 
    5159set focuscontent 
    5260 
    53 set complete=slh 
     61set complete=sl 
    5462"set wildoptions=auto 
    5563 
    5664" ]] 
    57 set nextpattern=次.*,→,\bnext,>>,» 
     65set nextpattern=^次.*,→,\bnext,>>,» 
    5866" [[ 
    59 set previouspattern=前.*,←,\bprev,<<,« 
     67set previouspattern=^前.*,←,\bprev,<<,« 
    6068 
    61 set verbose=9 
     69set hintmatching=custom 
    6270 
     71let mapleader="," 
     72 
     73set verbose=0 
    6374javascript <<EOM 
    64 liberator.commands.add(["hatebu"], "Hatena Bookmark", function() { 
    65     var url = 'http://b.hatena.ne.jp/entry/'+liberator.buffer.URL; 
    66     getBrowser().addTab(url, null, null, null); 
    67 }); 
     75[ 
     76    [['sfl'], 'Subscribe Fastladder', function() liberator.open('http://fastladder.com/subscribe/'+buffer.URL, liberator.CURRENT_TAB)], 
     77    [['hateb'], 'Hatena Bookmark', function() liberator.open('http://b.hatena.ne.jp/entry/'+buffer.URL, liberator.NEW_BACKGROUND_TAB)], 
     78    [['hatea'], 'Hatena Antenna', function() liberator.open('http://a.hatena.ne.jp/append?'+buffer.URL, liberator.NEW_BACKGROUND_TAB)] 
     79].forEach(function([cmd, description, action]) commands.addUserCommand(cmd, description, action)); 
    6880// add dialogs 
    6981[ 
    70 ['bbs2chreader', 'bbs2chreader', 'chrome://bbs2chreader/content/bbsmenu/page.xul', 'resizable,width=200,height=700'], 
    71 ['scrapbook', 'ScrapBook', 'chrome://scrapbook/content/scrapbook.xul', 'resizable,width=300,height=700'], 
    72 ['foxage2ch', 'Foxage2ch', 'chrome://foxage2ch/content/foxage2ch.xul'], 
    73 ['livehttpheaders', 'Live HTTP Headers', 'chrome://livehttpheaders/content/LiveHTTPHeaders.xul'], 
    74 ].forEach(function([name, description, uri, args]) liberator.config.dialogs.push([name, description, function() openDialog(uri, "_blank", args)])); 
     82    ['bbs2chreader', 'bbs2chreader', 'chrome://bbs2chreader/content/bbsmenu/page.xul', 'resizable,width=200,height=700'], 
     83    ['scrapbook', 'ScrapBook', 'chrome://scrapbook/content/scrapbook.xul', 'resizable,width=300,height=700'], 
     84    ['foxage2ch', 'Foxage2ch', 'chrome://foxage2ch/content/foxage2ch.xul'], 
     85    ['livehttpheaders', 'Live HTTP Headers', 'chrome://livehttpheaders/content/LiveHTTPHeaders.xul'], 
     86].forEach(function([name, description, uri, args]) config.dialogs.push([name, description, function() openDialog(uri, "_blank", args)])); 
    7587 
    7688// SessionManager 
    77 liberator.commands.add(["saves[ession]"], "Save Session", function() gSessionManager.saveWindow()); 
     89commands.add(["saves[ession]"], "Save Session", function() gSessionManager.saveWindow()); 
     90 
     91hints.addMode("i", "Focus to textbox", 
     92    function(elem) elem.focus(), 
     93    function() "//input[not(@type='hidden')] | //textarea | //xhtml:input[not(@type='hidden')] | //xhtml:textarea" 
     94); 
     95hints.addMode("I", "delete image", 
     96    function(elem) elem.style.display="none", 
     97    function() "//img"); 
     98hints.addMode("D", "delete block", 
     99    function(elem) elem.parentNode.removeChild(elem), 
     100    function() "//p | //div | //table | //iframe"); 
     101hints.addMode("d", "delete element", 
     102    function(elem) elem.parentNode.removeChild(elem), 
     103    function() "//*"); 
    78104 
    79105// proxy.js 
    80106liberator.globalVariables.proxy_settings = [ 
    81      { 
    82           conf_name: 'disable', 
    83           conf_usage: 'direct connection', 
    84           settings: [ 
    85               { 
    86                   label: 'type', 
    87                   param: 0 
    88               } 
    89           ] 
    90       }, 
    91       { 
    92           conf_name: 'forwarding', 
    93           conf_usage: 'use port forwarding', 
    94           settings: [ 
    95               { 
    96                   label: 'type', 
    97                   param: 1 
    98               }, 
    99               { 
    100                   label: 'http', 
    101                   param: 'localhost' 
    102               }, 
    103               { 
    104                   label: 'http_port', 
    105                   param: 8080 
    106               } 
    107           ] 
    108       } 
     107    {conf_name: 'disable', 
     108    conf_usage: 'direct connection', 
     109    settings: [ 
     110        { 
     111            label: 'type', 
     112            param: 0 
     113        } 
     114    ] 
     115    }, 
     116    { 
     117        conf_name: 'forwarding', 
     118        conf_usage: 'use port forwarding', 
     119        settings: [ 
     120            { 
     121                label: 'type', 
     122                param: 1 
     123            }, 
     124            { 
     125                label: 'http', 
     126                param: 'localhost' 
     127            }, 
     128            { 
     129                label: 'http_port', 
     130                param: 8080 
     131            } 
     132        ] 
     133    } 
    109134]; 
    110  
    111 liberator.commands.addUserCommand(["gmcommand", "gmcmd"], "Run Greasemonkey Command", 
    112 function(value) { 
    113     var commander = GM_BrowserUI.getCommander(getBrowser().selectedTab.linkedBrowser.contentWindow); 
    114     for (var i = 0; i < commander.menuItems.length; i++) { 
    115         var menuItem = commander.menuItems[i]; 
    116         if (menuItem.getAttribute("label") == value) { 
    117             menuItem._commandFunc(); 
    118             return; 
    119         } 
    120     } 
    121     liberator.echoerr(value+" is not defined userscript command."); 
    122 }, 
    123 { 
    124     completer: function(filter) { 
    125         var commander = GM_BrowserUI.getCommander(getBrowser().selectedTab.linkedBrowser.contentWindow); 
    126         var completions = []; 
    127         var exp = new RegExp(".*" + filter + ".*"); 
    128         for (var i = 0; i < commander.menuItems.length; i++) { 
    129             var label = commander.menuItems[i].getAttribute("label"); 
    130             if (!filter || exp.test(label)) { 
    131             completions.push([label, label]); 
    132         } 
    133     } 
    134     return [0, completions]; 
    135 } 
    136 }); 
    137135EOM 
    138136 
    139 echo ".vimperatorrc is loaded" 
    140 " vim: set ft=javascript sw=4 ts=4 et: 
     137"echo ".vimperatorrc loaded" 
     138" vim: set fdm=marker ft=javascript sw=4 ts=4 et: