You can delete trailing spaces with the following command.
This command is explained as follows:
%(default would be for the current line)
/start of the search pattern
\+escaped + sign, one or more spaces should be matched
/end of the search pattern, beginning of replacement pattern
/end of the replacement pattern. Basically, replace with nothing.
esuppress error messages if no match found