diff --git a/AUTHORS b/AUTHORS index c58ac533..c3fb1ac2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -10,5 +10,5 @@ Patches: * Lars Kindler (:buffer(s) functionality) * Lee Hinman (:open ./.. support) * Bart Trojanowski (Makefile) - * Doug Kearns (vimperator.vim) + * Doug Kearns (vimperator.vim, :tabonly etc. commands) diff --git a/ChangeLog b/ChangeLog index 230654c2..d70ac097 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@
2007-05-02: * version ??? + * added :tabonly and :tabrewind and :tablast commands and some futher aliases :tabNext, etc. (by Doug Kearns) * added vimparator.vim for .vimperatorrc syntax highlighting in the XPI (by Doug Kearns) * Added keyword support for bookmarks to the :[tab]open commands * many small bug fixes diff --git a/TODO b/TODO index 771fc497..12534e8f 100644 --- a/TODO +++ b/TODO @@ -55,4 +55,8 @@ RANDOM IDEAS: * https://addons.mozilla.org/en-US/firefox/addon/4125 - use vim to edit text fields * Would it be possible to add a setting "maxcompletionsshown" and "maxpreviewwindowheight" or something like this? +* 16:06:04 bartman| maxauthority: feature idea: what if :n and :N searched the + page and if they found a unique .*next.* or .*prev.* they would follow that link? +diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index 7e6b08ff..c13f6f5b 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -184,7 +184,14 @@ var g_commands = [/*{{{*/ ["help", "h"], ["h[elp] {subject}"], "Open the help window", - "You can jump to the specified {subject} with
:help {subject}.",
+ "You can jump to the specified {subject} with :help {subject}.:help :help for commands (: prefix):help 'complete' for settings (surrounded by ' and '):help o for mappings (no pre- or postfix):help he will complete :help :help",
help,
function(filter) { return get_help_completions(filter); }
],
@@ -380,13 +387,43 @@ var g_commands = [/*{{{*/
function (filter) { return get_url_completions(filter); }
],
[
- ["tabprevious", "tp", "tprev", "tprevious"],
- ["tabp[revious]"],
+ ["tabonly", "tabo"],
+ ["tabo[nly]"],
+ "Close all other tabs",
+ null,
+ function () {
+ tabs = getBrowser().mTabContainer.childNodes;
+ for (var i = tabs.length - 1; i >= 0; i--) {
+ if (tabs[i] != getBrowser().mCurrentTab)
+ getBrowser().removeTab(tabs[i]);
+ }
+ },
+ null
+ ],
+ [
+ ["tabprevious", "tabp", "tp", "tprev", "tprevious", "tabNext", "tabN", "tN", "tNext"],
+ ["tabp[revious]", "tabN[ext]"],
"Switch to the previous tab",
"Cycles to the last tab, when the first is selected.",
function(args, count) { tab_go(-1); },
null
],
+ [
+ ["tabrewind", "tabr", "tabfir", "tabfirst"],
+ ["tabr[ewind]", "tabfir[st]"],
+ "Switch to the first tab",
+ null,
+ function(args, count) { tab_go(1); },
+ null
+ ],
+ [
+ ["tablast", "tabl"],
+ ["tabl[ast]"],
+ "Switch to the last tab",
+ null,
+ function(args, count) { tab_go(getBrowser().mTabContainer.childNodes.length); },
+ null
+ ],
[
["undo", "u"],
["{count}undo"],
diff --git a/chrome/content/vimperator/completion.js b/chrome/content/vimperator/completion.js
index bcc7d173..e7821454 100644
--- a/chrome/content/vimperator/completion.js
+++ b/chrome/content/vimperator/completion.js
@@ -355,8 +355,8 @@ function filter_url_array(urls, filter)/*{{{*/
*/
for (var i = 0; i < urls.length; i++)
{
- var url = urls[i][0];
- var title = urls[i][1];
+ var url = urls[i][0] || "";
+ var title = urls[i][1] || "";
if(ignorecase)
{
url = url.toLowerCase();
diff --git a/chrome/content/vimperator/help.js b/chrome/content/vimperator/help.js
index 2b62e7d1..51483f6f 100644
--- a/chrome/content/vimperator/help.js
+++ b/chrome/content/vimperator/help.js
@@ -194,10 +194,24 @@ function help(section, easter)
'\n\n