aboutsummaryrefslogtreecommitdiffstats
path: root/x-hint.js
diff options
context:
space:
mode:
authoranekos2010-03-25 14:03:40 +0000
committeranekos2010-03-25 14:03:40 +0000
commitaed6d117ce8af27fd986a4d6a11a6c64898ceff4 (patch)
treef8b5d8f277a829d9737dd630824bbe728e47f752 /x-hint.js
parent9426ba9901755a405932426aeb3c476ac40b5950 (diff)
downloadvimperator-plugins-aed6d117ce8af27fd986a4d6a11a6c64898ceff4.tar.bz2
外部から使える様に
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37089 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'x-hint.js')
-rwxr-xr-xx-hint.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/x-hint.js b/x-hint.js
index fa8e537..0cb6cef 100755
--- a/x-hint.js
+++ b/x-hint.js
@@ -163,12 +163,18 @@ let INFO =
true
);
+ function showHintsWith (mode, xpath) {
+ last.xpath = xpath;
+ hints.show(mode);
+ }
+
+ __context__.show = showHintsWith;
+
commands.addUserCommand(
['xh[int]'],
description,
function (args) {
- last.xpath = args.literalArg;
- hints.show(args[0]);
+ showHintsWith(args[0], args.literalArg);
},
{
literal: 1
@@ -194,9 +200,8 @@ let INFO =
['xhintdo', 'xhdo'],
'Run js-code with X-Hint',
function (args) {
- last.xpath = args[0];
js = args.literalArg;
- hints.show(hintModeText);
+ showHintsWith(hintModeText, args[0]);
},
{
literal: 1,