How do I delete all the trailing white space characters (SPACE and TAB) at the end of all the lines in a file?

You can use the “:substitute” command on the entire file to search and remove all the trailing white space characters:

    :%s/\s\+$//

Comments (1)


Pepsh Pepshinsky

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


Speak Your Mind