Pages

Saturday, August 8, 2009

Save Time and Work: TextPad Clip Libraries and Custom Settings

TextPad is my all-time favorite code editor. I use it extensively for work with VBScript, Visual LISP (even with Autodesk's dying/dead VLIDE), KiXtart, ASP, PHP, PowerShell (even with newer tools like PowerGUI and PowerShell IDE v2, etc), XML, XHTML, XSLT, SQL, and trusty old BAT/CMD. I even use it in place of Notepad for editing TXT and INI files. Yes, it's that good.

But, more importantly, I can (and do) use ONE editor for all of these environments. The flexible nature of TextPad makes this a no-brainer. I don't even want to bother with tracking keyboard shortcuts, options settings, menu locations, command features, command names, etc. between incompatible code editors anymore. It's 2009 and I'm tired of that crap. TextPad works and works very well across all of those dialects, and many many more.

Sorry if I sound like Billy Mays trying to pitch it. I don't work for Helios, and they didn't pay me to say any of that. It's all my own testimonial.  I’ve spent years with PrimalScript, UltraDev, DevPad, UltraDev, Dev-This, Dev-That, all the way back to Aurora Edit in the early 1990’s.  Everyone has their preference.  My preference is TextPad.

The power of TextPad comes from the ability to configure custom Document Classes. Each class is a set of options you associate to a document type or set of document types. For example, you can create a class called "KiXtart" and associate it with *.kix, and *.udf document types. This is not to be confused with how Windows associates document types to applications, but that is also a set of options you can configure within TextPad. The document class simply loads a set of behaviors into TextPad when you open a document of that class. So when you open a .kix file, it sets the active syntax definition file and keyword coloring, tab spacing, font characteristics, and so on for that class.

One catch to this is that it's too easy to waste time setting up each document class individually when some options can be configured globally. This is especially true when you prefer some features to be the same regardless of document class. Such as fonts, tab spacing or keyword coloring.

textpad1

The most efficient way I’ve found is to (first) configure the “Default” document class.  Then create your custom document classes, which inherit most of the settings (aside from syntax definition, since that varies by class).  That way, you configure the tab spacing, font settings, print settings, trailing space options, keyword coloring and so on, just one time.  You only need to set the syntax option for each class and you’re done.  You can see some of these options I’m talking about in the images below.

textpad2 textpad3
I’m still looking for a quick and easy way to back up all my settings, tools, macros, and so forth so when I have to reload or replace my computer I can put things back with less hassle.  Right now I’m using scripts and ZIP files to do that, which is not ideal.  Drop me a comment if you have some suggestions about how to do this properly?  Thanks!

No comments:

Post a Comment