1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 08:07:58 +01:00

Set MY_VIMPERATORRC when sourcing the RC file on startup.

This commit is contained in:
Doug Kearns
2009-01-15 18:03:04 +11:00
parent 4f4d6ddd9d
commit d9b07c2ff6
3 changed files with 12 additions and 6 deletions

View File

@@ -1284,11 +1284,13 @@ const liberator = (function () //{{{
// TODO: we should have some class where all this guioptions stuff fits well
hideGUI();
// finally, read a ~/.vimperatorrc and plugin/**.{vimp,js}
// finally, read the RC file and source plugins
// make sourcing asynchronous, otherwise commands that open new tabs won't work
setTimeout(function () {
let init = services.get("environment").get(config.name.toUpperCase() + "_INIT");
let extensionName = config.name.toUpperCase();
let init = services.get("environment").get(extensionName + "_INIT");
if (init)
liberator.execute(init);
else
@@ -1296,7 +1298,10 @@ const liberator = (function () //{{{
let rcFile = io.getRCFile("~");
if (rcFile)
{
io.source(rcFile.path, true);
services.get("environment").set("MY_" + extensionName + "RC", rcFile.path);
}
else
liberator.log("No user RC file found", 3);
}
@@ -1313,7 +1318,7 @@ const liberator = (function () //{{{
// after sourcing the initialization files, this function will set
// all gui options to their default values, if they have not been
// set before by any rc file
// set before by any RC file
for (let option in options)
{
if (option.setter)

View File

@@ -22,7 +22,7 @@
* IMPORTANT: $VIMPERATOR_HOME is no longer used.
* Added ~/.vimperator/info/{profile}/, similar to viminfo
* added $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT
* add $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT and $MY_VIMPERATORRC
* :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

@@ -15,7 +15,8 @@ At startup, Vimperator completes the following tasks in order.
command (e.g.,
"[c]:source {file}[c]").
.. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its
contents are executed.
contents are executed and
_$MY_VIMPERATORRC_ set to its path.
.. [a]\~/.vimperatorrc[a] -- If this file exists, its contents are
executed.