diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index 7efce214..bc1beeb5 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -296,7 +296,7 @@ function Commands() //{{{ usage: ["bma[rk] [-t {title}] [url]"], 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.
" + - "You can omit the optional [url] argument, so just do :bmadd to bookmark the currently loaded web page with a default title and without any tags.
" + + "You can omit the optional [url] argument, so just do :bmark to bookmark the currently loaded web page with a default title and without any tags.
" + " -t \"custom title\"
" + "The following options will be interpreted in the future:
" + " -T comma,separated,tag,list
" + @@ -333,7 +333,8 @@ function Commands() //{{{ { usage: ["b[uffer] {url|index}"], 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.
" + + "Use b as a shortcut to open this prompt.", completer: function(filter) { return vimperator.completion.get_buffer_completions(filter); } } )); @@ -468,14 +469,14 @@ function Commands() //{{{ function(args) { vimperator.echo(args); } , { short_help: "Display a string at the bottom of the window", - help: "Echo all arguments of this command. Useful for showing informational messages.
Multiple lines WILL be separated by \\n." + help: "Echo all arguments of this command. Useful for showing informational messages.
Multiple lines can be separated by \\n." } )); addDefaultCommand(new Command(["echoe[rr]"], function(args) { vimperator.echoerr(args); } , { 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.
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]"], @@ -483,7 +484,7 @@ function Commands() //{{{ { usage: ["exe[cute] {expr1} [ ... ]"], short_help: "Execute the string that results from the evaluation of {expr1} as an Ex command.", - help: ":execute "echo test" would show a message with the text "test".
" + help: ":execute echo test would show a message with the text "test".
" } )); addDefaultCommand(new Command(["exu[sage]"], @@ -615,7 +616,8 @@ function Commands() //{{{ { usage: ["map {lhs} {rhs}", "map {lhs}", "map"], 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.
" + + "Mappings are NOT saved during sessions, make sure you put them in your vimperatorrc file!" } )); addDefaultCommand(new Command(["mapc[lear]"], @@ -631,7 +633,8 @@ function Commands() //{{{ }, { short_help: "Remove all mappings", - help: "TODO" + help: "All user-defined mappings which were set by " + + ":map or :noremap are cleared." } )); addDefaultCommand(new Command(["ma[rk]"], @@ -693,7 +696,7 @@ function Commands() //{{{ { usage: ["norm[al][!] {commands}"], short_help: "Execute Normal mode commands", - help: "TODO" + help: ":normal 20j would scroll 20 lines down." } )); // TODO: remove duplication in :map @@ -747,7 +750,7 @@ function Commands() //{{{ { usage: ["no[remap] {lhs} {rhs}", "no[remap] {lhs}", "no[remap]"], 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.
NOTE: :noremap does not yet work as reliable as :map." } )); addDefaultCommand(new Command(["o[pen]", "e[dit]"], @@ -891,7 +894,7 @@ function Commands() //{{{ function() { saveDocument(window.content.document); }, { short_help: "Save current web page to disk", - help: "Open the original Firefox \"Save page as...\" dialog in a new tab.
" + + help: "Opens the original Firefox \"Save page as...\" dialog.
" + "There, you can save the current web page to disk with various options." } )); diff --git a/chrome/content/vimperator/default.css b/chrome/content/vimperator/default.css index 4599d43b..0ace7442 100644 --- a/chrome/content/vimperator/default.css +++ b/chrome/content/vimperator/default.css @@ -152,7 +152,6 @@ fieldset.paypal { color: HighlightText !important; } - #vimperator-statusline > label { padding: 0px 0px 0px 8px; } diff --git a/chrome/content/vimperator/help.js b/chrome/content/vimperator/help.js index 034410b9..38bd5a99 100644 --- a/chrome/content/vimperator/help.js +++ b/chrome/content/vimperator/help.js @@ -150,9 +150,10 @@ vimperator.help = function(section, easter) //{{{ 'If you like it, but can\'t remember the shortcuts, press F1 or :help to get this help window back.

\n' + '

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 Whitehart theme.

