In German there is subject verb inversion whenever a sentence begins with something that is not subject. This kind of inversion is automatic in German.
English has in some cases kept this feature that goes back to old times. English uses this kind of inversion after negative or similar adverbs as
- never, rarely, seldom (adverbs of frequency)
And some others
- hardly/scarcely ... when - no sooner ... than - nor - in vain - little.
This is a feature of written language. In spoken language regular word order is preferred.
This inversion is also used in short reactions beginning with
so, nor/neither, no more as in
So do I - Nor/Neither am I -No more can I
I have never managed to get this grammar point into an optimal form, so it can be remembered easily. Furthermore it seems that writers can use this kind of inversion after other sentence introductions that are not subject. Such a grammar point is not wortworth much without a lot of example material, but I have not the time for it. It is recommendable to study this type of inversion in a larger grammar where you will find example sentences.
This grammar point is a subsection of a larger chapter "Inversion after adverbs".