Verb + ~ing or to ~: Prefer and would rather

I6. Prefer and would rather
a. We can use 'prefer to (do)' or 'prefer -ing' to say what you prefer in general. (e.g. I don't like cities. I prefer to live in the country. or I prefer living in the country.) I prefer doing something vs. to doing something else. But I prefer to do something vs. rather than (do) something else. (e.g. I prefer driving to travelling by train. but I prefer to drive rather than travel by train.)
b. use 'would prefer to do' somebody wants in a specific situation (not in general) (e.g. Would you prefer tea or coffee? Coffee please.), say 'would prefer to do something' (not doing). (e.g. Shall we go by train? I'd prefer to drive. (not I'd prefer driving))
c. Would rather (do) = would prefer (to do). We use would 'rather + infinitive' (without to) (e.g. Shall we go by train? I'd prefer to drive. or I'd rather drive (not to drive)), the negative is 'I'd rather not (do something) (e.g. I'm tired. I'd rather not go out this evening, if you don't mind.). We can say 'would rather do something than do something else'. (e.g. I'd rather stay at home tonight than go to the cinema.)
d. We can say 'I'd rather you did something' (not I'd rather you do.) (e.g. Shall I stay here? I'd rather you came with us. (= I would prefer this)). In this structure we use the past (came, did etc.), but the meaning is present not past. (e.g. I'd rather make dinner now. vs. I'd rather you made dinner now. (not I'd rather you make)). I'd rather you didn't (do something) = I'd prefer you not to do it. (e.g. I'd rather you didn't tell anyone what I said.)

more about the Gerund (-ing) and to ~ (infinitive)

Idiom 365

Put a Sock in it: to tell noisy person to stop talking or to shut one's mouth.
Example: Could you please told him to put a sock in it? I'm trying to work here.)

more about the Idioms...