我正在尝试创建一个autocmd
将在我退出插入模式时替换文件中的所有空格.然而,AFAIK会让Vim记住这个模式并删除已经存在的模式.
" Add function for remove tailing whitespaces
command! CleanupTrailingSpaces :%s/\s\+$//ge | :nohlsearch
autocmd InsertLeave * :CleanupTrailingSpaces
Run Code Online (Sandbox Code Playgroud)
是否有一个标志:s[ubstitute]
会使它不能保存模式?