How to substitute multiple space with a single space in Vim

Solution 1:

You can do it with a vim regex.

:%s# \+# #g