diff options
author | anekos | 2011-04-10 23:42:40 +0900 |
---|---|---|
committer | anekos | 2011-04-10 23:42:40 +0900 |
commit | 0df4757860585f31b3047fe3c4d673a9c51db47e (patch) | |
tree | 4e5ad33f0ba34986f9bf4ec6342d086476ff8de7 /function-template.js | |
parent | 3c332e8e02644c135398808f262706f4b3bc04ef (diff) | |
download | vimperator-plugins-0df4757860585f31b3047fe3c4d673a9c51db47e.tar.bz2 |
サブコマンド追加
Diffstat (limited to 'function-template.js')
-rw-r--r-- | function-template.js | 23 |
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 ); |