IDL Syntax coloring for
BBEdit and TextWrangler
 
BBEdit and TextWrangler are full-featured, point-and-click, text editors for Macintosh computer systems from Barebones Software. Either program is an excellent IDL programming editor for those who prefer the command line to the IDL Development Environment on Mac OS X systems. The Barebones web site explains the differences between the free TextWrangler and the commercial BBEdit. I use TextWrangler in our Mac lab to teach introductory IDL programming.
Click on the appropriate link below to download a zip file containing the IDL syntax-coloring plug-in for BBEdit and TextWrangler. This is an Apple preferences list (.plist) XML file. Many thanks to Will Powell of Macquarie University, Australia for putting this together.
  1. Version 2.0 - for BBEdit 8.5 or higher and TextWrangler 2.2 or higher
  2. Version 1.0 - for previous versions
 
Since TextWrangler is free, we recommend that TextWrangler users download the latest version of TextWrangler and use Version 2.0 of the plug-in.
 
The syntax-coloring plug-in adds basic syntax coloring to either BBEdit or TextWrangler. To use it, unzip the downloaded file and and put the file IDL Configuration.plist into ~/Library/Application Support/BBEdit/Language Modules/ or ~/Library/Application Support/TextWrangler/Language Modules/, depending on which program you have. You may also need to go into the Preferences panel for BBEdit or TextWrangler and do two things: turn on syntax coloring in the Editor Defaults pane and make sure that IDL is linked to .pro files in the Languages pane.
 
The plist file includes a list of built-in IDL routines and functions that is used to determine which words should be colored. Will Powell wrote a short IDL program to allow this list to be updated, get_routine_names.pro. The program generates a text file that can be copied and pasted into the plist file. This should only be necessary when IDL is updated and new system routines are added.
 
Version 2.0 of the plug-in will identify the start and end point of functions and procedures, so TextWrangler can display them in its popup menu and allow you to use the 'Go to Function Start' and 'Go to Function End' menu commands. This allows you to navigate long source files which contain multiple routines much more easily. When used with BBEdit, you can also do Code Folding - which hides routines from view while you're not interested in them.
 
The plug-in does not provide full, context-sensitive, syntax coloring, but it does highlight strings, comments, and built-in procedure and function names.