1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 00:28:00 +01:00

Add \ mapping to toggle between rendered and source view.

Like lynx, elinks et al.
This commit is contained in:
Doug Kearns
2009-05-22 18:30:39 +10:00
parent da89552a1e
commit 62853b2498
4 changed files with 24 additions and 1 deletions

View File

@@ -365,6 +365,18 @@ function Buffer() //{{{
"View source with an external editor",
function () { buffer.viewSource(null, true); });
mappings.add(myModes, ["\\"],
"Toggle between rendered and source view",
function ()
{
const scheme = "view-source";
if (util.newURI(buffer.URL).scheme == scheme)
liberator.open(buffer.URL.substr(scheme.length + 1));
else
liberator.open(scheme + ":" + buffer.URL)
});
mappings.add(myModes, ["gi"],
"Focus last used input field",
function (count)

View File

@@ -1,6 +1,7 @@
2009-XX-XX:
* version 2.2a1pre
* add @: mapping
* add @: mapping - repeat the last Ex command
* add \ mapping - toggle between rendered and source view
2009-05-21:
* version 2.1

View File

@@ -54,6 +54,14 @@ source of that document. When [!] is given, it is opened with the external
editor.
________________________________________________________________________________
|\| +
||\||
________________________________________________________________________________
Toggle between rendered and source view. Alternates the page in the current tab
between a normally rendered view and the internal editor source view.
________________________________________________________________________________
section:Motion{nbsp}commands[motion,scrolling]
|^| |0| +

View File

@@ -78,6 +78,8 @@ section:Normal{nbsp}mode[normal-index]
||[m]~[m]|| Open home directory +
||[m]\[m]|| Toggle between rendered and source view +
||[m]/[m]|| Search forward for a pattern +
||[m]?[m]|| Search backwards for a pattern +
||[m]*[m]|| Find word under cursor +