mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:27:59 +01:00
Hint mode improvements.
This commit is contained in:
@@ -232,9 +232,13 @@
|
||||
<xsl:variable name="type" select="preceding-sibling::dactyl:type[1] | following-sibling::dactyl:type[1]"/>
|
||||
<span dactyl:highlight="HelpDefault">(default:<xsl:text> </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with($type, 'string') or starts-with($type, 'regex')">
|
||||
<xsl:when test="$type = 'string'">
|
||||
<span dactyl:highlight="HelpString"><xsl:apply-templates mode="help-1"/></span>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains($type, 'list') or contains($type, 'map')">
|
||||
<span dactyl:highlight="HelpString" delim=""><xsl:apply-templates mode="help-1"/></span>
|
||||
<xsl:if test=". = ''">(empty)</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<span>
|
||||
<xsl:attribute name="dactyl:highlight">
|
||||
|
||||
@@ -72,7 +72,14 @@ const Hints = Module("hints", {
|
||||
_reset: function (slight) {
|
||||
if (!slight) {
|
||||
this.__reset();
|
||||
this.prevInput = "";
|
||||
this.escNumbers = false;
|
||||
this._usedTabKey = false;
|
||||
this._canUpdate = false;
|
||||
this._hintNumber = 0;
|
||||
this._hintString = "";
|
||||
statusline.updateInputBuffer("");
|
||||
commandline.command = "";
|
||||
}
|
||||
this._pageHints = [];
|
||||
this._validHints = [];
|
||||
@@ -83,13 +90,8 @@ const Hints = Module("hints", {
|
||||
this._activeTimeout = null;
|
||||
},
|
||||
__reset: function () {
|
||||
statusline.updateInputBuffer("");
|
||||
this._hintString = "";
|
||||
this._hintNumber = 0;
|
||||
this._usedTabKey = false;
|
||||
this.prevInput = "";
|
||||
this.escNumbers = false;
|
||||
commandline.command = "";
|
||||
if (!this._usedTabKey)
|
||||
this._hintNumber = 0;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -478,7 +480,8 @@ const Hints = Module("hints", {
|
||||
let top = this._top;
|
||||
if (this._continue) {
|
||||
this.__reset();
|
||||
this._showHints();
|
||||
if (this._validHints.length <= 1)
|
||||
this._showHints();
|
||||
}
|
||||
else {
|
||||
this._removeHints(timeout);
|
||||
@@ -491,7 +494,8 @@ const Hints = Module("hints", {
|
||||
if ((modes.extended & modes.HINTS) && !this._continue)
|
||||
modes.pop();
|
||||
commandline._lastEcho = null; // Hack.
|
||||
this._hintMode.action(elem, elem.href || "", this._extendedhintCount, top);
|
||||
this._hintMode.action(elem, elem.href || elem.src || "",
|
||||
this._extendedhintCount, top);
|
||||
}, timeout);
|
||||
return true;
|
||||
},
|
||||
@@ -1078,7 +1082,9 @@ const Hints = Module("hints", {
|
||||
|
||||
options.add(["extendedhinttags", "eht"],
|
||||
"XPath string of hintable elements activated by ';'",
|
||||
"regexmap", "[iI]:" + Option.quote(util.makeXPath(["img"])),
|
||||
"regexmap", "[iI]:" + Option.quote(util.makeXPath(["img"])) +
|
||||
",[OTivVWy]:" + Option.quote(util.makeXPath(
|
||||
["{a,area}[@href]", "{img,iframe}[@src]"])),
|
||||
{ validator: Option.validateXPath });
|
||||
|
||||
options.add(["hinttags", "ht"],
|
||||
|
||||
@@ -96,13 +96,11 @@
|
||||
|
||||
<code><ex>:autocmd LocationChange .* js modes.passAllKeys = /(www|mail)\.google\.com/.test(buffer.URL)</ex></code>
|
||||
|
||||
<p>
|
||||
Set the filetype to mail when editing email at Gmail:
|
||||
</p>
|
||||
<p>Set the filetype to mail when editing email at Gmail:</p>
|
||||
|
||||
<code><!-- Why is the XSLT processor mangling newlines? -->
|
||||
<ex>:autocmd LocationChange .* :set editor=<str>gvim -f</str></ex>
|
||||
<ex>:autocmd LocationChange 'mail\.google\.com' :set editor=<str>gvim -f -c 'set ft=mail'</str></ex>
|
||||
<ex>:autocmd LocationChange !'mail\.google\.com'</ex> <ex>:set editor=<str>gvim -f</str></ex>
|
||||
<ex>:autocmd LocationChange 'mail\.google\.com'</ex> <ex>:set editor=<str>gvim -f -c 'set ft=mail'</str></ex>
|
||||
</code>
|
||||
|
||||
</document>
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
<spec>'activate' 'act'</spec>
|
||||
<type>stringlist</type>
|
||||
<default>addons,downloads,extoptions,help,
|
||||
homepage,quickmark,tabopen,paste</default>
|
||||
homepage,quickmark,tabopen,paste</default>
|
||||
<description>
|
||||
<p>
|
||||
A list of items which, when opened in a new tab, are
|
||||
@@ -556,7 +556,11 @@
|
||||
<spec>'extendedhinttags' 'eht'</spec>
|
||||
<strut/>
|
||||
<type>regexmap</type>
|
||||
<default>[iI]:'//img | //xhtml:img'</default>
|
||||
<default>[iI]:'//img | //xhtml:img',
|
||||
[OTivVWy]:'//a[@href] | //xhtml:a[@href] |
|
||||
//area[@href] | //xhtml:area[@href] |
|
||||
//img[@src] | //xhtml:img[@src] |
|
||||
//iframe[@src] | //xhtml:iframe[@src]'</default>
|
||||
<description>
|
||||
<p>
|
||||
Defines specialized XPath expressions for arbitrary
|
||||
@@ -891,7 +895,7 @@
|
||||
<tags>'noloadplugins' 'loadplugins'</tags>
|
||||
<spec>'loadplugins' 'lpl'</spec>
|
||||
<type>regexlist</type>
|
||||
<default>\.(js|&dactyl.fileExt;)$</default>
|
||||
<default>'\.(js|&dactyl.fileExt;)$'</default>
|
||||
<description>
|
||||
<p>
|
||||
A regular expression list that defines which plugins are loaded at
|
||||
@@ -1000,7 +1004,7 @@
|
||||
<tags>'nextpattern'</tags>
|
||||
<spec>'nextpattern'</spec>
|
||||
<type>stringlist</type>
|
||||
<default>\bnext,^>$,^(>>|»)$,^(>|»),(>|»)$,\bmore\b</default>
|
||||
<default>'\bnext',^>$,'^(>>|»)$','^(>|»)','(>|»)$','\bmore\b'</default>
|
||||
<description>
|
||||
<p>
|
||||
Patterns to use when guessing the next page in a document
|
||||
@@ -1393,7 +1397,7 @@
|
||||
<tags>'wia' 'wildanchor'</tags>
|
||||
<spec>'wildanchor' 'wia'</spec>
|
||||
<type>regexlist</type>
|
||||
<default>!/ex/(back|buffer|ext|forward|help|undo)</default>
|
||||
<default>!'/ex/(back|buffer|ext|forward|help|undo)'</default>
|
||||
<description>
|
||||
<p>
|
||||
Regular expression list defining which completion groups show only
|
||||
|
||||
Reference in New Issue
Block a user