BBEdit

My editing weapon of choice is BBEdit: It Doesn't Suck™. Why? I want you to read the typical release notes:
http://www.barebones.com/support/bbedit/notes-11.6.html
Attention to fucking detail. Best $100 I ever spent (it's cheaper now).

On iPad I use Textastic (has regexp) or Editorial (has scripting filters), but they're amateur hour in comparison.

If I have to shell in and can't edit remotely & upload with BBEdit, I'll use vi, which I used for ~20 years (actual vi, STeVIe, Elvis, & Vim).

Oh, and for iOS/Mac apps with a ton of UI/framework shit, I use AppCode. BBEdit for clean C/Obj-C and I can just xcodebuild from Terminal. As the avatar says, STOP Xcode!

It's a hell of a thing. Apple had a reasonable but limited Project Builder/Interface Builder pair of apps from NeXT. PB could set an external editor (BBEdit) so I was happy. Then Xcode combined them and lost the external editors, and every version since has been worse, slower, crashier, renders ASCII text as Russian, less capable of even simple refactors. Now it just shoves fucking Swift (C++ for masochists) down your throat and shits 10k messages into Console so you can't debug.