Advertisement

Daily Mac App and Friday Favorite: CodeRunner

CodeRunner is a text editor for people who write code. It comes with built-in syntax highlighting for AppleScript, C, C++, Java, JavaScript (Node.js), Objective,C, Perl, PHP, Python, Ruby, or shell scripting.

I have been using it for a few months, mostly for writing shell scripts, and love it. The color coding makes it easy to immediately tell when I am missing a quote or some other basic syntax flaw, which means making fewer mistakes. It automatically applies templates (which are editable) to new files, so whenever I start a new shell script, it automatically includes the header lines and some other settings that I always use. In fact, it defaults to using the same template as the last kind of file you saved, so if you tend to write in one language, it will automatically pick that language and template. Otherwise you can choose manually.

One of my favorite aspects of it is a built-in terminal console, which lets you test the script without switching over to Terminal or iTerm. A recent update even made it possible to define arguments, compilations flags, or arguments before sending it to the built-in console. The console automatically appears when needed, and can be shown/hidden with a keyboard command.

CodeRunner offers "completions" (for example: automatically adding a closing bracket when you open one), but it also lets you turn that off if you don't like it. There are even themes to change the color combinations. I tend to prefer a simple black-on-white, but there are several dark background/light type options as well. In Lion, CodeRunner supports Autosaving, Versions and Fullscreen mode. It also supports "tabs" (multiple documents in one window) if you want to use them, but doesn't require them. Generally I don't like tabs in any apps except web browsers, but it is handy to have the option to keep related files together when working on separate projects.

CodeRunner isn't going to replace a complex program like BBEdit with integrated FTP and a multitude of configurable options, but it doesn't need to. I own, use, and love BBEdit, but I use CodeRunner exclusively for writing shell scripts now, and vastly prefer it for that purpose.

If you want a lightweight tool for writing scripts, you should definitely check it out on its home page or download it from the Mac App Store for $10. (Also: if you use regular expressions -- especially if you have trouble with them -- be sure to also checkout Patterns, an app by the same developer which makes it much easier to see how they expand. I'll probably review that more fully another day but it's currently on sale for $3 instead of $5, so you might want to check it out soon.)