diff options
author | anekos | 2008-12-09 08:31:56 +0000 |
---|---|---|
committer | anekos | 2008-12-09 08:31:56 +0000 |
commit | 0b4c50f69beaeeae831a5364ab07bc76e5539936 (patch) | |
tree | 4fd2f8072581260111a5714407398819e0b1dc5c /auto_source.js | |
parent | 984f070cec08f03bc02c0b992884b1417c1330dd (diff) | |
download | vimperator-plugins-0b4c50f69beaeeae831a5364ab07bc76e5539936.tar.bz2 |
Follow Head
プラグインマネージャ対応
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26206 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'auto_source.js')
-rw-r--r-- | auto_source.js | 69 |
1 files changed, 38 insertions, 31 deletions
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 = +<VimperatorPlugin> + <name> Auto Source </name> + <description>Sourcing automatically when the specified file is modified.</description> + <description lang="ja">指定のファイルが変更されたら自動で :so する。</description> + <version>1.2</version> + <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> + <minVersion>2.0pre</minVersion> + <maxVersion>2.0pre</maxVersion> + <license document="http://creativecommons.org/licenses/by-sa/3.0/"> + Creative Commons Attribution-Share Alike 3.0 Unported + </license> + <detail><![CDATA[ + == Commands == + Start watching: + :aso taro.js + :autoso[urce] taro.js + Stop watching: + :aso! taro.js + :autoso[urce]! taro.js + ]]></detail> + <detail lang="ja"><![CDATA[ + == Commands == + 監視を開始: + :aso taro.js + :autoso[urce] taro.js + 監視を中止: + :aso! taro.js + :autoso[urce]! taro.js + ]]></detail> +</VimperatorPlugin>; + // 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: |