editorconfig/editorconfig-vim — pull request #20 by kopischke (2014-10-27 11:17:51+00:00)
Title: Preserve cursor position when trimming trailing whitespace

This PR gets rid of cursor position loss side effects from the whitespace trimming autocommand (in particular, when `startofline` is set – which is VIm’s default –, the cursor would jump to the line start after each save).

This also refactors the trimming autocommand to get rid of the buffer variable introduced in #15. #15's committer (me, a few months ago :P) didn’t know how to read `:h autocmd` correctly and introduced a perfectly unnecessary moving part into the mix where a one line edit would have been enough. Reverted.