News for hackers. Stuff that matters.
Re:Stack Overflow Outage Postmortem by duijf on Thursday July 21, 2016 @05:26AM (#12135721)
Not exactly at insert mode, but this may be helpful:

    autocmd BufWritePre * :%s/\s\+$//e
Before you save a file, it removes all trailing whitespace (ironically using the same regex as in the article -- hasn't given me trouble yet though)

There are no comments on this comment yet.