I tend to edit a lot as I write. Sometimes I write a scene or a chapter quickly but know it needs more work, so once it’s written I’ll go back and rephrase things, find better words, change sentences around etc. I’m aware of my bad habits (thanks to my CPs!) and try to avoid them.
Once the whole story is written, I then go back, and do some drastic editing, either deleting irrelevancies or adding more explanation or layering in extra information (which I may not actually have known when I wrote the early chapters!).
The final edit is a search for the repeated words and phrases I have a habit of using, and generally tightening up the narrative and/or dialogue.
I write what, to me, sounds right, regardless of all the so-called rules. Editors are all different – some may dislike adverbs, others may dislike synonyms for ‘said’, etc etc. You can’t please ‘em all as far as the ‘technicalities’ go and I don’t think that editors want or need a technically perfect MS. They want a damn good story which keeps the readers reading, and they want strong realistic characters. As long as the grammar is reasonable okay and the story flows, the main criteria is the story itself, not all the rules that all the ‘How to Write’ pundits tell us we must stick to!