Since, by this answer, both of these sentences are correct:
Not only should you be able to speak, but also should you be able to
write.Not only should you be able to speak, but also to write.
Is this one correct too?
Not only should you be able to speak, but also be able to write.
What is the rule for omissions here? I'm asking because I wrote this and it doesn't sound correct to me:
This not only allows you to maintain a uniform visual style, but also
to introduce new developers to your codebase.
This option is less economical, but somehow it feels right: "This not only allows you to maintain a uniform visual style, but also allows you to introduce new developers to your codebase."
Which do you think is more understandable/natural? I'm not a native speaker of English.
Best Answer
The basic rule is that the matter following not only should parallel the matter following but also--the two should play the same syntactic role in the sentence.
So this is clumsy:
To introduce is not parallel with allows you. But you may easily clean this up by moving not only
Your other examples are a little harder to illustrate, because a) the inversion you employ when not only launches the sentence has to go away in the but also piece, and b) the also has to move; but the principle is the same:
Note that you can drop the but in this case. You can see the pattern more clearly without the inversion: