diff --git a/NEWS b/NEWS index 1231c7ee..5ccaad3f 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@
2007-XX-XX: * version 0.5.2 + * added new 'laststatus' option and removed "s" value from 'guioptions' * statusline is now white on black with bold font by default (like in (g)vim) (change with userChrome.css if you don't like it until we have :colorscheme) * :let mapleader="," andin :map support diff --git a/content/options.js b/content/options.js index 122e153d..577b46a4 100644 --- a/content/options.js +++ b/content/options.js @@ -199,9 +199,24 @@ function Options() //{{{ // and bookmarks toolbar document.getElementById("PersonalToolbar").collapsed = value.indexOf("b") > -1 ? false : true; document.getElementById("PersonalToolbar").hidden = value.indexOf("b") > -1 ? false : true; - // and status bar (default on) - document.getElementById("status-bar").collapsed = value.indexOf("s") > -1 ? false : true; - document.getElementById("status-bar").hidden = value.indexOf("s") > -1 ? false : true; + } + + function setStatusLine(value) + { + if (value == 0) + { + document.getElementById("status-bar").collapsed = true; + document.getElementById("status-bar").hidden = true; + } + else if (value == 1) + { + vimperator.echo("show status line only with > 1 window not implemented yet"); + } + else + { + document.getElementById("status-bar").collapsed = false; + document.getElementById("status-bar").hidden = false; + } } function setShowTabline(value) @@ -213,7 +228,9 @@ function Options() //{{{ getBrowser().mStrip.hidden = true; } else if (value == 1) - vimperator.echo("show tabline only with > 1 page open not impl. yet"); + { + vimperator.echo("show tabline only with > 1 page open not implemented yet"); + } else { getBrowser().mStrip.collapsed = false; @@ -359,11 +376,13 @@ function Options() //{{{ addOption(new Option(["complete", "cpt"], "charlist", { short_help: "Items which are completed at the :[tab]open prompt", - help: "Available items: " + + help: "Available items:
" + "The order is important, so
" + + "" + "
" + + "- s: Search engines and keyword URLs
" + "- f: Local files
" + "- b: Bookmarks
" + - "- h: History
- h: History
" + + ":set complete=bswould list bookmarks first, and then any available quick searches.
" + "Add'sort'to the'wildoptions'option if you want all entries sorted.", default_value: "sfbh", @@ -403,14 +422,15 @@ function Options() //{{{ addOption(new Option(["guioptions", "go"], "charlist", { short_help: "Show or hide the menu, toolbar and scrollbars", - help: "Supported characters:" + + help: "Supported characters:
", setter: function(value) { Options.setPref("guioptions", value); setGuiOptions(value); }, - default_value: "s", - validator: function (value) { if (/[^mTbs]/.test(value)) return false; else return true; } + default_value: "", + validator: function (value) { if (/[^mTb]/.test(value)) return false; else return true; } } )); addOption(new Option(["hintchars", "hc"], "charlist", @@ -458,7 +478,23 @@ function Options() //{{{ default_value: true } )); - addOption(new Option(["linksearch", "ls"], "boolean", + addOption(new Option(["laststatus", "ls"], "number", + { + short_help: "Show the status line", + help: "Determines when the last window will have a status line. " + + "Possible values:
" + + "" + "
", + "- m: menubar
" + "- T: toolbar
" + "- b: bookmark bar
" + - "- s: statusbar
" + + "" + + "
" + + "NOTE: laststatus=1 not implemented yet.", + default_value: 2, + setter: function(value) { Options.setPref("laststatus", value); setStatusLine(value); }, + validator: function (value) { if (value >= 0 && value <= 2) return true; else return false; } + } + )); + addOption(new Option(["linksearch", "lks"], "boolean", { short_help: "Limit the search to hyperlink text", help: "This includes (X)HTML elements with an \"href\" atrribute and XLink \"simple\" links.", @@ -483,11 +519,13 @@ function Options() //{{{ { short_help: "Where to show requested popup windows", help: "Define where to show requested popup windows. Does not apply to windows which are opened by middle clicking a link, they always open in a new tab. " + - "Possible values:- 0: never
" + + "- 1: only if there are multiple windows
" + + "- 2: always
" + + "" + + "Possible values:
" + "NOTE: This option does not change the popup blocker of Firefox in any way.", default_value: 1, setter: function(value) { Options.setPref("popups", value); setPopups(value); }, @@ -532,10 +570,12 @@ function Options() //{{{ { short_help: "Show the destination of the link under the cursor in the status bar", help: "Also links which are focused by keyboard commands like
" + + "" + "
" + + "- 0: Force to open in the current tab (NOTE: this can stop some web sites from working correctly!)
" + "- 1: Always open in a new tab
" + "- 2: Open in a new window if it has a specific requested size (default in Firefox)
"+ - "- 3: Always open in a new window
- 3: Always open in a new window
" + + "<Tab>are shown. " + - "Possible values:" + + "Possible values:
", default_value: 1, validator: function (value) { if (value >= 0 && value <= 2) return true; else return false; } } @@ -543,11 +583,13 @@ function Options() //{{{ addOption(new Option(["showtabline", "stal"], "number", { short_help: "Control when to show the tab bar of opened web pages", - help: "Possible values:
" + + "" + "
", + "- 0: Don't show link destination
" + "- 1: Show the link in the status line
" + - "- 2: Show the link in the command line
- 2: Show the link in the command line
" + + "" + + help: "Possible values:
" + + "NOTE: showtabline=1 not implemented yet and buggy with showtabline=0", setter: function(value) { Options.setPref("showtabline", value); setShowTabline(value); }, default_value: 2, validator: function (value) { if (value >= 0 && value <= 2) return true; else return false; } @@ -646,6 +688,7 @@ function Options() //{{{ setShowTabline(this.showtabline); setGuiOptions(this.guioptions); + setStatusLine(this.laststatus); setTitleString(this.titlestring); setPopups(this.popups); } //}}} diff --git a/vimperator.vim b/vimperator.vim index 8a6a92c4..6e4a9dee 100644 --- a/vimperator.vim +++ b/vimperator.vim @@ -31,9 +31,9 @@ syn match vimperatorCommandWrapper "\<\h\w*\>" contains=vimperatorCommand syn region vimperatorSet matchgroup=vimperatorCommand start="\
" + + "" + "
" + - "NOTE: Not fully implemented yet and buggy with stal=0", + "- 0: Never show tab bar
" + "- 1: Show tab bar only if more than one tab is open
" + - "- 2: Always show tab bar
- 2: Always show tab bar
" + + "" end="$" keepend oneline contains=vimperatorOption syn keyword vimperatorOption activate act complete cpt defsearch ds extendedhinttags eht focusedhintstyle fhs fullscreen fs \ nofullscreen nofs guioptions go hintchars hc hintstyle hs hinttags incsearch is noincsearch nois ignorecase ic - \ noignorecase noic maxhints mh preload nopreload previewheight pvh showmode smd noshowmode nosmd showstatuslinks ssli - \ showtabline stal smartcase scs nosmartcase noscs titlestring usermode um nousermode noum verbose vbs visualbell vb - \ wildmode wim wildoptions wop + \ noignorecase noic laststatus ls maxhints mh preload nopreload previewheight pvh showmode smd noshowmode nosmd + \ showstatuslinks ssli showtabline stal smartcase scs nosmartcase noscs titlestring usermode um nousermode noum verbose + \ vbs visualbell vb wildmode wim wildoptions wop \ contained syn region vimperatorJavascript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline