aboutsummaryrefslogtreecommitdiffstats
path: root/erection.js
diff options
context:
space:
mode:
authoranekos2012-05-05 16:16:23 +0900
committeranekos2012-05-05 16:16:23 +0900
commit39f2fbcd2a81790444cc19b5de6ac349e4e86d98 (patch)
treedc325072fc578d97794233ea5191e52200508160 /erection.js
parentc1f885f94c82a4959c42491b6b78d053c318cfc7 (diff)
downloadvimperator-plugins-39f2fbcd2a81790444cc19b5de6ac349e4e86d98.tar.bz2
Add subcommand "excommand" for :erection.
Diffstat (limited to 'erection.js')
-rw-r--r--erection.js24
1 files changed, 21 insertions, 3 deletions
diff --git a/erection.js b/erection.js
index 829cb46..be7e1d2 100644
--- a/erection.js
+++ b/erection.js
@@ -35,7 +35,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
// INFO {{{
let INFO =
<>
- <plugin name="erection" version="1.0.1"
+ <plugin name="erection" version="1.1.1"
href="http://vimpr.github.com/"
summary="Show the Erection."
lang="en-US"
@@ -55,7 +55,7 @@ let INFO =
<description><p>Show erected text with the image.</p></description>
</item>
</plugin>
- <plugin name="エレクチオン" version="1.0.1"
+ <plugin name="エレクチオン" version="1.1.1"
href="http://vimpr.github.com/"
summary="どうしてなの――ッ!! どうしてエレクチオンしないのよーッ!!"
lang="ja"
@@ -197,7 +197,7 @@ let INFO =
return function (args) {
let num = parseInt(args.literalArg, 10);
return erect(function (erections) {
- return action(erections[num]);
+ return action(erections[num], args);
});
}
}
@@ -235,6 +235,24 @@ let INFO =
</>);
}),
subOption
+ ),
+ new Command(
+ ['e[xcommand]'],
+ 'Open command line with select erection',
+ makeErectionCommand(function (e, args) {
+ let cmdArgs = String(<>{e.text} - {e.by} {e.from} {e.imageURL}</>);
+ setTimeout(function () commandline.open('', args[0] + ' ' + cmdArgs, modes.EX), 1);
+ }),
+ {
+ literal: 1,
+ completer: function (context, args) {
+ if (args.length <= 1) {
+ completion.ex(context);
+ } else {
+ erectionCompleter(context, args);
+ }
+ }
+ }
)
]
},