jEdit Syntax Highlighting Mode for the Peg/Leg Parser Generator 'Leg' Syntax

Filed under jEdit, Programming

jedit icon I've been working on a fast and embeddable Markdown parser that can be used for syntax highlighting in editors, based on the PEG grammar from John MacFarlane's peg-markdown compiler project. The grammar is written in leg, a syntax for the peg/leg parser generator by Ian Piumarta, and to make my work with this new syntax a bit more pleasant I implemented a jEdit mode for it.

jEdit Macro for Opening the File Browser at Current Buffer's "Project Root" Directory

Filed under jEdit, Programming, Scripts

When I'm working with code in jEdit, my editor of choice, I like to keep the file browser open and docked to the left side of my editor window. When I'm switching between files -- often belonging to different projects -- I find myself reaching for the mouse in order to manually navigate the file browser to the root folder of the project the currently open file belongs to. I started doing this so often that I decided to whip up a small macro to do it for me.

Update (April 4, 2011): Set file browser to directory of current buffer if version control root cannot be found.

Quick, Declarative UML Sequence Diagrams

Filed under jEdit, Scripts

wsd-example-diagram-small I recently had to create a few UML sequence diagrams, and I decided that I didn't want to spend too much time manually tweaking and fixing the diagrams themselves (which is what I probably would've done, had I used OmniGraffle or something similar), but instead focus on the content — the depicted workflow itself. This is when I remembered the bookmark I had in my browser for the Web Sequence Diagrams online service.

Markdown and POD Syntax Highlighting Modes for jEdit

Filed under jEdit

In The Pragmatic Programmer¹, the authors Andrew Hunt and David Thomas empasize the power of plain text, as well as "generators" that take the canonical form of some document and generate different representations of it. This is very much in line with the way I like to work with a lot of documents, which is why I've been using the Markdown and POD (Plain Old Documentation) syntaxes for a couple of things. As jEdit is the editor I prefer to use for working with most plain-text formats, I wrote highlighting modes for it for these two syntaxes.

Update (April 23, 09): Updated the Markdown mode with slightly better handling of code blocks and list item paragraphs as well as some comments about problems therein (see below in the post for more info on this).

fcshctl: the Flex Compiler Shell Controller

Filed under ActionScript 3, Flex, jEdit, Programming, Scripts


Like I've mentioned before in this blog, I develop Flex applications using the Flex SDK and jEdit instead of Adobe's Flex Builder IDE. This setup has worked very well for me but one annoying issue I've had to deal with because of this is the slow compilation speed: every time I make a small change into one of my projects and recompile it, the mxmlc compiler (that my build scripts are calling) has to load the JVM into memory and recompile my whole project from scratch, which obviously takes a while. Compiling things in Flex Builder is a lot faster, and the reason for that is the Flex Compiler Shell, which it uses for compilation instead of mxmlc.

Update (Version 0.5.1, Mar 17, 09):
  • Display a "compiling..." message before sending fcsh a compilation command in order to let the user know that something is going on and that they should wait instead of just killing the process.
  • If the log file exists when fcshctl runs, check if there are any other fcshctl instances running, and if not, assume that the log file has been orphaned, delete it and continue.
  • Exit with status code 0 ("ok") if fcsh output ends in the "Nothing has changed since the last compile" message.

ActionScript 3 Support for jEdit's SideKick Plugin Through Exuberant Ctags

Filed under ActionScript 3, Flex, jEdit, Programming

Today VeryVito made a post on his blog that I had been waiting for a while now: he had just written ActionScript 3 support for Exuberant Ctags, which means proper SideKick plugin support for jEdit when editing AS3 with it. He also made nicer icons for use with the CtagsSideKick, so you should definitely check his stuff out if you use (or plan to use) jEdit for editing AS3.

However, after starting to use the SideKick plugin with the modified, AS3-supported version of Ctags while doing my work, I found a few small rough edges in the ActionScript support he had made:

Flex SDK Language Reference Helper Macro for jEdit

Filed under ActionScript 3, Flex, jEdit, Mac, Programming

VeryVito at turdhead.com has been writing lately about customizing jEdit for writing ActionScript, which is exactly what I've also been doing. A While ago he posted macros for referencing the help files that came with Flash CS3. Well, I don't have Flash CS3, and I use the Flex SDK to do my ActionScripting, so I took the macro he posted and modified it so that it can be used with the Flex language reference.

Update (Oct 5, 07): Now it can search from any number of AsDoc sources
Update (Oct 8, 07): Also finds documentation for methods, changing the command for opening a file in a web browser is easier
Update (Oct 10, 07): now the script searches through files, not buffers, so you needn't have all of your project's files open for it to be able to search through them

jEdit Macros for Running Compilers

Filed under Flex, jEdit, Programming, Scripts

compileMxml shell script displays Growl notifications I've been using jEdit as my ActionScript 3 editor for a while now. I Like the extension and customization possibilities it gives me, and I've used them to create macros for compiling my Flex applications and then bound them to specific keyboard shortcuts to enable quick access to running the compiler.