Using JEdit as external code editor for Processing
As you might know, the Processing IDE (to a large part) is based on the open source JEdit editor. Having grown fond of this powerful and customizable editor, I've been using it for most of my XML and programming tasks over the years, whenever Eclipse is a too big a gun to fire up. JEdit only becomes "truly" efficient via its many plugins available, but it also rocks in ease of customization.
Due to my new job I've become a semi-Mac user again (at least to 50%) and haven't got around installing much software yet. So using the existing definition for Java and some handy Regular Expressions I quickly converted the list of processing keywords (located in the file /lib/keywords.txt inside the Processing root folder) into a JEdit edit mode XML definition for PDE source files.
Brief note for installation:
1) put this file into the /modes directory inside the JEdit root folder
2) copy & paste the following XML node into the file "catalog" inside the same folder
<MODE NAME="processing" FILE="processing.xml" FILE_NAME_GLOB="*.pde" />
Syntax colouring/checking for PDE files should now be ready. Please do let me know any errors/suggestions. Maybe it'd be handy to include method names and constants of some common P5 libraries too?
Btw. If you're interested the JEdit RegExp used for turning the plaintext list into XML are here:
search pattern: ^(\w+)\t(\w+).*$
replace pattern: <$2>$1</$2>
Due to my new job I've become a semi-Mac user again (at least to 50%) and haven't got around installing much software yet. So using the existing definition for Java and some handy Regular Expressions I quickly converted the list of processing keywords (located in the file /lib/keywords.txt inside the Processing root folder) into a JEdit edit mode XML definition for PDE source files.
Brief note for installation:
1) put this file into the /modes directory inside the JEdit root folder
2) copy & paste the following XML node into the file "catalog" inside the same folder
<MODE NAME="processing" FILE="processing.xml" FILE_NAME_GLOB="*.pde" />
Syntax colouring/checking for PDE files should now be ready. Please do let me know any errors/suggestions. Maybe it'd be handy to include method names and constants of some common P5 libraries too?
Btw. If you're interested the JEdit RegExp used for turning the plaintext list into XML are here:
search pattern: ^(\w+)\t(\w+).*$
replace pattern: <$2>$1</$2>
Tags: processing.org jEdit

3 Comments:
hmm.. interesting how blind i am sometimes! being based on jEdit of course there must already be an existing edit mode file bundled with Processing. it's called "pde.xml". it would have been a better start, but it's not directly usable by jEdit... oh well!
I've been puzzling how to get the advantages of the code - test - recode behaviour of the Processing IDE.
Is there a good way to launch and test programs which you're editing in Jedit (preferably a single keypress).
Currently the overhead of switching, loading and running is making Jedit a lot less of an attractive option.
I completely agree!
Im interested in Jedit because i can change the font size of my text, which is something i cant do inside the processing IDE.
-What sort of interoperabliity is there between Jedit + processing?
I followed your instructions but am not sure how to access the processing mode in jedt.
Please help!
-VJ Anomolee
Post a Comment
Links to this post:
Create a Link
<< Home