diff --git a/ChangeLog b/ChangeLog index a2a498fa..657b43c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,13 @@
2007-07-02: * version 0.5 + * :winopen support (multiple windows still very very experimental) + * 'activate' option implemented + * search enginges which use POST instead of GET work now * :javascript <" + "Each token is analyzed and in this order:
" + @@ -824,7 +823,8 @@ function Commands() //{{{ var oper = matches[5]; var val = matches[6]; if (val === undefined) val = ""; - // reset a variable to its default value. + // reset a variable to its default value + // TODO: remove the value from about:config instea of setting it to the current default value if (reset) { option.value = option.default_value; @@ -836,7 +836,6 @@ function Commands() //{{{ vimperator.echo((option.value ? " " : "no") + option.name); else vimperator.echo(" " + option.name + "=" + option.value); - //vimperator.echo(" " + option.name + "=" + vimperator.options[option.name]); } // write access else @@ -968,13 +967,17 @@ function Commands() //{{{ addDefaultCommand(new Command(["tabopen", "t[open]", "tabnew", "tabe[dit]"], function(args, special) { + var where = special ? vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB; + if (vimperator.options["activate"].search(/\bquickmark\b/) > -1) + where = special ? vimperator.NEW_BACKGROUND_TAB : vimperator.NEW_TAB; + if (args.length > 0) - vimperator.open(args, special ? vimperator.NEW_BACKGROUND_TAB : vimperator.NEW_TAB); + vimperator.open(args, where); else - vimperator.open("about:blank", vimperator.NEW_TAB); + vimperator.open("about:blank", where); }, { - usage: ["tabopen [url] [| url]"], + usage: ["tabopen [url] [, url]"], short_help: "Open one or more URLs in a new tab", help: "Like:openbut open URLs in a new tab.
" + "If used with!, the 'tabopen' value of the'activate'option is negated.", @@ -1083,11 +1086,11 @@ function Commands() //{{{ } )); addDefaultCommand(new Command(["wino[pen]", "w[open]", "wine[dit]"], - function() { vimperator.echo("winopen not implemented yet"); }, + function(args) { vimperator.open(args, vimperator.NEW_WINDOW); }, { - usage: ["wino[pen] [url] [| url]"], - short_help: "Open a URL in a new window", - help: "Not implemented yet." + usage: ["wino[pen] [url] [, url]"], + short_help: "Open one or more URLs in a new window", + help: "NOTE: Multiple windows are not really support by vimperator, use at your own risk!" } )); addDefaultCommand(new Command(["wqa[ll]", "wq", "xa[ll]"], diff --git a/chrome/content/vimperator/mappings.js b/chrome/content/vimperator/mappings.js index 7afda9e9..e0f9512c 100644 --- a/chrome/content/vimperator/mappings.js +++ b/chrome/content/vimperator/mappings.js @@ -376,26 +376,38 @@ function Mappings() //{{{ } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["go"], - function(mark) { vimperator.quickmarks.jumpTo(mark, false) }, + function(mark) { vimperator.quickmarks.jumpTo(mark, vimperator.CURRENT_TAB) }, { - short_help: "Jump to a QuickMark in the current buffer", + short_help: "Jump to a QuickMark in the current tab", usage: ["go{a-zA-Z0-9}"], - help: "Open any QuickMark in the current buffer. You can mark any URLs withM{a-zA-Z0-9}. " + + help: "Open any QuickMark in the current tab. You can mark any URLs withM{a-zA-Z0-9}. " + "These QuickMarks are persistent across browser session.", flags: Mappings.flags.ARGUMENT } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["gn"], - function(mark) { vimperator.quickmarks.jumpTo(mark, true) }, + function(mark) { - short_help: "Jump to a QuickMark in a new buffer", + vimperator.quickmarks.jumpTo(mark, + vimperator.options["activate"].search(/\bquickmark\b/) > -1 ? + vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB); + }, + { + short_help: "Jump to a QuickMark in a new tab", usage: ["gn{a-zA-Z0-9}"], - help: "Mnemonic: Go in a new buffer.gtwould make more sense but is already taken.", + help: "Works likego{a-zA-Z0-9}but opens the QuickMark in a new tab. " + + "Whether the new tab is activated or not depends on the'activate'option.
" + + "Mnemonic: Go in a new tab.gtwould make more sense but is already taken.", flags: Mappings.flags.ARGUMENT } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["gP"], - function(count) { vimperator.open(readFromClipboard(), vimperator.NEW_BACKGROUND_TAB); }, + function(count) + { + vimperator.open(readFromClipboard(), + vimperator.options["activate"].search(/\bpaste\b/) > -1 ? + vimperator.NEW_BACKGROUND_TAB : vimperator.NEW_TAB); + }, { short_help: "Open (put) a URL based on the current clipboard contents in a new buffer", help: "Works likeP, but inverts the'activate'option." @@ -485,7 +497,12 @@ function Mappings() //{{{ } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["P"], - function(count) { vimperator.open(readFromClipboard(), vimperator.NEW_TAB); }, + function(count) + { + vimperator.open(readFromClipboard(), + vimperator.options["activate"].search(/\bpaste\b/) > -1 ? + vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB); + }, { short_help: "Open (put) a URL based on the current clipboard contents in a new buffer", help: "Works likep, but opens a new tab.
" + diff --git a/chrome/content/vimperator/options.js b/chrome/content/vimperator/options.js index ba158135..f991dec3 100644 --- a/chrome/content/vimperator/options.js +++ b/chrome/content/vimperator/options.js @@ -305,7 +305,12 @@ function Options() //{{{ addOption(new Option(["activate"], "stringlist", { short_help: "Define when tabs are automatically activated", - help: "Not implemented yet", + help: "Available items:
" + + "
| quickmark: | go and gn mappings | " +
+ "
| tabopen: | :tabopen[!] command | " +
+ "
| paste: | P and gP mappings | " +
+ "