in reply to Can your editor do this?

This doesn't directly answer your question, but (using your example) why don't you take those 15 lines of obstruse code and put them in a function at the bottom of the script (i.e., out of the way) and name that function "file_exists" and have it return true/false.