From b86026cdc078c2fd487f08cf1e74daac8f9c372f Mon Sep 17 00:00:00 2001 From: David Lee Date: Tue, 10 May 2011 23:34:17 -0700 Subject: [PATCH] Cache g:syntastic_sass_imports on first use --- syntax_checkers/sass.vim | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim index 0e93c3eb..4eb128b3 100644 --- a/syntax_checkers/sass.vim +++ b/syntax_checkers/sass.vim @@ -19,13 +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 +let g:syntastic_sass_imports = 0 function! SyntaxCheckers_sass_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'