All this can be found inside jEdit help using jEdit → Writing Editing Modes → Setting Editing Modes. But, if you are like me, and you first tried StackOverflow, that’s short.
Place the mode file (in this case scala.xml) inside the "modes" directory in the jEdit home directory - this can be found in the "Utilities" menu - if you want it for all users or the "modes" in jEdit diretory user settings - which can also be find in the Utilities menu - if the new mode should be used by only one user.
After that, edit the file "directory" inside the same directory. It contains a list of supported modes. If you work in the settings directory, examples will not be used as a link, but there are many examples in the directory inside the home directory.
The directory of the configuration directories will look like this: for the link mode:
<?xml version="1.0"?>
<!DOCTYPE MODES SYSTEM "catalog.dtd">
<MODES>
<MODE NAME="scala" FILE="scala.xml"
FILE_NAME_GLOB="*.scala" />
</MODES>
source
share