1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-05 04:25:47 +01:00

Fix now spurious :autocmd examples.

--HG--
branch : mode-refactoring
This commit is contained in:
Kris Maglione
2010-10-09 12:56:05 -04:00
parent 08ed30f07a
commit 0d3c9bd613
2 changed files with 7 additions and 7 deletions

View File

@@ -271,7 +271,9 @@ const Buffer = Module("buffer", {
statusline.updateUrl();
statusline.updateProgress();
autocommands.trigger("LocationChange", { url: buffer.URL });
util.timeout(function () {
autocommands.trigger("LocationChange", { url: buffer.URL });
});
// if this is not delayed we get the position of the old buffer
util.timeout(function () {

View File

@@ -90,18 +90,16 @@
<p>Enable <em>passthrough</em> mode on all Google sites:</p>
<code><ex>:autocmd LocationChange .* js modes.passAllKeys = /google\.com/.test(buffer.URL)</ex></code>
<code><ex>:autocmd LocationChange</ex> <str delim="'">google\.com</str> <hl key="HelpArg">-js</hl> modes.push(modes.PASS_THROUGH)</code>
<p>Enable <em>passthrough</em> mode on <em>some</em> Google sites:</p>
<code><ex>:autocmd LocationChange .* js modes.passAllKeys = /(www|mail)\.google\.com/.test(buffer.URL)</ex></code>
<code><ex>:autocmd LocationChange</ex> <str delim="'">(www|mail)\.google\.com</str> <hl key="HelpArg">-js</hl> modes.push(modes.PASS_THROUGH)</code>
<p>Set the filetype to mail when editing email at Gmail:</p>
<code><!-- Why is the XSLT processor mangling newlines? -->
<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>
<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>
</document>