\n' + + 'For the best experience, I therefore recommend the Whitehart theme or any other flat theme.

\n' + - '

Vimperator was written by Martin Stubenschrott. If you appreciate my work on Vimperator, you can either send me greetings, patches or make a donation:

\n' + + '

Vimperator was written by Martin Stubenschrott.' + + '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:

\n' + '
\n
' + '' + @@ -162,7 +163,7 @@ vimperator.help = function(section, easter) //{{{ '' + '
\n
\n' + - '

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 :)

\n' + '

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 :)

\n' var mappings = 'mappings

Mappings

\n' + '

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.

'+ @@ -222,6 +223,7 @@ vimperator.help = function(section, easter) //{{{ doc.close(); + // TODO: change to getBoundingClientRect() for FF 3.0 function cumulativeOffset(element) { var valueT = 0, valueL = 0; diff --git a/chrome/content/vimperator/mappings.js b/chrome/content/vimperator/mappings.js index 74c4853b..421be066 100644 --- a/chrome/content/vimperator/mappings.js +++ b/chrome/content/vimperator/mappings.js @@ -294,21 +294,69 @@ function Mappings() //{{{ // // Normal mode // {{{ - - addDefaultMap(new Map(vimperator.modes.NORMAL, ["'", "`"], - function(arg) { vimperator.marks.jumpTo(arg) }, + // vimperator management + addDefaultMap(new Map(vimperator.modes.NORMAL, [""], + function() { vimperator.help(null); }, { - 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 + short_help: "Open help window", + help: "The default section is shown, if you need help for a specific topic, try :help <F1>." } )); + 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 <Esc> are passed to the next event handler.
" + + "This is especially useful, if JavaScript controlled forms like the RichEdit form fields of GMail don't work anymore.
" + + "To exit this mode, press <Esc>. If you also need to pass <Esc>" + + "in this mode to the web page, prepend it with <C-v>." + } + )); + addDefaultMap(new Map(vimperator.modes.NORMAL, [""], + 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 <C-v>.
" + + "Also works to unshadow Firefox shortcuts like <C-o> which are otherwise hidden in vimperator.
" + + "When in 'ignorekeys' mode (activated by <I>), <C-v> will pass the next key to Vimperator instead of the web page." + } + )); + addDefaultMap(new Map(vimperator.modes.NORMAL, [""], + BrowserStop, + { + short_help: "Stop loading", + help: "Stops loading the current web page." + } + )); + addDefaultMap(new Map(vimperator.modes.NORMAL, [""], + function() { return; }, + { + short_help: "Do nothing", + help: "This command is useful for disabling a specific mapping. " + + ":map <C-n> <Nop> will prevent <C-n> from doing anything." + } + )); + addDefaultMap(new Map(vimperator.modes.NORMAL, ["", ""], + vimperator.events.onEscape, + { + short_help: "Focus content", + help: "Exits any command line or hint mode and returns to browser mode.
" + + "Also focuses the web page, in case a form field has focus and eats our key presses." + } + )); + addDefaultMap(new Map(vimperator.modes.NORMAL, ["]f"], function(count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, true); }, { short_help: "Focus next frame", - help: "Transfers keyboard focus to the [count]th next frame in order. The newly focused frame is briefly colored red.", + help: "Transfers keyboard focus to the [count]th next frame in order. The newly focused frame is briefly colored red. Does not wrap.", flags: Mappings.flags.COUNT } )); @@ -316,7 +364,7 @@ function Mappings() //{{{ function(count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, false); }, { short_help: "Focus previous frame", - help: "Transfers keyboard focus to the [count]th previous frame in order. The newly focused frame is briefly colored red.", + help: "Transfers keyboard focus to the [count]th previous frame in order. The newly focused frame is briefly colored red. Does not wrap.", flags: Mappings.flags.COUNT } )); @@ -331,7 +379,8 @@ function Mappings() //{{{ function() { vimperator.buffer.list(true); }, { 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.
" + + "Warning: This mapping may be removed/changed in future." } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["d"], @@ -469,6 +518,15 @@ function Mappings() //{{{ 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"], function(arg) { @@ -506,7 +564,7 @@ function Mappings() //{{{ function() { vimperator.open(readFromClipboard()); }, { 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 'defsearch' option) with p." + 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 'defsearch' option) with p." } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["P"], @@ -555,7 +613,7 @@ function Mappings() //{{{ function(count) { vimperator.commands.undo("", false, count); }, { short_help: "Undo closing of a tab", - help: "If a count is given, don't close the last but the countth last tab.", + help: "If a count is given, don't close the last but the [count]th last tab.", flags: Mappings.flags.COUNT } )); @@ -568,7 +626,7 @@ function Mappings() //{{{ }, { 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"], @@ -653,7 +711,7 @@ function Mappings() //{{{ function(count) { vimperator.buffer.scrollToPercentile(count > 0 ? count : 0); }, { short_help: "Goto the top of the document", - help: "Count is supported: 35gg vertically goes to 35% of the document.", + help: "When used with [count] like in 35gg, it scrolls to 35% of the document.", flags: Mappings.flags.COUNT } )); @@ -661,7 +719,7 @@ function Mappings() //{{{ function(count) { vimperator.buffer.scrollToPercentile(count >= 0 ? count : 100); }, { short_help: "Goto the end of the document", - help: "Count is supported: 35G vertically goes to 35% of the document.", + help: "When used with [count] like in 35G, it scrolls to 35% of the document.", flags: Mappings.flags.COUNT } )); @@ -892,75 +950,19 @@ function Mappings() //{{{ function() { vimperator.search.findNext(); }, { 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).
" + + "NOTE: As \"g/\" is a little broken right now, use to go to the next search item of the \"/\" search for now." } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["N"], function() { vimperator.search.findPrevious(); }, { 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.
" + + "NOTE: As \"g/\" is a little broken right now, use to go to the previous search item of the \"/\" search for now." } )); - // vimperator management - addDefaultMap(new Map(vimperator.modes.NORMAL, [""], - function() { vimperator.help(null); }, - { - short_help: "Open help window", - help: "The default section is shown, if you need help for a specific topic, try :help <F1> (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 <Esc> are passed to the next event handler.
" + - "This is especially useful, if JavaScript controlled forms like the RichEdit form fields of GMail don't work anymore.
" + - "To exit this mode, press <Esc>. If you also need to pass <Esc>" + - "in this mode to the web page, prepend it with <C-v>." - } - )); - addDefaultMap(new Map(vimperator.modes.NORMAL, [""], - 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 <C-v>.
" + - "Also works to unshadow Firefox shortcuts like <C-o> which are otherwise hidden in vimperator.
" + - "When in 'ignorekeys' mode (activated by <I>), <C-v> will pass the next key to Vimperator instead of the web page." - } - )); - addDefaultMap(new Map(vimperator.modes.NORMAL, [""], - BrowserStop, - { - short_help: "Stop loading", - help: "Stops loading the current web page." - } - )); - addDefaultMap(new Map(vimperator.modes.NORMAL, [""], - function() { return; }, - { - short_help: "Do nothing", - help: "This command is useful for disabling a specific mapping. " + - ":map <C-n> <Nop> will prevent <C-n> from doing anything." - } - )); - // if you ever add/remove keys here, also check them in the vimperator.events.onKeyPress() - addDefaultMap(new Map(vimperator.modes.NORMAL, ["", ""], - vimperator.events.onEscape, - { - short_help: "Cancel any operation", - help: "Exits any command line or hint mode and returns to browser mode.
" + - "Also focuses the web page, in case a form field has focus and eats our key presses." - } - )); // }}} // Hints mode diff --git a/chrome/content/vimperator/options.js b/chrome/content/vimperator/options.js index b8bb952c..fba9729b 100644 --- a/chrome/content/vimperator/options.js +++ b/chrome/content/vimperator/options.js @@ -417,7 +417,8 @@ function Options() //{{{ { 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. " + - "Close the preview window with :pclose.", + "Close the preview window with :pclose." + + "NOTE: Option currently disabled", default_value: 10, validator: function (value) { if (value>=1 && value <=50) return true; else return false; } }