Pride, vanity, vainglory are comparable when they mean the quality or the feeling of a person who is keenly or excessively aware of his own excellence or superiority.
The same distinctions in implications and connotations are found in their corresponding adjectives proud, vain, vainglorious.
Pride and proud may imply either justified or unjustified self-esteem, insofar as what one regards as a merit or a superiority is real or imagined, and insofar as the feeling manifests itself either in proper self-respect and distaste for what is beneath one’s standards or in inordinate and arrogant conceit. In the “unjustified” interpretation, pride is a sin or vice and the antithesis of humility, but in the “justified” interpretation, pride is a virtue or at least a highly pardonable, even commendable, feeling or quality that is the antithesis of shame and that spurs one to equal or better one’s best or gives one rightful gratification.
Vanity and vain imply an excessive desire to win the notice, approval, or praise of others; both connote an interest centered on oneself and often suggest a concentration on things of little or no importance relatively.
Vainglory and vainglorious imply excessive pride which manifests itself in boastfulness and arrogant display of one’s power, skill, or influence.