To cook is a very enjoyable activity.
Cooking is a very enjoyable activity.
After to teach you I will go home.
After teaching you I will go home.
I look forward to hear from you.
I look forward to hearing from you.
While to watch the film I fell asleep.
While watching the film I fell asleep.
How long will it take for reaching the next town?
How long will it take to reach the next town?
To have a good memory you need to do a specialized course.
Having a good memory is really useful.
Before using it you need to attach the headphones.
I look forward to hearing from you.
We would like to inform you that we have decided to accept your proposal.
This program allows / enables / permits you to write spreadsheets.
I persuaded him to let me use his mobile.
The -ing form focuses on the activity (e.g. Learning English is easy). The infinitive form focuses on the objective or what you have to do to achieve an objective (e.g. To learn English you need to study hard).
Use the -ing form immediately after before, after, by, about, on, for, in, to, etc.
Use the -ing form after verbs that express: a) ideas, advice, e.g. recommend, propose, suggest; b) how much we enjoy or enjoyed something, e.g. like, love, hate, enjoy ; c) -ing is also used after verbs: risk, avoid, spend time, mind.
Use the infinitive a) when you focus on a purpose or objective, e.g. would like, want, plan, promise, decide, hope; b) when you tell someone what they can do or what we want them to do: allow, ask, enable, expect, help, instruct, permit, persuade, tell.
Use the infinitive generally after adjectives and with how. Examples: It’s easy to use. If you like, I’ll show you how to use one.