1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-31 08:15:46 +01:00

Add $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT, ~/.vimperator/info/{profile}.

This commit is contained in:
Kris Maglione
2008-12-20 18:34:14 -05:00
19 changed files with 280 additions and 266 deletions

View File

@@ -20,7 +20,10 @@
* IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and
VimperatorLeave respectively
* IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages
* IMPORTANT: $VIMPERATOR_HOME is no longer used.
* Added ~/.vimperator/info/{profile}/, similar to viminfo
* added $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT
* :hardcopy now supports output redirection to a file on Unix and MacUnix
* add ";f" extended hint mode to focus a frame
* add "r", "l", and "b" to 'guioptions' to toggle the scrollbars.

View File

@@ -59,8 +59,8 @@ function Bookmarks() //{{{
const historyService = PlacesUtils.history;
const bookmarksService = PlacesUtils.bookmarks;
const taggingService = PlacesUtils.tagging;
const searchService = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
const searchService = service.browserSearch;
const ioService = service.io;
const faviconService = Cc["@mozilla.org/browser/favicon-service;1"].getService(Ci.nsIFaviconService);
const Bookmark = new Struct("url", "title", "icon", "keyword", "tags", "id");
@@ -561,7 +561,7 @@ function Bookmarks() //{{{
getSuggestions: function getSuggestions(engine, query, callback)
{
let ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
let ss = service.browserSearch;
const responseType = "application/x-suggestions+json";
let engine = ss.getEngineByAlias(engine);
@@ -572,7 +572,7 @@ function Bookmarks() //{{{
function process(resp)
{
const json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
const json = service.json;
let results = [];
try
{
@@ -876,7 +876,7 @@ function History() //{{{
let items = completion.runCompleter("history", filter, maxItems);
if (items.length)
return liberator.open([i[0] for each (i in items)], liberator.NEW_TAB);
return liberator.open(items.map(function (i) i.url), liberator.NEW_TAB);
if (filter.length > 0)
liberator.echoerr("E283: No history matching \"" + filter + "\"");

View File

@@ -418,16 +418,13 @@ const config = { //{{{
{
setter: function (value)
{
const ioService = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService2);
ioService.offline = !value;
gPrefService.setBoolPref("browser.offline", ioService.offline);
service.io.offline = !value;
gPrefService.setBoolPref("browser.offline", service.io.offline);
return value;
},
getter: function ()
{
return Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService2).offline;
return service.io.offline;
}
});

View File

@@ -590,10 +590,11 @@ match being used. The patterns are case insensitive regular expressions.
____
|$VIMPERATOR_RUNTIME|
|\'rtp'| |\'runtimepath'|
||'runtimepath' 'rtp'|| stringlist
____
(default: Unix, Mac: "\~/.vimperator", Windows: "\~/vimperator")
(default: \'$VIMPERATOR_RUNTIME' or Unix, Mac: "\~/.vimperator", Windows: "\~/vimperator")
List of directories searched for runtime files: +
macros/ +

View File

@@ -5,20 +5,20 @@ be documented here.
section:Initialization[initialization,startup]
At startup Vimperator sources a user RC file, containing Ex commands, and any
JavaScript files found in the plugin directory. The RC file may be named
[a].vimperatorrc[a] or [a]\_vimperatorrc[a]. The search order is:
At startup Vimperator can perform user initialization commands. When one of
the following is successfully located, it is executed, and no further
locations are tried.
* Unix and Mac: [a]\~/.vimperatorrc[a] then [a]\~/_vimperatorrc[a]
* Windows - [a]\~/_vimperatorrc[a] then [a]\~/.vimperatorrc[a]
|$VIMPERATOR_INIT|
1. _$VIMPERATOR_INIT_ - May contain a single ex command, usually
[c]:source {file}[c].
2. [a]\~/_vimperatorrc[a] - Windows only. If this file exists, its contents
are executed.
3. [a]\~/.vimperatorrc[a] - If this file exists, its contents are executed.
If 'exrc' is set then any RC file in the current directory is also sourced.
The plugin directory can be in any of the directories in 'runtimepath'. Using
the default value of 'runtimepath' this would be:
* Unix and Mac - [a]\~/.vimperator/plugin[a]
* Windows - [a]\~/vimperator/plugin[a]
The plugin directory can be in any of the directories in 'runtimepath'.
All directories in 'runtimepath' are searched for plugins and they are are all
loaded.
@@ -31,8 +31,6 @@ The user's \'$HOME'(~) directory is determined as follows:
* Windows - if _%HOME%_ is set then this is used, otherwise _%USERPROFILE%_ or finally
_%HOMEDRIVE%%HOMEPATH%_.
_$VIMPERATOR_HOME_ can be used to override the calculated _$HOME_ directory.
section:Saving{nbsp}settings[save-settings]
|:mkv| |:mkvimperatorrc|