Trim trailing spaces

1 Point

Romain Lafourcade Romain Lafourcade

10 years ago

This command trims trailing spaces and moves the cursor back to its initial position.

command! -range=% TR mark ` | execute <line1> . ',' . <line2> . 's/\s\+$//' | normal! ``