aboutsummaryrefslogtreecommitdiffstats
path: root/function-template.js
diff options
context:
space:
mode:
authoranekos2011-04-10 23:42:40 +0900
committeranekos2011-04-10 23:42:40 +0900
commit0df4757860585f31b3047fe3c4d673a9c51db47e (patch)
tree4e5ad33f0ba34986f9bf4ec6342d086476ff8de7 /function-template.js
parent3c332e8e02644c135398808f262706f4b3bc04ef (diff)
downloadvimperator-plugins-0df4757860585f31b3047fe3c4d673a9c51db47e.tar.bz2
サブコマンド追加
Diffstat (limited to 'function-template.js')
-rw-r--r--function-template.js23
1 files changed, 22 insertions, 1 deletions
diff --git a/function-template.js b/function-template.js
index f790f72..5dac6fd 100644
--- a/function-template.js
+++ b/function-template.js
@@ -95,7 +95,28 @@ let PLUGIN_INFO =
context.completions = [
['item1', 'desc1'],
];
- }
+ },
+
+ // サブコマンド ( aptitude install ... みたいなもの)
+ // Command のインスタンスの配列を渡します
+ subCommands: [
+ new Command(
+ ['subA'],
+ 'Sub command A'
+ function (args) {
+ // addUserCommand のと同じ
+ },
+ {
+ // extra options これまた addUserCommand のと同じ
+ }
+ ),
+ new Command(
+ ['subB'],
+ 'Sub command B'
+ function (args) { },
+ {}
+ )
+ ]
},
true // replace
);