Praise be to Allah.
No sin is too great for Allah to forgive, no matter what this sin is, so long as the person has repented from it. Allah says (interpretation of the meaning):
“Say: O ‘Ibadi (My slaves) who have transgressed against themselves (by committing evil deeds and sins)! Despair not of the Mercy of Allah, verily, Allah forgives all sins. Truly, He is Oft‑Forgiving, Most Merciful.” [39:53]
The door of repentance is open so long as death has not come to a person, and so long as the sun has not begun to rise from the west.
It was narrated that Ibn ‘Umar (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Allah accepts the repentance of His slave so long as the death rattle has not yet reached his throat.” [Ahmad, al-Tirmithi]
It was narrated that Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Whoever repents before the sun rises from the west, Allah will accept his repentance.” [Muslim]
So the Muslim should make the most of this opportunity and this great bounty from Allah, and hasten to repent so long as there is still time; he should not delay his repentance.
But this repentance has to be sincere, as Allah says (interpretation of the meaning):
“O you who believe! Turn to Allah with sincere repentance! It may be that your Lord will expiate from you your sins, and admit you into Gardens under which rivers flow (Paradise) the Day that Allah will not disgrace the Prophet (Muhammad) and those who believe with him. Their Light will run forward before them and (with their Records, Books of deeds) in their right hands. They will say: ‘Our Lord! Keep perfect our Light for us [and do not put it off till we cross over the sirat (a slippery bridge over Hell) safely] and grant us forgiveness. Verily, You are Able to do all things.’” [66:8]
The scholars have stated that sincere repentance is that which meets five conditions:
1- It should be sincerely for the sake of Allah.
2- There should be real regret for sins committed in the past, and the person should wish that he had never done them.
3- He should give up the sin immediately. If the sin consists of doing something haram (unlawful), he should stop doing it at once. If the sin consists of not doing something that is obligatory, he should start to do it at once. If the sin has to do with people’s dues, his repentance is not valid unless he gives them those dues.
4- He should resolve never to go back to that sin in the future.
5- That it should not come after the time when repentance is accepted[U1] , as stated above.
See Majalis Shahr Ramadhan by Ibn ‘Uthaymeen.
Hence we know that it is not one of the conditions of repentance that one should not repeat the sin, rather the condition is the sincere resolve not to repeat it. If a person repents from a sin that he used to commit, then the shaytaan (devil) toys with him and makes him go back to it – there is no power and no strength except with Allah – he should not despair of the mercy of Allah. He should repent once again and Allah will accept it, for Allah’s bounty and forgiveness are immense.
It was narrated from Abu Moosa al-Ash’ari (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “Allah spreads out His hand at night to accept the repentance of those who committed sin during the day, and He spreads out His hand during the day to accept the repentance of those who committed sin during the night (and this will continue) until the sun rises from the west.” [Muslim]
It was narrated from Abu Hurayrah (may Allah be pleased with him) that he heard the Messenger of Allah (peace and blessings of Allah be upon him) say: “A person committed a sin and said, ‘O Lord, I have sinned; forgive me.’ His Lord said: ‘Does My slave know that he has a Lord Who forgives sin and punishes for it? I have forgiven My slave.’ Then as much time as Allah willed passed, and he committed the sin again. He said, ‘O Lord, I have sinned; forgive me.’ His Lord said: ‘Does My slave know that he has a Lord Who forgives sin and punishes for it? I have forgiven My slave.’ …”
But the wise Muslim should be sincere towards Allah in his repentance, and sincerely resolve not to repeat the sin, and regret what he has done in the past. His repentance should not merely be words that are spoken by his lips when the rest of his faculties pay no heed; that is the repentance of liars.
With regard to making vows not to commit this sin again, there is no need for that. Sincere repentance is that which fulfils the conditions mentioned above.
It remains to comment on that which the questioner mentioned about the one who breaks his vow having to fast for three days. This is not always the case. Rather what the one who breaks his vow has to do is to free a slave, or feed or clothe ten poor persons. If he cannot do any of these things, then he has to fast for three days, but fasting is only an option if he is unable to do any of the three other things, as is indicated by the verse in which Allah says (interpretation of the meaning):
“Allah will not punish you for what is unintentional in your oaths, but He will punish you for your deliberate oaths; for its expiation (a deliberate oath) feed ten Masakeen (poor persons), on a scale of the average of that with which you feed your own families, or clothe them or manumit a slave. But whosoever cannot afford (that), then he should fast for three days. That is the expiation for the oaths when you have sworn. And protect your oaths (i.e. do not swear much). Thus Allah makes clear to you His Ayat (proofs, evidences, verses, lessons, signs, revelations, etc.) that you may be grateful.” [5:89]
And Allah knows best. May Allah send blessings and peace upon our Prophet Muhammad and his family and Companions.