From 0b4c50f69beaeeae831a5364ab07bc76e5539936 Mon Sep 17 00:00:00 2001 From: anekos Date: Tue, 9 Dec 2008 08:31:56 +0000 Subject: Follow Head プラグインマネージャ対応 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26206 d0d07461-0603-4401-acd4-de1884942a52 --- auto_source.js | 69 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 31 deletions(-) (limited to 'auto_source.js') diff --git a/auto_source.js b/auto_source.js index 2253c26..2357cb9 100644 --- a/auto_source.js +++ b/auto_source.js @@ -1,30 +1,35 @@ -// ==VimperatorPlugin== -// @name Auto Source -// @description Sourcing automatically when the specified file is modified. -// @description-ja 指定のファイルが変更されたら自動で :so する。 -// @license Creative Commons 2.1 (Attribution + Share Alike) -// @version 1.1 -// @author anekos (anekos@snca.net) -// @minVersion 2.0pre -// @maxVersion 2.0pre -// ==/VimperatorPlugin== -// -// Usage: -// Start watching -// :aso taro.js -// :autoso[urce] taro.js -// Stop watching -// :aso! taro.js -// :autoso[urce]! taro.js -// -// Usage-ja: -// 監視を開始 -// :aso taro.js -// :autoso[urce] taro.js -// 監視を中止 -// :aso! taro.js -// :autoso[urce]! taro.js -// +var PLUGIN_INFO = + + Auto Source + Sourcing automatically when the specified file is modified. + 指定のファイルが変更されたら自動で :so する。 + 1.2 + anekos + 2.0pre + 2.0pre + + Creative Commons Attribution-Share Alike 3.0 Unported + + + +; + // Links: // http://d.hatena.ne.jp/nokturnalmortum/20081114#1226652163 // http://p-pit.net/rozen/ @@ -73,15 +78,15 @@ ['autoso[urce]', 'aso'], 'Sourcing automatically when the specified file is modified.', function (arg, bang) { - (bang ? killWatcher : startWatching)(io.expandPath(arg.string)); + (bang ? killWatcher : startWatching)(io.expandPath(arg[0])); }, { bang: true, argCount: '1', - completer: function (context, arg, bang) { - if (bang) { + completer: function (context, args) { + if (args.bang) { context.title = ['Path']; - context.completions = files.map(function (it) ([it.path])); + context.completions = files.map(function (it) ([it.path, ''])); } else { completion.file(context); } @@ -91,3 +96,5 @@ ); })(); + +// vim:sw=2 ts=2 et si fdm=marker: -- cgit v1.2.3