diff --git a/NEWS b/NEWS index 9b7d4ad5..6a11772c 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@
2008-XX-XX:
* version 2.0 (probably)
+ * add 'helpfile' option
* add 'wildignore' option
* add :finish command
* new events BookmarkPost, ShellCmdPost, QuitPre
diff --git a/content/liberator.js b/content/liberator.js
index 52c2fdd7..19a73b6f 100644
--- a/content/liberator.js
+++ b/content/liberator.js
@@ -76,6 +76,10 @@ const liberator = (function () //{{{
}
});
+ liberator.options.add(["helpfile", "hf"],
+ "Name of the main help file",
+ "string", "intro.html");
+
liberator.options.add(["loadplugins", "lpl"],
"Load plugin scripts when starting up",
"boolean", true);
@@ -757,6 +761,18 @@ const liberator = (function () //{{{
liberator.options["newtab"].split(",").indexOf("help") != -1)) ?
liberator.NEW_TAB : liberator.CURRENT_TAB;
+ if (!topic)
+ {
+ var helpFile = liberator.options["helpfile"];
+
+ if (liberator.config.helpFiles.indexOf(helpFile) != -1)
+ liberator.open("chrome://" + liberator.config.name.toLowerCase() + "/locale/" + helpFile, where);
+ else
+ liberator.echo("Sorry, help file \"" + helpFile + "\" not found");
+
+ return;
+ }
+
function jumpToTag(file, tag)
{
liberator.open("chrome://" + liberator.config.name.toLowerCase() + "/locale/" + file, where);
@@ -770,14 +786,9 @@ const liberator = (function () //{{{
}, 500);
}
- if (!topic)
- {
- liberator.open("chrome://" + liberator.config.name.toLowerCase() + "/locale/intro.html", where);
- return;
- }
-
var [, items] = getHelpCompletions(topic);
var partialMatch = -1;
+
for (var i = 0; i < items.length; i++)
{
if (items[i][0] == topic)
diff --git a/locale/en-US/options.txt b/locale/en-US/options.txt
index a7b6086a..ad4cf2c9 100644
--- a/locale/en-US/options.txt
+++ b/locale/en-US/options.txt
@@ -319,6 +319,14 @@ You can also hide the tab bar with [c]:set showtabline=0[c].
____
+|\'hf'| |\'helpfile'|
+||'helpfile' 'hf'|| string (default: "intro.html")
+____
+Name of the main help file. This is the tail component of the chrome URL as
+displayed in the status line when viewing the page.
+____
+
+
|\'hm'| |\'hintmatching'|
||'hintmatching' 'hm'|| string (default: contains)
____
diff --git a/vimperator.vim b/vimperator.vim
index 150d27b0..93ad42c9 100644
--- a/vimperator.vim
+++ b/vimperator.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: VIMperator configuration file
" Maintainer: Doug Kearns
-" Last Change: 2008 Sep 04
+" Last Change: 2008 Sep 06
if exists("b:current_syntax")
finish
@@ -41,9 +41,9 @@ syn match vimperatorCommandWrapper "\%(^\s*:\=\)\@<=\%(!\|\h\w*\>\)" contains=vi
syn region vimperatorSet matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\" end="$" keepend oneline contains=vimperatorOption
syn keyword vimperatorOption activate act activelinkfgcolor alfc activelinkbgcolor albc cdpath cd complete cpt defsearch ds editor
\ extendedhinttags eht eventignore ei focuscontent fc nofocuscontent nofc fullscreen fs nofullscreen nofs guioptions go
- \ hintmatching hm hintstyle hs hinttags ht hinttimeout hto history hi hlsearch hls nohlsearch nohls hlsearchstyle hlss
- \ incsearch is noincsearch nois ignorecase ic noignorecase noic insertmode im noinsertmode noim laststatus ls linkbgcolor lbc
- \ linkfgcolor lfc linksearch lks nolinksearch nolks loadplugins noloadplugins lpl nolpl more newtab nextpattern nomore
+ \ helpfile hf hintmatching hm hintstyle hs hinttags ht hinttimeout hto history hi hlsearch hls nohlsearch nohls hlsearchstyle
+ \ hlss incsearch is noincsearch nois ignorecase ic noignorecase noic insertmode im noinsertmode noim laststatus ls linkbgcolor
+ \ lbc linkfgcolor lfc linksearch lks nolinksearch nolks loadplugins noloadplugins lpl nolpl more newtab nextpattern nomore
\ pageinfo pa popups pps preload nopreload previewheight pvh previouspattern online noonline scroll scr shell sh shellcmdflag
\ shcf showmode smd noshowmode nosmd showstatuslinks ssli showtabline stal smartcase scs nosmartcase noscs suggestengines
\ titlestring usermode um nousermode noum urlseparator verbose vbs visualbell vb novisualbell novb visualbellstyle wildignore