views:

489

answers:

3

While looking for a light-weight Scala development environment, I came upon an Scala edit mode for jEdit. I don't know how to put it to use, though. How does one put a new edit mode in jEdit?

A: 
VonC
It is very helpful, indeed, but does not answer the question I asked. I could change my question, but I think it's best to leave the answer I found myself here, and write a new question, about developing Scala with jEdit, and you could post your answer there. How's that for you?
Daniel
Looks fine to me. I upvoted your answer by the way.
VonC
Ok, I asked the question as http://stackoverflow.com/questions/428819/how-do-i-configure-jedit-for-scala-projects
Daniel
All right: I "recycled" this answer in your new question ;)
VonC
A: 

You can copy the scala.xml file to $JEDIT_HOME/modes

sblundy
+4  A: 

All of this can be found inside jEdit's help, Using jEdit -> Writing Edit Modes -> Installing Edit Modes. But, if you are like me, and tried StackOverflow first, here's the short of it.

Place the mode file (in this case, scala.xml) inside the "modes" directory in jEdit home directory -- this can be found through the Utilities menu -- if you want it for all users, or the "modes" directory in user's jEdit's settings diretory -- which can also be found through the Utilities menu -- if the new mode is to be used by only one user.

After that, edit a file "catalog" inside that same directory. It contains a list of supported modes. If you are working on the settings directory, there won't be any examples to use as a reference, but the catalog inside the home directory has plenty.

A settings directory catalog would look like this, for the referenced mode:

<?xml version="1.0"?>
<!DOCTYPE MODES SYSTEM "catalog.dtd">

<MODES>

<!-- Add lines like the following, one for each edit mode you add: -->
<!-- <MODE NAME="foo" FILE="foo.xml" FILE_NAME_GLOB="*.foo" /> -->

<MODE NAME="scala"   FILE="scala.xml"
       FILE_NAME_GLOB="*.scala" />

</MODES>
Daniel