mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 10:17:58 +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
|
// TODO: we should have some class where all this guioptions stuff fits well
|
||||||
hideGUI();
|
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
|
// make sourcing asynchronous, otherwise commands that open new tabs won't work
|
||||||
setTimeout(function () {
|
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)
|
if (init)
|
||||||
liberator.execute(init);
|
liberator.execute(init);
|
||||||
else
|
else
|
||||||
@@ -1296,7 +1298,10 @@ const liberator = (function () //{{{
|
|||||||
let rcFile = io.getRCFile("~");
|
let rcFile = io.getRCFile("~");
|
||||||
|
|
||||||
if (rcFile)
|
if (rcFile)
|
||||||
|
{
|
||||||
io.source(rcFile.path, true);
|
io.source(rcFile.path, true);
|
||||||
|
services.get("environment").set("MY_" + extensionName + "RC", rcFile.path);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
liberator.log("No user RC file found", 3);
|
liberator.log("No user RC file found", 3);
|
||||||
}
|
}
|
||||||
@@ -1313,7 +1318,7 @@ const liberator = (function () //{{{
|
|||||||
|
|
||||||
// after sourcing the initialization files, this function will set
|
// after sourcing the initialization files, this function will set
|
||||||
// all gui options to their default values, if they have not been
|
// 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)
|
for (let option in options)
|
||||||
{
|
{
|
||||||
if (option.setter)
|
if (option.setter)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
* IMPORTANT: $VIMPERATOR_HOME is no longer used.
|
* IMPORTANT: $VIMPERATOR_HOME is no longer used.
|
||||||
|
|
||||||
* Added ~/.vimperator/info/{profile}/, similar to viminfo
|
* 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
|
* :hardcopy now supports output redirection to a file on Unix and MacUnix
|
||||||
* add ";f" extended hint mode to focus a frame
|
* add ";f" extended hint mode to focus a frame
|
||||||
* add "r", "l", and "b" to 'guioptions' to toggle the scrollbars.
|
* add "r", "l", and "b" to 'guioptions' to toggle the scrollbars.
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ At startup, Vimperator completes the following tasks in order.
|
|||||||
command (e.g.,
|
command (e.g.,
|
||||||
"[c]:source {file}[c]").
|
"[c]:source {file}[c]").
|
||||||
.. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its
|
.. [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
|
.. [a]\~/.vimperatorrc[a] -- If this file exists, its contents are
|
||||||
executed.
|
executed.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user