The past tense of have a habit of is had a habit of.
The third-person singular simple present indicative form of have a habit of is has a habit of.
The present participle of have a habit of is having a habit of.
The past participle of have a habit of is had a habit of.