You basically need to kill one habit by exchanging it with another.

Or at least that is how I do it.