5 ms·> :%s/\s+$//e Annoyingly, "+" matches literal "+" by default. You need \s\+$ or \v\s+$ .by jwilk 3y ago> :%s/\s+$//e Annoyingly, "+" matches literal "+" by default. You need \s\+$ or \v\s+$ .