mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 13:42:27 +01:00
add new 'loadplugins' option
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,6 +1,7 @@
|
||||
<pre>
|
||||
2008-08-16:
|
||||
* version 2.0 (probably)
|
||||
* add 'loadplugins' option
|
||||
* add count support to C-^ (Kazuo)
|
||||
* add 'eventignore' option
|
||||
* add :tabdetach command
|
||||
|
||||
@@ -72,6 +72,10 @@ const liberator = (function () //{{{
|
||||
}
|
||||
});
|
||||
|
||||
liberator.options.add(["loadplugins", "lpl"],
|
||||
"Load plugin scripts when starting up",
|
||||
"boolean", true);
|
||||
|
||||
liberator.options.add(["verbose", "vbs"],
|
||||
"Define which type of messages are logged",
|
||||
"number", 0,
|
||||
@@ -983,29 +987,32 @@ const liberator = (function () //{{{
|
||||
else
|
||||
liberator.log("No user RC file found", 3);
|
||||
|
||||
// also source plugins in ~/.vimperator/plugin/
|
||||
try
|
||||
if (liberator.options["loadplugins"])
|
||||
{
|
||||
var pluginDir = liberator.io.getSpecialDirectory("plugin");
|
||||
if (pluginDir)
|
||||
// also source plugins in ~/.vimperator/plugin/
|
||||
try
|
||||
{
|
||||
var files = liberator.io.readDirectory(pluginDir.path);
|
||||
liberator.log("Sourcing plugin directory...", 3);
|
||||
files.forEach(function (file) {
|
||||
if (!file.isDirectory() && /\.(js|vimp)$/i.test(file.path))
|
||||
liberator.io.source(file.path, false);
|
||||
});
|
||||
var pluginDir = liberator.io.getSpecialDirectory("plugin");
|
||||
if (pluginDir)
|
||||
{
|
||||
var files = liberator.io.readDirectory(pluginDir.path);
|
||||
liberator.log("Sourcing plugin directory...", 3);
|
||||
files.forEach(function (file) {
|
||||
if (!file.isDirectory() && /\.(js|vimp)$/i.test(file.path))
|
||||
liberator.io.source(file.path, false);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
liberator.log("No user plugin directory found", 3);
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (e)
|
||||
{
|
||||
liberator.log("No user plugin directory found", 3);
|
||||
// thrown if directory does not exist
|
||||
//liberator.log("Error sourcing plugin directory: " + e);
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// thrown if directory does not exist
|
||||
//liberator.log("Error sourcing plugin directory: " + e);
|
||||
}
|
||||
|
||||
// after sourcing the initialization files, this function will set
|
||||
// all gui options to their default values, if they have not been
|
||||
|
||||
@@ -444,6 +444,13 @@ This includes (X)HTML elements with an "href" atrribute and XLink "simple" links
|
||||
____
|
||||
|
||||
|
||||
|\'noloadplugins'| |\'loadplugins'|
|
||||
||'loadplugins'|| boolean (default on)
|
||||
____
|
||||
Load plugin scripts when starting up.
|
||||
____
|
||||
|
||||
|
||||
|\'nomore'| |\'more'|
|
||||
||'more'|| boolean (default: on)
|
||||
____
|
||||
@@ -485,6 +492,7 @@ ____
|
||||
Show and set the \'work offline' behavior.
|
||||
____
|
||||
|
||||
|
||||
|\'pageinfo' \'pa'|
|
||||
||'pageinfo' 'pa'||
|
||||
charlist (default: gfm)
|
||||
|
||||
@@ -17,7 +17,9 @@ The plugin directory is named:
|
||||
* Unix and Mac - [a]\~/.vimperator/plugin[a]
|
||||
* Windows - [a]\~/vimperator/plugin[a]
|
||||
|
||||
The user's '$HOME'(~) directory is determined as follows:
|
||||
Plugins will not be sourced if 'noloadplugins' is set.
|
||||
|
||||
The user's \'$HOME'(~) directory is determined as follows:
|
||||
|
||||
* Unix and Mac - _$HOME_ is used.
|
||||
* Windows - if _%HOME%_ is set then this is used, otherwise _%USERPROFILE%_ or finally
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: VIMperator configuration file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2008 Aug 28
|
||||
" Last Change: 2008 Aug 29
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -43,10 +43,11 @@ syn keyword vimperatorOption activate act activelinkfgcolor alfc activelinkbgcol
|
||||
\ 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 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 wildmode wim wildoptions wop wordseparators wsp
|
||||
\ 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 wildmode
|
||||
\ wim wildoptions wop wordseparators wsp
|
||||
\ contained
|
||||
|
||||
syn region vimperatorJavascript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline
|
||||
|
||||
Reference in New Issue
Block a user