Pretty simple really.
Just start developing habits and routines to keep yourself preoccupied.
As time passes, you'll still have that knack in the back of your mind that it's time for a cigarette, but it won't feel like a need, as much. And eventually it will get easier and easier to tell...