I wish… and If only…

People express wishes when they want the reality to be different from the true situation.

E.g. True situation: I don’t know how to dance.
Expressing a wish about it: I wish I knew how to dance.

E.g. True situation: Jane has to work tonight.
Expressing a wish about it: Jane wishes she didn’t have to work tonight.

Statements beginning with I wish… and If only… are closely connected with conditional sentences in that we use a past tense to refer to a hypothetical present event and a past perfect to refer to a hypothetical event in the past (i.e. express a wish about a situation in the past).

Hypothetical present event
I wish + past simple
E.g. True situation: I don’t know how to dance.
Expressing a wish about a hypothetical event in the present: I wish I knew how to dance.
E.g. True situation: Jane has to work tonight.
Expressing a wish about a hypothetical event in the present: Jane wishes she didn’t have to work tonight.

Hypothetical event in the past
I wish + past perfect
E.g. True situation: They didn’t study for the test.
Expressing a wish about a hypothetical event in the past: They wish they had studied for the test.
E.g. True situation: I attended the meeting.
Expressing a wish about a hypothetical event in the past: I wish I hadn’t attended the meeting.

Hypothetical present event
If only + past simple
E.g. True situation: She doesn’t pay enough attention.
Expressing a wish about a hypothetical event in the present: If only she paid a little more attention.

Hypothetical event in the past
If only + past perfect
E.g. True situation: He didn’t tell me the truth.
Expressing a wish about a hypothetical event in the past: If only he had told me the truth.