From bbc9148c080d6493e00d5a066111537e111b0cf6 Mon Sep 17 00:00:00 2001 From: Esa-Matti Suuronen Date: Mon, 20 Jun 2011 21:58:45 +0300 Subject: [PATCH 1/2] Add poor man's SCSS support. --- syntax_checkers/sass.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim index 0e93c3eb..4b3c8ff1 100644 --- a/syntax_checkers/sass.vim +++ b/syntax_checkers/sass.vim @@ -38,3 +38,17 @@ function! SyntaxCheckers_sass_GetLocList() return loclist endfunction + +function! SyntaxCheckers_scss_GetLocList() + 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("") + for i in loclist + let i['bufnr'] = bn + endfor + + return loclist +endfunction From d5b27881722ac5e5fb27394fea052746738e1009 Mon Sep 17 00:00:00 2001 From: Esa-Matti Suuronen Date: Mon, 20 Jun 2011 22:01:29 +0300 Subject: [PATCH 2/2] Update poor man's SCSS support to match new Sass function. --- syntax_checkers/sass.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim index e0026e78..9a62a0a2 100644 --- a/syntax_checkers/sass.vim +++ b/syntax_checkers/sass.vim @@ -43,6 +43,13 @@ function! SyntaxCheckers_sass_GetLocList() endfunction function! SyntaxCheckers_scss_GetLocList() + "use compass imports if available + if g:syntastic_sass_imports == 0 && executable("compass") + let g:syntastic_sass_imports = system("compass imports") + else + let g:syntastic_sass_imports = "" + endif + 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'