Created
February 10, 2010 08:29
-
-
Save Milly/300141 to your computer and use it in GitHub Desktop.
Add highlight for spaces.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim plugin file - highlight_spaces | |
" | |
" Last Change: 08 February 2010 | |
" Maintainer: Milly | |
" Purpose: Add highlight for spaces. | |
"============================================================================= | |
if exists("loaded_highlight_spaces") | |
finish | |
endif | |
if has('syntax') && has('iconv') | |
function! s:HighlightSpaces() | |
if &buftype == "" | |
syntax match FullWidthSpace " " display containedin=ALL | |
highlight FullWidthSpace ctermbg=darkgrey guibg=#555555 | |
syntax match TrailedSpaces "\s\+$" display containedin=ALL | |
highlight TrailedSpaces ctermbg=grey guibg=#666666 | |
endif | |
endf | |
augroup highlight_spaces | |
au! | |
au BufNew,BufRead,FileType,ColorScheme * call s:HighlightSpaces() | |
augroup END | |
endif | |
let loaded_highlight_spaces=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment