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.
If only / I wish + simple past
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)
- 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”.
I wish I were a millionaire!
If only / I wish + past perfect
If only I had woken up early. (I didn't wake up early and I missed my bus.)
- To express a regret.
- The action is past.
I wish / if only + would + verb
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)
- To complain about a behavior that you disapprove.
- Expressing impatience, annoyance or dissatisfaction with a present action.