How can I augment/modify my trailing whitespace logic to also remove any empty or all whitespace lines at the end of a file?
My current whitespace stripping logic in my .vimrc
is:
"remove trailing whitespaces automatically
autocmd FileType c,cpp,java,python,markdown,shell autocmd BufWritePre <buffer> %s/\s\+$//e
I've tried Googling for an answer, but only get results that strip the end of the line, not that clean up at the end of the file.