Inversion is not used after "not far/long"
The negation in sentences like “Not a single word did he say” applies to the clause level; rearranged, it is “He did not say a single word”.
The negation in the examples without inversion is not at the clause level: “Not far from here you can see foxes” doesn't mean “You cannot see foxes far from here”.
“Not long after that she got married” would probably not be expressed by “She did not get married long after that” (I can maybe barely imagine it if you put stress on long are are trying to emphasize that she did not get married long after).
I think the inversion associated with negative expressions only occurs when the negation semantically applies at the clause level.
I'm not sure my explanation is correct. There is no problem with saying He did not hit the ball very far and She did not stay in the house very long, with negation at the clause level.
So if *Not very far did he hit the ball and *Not for very long did she stay in the water are ungrammatical, it's for a different reason.
To me, "Far from here(,) you can see foxes" and "Long after that(,) she got married" sound grammatical, although I'm not certain. ("Far from here" and "long after that" definitely aren't as commonly encountered at the start of a sentence as their negated equivalents.)