I hope it is as short as the doctor suggests. There was no bone fracture only tendon.
The best way to avoid this is to keep up the strength and conditioning. Using resistance bands to work on all the stabilising muscles of your foot and ankle.
Obviously, some injuries come as a result of freak accidents, I think this one is probably one of those.