diff --git a/common/content/buffer.js b/common/content/buffer.js index 1074be81..f8d07e03 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -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) diff --git a/vimperator/NEWS b/vimperator/NEWS index 318858b2..3edd04b7 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -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 diff --git a/vimperator/locale/en-US/buffer.txt b/vimperator/locale/en-US/buffer.txt index 4a6975e0..8029020d 100644 --- a/vimperator/locale/en-US/buffer.txt +++ b/vimperator/locale/en-US/buffer.txt @@ -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| + diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index 8c7349b9..082efdde 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -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 +