diff --git a/ChangeLog b/ChangeLog
index 12813a42..96b0cacf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
date:
* version 0.4
+ * gh goes home :) gH in a new tab
+ * :open! bypasses cache
+ * :buffer and :buffers support (patch from Lars Kindler)
* added :edit, :e and :tabedit aliases for :open, :tabopen
* settings can now be changed with += and -= like in vim (patch from Виктор Кожухаров)
* Support for space/shift-space/alt-left/alt-right keys without beeping
diff --git a/Donators b/Donators
index 538eb0e3..e9f3f288 100644
--- a/Donators
+++ b/Donators
@@ -3,4 +3,7 @@
Also if you want the amount or email address or whatever listet, send me an email.
* Andrew Pantyukhin
+* Ben Klemens
+
+I want to say a big THANK YOU for all people which supported this project in this way.
diff --git a/TODO b/TODO
index 0f64603b..7e1676f7 100644
--- a/TODO
+++ b/TODO
@@ -27,26 +27,22 @@ FEATURES:
7 whereever possible: get rid of dialogs and ask console-like dialog questions or write error prompts directly on the webpage or with :echo()
7 :hardcopy -> printing
7 Ctrl-6/Ctrl-^ -> jump to the previously active tab
-7 :b[uffer] should switch to a buffer/tab
- :b[uffer] - show buffers, if argument is number, switch to this tab, if url, open tab with this url
- buffer Switching also after pressing 'b' and typing _any_ part of the buffer name?
7 3d should delete 3 tabs
6 :map commands to keys
6 autocommands (BrowserStart, BrowserQuit, TabClose, TabOpen, TabChanged, PageLoaded, any more?)
6 vim like mappings for caret mode and textboxes (i to start caret mode?)
6 pipe selected text/link/website to an external command
6 macros (qq)
-6 :ls - show buffers
6 support firefox search engines, or at least make our search enginges user configurable
6 gf = view source?
6 make a real one-tab-mode, divert _all_ other targets, possible by setting a firefox option (set popup=0-3)
-6 Shift-Insert in textboxes pastes clipboard contents
+6 Shift-Insert in textboxes pastes selection contents
+6 page info support (ctrl-g, g)
5 Use arrow keys in preview window
5 Sort :open completion by date?
5 make use of the ] and [ keys to e.g. jump to the next heading ]], next image ]i, previous textbox [t and so on
5 add tag support to adding/deleting bookmarks
4 Support multiple top-level windows?
-4 :restart command to restart firefox
3 Splitting Windows with [:sp :vsp ctrl-w,s ctrl-w,v] and closing with [ctrl-w,q], moving with [ctrl-w,w or tab]
have a look into the split browser extension
3 :set should also set about:config options (with autocomplete)
@@ -54,4 +50,5 @@ FEATURES:
RANDOM IDEAS:
* numbered tabs
* make hints work with usermode
+* https://addons.mozilla.org/en-US/firefox/addon/4125 - use vim to edit text fields
diff --git a/chrome/content/vimperator/bookmarks.js b/chrome/content/vimperator/bookmarks.js
index 22f72c32..cc4e857f 100644
--- a/chrome/content/vimperator/bookmarks.js
+++ b/chrome/content/vimperator/bookmarks.js
@@ -151,3 +151,4 @@ function parseBookmarkString(str, res)
return true;
}
+// vim: set fdm=marker sw=4 ts=4:
diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js
index e94f44b6..384f3b84 100644
--- a/chrome/content/vimperator/commands.js
+++ b/chrome/content/vimperator/commands.js
@@ -93,7 +93,7 @@ var g_commands = [/*{{{*/
function(filter) { return get_bookmark_completions(filter); }
],
[
- ["buffer", "bu"],
+ ["buffer", "b"],
"Go to buffer number n. Full completion works.",
null,
function (args) { tab_go(args.split(":")[0]); preview_window.hidden = true; },
@@ -103,7 +103,7 @@ var g_commands = [/*{{{*/
["buffers", "files", "ls"],
"Shows a list of all buffers.",
null,
- function (args) {bushow("");},
+ function (args) {bushow("", false);},
null
],
[
@@ -198,8 +198,21 @@ var g_commands = [/*{{{*/
" Passed directly to Firefox in all other cases (:open www.osnews.com | www.slashdot.org will open OSNews in the current, and Slashdot in a new background tab)."+
"You WILL be able to use :open [-T \"linux\"] torvalds<Tab> to complete bookmarks with tag \"linux\" and which contain \"torvalds\". Note that -T support is only available for tab completion, not for the actual command.
"+
"The items which are completed on <Tab> are specified in the 'complete' option.
"+
- "Without argument, reloads the current page.",
- function(args) { if(args.length > 0) openURLs(args); else reload(false); },
+ "Without argument, reloads the current page.
"+
+ "Without argument but with !, reloads the current page skipping the cache.",
+ function(args, special)
+ {
+ if(args.length > 0)
+ openURLs(args);
+ else
+ {
+ if (special)
+ BrowserReloadSkipCache();
+ else
+ BrowserReload();
+ }
+ },
+
function(filter) { return get_url_completions(filter); }
],
[
@@ -373,7 +386,7 @@ var g_mappings = [/*{{{*/
["b"],
"Open a prompt to switch buffers",
"Typing the corresponding number opens switches to this buffer",
- function (args) { bushow(""); openVimperatorBar('buffer '); }
+ function (args) { bushow("", true); openVimperatorBar('buffer '); }
],
[
["d"],
@@ -394,6 +407,18 @@ var g_mappings = [/*{{{*/
"This mapping is for debugging purposes, and may be removed in future.",
function(count) { openVimperatorBar('execute '); }
],
+ [
+ ["gh"],
+ "Go home",
+ "Opens the homepage in the current tab.",
+ function(count) { BrowserHome(); }
+ ],
+ [
+ ["gH"],
+ "Go home in a new tab",
+ "Opens the homepage in a new tab.",
+ function(count) { openURLsInNewTab("", true); BrowserHome(); }
+ ],
[
["gP"],
"Open (put) an URL based on the current Clipboard contents in a new buffer",
@@ -1117,7 +1142,7 @@ function bmshow(filter, fullmode)
openURLsInNewTab("chrome://browser/content/bookmarks/bookmarksPanel.xul", true);
else
{
- items = get_bookmark_completions(filter);
+ var items = get_bookmark_completions(filter);
preview_window_fill(items);
preview_window.hidden = false;
}
@@ -1128,16 +1153,25 @@ function hsshow(filter, fullmode)
openURLsInNewTab("chrome://browser/content/history/history-panel.xul", true);
else
{
- items = get_history_completions(filter);
+ var items = get_history_completions(filter);
preview_window_fill(items);
preview_window.hidden = false;
}
}
-function bushow(filter)
+function bushow(filter, in_comp_window)
{
- items = get_buffer_completions(filter);
- preview_window_fill(items);
- preview_window.hidden = false;
+ if (in_comp_window) // fill the completion list
+ {
+ g_completions = get_buffer_completions(filter);
+ completion_fill_list(0);
+ completion_show_list();
+ }
+ else // in the preview window
+ {
+ var items = get_buffer_completions(filter);
+ preview_window_fill(items);
+ preview_window.hidden = false;
+ }
}
@@ -1856,4 +1890,4 @@ function removeMode(mode)
// return 0;
// }
-// vim: set fdm=marker :
+// vim: set fdm=marker sw=4 ts=4:
diff --git a/chrome/content/vimperator/completion.js b/chrome/content/vimperator/completion.js
index 05166110..3e103743 100644
--- a/chrome/content/vimperator/completion.js
+++ b/chrome/content/vimperator/completion.js
@@ -426,8 +426,10 @@ function get_settings_completions(filter)/*{{{*/
function get_buffer_completions(filter)
{
var reg = new RegExp("^"+filter,"i");
- items=new Array();
+ items = new Array();
var num = getBrowser().browsers.length;
+ var title, url;
+
for(var i=0; i