vim command to alphabetize lines in a file

I'm looking for a vim command that will alphabetize the lines in a file. That is:

pear
apple
orange


..would change to..

apple
pear
orange
zumpoofAsked:
Who is Participating?
 
AnuroopsunddCommented:
vim :%!sort
0
 
arnoldCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.