Toxic baby dad

I have been with my baby dad for almost 4 years and we broke up and trying to figure out how to do parent. Any tips that you guys have to help. He’s always calling me names and yelling at me in front of our daughter and ask him to stop and he says he will when I deserve not to be called names.