From 7e9456ebb97341d6cd4ead39cfd88c602f007bae Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Mon, 31 Jan 2011 15:57:54 +0800 Subject: [PATCH] Add support for Sass 3.x and Compass imports --- syntax_checkers/sass.vim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim index 2bfa1ab4..0e93c3eb 100644 --- a/syntax_checkers/sass.vim +++ b/syntax_checkers/sass.vim @@ -19,9 +19,16 @@ if !executable("sass") finish endif +"use compass imports if available +let g:syntastic_sass_imports = "" +if executable("compass") + let g:syntastic_sass_imports = system("compass imports") +endif + function! SyntaxCheckers_sass_GetLocList() - let makeprg='sass --check '.shellescape(expand('%')) - let errorformat = '%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m' + let makeprg='sass '.g:syntastic_sass_imports.' --check '.shellescape(expand('%')) + let errorformat = '%ESyntax %trror:%m,%C on line %l of %f,%Z%m' + let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m' let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) let bn = bufnr("")