I have ths line in my .vimrc:
map gu :%s/\s\+$//<enter> :w<enter>
to remove trailing spaces and saving the file in the same time.
When there are trailing spaces in the file, it works OK (it removes the spaces and saves the file), but when there are not trailing spaces it doesn't save the file, it just says Pattern not found: \s+$.
NOTE: I found this, but I'm curious about the way I'm asking.