1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 23:57:59 +01:00

Get rid of offensively long list of specs for :setl and :setg, and other small help formatting changes.

This commit is contained in:
Kris Maglione
2010-12-29 23:46:56 -05:00
parent 538b91719e
commit 1de88a4016
4 changed files with 48 additions and 62 deletions

View File

@@ -458,6 +458,7 @@
<xsl:template match="dactyl:se" mode="help-2"> <xsl:template match="dactyl:se" mode="help-2">
<xsl:variable name="nodes" xmlns="&xmlns.dactyl;"> <xsl:variable name="nodes" xmlns="&xmlns.dactyl;">
<html:span style="display: inline-block;">
<ex>:set</ex> <ex>:set</ex>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<link topic="'{@opt}'"><hl key="HelpOpt"><xsl:value-of select="@opt"/></hl></link> <link topic="'{@opt}'"><hl key="HelpOpt"><xsl:value-of select="@opt"/></hl></link>
@@ -466,6 +467,7 @@
<xsl:otherwise>=</xsl:otherwise> <xsl:otherwise>=</xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:copy-of select="@*|node()"/> <xsl:copy-of select="@*|node()"/>
</html:span>
</xsl:variable> </xsl:variable>
<xsl:apply-templates select="exsl:node-set($nodes)" mode="help-1"/> <xsl:apply-templates select="exsl:node-set($nodes)" mode="help-1"/>
</xsl:template> </xsl:template>

View File

@@ -228,16 +228,17 @@
progress messages are also output to this field. progress messages are also output to this field.
</li> </li>
<li> <li>
<em>History and bookmark status</em> (<em>[+-❤⋯]</em>): The position <em>History and bookmark status</em> (<tt>[+-❤⋯]</tt>): The position
of the current page in the tab's session history; <em>+</em> and of the current page in the tab's session history; <tt>+</tt> and
<em>-</em> indicate that it is possible to move backwards and forwards <tt>-</tt> indicate that it is possible to move backwards and forwards
through the history respectively. ❤ indicates that the current page is through the history respectively. ❤ indicates that the current page is
bookmarked. Any other character indicates a QuickMark matching the bookmarked. Any other character indicates a QuickMark matching the
current page. current page.
</li> </li>
<li> <li>
<em>Tab index</em> (<em>[N/M]</em>): N is the index of the currently selected tab and M is <em>Tab index</em> (<tt>[N/M]</tt>): <tt>N</tt> is the index of the
the total number of tabs in the current window. currently selected tab and <tt>M</tt> is the total number of tabs in
the current window.
</li> </li>
<li> <li>
<em>Vertical scroll</em>: The vertical scroll percentage of the current buffer, <em>Vertical scroll</em>: The vertical scroll percentage of the current buffer,

View File

@@ -38,7 +38,7 @@
<dt>stringlist</dt> <dt>stringlist</dt>
<dd> <dd>
A comma-separated list of strings. Any comma appearing within single A comma-separated list of strings. Any comma appearing within single
or double quotes, or prefixed with a <em>\</em>, will not be treated or double quotes, or prefixed with a <tt>\</tt>, will not be treated
as an item separator. as an item separator.
</dd> </dd>
@@ -50,12 +50,12 @@
<dt>regexplist</dt> <dt>regexplist</dt>
<dd> <dd>
A comma-separated list of regular expressions. Expressions may be A comma-separated list of regular expressions. Expressions may be
prefixed with a <em>!</em>, in which case the match will be negated. A prefixed with a <tt>!</tt>, in which case the match will be negated. A
literal <em>!</em> at the beginning of the expression may be matched literal <tt>!</tt> at the beginning of the expression may be matched
with <em>[!]</em> or by placing the regular expression in quotes. with <tt>[!]</tt> or by placing the regular expression in quotes.
Generally, the first matching regular expression is used. Any comma Generally, the first matching regular expression is used. Any comma
appearing within single or double quotes, or prefixed with a appearing within single or double quotes, or prefixed with a
<em>\</em>, will not be treated as an item separator. <tt>\</tt>, will not be treated as an item separator.
</dd> </dd>
<dt/><dd tag="regexpmap"/> <dt/><dd tag="regexpmap"/>
@@ -63,7 +63,7 @@
<dd> <dd>
A combination of a <em>stringmap</em> and a <em>regexplist</em>. Each key A combination of a <em>stringmap</em> and a <em>regexplist</em>. Each key
in the <a>key</a>:<a>value</a> pair is a regexp. If the regexp begins with a in the <a>key</a>:<a>value</a> pair is a regexp. If the regexp begins with a
<em>!</em>, the sense of the match is negated, such that a non-matching <tt>!</tt>, the sense of the match is negated, such that a non-matching
expression will be considered a match and <html:i>vice versa</html:i>. expression will be considered a match and <html:i>vice versa</html:i>.
The first <a>key</a> to match yields value. The first <a>key</a> to match yields value.
</dd> </dd>
@@ -71,23 +71,24 @@
<p tag="macro-string"> <p tag="macro-string">
Some options may be given format strings containing macro replacements in Some options may be given format strings containing macro replacements in
the form of <em>&lt;<a>name</a>></em>. These tokens are replaced by the form of <tt>&lt;<a>name</a>></tt>. These tokens are replaced by
the parameter <a>name</a> as specified in the relevant documentation. the parameter <a>name</a> as specified in the relevant documentation.
If the token is in the form <em>&lt;q-<a>name</a>></em>, the value of the If the token is in the form <tt>&lt;q-<a>name</a>></tt>, the value of the
parameter is automatically <link topic="quoting">quoted</link>. If it is in parameter is automatically <link topic="quoting">quoted</link>. If it is in
the form of <em>&lt;e-<a>name</a>></em>, its value is never shown but may be the form of <tt>&lt;e-<a>name</a>></tt>, its value is never shown but may be
used to test whether the given parameter is empty. used to test whether the given parameter is empty.
</p> </p>
<p> <p>
Any substring enclosed by <em>&lt;{</em> and <em>}></em> is automatically Any substring enclosed by <em><tt>&lt;{</tt></em> and <em><tt>}></tt></em>
elided if any of the contained macros aren't currently valid. A is automatically elided if any of the contained macros aren't currently
literal <em>&lt;</em> or <em>></em> character may be included with the valid. A literal <em><tt>&lt;</tt></em> or <em><tt>></tt></em> character may
special escape sequences <em>&lt;lt></em> or <em>&lt;gt></em> respectively. be included with the special escape sequences <tt>&lt;lt></tt> or
<tt>&lt;gt></tt> respectively.
</p> </p>
<p> <p style="text-align: left">
For example, given the format string For example, given the format string
<str><em>&lt;{</em>(cmd: <em>&lt;column></em>) <em>}>&lt;{</em>line: <em>&lt;line> }>&lt;file></em></str>, <str>&lt;{(cmd: &lt;column>) }>&lt;{line: &lt;line> }>&lt;file></str>,
where <em>line</em>=<hl key="Number">32</hl> and where <em>line</em>=<hl key="Number">32</hl> and
<em>file</em>=<str delim="'">Lieder eines fahrenden Gesellen.txt</str>, <em>file</em>=<str delim="'">Lieder eines fahrenden Gesellen.txt</str>,
the result is formatted as the result is formatted as
@@ -156,16 +157,20 @@
<description> <description>
<p>For list options, toggle the specified values.</p> <p>For list options, toggle the specified values.</p>
<p>If the option is a list, the given values are toggled. Given,</p> <p style="text-align: left;">
<set opt="opt"><str delim="">foo</str>,<str delim="">bar</str></set> If the option is a list, the given values are toggled. Given,
<p>then,</p> <se opt="opt"><str delim="">foo</str>,<str delim="">bar</str></se>
<set opt="opt" op="!="><str delim="">foo</str>,<str delim="">baz</str></set> then,
<p>has the same result as</p> <se opt="opt" op="!="><str delim="">foo</str>,<str delim="">baz</str></se>
<set opt="opt"><str delim="">bar</str>,<str delim="">baz</str></set> has the same result as
<se opt="opt"><str delim="">bar</str>,<str delim="">baz</str></se>
</p>
<p>This extends to string options in a natural way, e.g.</p> <p>
<set opt="stal" op="!="><str delim="">always</str>,<str delim="">never</str></set> This extends to string options in a natural way, e.g.,
<p>toggles between the two values.</p> <se opt="stal" op="!="><str delim="">always</str>,<str delim="">never</str></se>
toggles between the two values.
</p>
</description> </description>
</item> </item>
@@ -240,18 +245,7 @@
<item> <item>
<tags>:setlocal :setl</tags> <tags>:setlocal :setl</tags>
<spec>:setl<oa>ocal</oa></spec> <spec>:setl<oa>ocal</oa></spec>
<spec>:setl<oa>ocal</oa> all</spec>
<spec>:setl<oa>ocal</oa> <a>option</a>?</spec>
<spec>:setl<oa>ocal</oa> <a>option</a></spec>
<spec>:setl<oa>ocal</oa> no<a>option</a></spec>
<spec>:setl<oa>ocal</oa> inv<a>option</a></spec>
<spec>:setl<oa>ocal</oa> <a>option</a>&amp;</spec>
<spec>:setl<oa>ocal</oa> all&amp;</spec>
<spec>:setl<oa>ocal</oa> <a>option</a>=<a>value</a></spec>
<spec>:setl<oa>ocal</oa> <a>option</a>+=<a>value</a></spec>
<spec>:setl<oa>ocal</oa> <a>option</a>^=<a>value</a></spec>
<spec>:setl<oa>ocal</oa> <a>option</a>-=<a>value</a></spec>
<description> <description>
<p> <p>
The same as <ex>:set</ex> command, but operates on current tab options The same as <ex>:set</ex> command, but operates on current tab options
@@ -262,18 +256,7 @@
<item> <item>
<tags>:setglobal :setg</tags> <tags>:setglobal :setg</tags>
<spec>:setg<oa>lobal</oa></spec> <spec>:setg<oa>lobal</oa></spec>
<spec>:setg<oa>lobal</oa> all</spec>
<spec>:setg<oa>lobal</oa> <a>option</a>?</spec>
<spec>:setg<oa>lobal</oa> <a>option</a></spec>
<spec>:setg<oa>lobal</oa> no<a>option</a></spec>
<spec>:setg<oa>lobal</oa> inv<a>option</a></spec>
<spec>:setg<oa>lobal</oa> <a>option</a>&amp;</spec>
<spec>:setg<oa>lobal</oa> all&amp;</spec>
<spec>:setg<oa>lobal</oa> <a>option</a>=<a>value</a></spec>
<spec>:setg<oa>lobal</oa> <a>option</a>+=<a>value</a></spec>
<spec>:setg<oa>lobal</oa> <a>option</a>^=<a>value</a></spec>
<spec>:setg<oa>lobal</oa> <a>option</a>-=<a>value</a></spec>
<description> <description>
<p> <p>
The same as <ex>:set</ex> command, but operates on global options only. The same as <ex>:set</ex> command, but operates on global options only.

View File

@@ -337,7 +337,7 @@ var ConfigBase = Class("ConfigBase", {
HelpBody display: block; margin: 1em auto; max-width: 100ex; padding-bottom: 1em; margin-bottom: 4em; border-bottom-width: 1px; HelpBody display: block; margin: 1em auto; max-width: 100ex; padding-bottom: 1em; margin-bottom: 4em; border-bottom-width: 1px;
HelpBorder;*;dactyl://help/* border-color: silver; border-width: 0px; border-style: solid; HelpBorder;*;dactyl://help/* border-color: silver; border-width: 0px; border-style: solid;
HelpCode;;;FontCode display: block; white-space: pre; margin-left: 2em; HelpCode;;;FontCode display: block; white-space: pre; margin-left: 2em;
HelpTT;;;FontFixed HelpTT;html|tt;dactyl://help/*;FontCode
HelpDefault;;;FontCode display: inline-block; margin: -1px 1ex 0 0; white-space: pre; vertical-align: text-top; HelpDefault;;;FontCode display: inline-block; margin: -1px 1ex 0 0; white-space: pre; vertical-align: text-top;