Syntax errors in Clojure source result in InitBuffer exception that suppress plugin mappings
I have seen in a few places (most recently on StackOverflow ) that people are having issues with their VimClojure key mappings. Most of the troubleshooting revolves around trying to figure out how to correctly use the "local leader".
However, I think I have found one possible source of confusion.
If you are loading a Clojure source file into a buffer and this source file is not syntactically correct, the "NamespaceOfFile" nail will understandably fail to execute. The resulting exception is eaten inside the vimclojure#InitBuffer function  and the "b:vimclojure_namespace" variable is left undefined.
The filetype plugin checks for existence of the "b:vimclojure_namespace" variable prior to defining the full set of VimClojure mappings . Thus, the syntax error has the side effect of preventing the mappings from getting defined.
When the user tries to start a REPL, for example, the <LocalLeader>sr combo will have no effect, which makes it look like VimClojure is not installed properly when really the problem is in the source file.
In my opinion, loading a source file that contains syntax errors should be a valid use case for the plugin. For example, maybe I need to fix the syntax errors and then send the code off to the REPL for testing.
I would be happy to work on a patch for this, but I'm afraid that simply setting a default namespace (e.g. "user") when the "NamespaceOfFile" nail fails is not the best course of action. Thoughts? Is there danger in assuming namespace of "user" when the namespace of the source file can't be determined because of evaluation failure?
PS Thanks for the hard work on the plugin, it is very slick.