Rabbi Zeira had a long life. Rebbi asked, "To what do you attribute your long life?" Rabbi Zeira answered, "I have not gazed upon wicked people." Isaac, who was blind in his old age, gazed upon Esau, his wicked son, and became blind.
Tractate Megilla 27
What is the connection between looking at wicked people and losing one's ability to see? And why did Rabbi Zeira say that living a long life was attributable to the opposite of losing one's sight, rather than contrasting himself from one who lived a short life?
In the Shema we say. "ureesem osam" 'Gaze upon them' [the tzitzis], remember all the mitzvos I [G-d] gave you...
Rebbe Zeira did not look at the wicked, and his heart did not turn toward their wickedness. He achieved long life by doing good and turning away from evil. Instead of saying that he did not look at things that enticed him, he picked the most damaging thing, which is a wicked person himself. It is easier to resist a temptation when there is no wicked person giving encouragement and advice of how to do the evil deed. This is why David in Psalm 1 says "atzas reshaim" 'the advice of the wicked'. The wicked are called by that name mainly because they are eager to give 'the advice of the wicked', that is to tell a person the easiest way to go about sinning.