I assume that if you're trying to do this, you've got a keyboard attached to your iPad - I think I'd rather stick forks in my eyes than try to code with an on-screen keyboard. So at that point, why not just use a laptop?
I wish I could simply say a new variable or function and have it inserted.