Geeks With Blogs
Caffeinated Coder A Grande, Triple Shot, Non-Fat Core Dump by Russell Ball
I've been working on Nant scripts this week and the experience has been much more enjoyable since a co-worker showed me how he used EditPlus (thanks Raoul). After a few quick customizations, I was able to not only get syntax highlighting for my build files but also execute Nant from within the tool and see the output from the bottom pane. Anything that decreases context switching when I have a gajillion windows open is pretty nifty in my book.

Here's a picture of a build file with my custom button circled at the top and the nant output in the bottom pane..

Here are a list of tweaks that I made:
  • For syntax highlighting:
    1. Under the Document menu, go to 'Change File Type' and select XML.
  • To create a custom button that will execute the build you are editing:
    1. Select 'UserToolbar' under the View menu to get the user configurable buttons to appear.
    2. Click on the first button (the hammer icon) of the user toolbar that appears and choose 'Configure User Tools'.
    3. On the dialog box that appears, click the 'Add Tool' button and select 'Program'.
    4. For the Command field, navigate to the location of your Nant executable.
    5. For Argument field, enter the buildfile argument (-f:) and then choose 'FileName' from the drop down so that the name of the current build file you are editing will dynamically be sent as a command line parameter.
    6. For the Initial Directory textbox, choose 'File Directory' so that the path of the current file will be dynamically sent as a command line parameter.
  • To view the output from Nant in the bottom pane:
    1. Click on the 'Capture Output' checkbox from the previous dialog box.
In order to execute your Nant script, simply click on the first button that becomes enabled on the user toolbar. This is what the dialog box looks like for the above steps:

Happy Nant scripting!
Posted on Thursday, November 8, 2007 8:06 PM Tools | Back to top

Comments on this post: EditPlus: A Kinder, Gentler Way To Build Nant Scripts

# re: EditPlus: A Kinder, Gentler Way To Build Nant Scripts
Requesting Gravatar...
If you want all of what you've described here *plus* intellisense, try ReSharper in Visual Studio. No tweaking required and one of the best, but least talked about, features of ReSharper.
Left by Donald Belcham on Nov 08, 2007 11:13 PM

# re: EditPlus: A Kinder, Gentler Way To Build Nant Scripts
Requesting Gravatar...
I do use Resharper, but I haven't tried setting up a custom execute task or tried getting intellisense to work for build files. I'll have to give that a try. Good intellisense support might make it worth it, however I have to admit that I don't like waiting for the 10-15 second VS start-up time every time I want to edit a config or build file. It is nice to have a light-weight tool that loads instantly, but still offers some basic IDE comforts.
Left by Russell Ball on Nov 09, 2007 3:11 PM

Your comment:
 (will show your gravatar)

Copyright © Russell Ball | Powered by: