ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

jEdit ExpressionEngine Language Mode

February 14, 2009 6:24pm

Subscribe [5]
  • #1 / Feb 14, 2009 6:24pm

    Chris Ruzin

    41 posts

    I’ve made a jEdit language mode for EE that works pretty good, at least as good as my Textmate bundle. The jEdit mode is just for syntax highlighting though. No snippets. No doc lookups.

    The mode keeps HTML, JS, CSS and PHP styled correctly as well, so nothing should look weird. Just like my Textmate bundle, EE tags inside of strings (e.g. “test-{entry_id}”) don’t get highlighted correctly. I’m looking into ways of fixing this.

    I’ve attached a screenshot for those who are interested.

    You can download it here. To install it, unzip the file and drop it into the modes directory under ~/.jedit.

  • #2 / Feb 14, 2009 6:44pm

    russlipton

    305 posts

    Wow.

  • #3 / Feb 14, 2009 10:08pm

    Chris Ruzin

    41 posts

    I’ve made a jEdit macro that mimics the EE documentation lookup that’s in my Textmate bundle. Instead of popping open a little window in jEdit, it’ll open up your default browser. I know it works on a Mac, and should work on Windows and Linux too. If someone could test it out on those platforms, that’d be great.

    To install it, download the macro, unzip it and drop it in ~/.jedit/macros.

    You can then add it to the contextual menu and/or give it a keyboard shortcut in jEdit. I’ve given it the same shortcut as in the Textmate bundle, ctrl-e.

    You highlight the tag you want to look up, and then either use your keyboard shortcut or the contextual menu.

  • #4 / Feb 20, 2009 2:00pm

    Midoriberlin

    2 posts

    Nice work!

    I’m still getting used to the many intricacies of jEdit but this looks like a nice addition.

    Having said that, I downloaded it and installed and then jEdit totally hung for about 9 hours but that turned out to be something to do with updating JRE rather than the new mode.

    Just for anyone else like me who is new to some of this stuff, I think you need to edit the catalog file also in your .jedit directory

    Full instructions here - http://www.jedit.org/users-guide/installing-modes.html

    I think there may be a way using FIRST_LINE_GLOB to parse out EE PHP files automatically which would be nice. Will give it a bash and report back.

    Just struck me today as well how incredibly handy SuperAbbrevs could be for EE in jEdit.

    Thanks again for the language mode, very useful.

  • #5 / Feb 20, 2009 2:39pm

    Chris Ruzin

    41 posts

    Glad you like it. If you have any suggestions or ideas on how to improve it, please let me know. Anything that can make the mode more helpful is good.

  • #6 / Feb 21, 2009 8:56am

    Midoriberlin

    2 posts

    Hi there,

    Just to follow up on the previous post, putting the following into the catalog file seems to make jEdit automatically recognise EE files:

    <MODE NAME=“expression_engine” FILE=“ExpressionEngine.xml” FILE_NAME_GLOB=”*.php” FIRST_LINE_GLOB=”{!—*EE*” >

    along with a first line in each file that’s an EE comment with the string “EE” somewhere in it.

    Seems to work and saves me having to assign the buffer everytime in jEdit which is kind of handy.

  • #7 / Feb 22, 2009 11:02pm

    Chris Ruzin

    41 posts

    Great! I’ll add it to the mode.

    EDIT: Nevermind. I can’t add it to the mode since your suggestion isn’t part of the mode…

    My lack of sleep is quickly catching up with me.

  • #8 / Nov 18, 2009 4:38am

    toddprouty

    8 posts

    Chris: Thanks for the jEdit EE mode. I wasn’t optimistic that such a thing would exist (jEdit is so underrated). Do you have any problems with commenting using the keyboard shortcut? It’s not working for me, though it works as expected in other modes.

    Also, I get errors (shown in status bar) when I use the FIRST_LINE_GLOB mentioned by Midoriberlin. I tried formatting the glob differently, but nothing worked. Is it working for you?

  • #9 / Nov 18, 2009 12:55pm

    Chris Ruzin

    41 posts

    Glad you like the mode. Unfortunately I no longer use jEdit. I’m back with Textmate. I always seem to end up back with Textmate…

    If I remember right though, I wasn’t having any issues with the EE mode or the glob line.

  • #10 / Nov 18, 2009 1:02pm

    Joe Wolin

    206 posts

    Thanks.  I’m u huge fan of jEdit and using a Windows machine so no textmate.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases