Coda Snippets for ColdFusion, MXUnit and ShadoCMS

If you’ve been following my blog, you might have seen that I’ve started using this wonderful editor called Coda for most of the development work I do. It has very nice built-in support for ColdFusion and given that it is a native Mac app, the interface is beautiful. And it has a few really nice features like built-in FTP and Clips (snippets).

Over the last month or so, I’ve built up quite a few clips, which are just snippets in CFEclipse-speak, for ColdFusion, MXUnit and ShadoCMS. Obviously I’m adding more as I find time or as I need, but here is what I have managed to put together till now.

To install, simply download and double-click the file. It should automatically become available in the Clips area. Or you can open the Clips window and right click on the left side of the Clips window:

Also, I’ve set up keyboard triggers for most of the clips. You might want to change them to what you like.

Have fun!

PS: My initial ColdFusion clips started off with this comment on a previous blog entry.

FTP in Eclipse — Hooray!

Can’t believe it, just can’t believe! All this while I’ve been finding all kinds of ways to try and work with ColdFusion content on FTP servers, but there is a way built right into Ecplise to connect to an FTP site!

In the past I was pursuaded by colleagues to use Aptana, which caused me other types of grief. Then I used CyberDuck to open files directly in BBEdit and edit them there. At one point I used a couple of other plugins. All these approaches just caused more issues than they solved!

So today, when looking at the different perspectives in Eclipse, I found one called “Remote Filesystem Explorer”! With an intriguing name like that, I thought I’d give it a go and switched to it.

Low-and-behold! Right-clicking the navigator pane promoted me to setup a new connection, and guess what I saw!

Miracle! And it works like a charm and seems very reliable.

BTW, this is on Eclipse 3.4.2.

How do you edit a 862 MB Text File on a Mac?

Right… so I have this large large large text file. 862 MB. And I wanted to change the first few lines in it.

First I tried the usual editors… BBEdit, Coda, TextMate, TextWrangler etc. All crashed and burned.

Then went into Terminal to give the text-based editors a try. And to my amazement (and much joy) the file opened up in both Pico and vi. Although it took 30-odd seconds before the text showed up on the screen, but once it was there, I could scroll around and edit. And saving the file was pretty quick as well.

Long live command line!

Using BBEdit for Editing Apache Configuration Files

Off late, I’ve been working a lot with Apache configration files. And since I use BBEdit for most of my text file editing, I invariably use BBEdit for editing Apache configuration files. My workflow for working with these files is now quite settled. I thought I’d share it here.

Syntax Color Coding

BBEdit has very nice third-party language module for Apache Configuration files. The module automagically provides syntax coloring for all the Apache keywords, making it really easy to read configuration files. If you have ever had to work with Apache configuration files, you will see the utility in something like this. Obviously if you make any error in spelling out a directive or any other keyword, it does not get color-coded, so one ends up making fewer errors.

Apache Configuration Files Color Coding

Editing All Files at One Go

BBEdit has a very feature where one can open up a whole folder for editing. All files in the folder being edited become available on one side of the screen.

Apache File View

This comes in quite handy if you have a lot of include files in your main Apache conf. I have my enviornment setup so that I issue the following on Terminal and BBEdit loads up the folder view for Apache configuration files:

bbedit /private/etc/apache2

Testing Configuration

After making any change to configuration files, I normally test if the changes are ok or not. I’ve created a simple shell script that does the needful.

sudo apachectl -t

Using BBEdit you can run this script from within BBEdit, without having to open Terminal. You need to click on the top menu option which looks like #! to bring up the menu to run the script.

Restarting Apache

If the test is ok, you can restart Apache. I have another simply shell script that does the needful:

sudo apachectl restart

Again, I run it using the BBEdit option to run scripts in Terminal.

All in all, with the plugin and these simply scripts, my Apache webserver configuration tasks have become much simpler and more streamlined.

ColdFusionMX Syntax Files for PSPad

I use PSPad as the default reader/editor for text files of all kinds. Of late, I’ve been using it for working with ColdFusionMX files as well. It works very nicely!

However, the syntax definition file for ColdFusionMX available on the PSPad site was missing some tags and functions. I’ve updated the syntax definitions and attached the file here.