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

many small help fixes

This commit is contained in:
Martin Stubenschrott
2007-08-16 09:31:37 +00:00
parent d672382234
commit 0c7844dbeb
5 changed files with 97 additions and 90 deletions

View File

@@ -296,7 +296,7 @@ function Commands() //{{{
usage: ["bma[rk] [-t {title}] [url]"], usage: ["bma[rk] [-t {title}] [url]"],
short_help: "Add a bookmark", short_help: "Add a bookmark",
help: "If you don't add a custom title, either the title of the web page or the URL will be taken as the title.<br/>" + help: "If you don't add a custom title, either the title of the web page or the URL will be taken as the title.<br/>" +
"You can omit the optional <code class=\"argument\">[url]</code> argument, so just do <code class=\"command\">:bmadd</code> to bookmark the currently loaded web page with a default title and without any tags.<br/>" + "You can omit the optional <code class=\"argument\">[url]</code> argument, so just do <code class=\"command\">:bmark</code> to bookmark the currently loaded web page with a default title and without any tags.<br/>" +
" -t \"custom title\"<br/>" + " -t \"custom title\"<br/>" +
"The following options will be interpreted in the future:<br/>" + "The following options will be interpreted in the future:<br/>" +
" -T comma,separated,tag,list<br/>" + " -T comma,separated,tag,list<br/>" +
@@ -333,7 +333,8 @@ function Commands() //{{{
{ {
usage: ["b[uffer] {url|index}"], usage: ["b[uffer] {url|index}"],
short_help: "Go to buffer from buffer list", short_help: "Go to buffer from buffer list",
help: "Argument can be either the buffer index or the full URL.", help: "Argument can be either the buffer index or the full URL.<br/>" +
"Use <code class=\"mapping\">b</code> as a shortcut to open this prompt.",
completer: function(filter) { return vimperator.completion.get_buffer_completions(filter); } completer: function(filter) { return vimperator.completion.get_buffer_completions(filter); }
} }
)); ));
@@ -468,14 +469,14 @@ function Commands() //{{{
function(args) { vimperator.echo(args); } , function(args) { vimperator.echo(args); } ,
{ {
short_help: "Display a string at the bottom of the window", short_help: "Display a string at the bottom of the window",
help: "Echo all arguments of this command. Useful for showing informational messages.<br/>Multiple lines WILL be separated by \\n." help: "Echo all arguments of this command. Useful for showing informational messages.<br/>Multiple lines can be separated by \\n."
} }
)); ));
addDefaultCommand(new Command(["echoe[rr]"], addDefaultCommand(new Command(["echoe[rr]"],
function(args) { vimperator.echoerr(args); } , function(args) { vimperator.echoerr(args); } ,
{ {
short_help: "Display an error string at the bottom of the window", short_help: "Display an error string at the bottom of the window",
help: "Echo all arguments of this command highlighted in red. Useful for showing important messages.<br/>Multiple lines WILL be separated by \\n." help: "Echo all arguments of this command highlighted in red. Useful for showing important messages."
} }
)); ));
addDefaultCommand(new Command(["exe[cute]"], addDefaultCommand(new Command(["exe[cute]"],
@@ -483,7 +484,7 @@ function Commands() //{{{
{ {
usage: ["exe[cute] {expr1} [ ... ]"], usage: ["exe[cute] {expr1} [ ... ]"],
short_help: "Execute the string that results from the evaluation of {expr1} as an Ex command.", short_help: "Execute the string that results from the evaluation of {expr1} as an Ex command.",
help: "<code class=\"command\">:execute &#34;echo test&#34;</code> would show a message with the text &#34;test&#34;.<br/>" help: "<code class=\"command\">:execute echo test</code> would show a message with the text &#34;test&#34;.<br/>"
} }
)); ));
addDefaultCommand(new Command(["exu[sage]"], addDefaultCommand(new Command(["exu[sage]"],
@@ -615,7 +616,8 @@ function Commands() //{{{
{ {
usage: ["map {lhs} {rhs}", "map {lhs}", "map"], usage: ["map {lhs} {rhs}", "map {lhs}", "map"],
short_help: "Map the key sequence {lhs} to {rhs}", short_help: "Map the key sequence {lhs} to {rhs}",
help: "The {rhs} is remapped, allowing for nested and recursive mappings." help: "The {rhs} is remapped, allowing for nested and recursive mappings.<br/>" +
"Mappings are NOT saved during sessions, make sure you put them in your vimperatorrc file!"
} }
)); ));
addDefaultCommand(new Command(["mapc[lear]"], addDefaultCommand(new Command(["mapc[lear]"],
@@ -631,7 +633,8 @@ function Commands() //{{{
}, },
{ {
short_help: "Remove all mappings", short_help: "Remove all mappings",
help: "TODO" help: "All user-defined mappings which were set by " +
"<code class=\"command\">:map</code> or <code class=\"command\">:noremap</code> are cleared."
} }
)); ));
addDefaultCommand(new Command(["ma[rk]"], addDefaultCommand(new Command(["ma[rk]"],
@@ -693,7 +696,7 @@ function Commands() //{{{
{ {
usage: ["norm[al][!] {commands}"], usage: ["norm[al][!] {commands}"],
short_help: "Execute Normal mode commands", short_help: "Execute Normal mode commands",
help: "TODO" help: "<code class=\"command\">:normal 20j</code> would scroll 20 lines down."
} }
)); ));
// TODO: remove duplication in :map // TODO: remove duplication in :map
@@ -747,7 +750,7 @@ function Commands() //{{{
{ {
usage: ["no[remap] {lhs} {rhs}", "no[remap] {lhs}", "no[remap]"], usage: ["no[remap] {lhs} {rhs}", "no[remap] {lhs}", "no[remap]"],
short_help: "Map the key sequence {lhs} to {rhs}", short_help: "Map the key sequence {lhs} to {rhs}",
help: "No remapping of the {rhs} is performed." help: "No remapping of the {rhs} is performed.<br/> NOTE: :noremap does not yet work as reliable as :map."
} }
)); ));
addDefaultCommand(new Command(["o[pen]", "e[dit]"], addDefaultCommand(new Command(["o[pen]", "e[dit]"],
@@ -891,7 +894,7 @@ function Commands() //{{{
function() { saveDocument(window.content.document); }, function() { saveDocument(window.content.document); },
{ {
short_help: "Save current web page to disk", short_help: "Save current web page to disk",
help: "Open the original Firefox \"Save page as...\" dialog in a new tab.<br/>" + help: "Opens the original Firefox \"Save page as...\" dialog.<br/>" +
"There, you can save the current web page to disk with various options." "There, you can save the current web page to disk with various options."
} }
)); ));

