I've noticed that my Arduino IDE software (Vers 0022) won't open .cpp and .h files which I use as library files in my programs.
I have to first open them in Wordpad and then paste the info across to Arduino IDE to see if it compiles - and then if I make any amendments, I paste it back into Wordpad and save.
An actual programming editor is nice because it will do syntax hiliting, proper indentation and a bunch of other nice little things for you. If you have a CPP or an H file in your sketch, and you edit it while the sketch is open in the Arduino IDE, you will need to close the sketch in the Arduino IDE and reopen it, otherwise the Arduino IDE won't know the files have been edited.
No an editor won't do that for you. What i have been doing to debug sections of my Arduino code is loading it into Open Watcom, which is an open source / free development system. Arduino code is standard C/C++ and uses the GCC compiler. Watcom includes a source line debugger and a profiler, which have been very handy. Of course its all intergrated nicely with an editor.
But, Watcom does not target AVR or Arduino. You can get the makefile to work and then compile from the command line without having to start the Arduino IDE. I'm working on getting that to work now. I saw a reference also to using GDB (the debugger) for AVR stuff but I have not investigated yet.
I suppose you could also use AVR Studio, which is a free download from Atmel, but i have not tried this.
The problem with all this is the Arduino special code and libraries.
Maybe you could use Eclipse, a popular open source IDE. Eclipse can launch make, and capture the errors that it produces, and maybe even identify the source line with the error.
Sorry I don't have a better solution for you. when I come up with one I'll post it, because I'm looking as well.