在 vi 里面高亮显示行尾的空格和 tab 键

在 vi 配置文件里面,一般是用户目录下的 .vimrc,加上如下内容:

vim
highlight RedundantSpaces ctermbg=red guibg=red
match RedundantSpaces /\s\+$/