diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim index d6147811..23bf345c 100644 --- a/syntax_checkers/sass.vim +++ b/syntax_checkers/sass.vim @@ -19,17 +19,14 @@ if !executable("sass") finish endif -let g:syntastic_sass_imports = 0 +"use compass imports if available +let s:imports = "" +if executable("compass") + let s:imports = "--compass" +endif function! SyntaxCheckers_sass_GetLocList() - "use compass imports if available - if g:syntastic_sass_imports == 0 && executable("compass") - let g:syntastic_sass_imports = "--compass" - else - let g:syntastic_sass_imports = "" - endif - - let makeprg='sass '.g:syntastic_sass_imports.' --check '.shellescape(expand('%')) + let makeprg='sass '.s:imports.' --check '.shellescape(expand('%')) let errorformat = '%ESyntax %trror:%m,%C on line %l of %f,%Z%.%#' let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m' let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })