Just wrote a guide about this on the blog , this is a shortened version:
Part 1: Download what you need to download.
Download and set the Erlang runtime. Download and install TextPad.
Download the .syn file for Erlang and place it in the TextPad system folder. For me, this folder was C: \ Program Files \ TextPad 5 \ system. I'm not quite sure who made this syn file (the site is in a different language), but they did a pretty good job.
Part 2. Adjust syntax highlighting.
Open the text panel. Make sure the files are not open. Go to the "Configure" menu and select "Settings." In the settings window, click "Document Classes". There should be a list of currently recognized languages. Click the "Create" button (it is located directly below the list of languages) and enter "Erlang". Click "Apply."
Click the + button next to Document Classes. This should expand the list, and Erlang should now be on it. Click Erlang. You should see a list of file extensions associated with Erlang, click "Create" and enter "* .erl".
Now click the "+" button next to the "Erlang" on the left. This should expand the list of several more menus. Click Syntax. Click the drop-down menu and select erlang.syn. If erlang.syn does not exist, then the .syn file has not been placed properly.
Feel free to edit some other syntax options to customize the TextPad to your liking.
Part 3: Compiling from TextPad.
Note: as of 12/05/08 there are serious compilation issues in the text panel. The Erlang shell somehow ignores the new compilation when it is executed in a text field. This is only useful for checking errors, when you want to actually run the code, compile it in the Erlang shell.
In the settings menu, click "tools" on the left again.
Click the "Add" button and select "Program ...". Go to the erl5.6.5 \ erts-5.6.5 \ bin \ folder and select erlc.exe. Select and highlight a new entry in the list to rename it. Click "Apply."
Now click the "+" button next to "Tools on the left." Choose erlc or whatever you call the new tool (I called my "Compile Erlang"). The parameter field should read "$ File", and the initial folder field should read "$ FileDir".