Strip trailing whitespace

1 Point

Ory Band Ory Band

8 years ago

Define a command to strip trailing whitespace to all end of lines.

function! StripTrailingWhitespaces()
    let l = line(".")
    let c = col(".")
    call cursor(l, c)

" You can of course rename the command however you wish.
command! StripTrailingWhitespaces call StripTrailingWhitespaces()