I use Vim for all program / script / and text file editing.

I use this because it is ported to every operating system that I program on, so I get a common editor. It also supports every language I program in, as well as recognising just about every config file that I have to deal with - don't underestimate the usefulness of syntax highlighting in config files.

It's without a doubt the best programmers editor I've ever used, but it has a high learning curve because of all the features. This means it may not be suitable for starters, especially of you're only going to edit simple scripts.