I've come across this sentence:
[...] I've spent my all life making people happy when all they did was leave.
Shouldn't it be "To leave" or something?
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.
Sign up to join this communityIf an infinitive is preceded by an auxiliary verb and a phrase ending in do (such as What I did was, All we do is, etc.), the to is optional.
From Practical English Usage, 91.5:
Expressions like All I did was, What I do is, etc can be followed by an infinitive without to.
All I did was (to) give him a little push.
What a fire-door does is (to) delay the spread of a fire.
The only thing we can do is (to) accept.