mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 08:44:13 +01:00
Standardize formatting of :set examples in :help.
This commit is contained in:
@@ -454,6 +454,31 @@
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dactyl:se" mode="help-2">
|
||||
<xsl:variable name="nodes" xmlns="&xmlns.dactyl;">
|
||||
<ex>:set</ex>
|
||||
<xsl:text> </xsl:text>
|
||||
<link topic="'{@opt}'"><hl key="HelpOpt"><xsl:value-of select="@opt"/></hl></link>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@op and @op != ''"><xsl:value-of select="@op"/></xsl:when>
|
||||
<xsl:otherwise>=</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:copy-of select="@*|node()"/>
|
||||
</xsl:variable>
|
||||
<xsl:apply-templates select="exsl:node-set($nodes)" mode="help-1"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dactyl:set" mode="help-2">
|
||||
<xsl:variable name="nodes">
|
||||
<code xmlns="&xmlns.dactyl;">
|
||||
<se opt="{@opt}" op="{@op}">
|
||||
<xsl:copy-of select="@*|node()"/>
|
||||
</se>
|
||||
</code>
|
||||
</xsl:variable>
|
||||
<xsl:apply-templates select="exsl:node-set($nodes)" mode="help-1"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dactyl:description | dactyl:example | dactyl:spec" mode="help-2">
|
||||
<div>
|
||||
<xsl:if test="self::dactyl:description"><xsl:attribute name="dactyl:highlight">HelpDescription</xsl:attribute></xsl:if>
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
|
||||
<p>Set the filetype to mail when editing email at Gmail:</p>
|
||||
|
||||
<code><ex>:autocmd LocationChange</ex> !<str delim="'">mail\.google\.com</str> <ex>:set editor=<str>gvim -f</str></ex>
|
||||
<ex>:autocmd LocationChange</ex> <str delim="'">mail\.google\.com</str> <ex>:set editor=<str>gvim -f -c 'set ft=mail'</str></ex></code>
|
||||
<code><ex>:autocmd LocationChange</ex> !<str delim="'">mail\.google\.com</str> <se opt="editor"><str>gvim -f</str></se>
|
||||
<ex>:autocmd LocationChange</ex> <str delim="'">mail\.google\.com</str> <se opt="editor"><str>gvim -f -c 'set ft=mail'</str></se></code>
|
||||
|
||||
</document>
|
||||
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
<p>works like</p>
|
||||
<code><ex>:map \h</ex> <ex>:echo <str>Hello</str><k name="CR"/></ex></code>
|
||||
<p>but after</p>
|
||||
<code><ex>:set mapleader=<str>,</str></ex></code>
|
||||
<set opt="mapleader"><str>,</str></set>
|
||||
<p>it works like</p>
|
||||
<code><ex>:map ,h</ex> <ex>:echo <str>Hello</str><k name="CR"/></ex></code>
|
||||
</description>
|
||||
|
||||
@@ -151,11 +151,11 @@
|
||||
<p>For list options, toggle the specified values.</p>
|
||||
|
||||
<p>If the option is a list, the given values are toggled. Given,</p>
|
||||
<code><ex>:set opt=foo,bar</ex></code>
|
||||
<set opt="opt"><str delim="">foo</str>,<str delim="">bar</str></set>
|
||||
<p>then,</p>
|
||||
<code><ex>:set opt!=foo,baz</ex></code>
|
||||
<set opt="opt" op="!="><str delim="">foo</str>,<str delim="">baz</str></set>
|
||||
<p>has the same result as</p>
|
||||
<code><ex>:set opt=bar,baz</ex></code>
|
||||
<set opt="opt"><str delim="">bar</str>,<str delim="">baz</str></set>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
@@ -517,7 +517,7 @@
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
The order is important, such that <ex>:set complete=bsf</ex> will
|
||||
The order is important, such that <se opt="complete"><str delim="">bsf</str></se> will
|
||||
list bookmarks followed by matching quick searches and then
|
||||
matching files.
|
||||
</p>
|
||||
@@ -978,13 +978,13 @@
|
||||
For example, to prepend to the default value of this option to load
|
||||
all plugins except for <em>foobar-plugin</em>, you could use:
|
||||
</p>
|
||||
<code><ex>:se lpl^=</ex>!<str delim="'">foobar-plugin</str></code>
|
||||
<set opt="loadplugins" op="^=">!<str delim="'">foobar-plugin</str></set>
|
||||
<p>
|
||||
Alternatively, you can specify which plugins to load and which to
|
||||
omit in your <tt><t>&dactyl.name;rc</t></tt> using something like
|
||||
the following:
|
||||
</p>
|
||||
<code><ex>:set loadplugins=</ex>!<str delim="'">foo|bar</str>,<str delim="'">\.(js|&dactyl.fileExt;)$</str></code>
|
||||
<set opt="loadplugins">!<str delim="'">foo|bar</str>,<str delim="'">\.(js|&dactyl.fileExt;)$</str></set>
|
||||
<p>
|
||||
That will load all plugins but <em>foo</em> and <em>bar</em>.
|
||||
</p>
|
||||
@@ -1135,7 +1135,7 @@
|
||||
through directly to &dactyl.host;, and are not processed
|
||||
by &dactyl.appName; in any way.
|
||||
</p>
|
||||
<example><ex>:set passkeys+=</ex><str delim="'">https://mail\.google\.com/</str>:<str delim="">jk<k name="Return"/></str></example>
|
||||
<example><set opt="passkeys" op="+="><str delim="'">https://mail\.google\.com/</str>:<str delim="">jk<k name="Return"/></str></set></example>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
@@ -1225,7 +1225,7 @@
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<code><ex>:set runtimepath=~/my&dactyl.name;,~/.&dactyl.name;</ex></code>
|
||||
<set opt="runtimepath"><str delim="">~/my&dactyl.name;</str>,<str delim="">~/.&dactyl.name;</str></set>
|
||||
|
||||
<p>
|
||||
This will search for plugins in both
|
||||
@@ -1427,7 +1427,7 @@
|
||||
Set the application name shown after the current page title in
|
||||
&dactyl.host;'s title bar.
|
||||
</p>
|
||||
<example><ex>:set titlestring=<str>Mozilla &dactyl.host;</str></ex></example>
|
||||
<example><set opt="titlestring"><str>Mozilla &dactyl.host;</str></set></example>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
@@ -1443,7 +1443,7 @@
|
||||
are never split. With the default value, the following will open
|
||||
three URLs in the current tab and two new background tabs,
|
||||
</p>
|
||||
<code><ex>:open google Linux | wikipedia Arch Linux | imdb March of the Penguins</ex></code>
|
||||
<code><ex>:open <str delim="">google Linux</str> | <str delim="">wikipedia Arch Linux</str> | <str delim="">imdb Serenity</str></ex></code>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
@@ -1540,7 +1540,7 @@
|
||||
the following will ignore object files and Vim swap files:
|
||||
</p>
|
||||
|
||||
<code><ex>:set wildignore=<str delim="'">\.o$</str>,<str delim="'">^\..*\.s[a-z]{2}$</str></ex></code>
|
||||
<set opt="wildignore"><str delim="'">\.o$</str>,<str delim="'">^\..*\.s[a-z]{2}$</str></set>
|
||||
|
||||
<note>Unlike Vim, each pattern is a regular expression rather than a glob.</note>
|
||||
</description>
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
navigation, and tool bars by default. If you find it uncomfortable to work
|
||||
without them, you can re-enable them by typing
|
||||
</p>
|
||||
<code><ex>:set</ex> <link topic="'guioptions'"><hl key="HelpOpt">guioptions</hl></link><hl key="HelpEx">+=mT</hl><k name="Return"/></code>
|
||||
<set opt="guioptions" op="+="><str delim="">mT</str><k name="Return"/></set>
|
||||
<p>
|
||||
If you have trouble remembering commands or keyboard shortcuts, you can
|
||||
bring up this help page at any time by typing <ex>:help</ex> or
|
||||
<k name="F1"/>. If you find that you don't like &dactyl.appName; at all,
|
||||
you can disable it by typing <ex>:extdisable &dactyl.appName;</ex> or
|
||||
delete it entirely by typing <ex>:extdelete &dactyl.appName;</ex>
|
||||
you can disable it by typing <ex>:extdisable <str delim="">&dactyl.appName;</str></ex> or
|
||||
delete it entirely by typing <ex>:extdelete <str delim="">&dactyl.appName;</str></ex>
|
||||
</p>
|
||||
|
||||
<h2 tag="overview">Help topics</h2>
|
||||
@@ -151,7 +151,7 @@
|
||||
<li>Hit-a-hint like navigation of links (start with <k>f</k> to follow a link)</li>
|
||||
<li>Advanced completion of bookmark and history URLs</li>
|
||||
<li>Vim-like status line with a Wget-like progress bar</li>
|
||||
<li>Minimal GUI (easily hide superfluous menubar and toolbar with <ex>:set guioptions=</ex>)</li>
|
||||
<li>Minimal GUI (easily hide superfluous menubar and toolbar with <se opt="guioptions"/>)</li>
|
||||
<li>Ability to <ex>:source</ex> JavaScript, CSS, and &dactyl.appName; command files</li>
|
||||
<li>Easy quick searches (see <ex>:open</ex>)</li>
|
||||
<li>Count supported for many commands (<em>3</em><k name="C-o"/> will go back 3 pages)</li>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
regain these by issuing the command
|
||||
</p>
|
||||
|
||||
<code><ex>:set go+=mTB<k name="CR"/></ex></code>
|
||||
<set opt="go+"><str delim="">mTB</str><k name="CR"/></set>
|
||||
|
||||
<p>
|
||||
where <k name="CR"/> represents pressing the <k name="Enter"/> or <k name="Return"/> key.
|
||||
@@ -36,8 +36,8 @@
|
||||
<p>
|
||||
However, in this author's opinion, the best way to get familiar with
|
||||
&dactyl.appName; is to leave these disabled for now. (The above action can be
|
||||
reversed with <ex>:set go=<k name="CR"/></ex>) You can look at the entry for <o>guioptions</o> in
|
||||
<t>options</t> for more information on this.
|
||||
reversed with <se opt="go" op="&"/><k name="CR"/>) You can look at the entry
|
||||
for <o>guioptions</o> in <t>options</t> for more information on this.
|
||||
</p>
|
||||
|
||||
<h2 tag="modal">&dactyl.appName;'s modal interface</h2>
|
||||
@@ -360,7 +360,7 @@
|
||||
|
||||
<p>
|
||||
Alternatively, you can do this the old-fashioned way: re-enable the menubar,
|
||||
as above, with <ex>:set go+=m</ex>, and select <em>Add-ons</em> from the <em>Tools</em> menu.
|
||||
as above, with <se opt="go" op="+=">m</se>, and select <em>Add-ons</em> from the <em>Tools</em> menu.
|
||||
</p>
|
||||
|
||||
<h2 tag="support">I'm interested… but lost!</h2>
|
||||
|
||||
Reference in New Issue
Block a user