vim - Highlight unwanted spaces

http://vim.wikia.com/wiki/VimTip396

precondition: set hlsearch

" Show all tabs:
/\t

" Show trailing whitespace:
/\s\+$

" Show trailing whitespace only after some text (ignores blank lines):
/\S\zs\s\+$

" Show spaces before a tab:
/ \+\ze\t

posted @ 2016-11-29 15:43  cnblogist  阅读(95)  评论(0编辑  收藏  举报