I'm obviously not the greatest at writing, but I'll tell you what I do anyway. I don't recommend it by the way. It's probably just best if you write a whole section and then go back and edit it all. That seems like the smarter choice.
What I end up doing is I write three or four new paragraphs, and then I can't help but read over the whole section that I'm working on. This makes my actual writing process very slow, as I seem to suffer from the same thing you do. However, once I finish a section I usually just stuff it in a google doc somewhere and forget about until I've finished writing the whole thing.
The way I actually edit things depends on what it's for. If it's just a thing that wrote for no particular reason, I don't tend to edit those at all. That's probably not great, but I'm lazy, and unless it's something really cool, then it's not worth my time. If it's something I really like or if it's for a contest on here then I usually try to do a quick check for grammar mistakes, though that doesn't always happen. Now that I think about it, the only time that I really edit things is for school. Then again, those are usually shorter because of page limits and double spacing, so that makes it a bit easier. Plus, my grade kind of depends on those and my parents are really strict about my grade.
First I go through it a couple times and make sure there aren't any grammar mistakes. Then I tend to try to read through it slowly and pick apart the sentences to make sure that the sentence structure is correct and that everything makes sense. Then I usually kidnap my brother and force him to read it kindly ask my brother, who is an avid reader, to go through it and tell me what he would think if it was a book. He's really picky about things being perfect, so he's become my editor.
I now realize that this probably wasn't much help anyway because I don't actually tend to edit a lot of stuff, but I hope you at least gained something from reading this. If not, well, sorry. :)