April 13th, 2007

launching textpad from cygwin

This is a simple bash function that I use pretty often. It comes in handy when I’m navigating a tree of source code in a cygwin bash shell, and want to edit a file in TextPad. You can just put this line in your .bashrc file, and make sure the directory where TextPad.exe lives is in your $PATH environment variable:

function tp() { textpad $(cygpath --mixed $1) & }

This allows me to do things like:

$find . -name '*Foo*.java'

which returns results like:

./src/com/spugbrap/foo/bar/TestFooImpl.java
./servlet/com/spugbrap/baz/FooDispatcher.java

Then I can just copy one of those full (but relative) paths to the clipboard, and paste it into a command that looks like this:

$tp ./servlet/com/spugbrap/baz/FooDispatcher.java

Now, regardless of where the root of this relative path exists on the file system, it will open that file in TextPad.

The only limitation that I run into with this is that it only lets you specify one file to open. It could probably be modified to handle multiple files pretty easily, but this hasn’t bothered me enough to deal with yet.

November 29th, 2005

IE Tab Firefox Extension is great!

The IE Tab Firefox Extension is awesome! It allows you to open the current page in a new tab, rendered by the Internet Explorer engine.

Although most sites work fine in Firefox, it’s an unfortunate fact of life that some sites are designed to work with Internet Explorer only. To deal with this, I’ve been using the IE View Firefox Extension, which allows you to open the current page in an Internet Explorer window.

It allows you to define a list of sites that will always open in IE, which is useful if you use Firefox as your primary browser, but frequently need to use some IE-only sites.

This new IE Tab extension allows you to configure the same kind of list.. sites that will always open in an IE Tab. It even supports Ctrl-leftclick to open the current IE Tab into a new Internet Explorer window, using the IE View extension! I highly recommend both of these extensions.