diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js
index 64d44ad2..b5e1da91 100644
--- a/chrome/content/vimperator/commands.js
+++ b/chrome/content/vimperator/commands.js
@@ -381,6 +381,13 @@ function Commands()//{{{
help: ":execute "echo test" would show a message with the text "test".
"
}
));
+ addDefaultCommand(new Command(["exu[sage]"],
+ function () { help("commands"); },
+ {
+ usage: ["exu[sage]"],
+ short_help: "Show help for Ex commands"
+ }
+ ));
addDefaultCommand(new Command(["fo[rward]", "fw"],
function(args, special, count) { if(special) historyGoToEnd(); else stepInHistory(count > 0 ? count : 1); },
{
@@ -608,6 +615,22 @@ function Commands()//{{{
"Example: :tab help tab opens the help in a new tab."
}
));
+ addDefaultCommand(new Command(["tabl[ast]"],
+ function(args, count) { vimperator.tabs.select("$", false); },
+ {
+ usage: ["tabl[ast]"],
+ short_help: "Switch to the last tab"
+ }
+ ));
+ addDefaultCommand(new Command(["tabm[ove]"],
+ function(args, special) { vimperator.tabs.move(getBrowser().mCurrentTab, args, special); },
+ {
+ usage: ["tabm[ove] [N]", "tabm[ove][!] [+|-N]"],
+ short_help: "Move the current tab after tab N",
+ help: "When N is 0 the current tab is made the first one. Without N the current tab is made the last one. " +
+ "N can also be prefixed with '+' or '-' to indicate a relative movement. If ! is specified the movement wraps around the start or end of the tab list."
+ }
+ ));
addDefaultCommand(new Command(["tabn[ext]", "tn[ext]"],
function(args, special, count) { vimperator.tabs.select("+1", true); },
{
@@ -616,6 +639,13 @@ function Commands()//{{{
help: "Cycles to the first tab, when the last is selected."
}
));
+ addDefaultCommand(new Command(["tabo[nly]"],
+ function() { vimperator.tabs.keepOnly(getBrowser().mCurrentTab); },
+ {
+ usage: ["tabo[nly]"],
+ short_help: "Close all other tabs"
+ }
+ ));
addDefaultCommand(new Command(["tabopen", "t[open]", "tabnew", "tabe[dit]"],
function (args, special) { if (args.length > 0) openURLsInNewTab(args, !special); else openURLsInNewTab("about:blank", true); },
{
@@ -626,22 +656,6 @@ function Commands()//{{{
completer: function (filter) { return get_url_completions(filter); }
}
));
- addDefaultCommand(new Command(["tabo[nly]"],
- function() { vimperator.tabs.keepOnly(getBrowser().mCurrentTab); },
- {
- usage: ["tabo[nly]"],
- short_help: "Close all other tabs"
- }
- ));
- addDefaultCommand(new Command(["tabm[ove]"],
- function(args, special) { vimperator.tabs.move(getBrowser().mCurrentTab, args, special); },
- {
- usage: ["tabm[ove] [N]", "tabm[ove][!] [+|-N]"],
- short_help: "Move the current tab after tab N",
- help: "When N is 0 the current tab is made the first one. Without N the current tab is made the last one. " +
- "N can also be prefixed with '+' or '-' to indicate a relative movement. If ! is specified the movement wraps around the start or end of the tab list."
- }
- ));
addDefaultCommand(new Command(["tabp[revious]", "tp[revious]", "tabN[ext]", "tN[ext]"],
function(args, count) { vimperator.tabs.select("-1", true); },
{
@@ -657,13 +671,6 @@ function Commands()//{{{
short_help: "Switch to the first tab"
}
));
- addDefaultCommand(new Command(["tabl[ast]"],
- function(args, count) { vimperator.tabs.select("$", false); },
- {
- usage: ["tabl[ast]"],
- short_help: "Switch to the last tab"
- }
- ));
addDefaultCommand(new Command(["u[ndo]"],
function(args, special, count) { if(count < 1) count = 1; undoCloseTab(count-1); },
{
@@ -706,6 +713,13 @@ function Commands()//{{{
help: "You can show the Firefox version page with :version!."
}
));
+ addDefaultCommand(new Command(["viu[sage]"],
+ function () { help("mappings"); },
+ {
+ usage: ["viu[sage]"],
+ short_help: "Show help for normal mode commands"
+ }
+ ));
addDefaultCommand(new Command(["wino[pen]", "w[open]", "wine[dit]"],
function () { vimperator.echo("winopen not yet implemented"); },
{
diff --git a/chrome/content/vimperator/completion.js b/chrome/content/vimperator/completion.js
index a9d24e3f..55c7ea5b 100644
--- a/chrome/content/vimperator/completion.js
+++ b/chrome/content/vimperator/completion.js
@@ -253,7 +253,9 @@ function get_file_completions(filter)/*{{{*/
function get_help_completions(filter)/*{{{*/
{
- var help_array = [];
+ var help_array = [[["mappings"], "Normal mode commands"],
+ [["commands"], "Ex commands"],
+ [["settings"], "Configuration options"]]; // TODO: hardcoded until we have proper 'pages'
g_substrings = [];
for (var command in vimperator.commands)
{
diff --git a/chrome/content/vimperator/default.css b/chrome/content/vimperator/default.css
index fcd4a962..a0acd346 100644
--- a/chrome/content/vimperator/default.css
+++ b/chrome/content/vimperator/default.css
@@ -1,15 +1,25 @@
+div.main {
+ font-family: monospace;
+ font-size: 12px;
+ width: 800px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+h1 {
+ text-align: center;
+}
+
+p.tagline {
+ text-align: center;
+ font-weight: bold;
+}
+
/* the text in the tables is too large without that */
table {
font-size: 1.0em;
}
-table.main {
- border-width: 0px;
- border-style: none;
- margin-left: auto; /* for centering the table */
- margin-right: auto;
- width: 800px !important;
-}
table.vimperator {
border-width: 1px 1px 1px 1px;
border-style: dotted dotted dotted dotted;
@@ -17,6 +27,7 @@ table.vimperator {
margin-left: auto; /* for centering the table */
margin-right: auto;
width: 800px !important;
+ white-space: -moz-pre-wrap !important;
}
table.vimperator td {
border-width: 0px 0px 0px 0px;
@@ -39,7 +50,7 @@ hr { /* horizontal lines */
td.tag {
text-align: right;
vertical-align: top;
- white-space: -moz-pre-wrap !important;
+ /* white-space: -moz-pre-wrap !important; // DJK */
border-spacing: 13px 10px;
border-width: 0px 10px 0px 10px;
border-color: blue !important;
@@ -72,21 +83,37 @@ table.settings {
background-color: rgb(240, 250, 230);
}
+fieldset.paypal {
+ border: none;
+}
.command { font-weight: bold; color: #632610; }
.mapping { font-weight: bold; color: #102663; }
.setting { font-weight: bold; color: #106326; }
.argument { color: #6A97D4; }
-.version { position:absolute; top:10px; right:2%; color:#C0C0C0; text-align:right; }
+.version {
+ position: absolute;
+ top: 10px;
+ right: 2%;
+ color: #C0C0C0;
+ text-align: right;
+}
+.warning {
+ font-weight: bold;
+ color: red;
+}
+.shorthelp { font-weight: bold; }
.status_insecure, .status_insecure * {
background-color: transparent;
}
.status_secure, .status_secure * {
- background-color: #B0FF00; /* light green */
+ background-color: yellow;
color: black;
}
.status_broken, .status_broken * {
- background-color: #FF6060; /* light red */
+ background-color: #ff9900;
color: black;
}
+
+/* vim: set fdm=marker sw=4 ts=4 et: */
diff --git a/chrome/content/vimperator/help.js b/chrome/content/vimperator/help.js
index d6640f48..1dadbb70 100644
--- a/chrome/content/vimperator/help.js
+++ b/chrome/content/vimperator/help.js
@@ -41,12 +41,11 @@ function help(section, easter)
// xxx: for firebug: :js Firebug.toggleBar(true)
/* commands = array where help information is located
- * color = used for background of the table
* beg = string which is printed before the commmand/setting/mapping name
* end = string which is printed after the commmand/setting/mapping name
* func = called with 'command', result is a string is prepended to the help text
*/
- function makeHelpString(commands, color, beg, end, func)
+ function makeHelpString(commands, beg, end, func)
{
var ret = "";
for (var i=0; i < commands.length; i++)
@@ -74,9 +73,9 @@ function help(section, easter)
// the actual help text with the first line in bold
if (commands[i][SHORTHELP])
{
- ret += "";
+ ret += '';
ret += commands[i][SHORTHELP]; // the help description
- ret += "
";
+ ret += "
";
if(func) // for settings whe print default values here, e.g.
{
ret += func.call(this, commands[i]);
@@ -134,76 +133,80 @@ function help(section, easter)
return ret;
}
- var header = '
First there was a Navigator, then there was an Explorer.
\n'+
- 'Later it was time for a Konqueror. Now it\'s time for an Imperator, the VIMperator :)
First there was a Navigator, then there was an Explorer.
\n' +
+ 'Later it was time for a Konqueror. Now it\'s time for an Imperator, the VIMperator :)
Vimperator is a free browser add-on for Firefox, which makes it look and behave like the Vim text editor.
' +
'It has similar key bindings, and you could call it a modal webbrowser, as key bindings differ according to which mode you are in.
Warning: To provide the most authentic Vim experience, the Firefox menubar and toolbar were hidden.
'+
+ '
Warning: To provide the most authentic Vim experience, the Firefox menubar and toolbar were hidden.
' +
'If you really need them, type: :set guioptions=mT to get it back.
\n' +
- 'If you don\'t like Vimperator at all, you can uninstall it by typing :addons and remove/disable it.
' +
- 'If you like it, but can\'t remember the shortcuts, press F1 or :help to get this help window back.
:addons and remove/disable it.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 best experience, I therefore recommend the Whitehart theme.
Since Vimperator\'s GUI is embedded into a toolbar, it may look too 3D-like with the default theme.
' +
+ 'For best experience, I therefore recommend the Whitehart theme.
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, you can either send me greetings, patches or make a donation:
\n' + - '\n' + + '\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 = '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.
'+ - 'What is the meaning of life, the universe and everything?
' +
'Douglas Adams, the only person who knew what this question really was about is
' +
'now dead, unfortunately. So now you might wonder what the meaning of death
' +
'is...
\n
| \n' + // should change that to: white-space: pre-wrap; once CSS3 hits firefox
- 'version ' + vimperator.ver + '\n'+
+ '\n' +
+ '\n\n \n' +
+ 'version ' + vimperator.ver + '\n' +
header +
introduction +
mappings +
commands +
settings +
- '\n |
AB, press ; to start this hint mode.AB to select the hint. Now press y to yank its location.y to yank its locationY to yank its text descriptiono to open its location in the current tabt to open its location in a new tabO to open its location in an :open query (not implemented yet)T to open its location in an :tabopen query (not implemented yet)s to save its destination (not implemented yet)<C-w> to open its destination in a new windowy to yank its locationY to yank its text descriptiono to open its location in the current tabt to open its location in a new tabO to open its location in an :open query (not implemented yet)T to open its location in an :tabopen query (not implemented yet)s to save its destination (not implemented yet)<C-w> to open its destination in a new window;ab,ac,adt opens AB, AC and AD in a new tab.'extendedhinttags' XPath string."
diff --git a/chrome/content/vimperator/settings.js b/chrome/content/vimperator/settings.js
index 8abae88a..0f88519a 100644
--- a/chrome/content/vimperator/settings.js
+++ b/chrome/content/vimperator/settings.js
@@ -62,11 +62,11 @@ var g_settings = [/*{{{*/
["complete", "cpt"],
["complete", "cpt"],
"Items which are completed at the :[tab]open prompt",
- "Available items::set complete=bs would list bookmarks first, and then any available quick searches.'wildoptions' setting if you want all entries sorted.",
"charlist",
@@ -134,8 +134,7 @@ var g_settings = [/*{{{*/
"<Tab> are shown. "+
- "Possible values:| '' | Complete only the first match |
| 'full' | Complete the next full match. After the last, the original string is used. |
| 'longest' | Complete till the longest common string. |
| 'list' | When more than one match, list all matches. |
| 'list:full' | When more than one match, list all matches and complete first match. |
| 'list:longest' | When more than one match, list all matches and complete till the longest common string. |
| sort | Always sorts completion list, overriding the 'complete' option. |