View File

@@ -152,7 +152,6 @@ fieldset.paypal {
color: HighlightText !important; color: HighlightText !important;
} }
#vimperator-statusline > label { #vimperator-statusline > label {
padding: 0px 0px 0px 8px; padding: 0px 0px 0px 8px;
} }

View File

@@ -150,9 +150,10 @@ vimperator.help = function(section, easter) //{{{
'If you like it, but can\'t remember the shortcuts, press <code class="mapping">F1</code> or <code class="command">:help</code> to get this help window back.</p>\n' + 'If you like it, but can\'t remember the shortcuts, press <code class="mapping">F1</code> or <code class="command">:help</code> to get this help window back.</p>\n' +
'<p>Since Vimperator\'s GUI is embedded into a toolbar, it may look too 3D-like with the default theme. ' + '<p>Since Vimperator\'s GUI is embedded into a toolbar, it may look too 3D-like with the default theme. ' +
'For the best experience, I therefore recommend the <a href="https://addons.mozilla.org/firefox/364/">Whitehart</a> theme.</p>\n' + 'For the best experience, I therefore recommend the <a href="https://addons.mozilla.org/firefox/364/">Whitehart</a> theme or any other flat theme.</p>\n' +
'<p>Vimperator was written by <a href="mailto:stubenschrott@gmx.net">Martin Stubenschrott</a>. If you appreciate my work on Vimperator, you can either send me greetings, patches or make a donation: </p>\n' + '<p>Vimperator was written by <a href="mailto:stubenschrott@gmx.net">Martin Stubenschrott</a>.' +
'If you appreciate my work on Vimperator and want to encourge me working on it more, you can either send me greetings, patches or make a donation: </p>\n' +
'<form action="https://www.paypal.com/cgi-bin/webscr" method="post">\n<fieldset class="paypal">' + '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">\n<fieldset class="paypal">' +
'<input type="hidden" name="cmd" value="_s-xclick"/>' + '<input type="hidden" name="cmd" value="_s-xclick"/>' +
@@ -162,7 +163,7 @@ vimperator.help = function(section, easter) //{{{
'<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBDDJfc+lXLBSAM9XSWv/ebzG/L7PTqYiIXaWVg8pfinDsfYaAcifcgCTuApg4v/VaZIQ/hLODzQu2EvmjGXP0twErA/Q8G5gx0l197PJSyVXb1sLwd1mgOdLF4t0HmDCdEI9z3H6CMhsb3xVwlfpzllSfCIqzlSpx4QtdzEZGzLDELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0D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IwYJKoZIhvcNAQkEMRYEFCirrvlwYVHQiNEEbM6ikfx9+Dm5MA0GCSqGSIb3DQEBAQUABIGAtbsR8GdCdURLziozXLSdtY+zJZUPPeQFXXy2V1S/3ldiN+pRvd4HI7xz8mOY1UaKJZpwZnOosy9MflL1/hbiEtEyQ2Dm/s4jnTcJng/NjLIZu+0NYxXRJhB+zMJubnMMMjzNrGlqI4F2HAB/bCA1eOJ5B83Of3dA4rk/T/8GoSQ=-----END PKCS7-----"/>' +
'</fieldset>\n</form>\n' + '</fieldset>\n</form>\n' +
'<p>Of course as a believer in free open source software, only make a donation if you really like Vimperator, and the money doesn\'t hurt - otherwise just use it, recommend it and like it :)</p>\n' '<p>Of course as a believer in free open source software, only make a donation if you really like Vimperator and the money doesn\'t hurt - otherwise just use it, recommend it and like it :)</p>\n'
var mappings = '<span style="float: right"><code class="tag">mappings</code></span><h2 id="mappings">Mappings</h2>\n' + var mappings = '<span style="float: right"><code class="tag">mappings</code></span><h2 id="mappings">Mappings</h2>\n' +
'<p>The denotion of modifier keys is like in Vim, so C- means the Control key, M- the Meta key, A- the Alt key and S- the Shift key.</p>'+ '<p>The denotion of modifier keys is like in Vim, so C- means the Control key, M- the Meta key, A- the Alt key and S- the Shift key.</p>'+
@@ -222,6 +223,7 @@ vimperator.help = function(section, easter) //{{{
doc.close(); doc.close();
// TODO: change to getBoundingClientRect() for FF 3.0
function cumulativeOffset(element) function cumulativeOffset(element)
{ {
var valueT = 0, valueL = 0; var valueT = 0, valueL = 0;

View File

@@ -294,21 +294,69 @@ function Mappings() //{{{
// //
// Normal mode // Normal mode
// {{{ // {{{
// vimperator management
addDefaultMap(new Map(vimperator.modes.NORMAL, ["'", "`"], addDefaultMap(new Map(vimperator.modes.NORMAL, ["<F1>"],
function(arg) { vimperator.marks.jumpTo(arg) }, function() { vimperator.help(null); },
{ {
short_help: "Jump to the mark in the current buffer", short_help: "Open help window",
usage: ["'{a-zA-Z}"], help: "The default section is shown, if you need help for a specific topic, try <code class=\"command\">:help &lt;F1&gt;</code>."
help: "Marks a-z are local to the buffer, whereas A-Z are valid between buffers.",
flags: Mappings.flags.ARGUMENT
} }
)); ));
addDefaultMap(new Map(vimperator.modes.NORMAL, [":"],
function() { vimperator.commandline.open(":", "", vimperator.modes.EX); },
{
short_help: "Start command line mode",
help: "In command line mode, you can perform extended commands, which may require arguments."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["I"],
function() { vimperator.addMode(null, vimperator.modes.ESCAPE_ALL_KEYS); },
{
short_help: "Disable vimperator keys",
help: "Starts an 'ignorekeys' mode, where all keys except <code class=\"mapping\">&lt;Esc&gt;</code> are passed to the next event handler.<br/>" +
"This is especially useful, if JavaScript controlled forms like the RichEdit form fields of GMail don't work anymore.<br/>" +
"To exit this mode, press <code class=\"mapping\">&lt;Esc&gt;</code>. If you also need to pass <code class=\"mapping\">&lt;Esc&gt;</code>" +
"in this mode to the web page, prepend it with <code class=\"mapping\">&lt;C-v&gt;</code>."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<C-v>"],
function() { vimperator.addMode(null, vimperator.modes.ESCAPE_ONE_KEY); },
{
short_help: "Escape next key",
help: "If you need to pass a certain key to a javascript form field or another extension prefix the key with <code class=\"mapping\">&lt;C-v&gt;</code>.<br/>" +
"Also works to unshadow Firefox shortcuts like <code class=\"mapping\">&lt;C-o&gt;</code> which are otherwise hidden in vimperator.<br/>" +
"When in 'ignorekeys' mode (activated by <code class=\"mapping\">&lt;I&gt;</code>), <code class=\"mapping\">&lt;C-v&gt;</code> will pass the next key to Vimperator instead of the web page."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<C-c>"],
BrowserStop,
{
short_help: "Stop loading",
help: "Stops loading the current web page."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<Nop>"],
function() { return; },
{
short_help: "Do nothing",
help: "This command is useful for disabling a specific mapping. " +
"<code class=\"command\">:map &lt;C-n&gt; &lt;Nop&gt;</code> will prevent <code class=\"mapping\">&lt;C-n&gt;</code> from doing anything."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<Esc>", "<C-[>"],
vimperator.events.onEscape,
{
short_help: "Focus content",
help: "Exits any command line or hint mode and returns to browser mode.<br/>" +
"Also focuses the web page, in case a form field has focus and eats our key presses."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["]f"], addDefaultMap(new Map(vimperator.modes.NORMAL, ["]f"],
function(count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, true); }, function(count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, true); },
{ {
short_help: "Focus next frame", short_help: "Focus next frame",
help: "Transfers keyboard focus to the <code class=\"argument\">[count]</code>th next frame in order. The newly focused frame is briefly colored red.", help: "Transfers keyboard focus to the <code class=\"argument\">[count]</code>th next frame in order. The newly focused frame is briefly colored red. Does not wrap.",
flags: Mappings.flags.COUNT flags: Mappings.flags.COUNT
} }
)); ));
@@ -316,7 +364,7 @@ function Mappings() //{{{
function(count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, false); }, function(count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, false); },
{ {
short_help: "Focus previous frame", short_help: "Focus previous frame",
help: "Transfers keyboard focus to the <code class=\"argument\">[count]</code>th previous frame in order. The newly focused frame is briefly colored red.", help: "Transfers keyboard focus to the <code class=\"argument\">[count]</code>th previous frame in order. The newly focused frame is briefly colored red. Does not wrap.",
flags: Mappings.flags.COUNT flags: Mappings.flags.COUNT
} }
)); ));
@@ -331,7 +379,8 @@ function Mappings() //{{{
function() { vimperator.buffer.list(true); }, function() { vimperator.buffer.list(true); },
{ {
short_help: "Toggle buffer list", short_help: "Toggle buffer list",
help: "Toggles the display of the buffer list which shows all opened tabs." help: "Toggles the display of the buffer list which shows all opened tabs.<br/>" +
"Warning: This mapping may be removed/changed in future."
} }
)); ));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["d"], addDefaultMap(new Map(vimperator.modes.NORMAL, ["d"],
@@ -469,6 +518,15 @@ function Mappings() //{{{
flags: Mappings.flags.ARGUMENT flags: Mappings.flags.ARGUMENT
} }
)); ));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["'", "`"],
function(arg) { vimperator.marks.jumpTo(arg) },
{
short_help: "Jump to the mark in the current buffer",
usage: ["'{a-zA-Z}"],
help: "Marks a-z are local to the buffer, whereas A-Z are valid between buffers.",
flags: Mappings.flags.ARGUMENT
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["M"], addDefaultMap(new Map(vimperator.modes.NORMAL, ["M"],
function(arg) function(arg)
{ {
@@ -506,7 +564,7 @@ function Mappings() //{{{
function() { vimperator.open(readFromClipboard()); }, function() { vimperator.open(readFromClipboard()); },
{ {
short_help: "Open (put) a URL based on the current clipboard contents in the current buffer", short_help: "Open (put) a URL based on the current clipboard contents in the current buffer",
help: "You can also just select some non-URL text, and search for it with the default search engine or keyword (specified by the <code class=\"option\">'defsearch'</code> option) with <code class=\"mapping\">p</code>." help: "You can also just select (for non-X11 users: copy) some non-URL text, and search for it with the default search engine or keyword (specified by the <code class=\"option\">'defsearch'</code> option) with <code class=\"mapping\">p</code>."
} }
)); ));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["P"], addDefaultMap(new Map(vimperator.modes.NORMAL, ["P"],
@@ -555,7 +613,7 @@ function Mappings() //{{{
function(count) { vimperator.commands.undo("", false, count); }, function(count) { vimperator.commands.undo("", false, count); },
{ {
short_help: "Undo closing of a tab", short_help: "Undo closing of a tab",
help: "If a count is given, don't close the last but the <code class=\"argument\">count</code>th last tab.", help: "If a count is given, don't close the last but the <code class=\"argument\">[count]</code>th last tab.",
flags: Mappings.flags.COUNT flags: Mappings.flags.COUNT
} }
)); ));
@@ -568,7 +626,7 @@ function Mappings() //{{{
}, },
{ {
short_help: "Yank current location to the clipboard", short_help: "Yank current location to the clipboard",
help: "Under UNIX the location is also put into the selection, which can be pasted with the middle mouse button." help: "When running in X11 the location is also put into the selection, which can be pasted with the middle mouse button."
} }
)); ));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["Y"], addDefaultMap(new Map(vimperator.modes.NORMAL, ["Y"],
@@ -653,7 +711,7 @@ function Mappings() //{{{
function(count) { vimperator.buffer.scrollToPercentile(count > 0 ? count : 0); }, function(count) { vimperator.buffer.scrollToPercentile(count > 0 ? count : 0); },
{ {
short_help: "Goto the top of the document", short_help: "Goto the top of the document",
help: "Count is supported: <code class=\"mapping\">35gg</code> vertically goes to 35% of the document.", help: "When used with <code class=\"argument\">[count]</code> like in <code class=\"mapping\">35gg</code>, it scrolls to 35% of the document.",
flags: Mappings.flags.COUNT flags: Mappings.flags.COUNT
} }
)); ));
@@ -661,7 +719,7 @@ function Mappings() //{{{
function(count) { vimperator.buffer.scrollToPercentile(count >= 0 ? count : 100); }, function(count) { vimperator.buffer.scrollToPercentile(count >= 0 ? count : 100); },
{ {
short_help: "Goto the end of the document", short_help: "Goto the end of the document",
help: "Count is supported: <code class=\"mapping\">35G</code> vertically goes to 35% of the document.", help: "When used with <code class=\"argument\">[count]</code> like in <code class=\"mapping\">35G</code>, it scrolls to 35% of the document.",
flags: Mappings.flags.COUNT flags: Mappings.flags.COUNT
} }
)); ));
@@ -892,75 +950,19 @@ function Mappings() //{{{
function() { vimperator.search.findNext(); }, function() { vimperator.search.findNext(); },
{ {
short_help: "Find next", short_help: "Find next",
help: "Repeat the last \"/\" 1 time (until count is supported)." help: "Repeat the last \"g/\" 1 time (until count is supported). <br/>" +
"NOTE: As \"g/\" is a little broken right now, use <F3> to go to the next search item of the \"/\" search for now."
} }
)); ));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["N"], addDefaultMap(new Map(vimperator.modes.NORMAL, ["N"],
function() { vimperator.search.findPrevious(); }, function() { vimperator.search.findPrevious(); },
{ {
short_help: "Find previous", short_help: "Find previous",
help: "Repeat the last \"/\" 1 time (until count is supported) in the opposite direction." help: "Repeat the last \"g/\" 1 time (until count is supported) in the opposite direction.<br/>" +
"NOTE: As \"g/\" is a little broken right now, use <S-F3> to go to the previous search item of the \"/\" search for now."
} }
)); ));
// vimperator management
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<F1>"],
function() { vimperator.help(null); },
{
short_help: "Open help window",
help: "The default section is shown, if you need help for a specific topic, try <code class=\"command\">:help &lt;F1&gt;</code> (jumping to a specific section not implemented yet)."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, [":"],
function() { vimperator.commandline.open(":", "", vimperator.modes.EX); },
{
short_help: "Start command line mode",
help: "In command line mode, you can perform extended commands, which may require arguments."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["I"],
function() { vimperator.addMode(null, vimperator.modes.ESCAPE_ALL_KEYS); },
{
short_help: "Disable vimperator keys",
help: "Starts an 'ignorekeys' mode, where all keys except <code class=\"mapping\">&lt;Esc&gt;</code> are passed to the next event handler.<br/>" +
"This is especially useful, if JavaScript controlled forms like the RichEdit form fields of GMail don't work anymore.<br/>" +
"To exit this mode, press <code class=\"mapping\">&lt;Esc&gt;</code>. If you also need to pass <code class=\"mapping\">&lt;Esc&gt;</code>" +
"in this mode to the web page, prepend it with <code class=\"mapping\">&lt;C-v&gt;</code>."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<C-v>"],
function() { vimperator.addMode(null, vimperator.modes.ESCAPE_ONE_KEY); },
{
short_help: "Escape next key",
help: "If you need to pass a certain key to a javascript form field or another extension prefix the key with <code class=\"mapping\">&lt;C-v&gt;</code>.<br/>" +
"Also works to unshadow Firefox shortcuts like <code class=\"mapping\">&lt;C-o&gt;</code> which are otherwise hidden in vimperator.<br/>" +
"When in 'ignorekeys' mode (activated by <code class=\"mapping\">&lt;I&gt;</code>), <code class=\"mapping\">&lt;C-v&gt;</code> will pass the next key to Vimperator instead of the web page."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<C-c>"],
BrowserStop,
{
short_help: "Stop loading",
help: "Stops loading the current web page."
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<Nop>"],
function() { return; },
{
short_help: "Do nothing",
help: "This command is useful for disabling a specific mapping. " +
"<code class=\"command\">:map &lt;C-n&gt; &lt;Nop&gt;</code> will prevent <code class=\"mapping\">&lt;C-n&gt;</code> from doing anything."
}
));
// if you ever add/remove keys here, also check them in the vimperator.events.onKeyPress()
addDefaultMap(new Map(vimperator.modes.NORMAL, ["<Esc>", "<C-[>"],
vimperator.events.onEscape,
{
short_help: "Cancel any operation",
help: "Exits any command line or hint mode and returns to browser mode.<br/>" +
"Also focuses the web page, in case a form field has focus and eats our key presses."
}
));
// }}} // }}}
// Hints mode // Hints mode

View File

@@ -417,7 +417,8 @@ function Options() //{{{
{ {
short_help: "Default height for preview window", short_help: "Default height for preview window",
help: "Value must be between 1 and 50. If the value is too high, completions may cover the command-line. " + help: "Value must be between 1 and 50. If the value is too high, completions may cover the command-line. " +
"Close the preview window with <code class=\"command\">:pclose</code>.", "Close the preview window with <code class=\"command\">:pclose</code>." +
"NOTE: Option currently disabled",
default_value: 10, default_value: 10,
validator: function (value) { if (value>=1 && value <=50) return true; else return false; } validator: function (value) { if (value>=1 && value <=50) return true; else return false; }
} }