Robert Moffat attacked his victim at his home in Dunipace, and left her seriously injured with a horrific neck wound.
A judge told Moffat (56) that had she not received prompt medical aid, he would have been facing a charge of murder.
Lord Tyre imposed an Order for Lifelong Restriction, and ordered that he serve four years in prison from today before he can apply for release.
Moffat will only be freed under the indeterminate sentence when parole authorities are satisfied on public safety issues, and he will be on licence for the rest of his life and subject to recall to jail.
Lord Tyre told Moffat: "The length of time for which you will be in prison will be in your hands."
The judge said: "On previous occasions you have appeared to progress while in prison only to reoffend on release, which is what happened in this case."
The court heard that he has now been diagnosed with a paranoid personality disorder.
Moffat was out on licence from a previous jail sentence for serious assault when he tried to murder Annelouise Gallacher on May 31 last year.
During an earlier trial he denied attempting to murder her by assaulting her to her severe injury, permanent disfigurement and impairment and to the danger of her life at a house in Milton Row, Dunipace, by striking her on the neck with a knife, but was found guilty.
He also inflicted further injuries to her head and body by means unknown to the prosecutor.
The trial heard that after the murder bid Moffat claimed the victim had a knife but he was trained in unarmed combat and went to disarm her.
But he later told a relative: "I have done something wrong."
He was arrested in the early hours of June 1 last year and gave a "no comment" interview to police.
After procedures were finished, he asked about the victim. When he was told of her condition he appeared "quite upset".
He said he had been in a relationship with the 31-year-old for about eight or nine weeks on and off and she was staying with him.
A detective told the court that she noted him as saying the incident happened because "she was nipping his head".
He said that after it he got a towel and put it to her neck and called an ambulance. He left the house and was later detained in Falkirk.
The victim suffered a broken nose and fractured cheekbone as well as the life-threatening throat wound in the attack.
HGV driver Moffat claimed that when he went into the living room the victim was standing with a knife and he grabbed her. He told the court that she went down and he fell on top of her.
Defence counsel Matt Jackson QC urged Lord Tyre to impose a determinate sentence with a further period of supervision and monitoring.
He said that Moffat had a "lengthy spell in the armed forces" earlier in life. "He has, as so many ex-servicemen have, struggled to slip back into civilian life."
Mr Jackson said that Moffat did have the capacity for insight and the ability to change.