Flush with the knowledge that Clojure symbols can have '-' in them, I find myself creating file like this:
test-svg.clj
or worse
test-svg
However, Clojure's build system expects that a namespace such as:
(ns test-svg)
Will be built as test_svg.class
I suggest the following:
- The new filename should be taken to be the classpath class element, and the actual filename be calculated from that.
Create:
/myproj/src/views/test-svg.clj
Actually creates:
/myproj/src/views/test_svg.clj
- The (ns ) declaration be automatically placed at the start of the file. It's boilerplate that I don't really need to type.
Injects:
(ns myproj.src.views.test-svg)
- Some support of rename is added for idiots like me (so I don't have to drop to bash and then reload, losing catnip context)
Such as
3.1) Clicking on the filename in the top left corner switches to edit mode, can change filename. Auto update ns?
3.2) If a ns-declaration conflicts with the filename, the filename be changed.
For example, if I already created my file as above, and now I find I'm happy with my scribbling, I can type:
(ns myproj.src.views.test-svg)^H^H^H^H^H^H^H^H^Hsvg-view)
^S
Renames the file and builds the new class.
I know it's sugar, but I keep creating duff files. :-) Perhaps I should be the change I want to see.