diff --git a/ChangeLog b/ChangeLog index c3501fc2..6b2dedea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@
date:
* version 0.4
+ * :source support, and auto-sourcing ~/.vimperatorrc on startup
* fixed saving of session
* fixed hints display when zooming in/out of a web page
* added 'B' command for continous buffer display
diff --git a/Makefile b/Makefile
index 03ba4b61..de5500d4 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
VERSION = 0.4
-JAR_FILES = ${shell find chrome/content/ -type f -a ! -path '*CVS*'} chrome.manifest
+JAR_FILES = ${shell find chrome/content/ -type f -a ! -path '*CVS*' ! -name 'tags'} chrome.manifest
JAR = chrome/vimperator.jar
RELEASE_FILES = ${JAR} install.rdf chrome.manifest TODO AUTHORS Donators ChangeLog Makefile
diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js
index 66e7f54e..28b1cb68 100644
--- a/chrome/content/vimperator/commands.js
+++ b/chrome/content/vimperator/commands.js
@@ -281,7 +281,7 @@ var g_commands = [/*{{{*/
[
["source", "so"],
"Load a local javascript file and execute it",
- "Not implemented yet",
+ "~ is supported as a shortcut for the $HOME directory.",
source,
null
],
@@ -1599,23 +1599,20 @@ function set(args, special)
}
}
-function source(filename)
+function source(filename, silent)
{
-
-
-
- //echoerr("Soucing not yet implemented");
- var fd = fopen(filename, "<");
- var s = fd.read();
- fd.close();
-
try
{
+ var fd = fopen(filename, "<");
+ var s = fd.read();
+ fd.close();
+
eval(s);
}
catch(e)
{
- alert(e);
+ if(!silent)
+ echoerr(e);
}
}
diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js
index 3ebcddcd..9d5f3f12 100644
--- a/chrome/content/vimperator/vimperator.js
+++ b/chrome/content/vimperator/vimperator.js
@@ -283,7 +283,13 @@ function init()
// firefox preferences which we need to be changed to work well with vimperator
set_firefox_pref("browser.startup.page", 3); // start with saved session
+
logMessage("Initialized");
+
+ // at the very last, read a ~/.vimperatorrc
+ source("~/.vimperatorrc", true);
+
+ logMessage("~/.vimperatorrc sourced");
}
function unload()