Resist the urge to edit as you go. In Stephen King’s book On Writing, he gives this advice, and I think most writers would do well to heed it. If you have the type of personality that seeks diversions when you are momentarily stuck on a hard task, you will find yourself turning to editing what you have already written, rather than pushing forward to complete the story. This is not always helpful, as the editing process never ends. King acknowledges that one can wind up in an endless editing loop, constantly tweaking the words, but never really improving them.
King also describes his process involved a fervent push to finish writing the entire story, then he would print it on paper, and put it in a drawer for six months or so. Coming back to it later, with a fresh perspective, he would start reading it again with an eye on editing, and frequently he would have forgotten many of the details he wrote, and it was almost as if he was reading someone else’s work.
I think this is a superior approach, but I find it very difficult to wait.