IntelliJ and friends for anything that's not extremely trivial (including for single files). It's very convenient to use one program for everything. I've tried a number of IDEs and liked this one best. (The String Manipulation plugin is a nice addition).
For extremely small changes like configuring stuff over ssh, I use vim. Just because it's the only one I've learned and it has been adequate so far.
EDIT: and Notepad++ instead of vim when on Windows.