Expressing a wish or a regret
Use of I wish / if only:
There are three distinct types of I wish / if only sentences:
Wish, wanting change for the present or future with the simple past.
Regret with the past perfect.
Complaints with would + verb.
Expressing a wish:
Form:
If only / I wish + simple past
Example:
If only I knew how to use a computer. (I don’t know how to use a computer and I would like to learn how to use it)
Use:
To express a wish in the present or in the future.
The simple past here is an unreal past.
When you use the verb to be the form is “were”. Example: I wish I were a millionaire!
Expressing regret:
Form:
If only / I wish + past perfect
Example:
If only I had woken up early. (I didn't wake up early and I missed my bus.)
Use:
To express a regret.
The action is past.
Complaining:
Form:
I wish / if only + would + verb
Example:
I wish you wouldn't arrive so late all the time (I'm annoyed because you always come late and I want you to arrive on time)
Use:
To complain about a behavior that you disapprove.
Expressing impatience, annoyance or dissatisfaction with a present action.