Another tip: You can pipe text through shell commands with :! followed by the command.
For example, I always used to use :!sort, until I accidentally dropped the ! once and noticed that it still worked.
Most useful text-processing commands have some native way to do them in Vim, but I often haven't bothered to memorize them, when a shell command is just as easy to type and works in more contexts.