mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 12:18:00 +01:00
Set MY_VIMPERATORRC when sourcing the RC file on startup.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -14,8 +14,9 @@ At startup, Vimperator completes the following tasks in order.
|
||||
.. |$VIMPERATOR_INIT| _$VIMPERATOR_INIT_ -- May contain a single ex
|
||||
command (e.g.,
|
||||
"[c]:source {file}[c]").
|
||||
.. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its
|
||||
contents are executed.
|
||||
.. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its
|
||||
contents are executed and
|
||||
_$MY_VIMPERATORRC_ set to its path.
|
||||
.. [a]\~/.vimperatorrc[a] -- If this file exists, its contents are
|
||||
executed.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user