/* {{{ Copyright (c) 2008, anekos. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ################################################################################### # http://sourceforge.jp/projects/opensource/wiki/licenses%2Fnew_BSD_license # # に参考になる日本語訳がありますが、有効なのは上記英文となります。 # ################################################################################### }}} */ // PLUGIN_INFO {{{ let PLUGIN_INFO = Migemized Find Migemized Find Migemize default page search. デフォルトのドキュメント内検索をミゲマイズする。 2.9.0 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) http://coderepos.org/share/export/27234/lang/javascript/vimperator-plugins/trunk/migemized_find.js 2.0pre 2.0pre 正規表現検索 '?' => Migemo検索 以外 => Migemo検索 検索ワードを指定色で強調表示する: >|| :ml <検索ワード> [-c <色>] :migelight <検索ワード> [-c <色>] ||< 指定の色の強調表示を消す: >|| :ml! <色1> <色2> ... <色N> :migelight! <色1> <色2> ... <色N> ||< 全ての強調表示を消す: >|| :ml! all :migelight! all ||< ミ言語設定: >|| let g:migemized_find_language = "cat"; ||< インストール設定: Vimperator の "/" などを置き換えるか否かの設定 false にすると、置き換えされない。 :migelight などのコマンドだけ使いたいときはこれを設定する >|| let g:migemized_find_install = "false"; ||< == Link == http://d.hatena.ne.jp/nokturnalmortum/20080805#1217941126 ]]> ; // }}} (function () { let do_install = s2b(liberator.globalVariables.migemized_find_install, true); let XMigemoCore = Components.classes['@piro.sakura.ne.jp/xmigemo/factory;1'] .getService(Components.interfaces.pIXMigemoFactory) .getService(liberator.globalVariables.migemized_find_language || 'ja'); let colors = { white: '#ffffff', whitesmoke: '#f5f5f5', ghostwhite: '#f8f8ff', aliceblue: '#f0f8ff', lavendar: '#e6e6fa', azure: '#f0ffff', lightcyan: '#e0ffff', mintcream: '#f5fffa', honeydew: '#f0fff0', ivory: '#fffff0', beige: '#f5f5dc', lightyellow: '#ffffe0', lightgoldenrodyellow: '#fafad2', lemonchiffon: '#fffacd', floralwhite: '#fffaf0', oldlace: '#fdf5e6', cornsilk: '#fff8dc', papayawhite: '#ffefd5', blanchedalmond: '#ffebcd', bisque: '#ffe4c4', snow: '#fffafa', linen: '#faf0e6', antiquewhite: '#faebd7', seashell: '#fff5ee', lavenderblush: '#fff0f5', mistyrose: '#ffe4e1', gainsboro: '#dcdcdc', lightgray: '#d3d3d3', lightsteelblue: '#b0c4de', lightblue: '#add8e6', lightskyblue: '#87cefa', powderblue: '#b0e0e6', paleturquoise: '#afeeee', skyblue: '#87ceeb', mediumaquamarine: '#66cdaa', aquamarine: '#7fffd4', palegreen: '#98fb98', lightgreen: '#90ee90', khaki: '#f0e68c', palegoldenrod: '#eee8aa', moccasin: '#ffe4b5', navajowhite: '#ffdead', peachpuff: '#ffdab9', wheat: '#f5deb3', pink: '#ffc0cb', lightpink: '#ffb6c1', thistle: '#d8bfd8', plum: '#dda0dd', silver: '#c0c0c0', darkgray: '#a9a9a9', lightslategray: '#778899', slategray: '#708090', slateblue: '#6a5acd', steelblue: '#4682b4', mediumslateblue: '#7b68ee', royalblue: '#4169e1', blue: '#0000ff', dodgerblue: '#1e90ff', cornflowerblue: '#6495ed', deepskyblue: '#00bfff', cyan: '#00ffff', aqua: '#00ffff', turquoise: '#40e0d0', mediumturquoise: '#48d1cc', darkturquoise: '#00ced1', lightseagreen: '#20b2aa', mediumspringgreen: '#00fa9a', springgreen: '#00ff7f', lime: '#00ff00', limegreen: '#32cd32', yellowgreen: '#9acd32', lawngreen: '#7cfc00', chartreuse: '#7fff00', greenyellow: '#adff2f', yellow: '#ffff00', gold: '#ffd700', orange: '#ffa500', darkorange: '#ff8c00', goldenrod: '#daa520', burlywood: '#deb887', tan: '#d2b48c', sandybrown: '#f4a460', darksalmon: '#e9967a', lightcoral: '#f08080', salmon: '#fa8072', lightsalmon: '#ffa07a', coral: '#ff7f50', tomato: '#ff6347', orangered: '#ff4500', red: '#ff0000', deeppink: '#ff1493', hotpink: '#ff69b4', palevioletred: '#db7093', violet: '#ee82ee', orchid: '#da70d6', magenta: '#ff00ff', fuchsia: '#ff00ff', mediumorchid: '#ba55d3', darkorchid: '#9932cc', darkviolet: '#9400d3', blueviolet: '#8a2be2', mediumpurple: '#9370db1', gray: '#808080', mediumblue: '#0000cd', darkcyan: '#008b8b', cadetblue: '#5f9ea0', darkseagreen: '#8fbc8f', mediumseagreen: '#3cb371', teal: '#008080', forestgreen: '#228b22', seagreen: '#2e8b57', darkkhaki: '#bdb76b', peru: '#cd853f', crimsin: '#dc143c', indianred: '#cd5c5c', rosybrown: '#bc8f8f', mediumvioletred: '#c71585', dimgray: '#696969', black: '#000000', midnightblue: '#191970', darkslateblue: '#483d8b', darkblue: '#00008b', navy: '#000080', darkslategray: '#2f4f4f', green: '#008000', darkgreen: '#006400', darkolivegreen: '#556b2f', olivedrab: '#6b8e23', olive: '#808000', darkgoldenrod: '#b8860b', chocolate: '#d2691e', sienna: '#a0522d', saddlebrown: '#8b4513', firebrick: '#b22222', brown: '#a52a2a', maroon: '#800000', darkred: '#8b0000', darkmagenta: '#8b008b', purple: '#800080', indigo: '#4b0082', }; let colorsCompltions = [ [name, {'\u25a0 ' + value}] for each ([name, value] in Iterator(colors)) ]; function s2b (s, d) (!/^(\d+|false)$/i.test(s)|parseInt(s)|!!d*2)&1<