DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

tips:jedit

Edit mode for jEdit

To use DokuWiki syntax highlighting in jEdit, save the following XML text into the file dokuwiki.xml and put it into your .jedit/modes folder in your home directory:

<?xml version="1.0"?>
<!DOCTYPE MODE SYSTEM "xmode.dtd">
<MODE>
	<PROPS>
		<PROPERTY NAME="commentStart" VALUE="/*" />
		<PROPERTY NAME="commentEnd" VALUE="*/" />
	</PROPS>
	<RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
		<!-- Headlines -->
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE">
		  <BEGIN>=======</BEGIN>
		  <END>=======</END>
		</SPAN>
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE">
		  <BEGIN>======</BEGIN>
		  <END>======</END>
		</SPAN>
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE">
		  <BEGIN>=====</BEGIN>
		  <END>=====</END>
		</SPAN>
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE">
		  <BEGIN>====</BEGIN>
		  <END>====</END>
		</SPAN>
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE">
		  <BEGIN>===</BEGIN>
		  <END>===</END>
		</SPAN>
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE">
		  <BEGIN>==</BEGIN>
		  <END>==</END>
		</SPAN>
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE">
		  <BEGIN>=</BEGIN>
		  <END>=</END>
		</SPAN>
		<!-- Character formats -->
		<SPAN TYPE="LITERAL1">
		  <BEGIN>//</BEGIN>
		  <END>//</END>
		</SPAN>
		<SPAN TYPE="LITERAL2">
		  <BEGIN>**</BEGIN>
		  <END>**</END>
		</SPAN>
		<!-- Lists -->
		<SEQ TYPE="MARKUP" AT_WHITESPACE_END="TRUE">*</SEQ>
		<SEQ TYPE="MARKUP" AT_WHITESPACE_END="TRUE">-</SEQ>
		<SEQ TYPE="MARKUP" AT_WHITESPACE_END="TRUE">:</SEQ>
		<SEQ TYPE="MARKUP" AT_WHITESPACE_END="TRUE">;</SEQ>
		<!-- Links -->
 
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE" DELEGATE="links">
		  <BEGIN>[[</BEGIN>
		  <END>]]</END>
		</SPAN>
 
		<SPAN TYPE="MARKUP" NO_LINE_BREAK="TRUE" DELEGATE="links">
		  <BEGIN>{{</BEGIN>
		  <END>}}</END>
		</SPAN>
	</RULES>
	<RULES SET="links" DEFAULT="LITERAL2">
		<MARK_FOLLOWING TYPE="LITERAL3">|</MARK_FOLLOWING>
	</RULES>
</MODE>

After that, add the following line to the file .jedit/modes/catalog:

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

After you have saved the catalog file, you can select “dokuwiki” in the options for the buffer. If a file has the extension *.wiki, the edit mode will be chosen automatically.

tips/jedit.txt · Last modified: 2015-08-03 11:48 by 37.153.235.206