I'm trying to start using ENSIME for Scala development with SBT. How should I manage license headers? I used to use Copyright Wizard in Eclipse and that seemed fine.
相关问题
- Symbol's function definition is void: declare-
- Unusual use of the new keyword
- Get Runtime Type picked by implicit evidence
- What's the point of nonfinal singleton objects
- PlayFramework: how to transform each element of a
相关文章
- Gatling拓展插件开发,check(bodyString.saveAs("key"))怎么实现
- RDF libraries for Scala [closed]
- Why is my Dispatching on Actors scaled down in Akk
- ess-rdired: I get this error “no ESS process is as
- How do you run cucumber with Scala 2.11 and sbt 0.
- Emacs/xterm color annoyance on Linux
- GRPC: make high-throughput client in Java/Scala
- Setting up multiple test folders in a SBT project
Emacs has many ways to template, it really depends on what your workflow is. For copyright you might just want to add a copyright message to each new file opened. Last time I did this was with the skeleton package--- there are newer packages now.
Perhaps the easiest to set up, but not the most flexible. Is to place your copyright message into a file scala.template and add that filename to the auto-insert-alist.
scala.template is a file with which you want to insert into each new scala file. To do this automatically for new files the auto-insert function needs to be added to the find-file-hook.
This mechanism is very powerful, it is possible to use functions or templates that require user input instead of a simple file. For example for C++ header files:
See http://www.emacswiki.org/emacs/AutoInsertMode#toc1
It is possible to remove the copyright and call auto-insert manually. This might be done via a macro, perhaps called when you save the file.
For more versatile auto-updating of copyright messages you might want to look at the approach taken by the copyright package. Checking the copyright using this package can be performed on save using the before-save-hook. http://www.gnu.org/software/emacs/manual/html_node/autotype/Copyrights.html
See http://www.emacswiki.org/emacs/AutomaticFileHeaders . Also try googling for auto-header.el which might help too.
I don't think Emacs has something like this, let alone ENSIME, but you can easily define an abbrev for the license header and expand it when you need it.
This is the greatness of Emacs - it might not have exactly what you look for, but it certainly has everything that you need.