Created
May 20, 2015 18:07
-
-
Save richo/d11fd7fccb5a4164afc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! FixWhiteSpaceAndReturn() | |
| if expand('%') == '.git/addp-hunk-edit.diff' | |
| return | |
| endif | |
| normal mz | |
| " Hack for my mail :/ | |
| :%s/^-- $/-- MARKER/e | |
| :%s/\s\+$//e | |
| :%s/^-- MARKER$/-- /e | |
| normal `z | |
| endfunction | |
| autocmd BufWritePre * call FixWhiteSpaceAndReturn() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment