How do I replace all the occurrences of multiple consecutive space

characters to a single space? You can use the following command to replace all the occurrences of multiple consecutive space characters to a single space:

    :%s/ \{2,}/ /g

Alternatively use:

    :%s/  \+/ /g

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind