1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 03:47:58 +01:00

Improve behavior of gf. Remove "|" alias.

This commit is contained in:
Kris Maglione
2010-08-28 18:02:03 -04:00
parent 924863cd61
commit e3a2df403d
4 changed files with 12 additions and 26 deletions

View File

@@ -940,6 +940,11 @@ const Buffer = Module("buffer", {
url = url.substr(PREFIX.length); url = url.substr(PREFIX.length);
else else
url = PREFIX + url; url = PREFIX + url;
let sh = history.session;
if (sh[sh.index].URI.spec == url)
window.getWebNavigation().gotoIndex(sh.index);
else
dactyl.open(url, { hide: true }); dactyl.open(url, { hide: true });
} }
}, },
@@ -1470,17 +1475,13 @@ const Buffer = Module("buffer", {
{ count: true }); { count: true });
mappings.add(myModes, ["gf"], mappings.add(myModes, ["gf"],
"View source", "Toggle between rendered and source view",
function () { buffer.viewSource(null, false); }); function () { buffer.viewSource(null, false); });
mappings.add(myModes, ["gF"], mappings.add(myModes, ["gF"],
"View source with an external editor", "View source with an external editor",
function () { buffer.viewSource(null, true); }); function () { buffer.viewSource(null, true); });
mappings.add(myModes, ["|"],
"Toggle between rendered and source view",
function () { buffer.viewSource(null, false); });
mappings.add(myModes, ["gi"], mappings.add(myModes, ["gi"],
"Focus last used input field", "Focus last used input field",
function (count) { function (count) {

View File

@@ -51,8 +51,8 @@
<spec>gf</spec> <spec>gf</spec>
<description> <description>
<p> <p>
View source. Opens the source code of the current web site with the internal View source. Toggles between the source and rendered
editor in the current tab. content of the page.
</p> </p>
</description> </description>
</item> </item>
@@ -84,18 +84,6 @@
</item> </item>
<item>
<tags>|</tags>
<spec>|</spec>
<description>
<p>
Toggle between rendered and source view. Alternates the page in the current tab
between a normally rendered view and the internal editor source view.
</p>
</description>
</item>
<h2 tag="motion scrolling">Motion commands</h2> <h2 tag="motion scrolling">Motion commands</h2>
<item> <item>

View File

@@ -120,11 +120,6 @@ This file contains a list of all available commands, mappings and options.
</dl> </dl>
<dl>
<dt><k>\</k></dt> <dd>Toggle between rendered and source view</dd>
</dl>
<dl> <dl>
<dt><k>/</k></dt> <dd>Search forward for a pattern</dd> <dt><k>/</k></dt> <dd>Search forward for a pattern</dd>
<dt><k>?</k></dt> <dd>Search backwards for a pattern</dd> <dt><k>?</k></dt> <dd>Search backwards for a pattern</dd>
@@ -174,7 +169,7 @@ This file contains a list of all available commands, mappings and options.
<dt><k>gT</k></dt> <dd>Go to previous tab</dd> <dt><k>gT</k></dt> <dd>Go to previous tab</dd>
<dt><k>gU</k></dt> <dd>Go to the root of the website</dd> <dt><k>gU</k></dt> <dd>Go to the root of the website</dd>
<dt><k>gb</k></dt> <dd>Repeat last <ex>:buffer<oa>!</oa></ex> command</dd> <dt><k>gb</k></dt> <dd>Repeat last <ex>:buffer<oa>!</oa></ex> command</dd>
<dt><k>gf</k></dt> <dd>View source</dd> <dt><k>gf</k></dt> <dd>Toggle between rendered and source view</dd>
<dt><k>gg</k></dt> <dd>Go to the top of the document</dd> <dt><k>gg</k></dt> <dd>Go to the top of the document</dd>
<dt><k>gh</k></dt> <dd>Open homepage</dd> <dt><k>gh</k></dt> <dd>Open homepage</dd>
<dt><k>gi</k></dt> <dd>Focus last used input field</dd> <dt><k>gi</k></dt> <dd>Focus last used input field</dd>

View File

@@ -1,6 +1,8 @@
2009-XX-XX: 2009-XX-XX:
* Replaced 'focuscontent' with 'strictfocus' * Replaced 'focuscontent' with 'strictfocus'
* Replaced previous incremental search implementation * Replaced previous incremental search implementation
* gf now toggles between source and content view.
'|' key binding has been removed.
* :open now only opens files begining with / or ./ * :open now only opens files begining with / or ./
* Page zoom information is now shown in the status bar * Page zoom information is now shown in the status bar
* Added ZO, ZI, ZM, and ZR as aliases for zO, zI, zM, and zR * Added ZO, ZI, ZM, and ZR as aliases for zO, zI, zM, and zR