1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 20:27:57 +01:00

swapped meaning of gf and gF

This commit is contained in:
Martin Stubenschrott
2008-01-03 11:43:28 +00:00
parent 5ea202647b
commit 488e55390c
2 changed files with 11 additions and 11 deletions

View File

@@ -2521,11 +2521,7 @@ vimperator.Commands = function () //{{{
function (args, special) function (args, special)
{ {
var url = args || vimperator.buffer.URL; var url = args || vimperator.buffer.URL;
if (special) // internal editor if (special) // external editor
{
vimperator.open("view-source:" + url)
}
else
{ {
// TODO: make that a helper function // TODO: make that a helper function
// TODO: save return value in v:shell_error // TODO: save return value in v:shell_error
@@ -2543,11 +2539,15 @@ vimperator.Commands = function () //{{{
args.push(url) args.push(url)
vimperator.callFunctionInThread(newThread, vimperator.run, [prog, args, true]); vimperator.callFunctionInThread(newThread, vimperator.run, [prog, args, true]);
} }
else
{
vimperator.open("view-source:" + url)
}
}, },
{ {
usage: ["vie[wsource][!] [url]"], usage: ["vie[wsource][!] [url]"],
shortHelp: "View source code of current document", shortHelp: "View source code of current document",
help: "When ! is given, it is opened with the internal editor, otherwise with the external." help: "When ! is given, it is opened with the external editor."
} }
)); ));
commandManager.add(new vimperator.Command(["viu[sage]"], commandManager.add(new vimperator.Command(["viu[sage]"],

View File

@@ -571,16 +571,16 @@ vimperator.Mappings = function () //{{{
function () { vimperator.commands.viewsource(); }, function () { vimperator.commands.viewsource(); },
{ {
shortHelp: "View source", shortHelp: "View source",
help: "Opens the source code of the current website with the external editor specified " + help: "Opens the source code of the current website with the internal editor in the current tab."
"by the <code class='option'>'editor'</code> option. For now the external editor " +
"must be able to download and open files from a remote URL."
} }
)); ));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gF"], addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gF"],
function () { vimperator.commands.viewsource(null, true); }, function () { vimperator.commands.viewsource(null, true); },
{ {
shortHelp: "View source in current tab", shortHelp: "View source with an external editor",
help: "Opens the source code of the current website with the internal editor." help: "Opens the source code of the current website with the external editor specified " +
"by the <code class='option'>'editor'</code> option. For now the external editor " +
"must be able to download and open files from a remote URL."
} }
)); ));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gh"], addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gh"],