Vanity and pride are different things, though the words are often used synonymously. A person may be proud without being vain. Pride relates more to our opinion of ourselves; vanity, to what we would have others think of us.
Jane AustenShe was humbled, she was grieved; she repented, though she hardly knew of what. She became jealous of his esteem, when she could no longer hope to be benefited by it. She wanted to hear of him, when there seemed the least chance of gaining intelligence. She was convinced that she could have been happy with him, when it was no longer likely they should meet.
Jane Austen