diff options
| author | jdhao <jdhao@hotmail.com> | 2021-11-02 22:49:02 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-11-02 22:49:02 +0800 |
| commit | 9b9bd9dd4684a46e3d77515f613461887972aa10 (patch) | |
| tree | c4fc44cec6775fa579e6930423315ec29acdf6cf /core/autocommands.vim | |
| parent | 8ebbec29d612d243e9eecb7e02227bacad9f97ea (diff) | |
remove trailing whitespace on save
Diffstat (limited to 'core/autocommands.vim')
| -rw-r--r-- | core/autocommands.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/autocommands.vim b/core/autocommands.vim index 9355d05..9fa0ea6 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -103,3 +103,9 @@ augroup packer_auto_compile autocmd! autocmd BufWritePost */nvim/lua/plugins.lua source <afile> | PackerCompile augroup END + +" Remove trailing whitespaces +augroup strip_trailing_space + autocmd! + autocmd BufWritePre,TextChanged * StripTrailingWhitespace +augroup END |
