From 5850503574af8490e73af923d4de4d59a988d04f Mon Sep 17 00:00:00 2001 From: Julien Blanchard Date: Wed, 8 Dec 2010 00:38:36 +0800 Subject: [PATCH] LESS CSS syntax checker --- syntax_checkers/less.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syntax_checkers/less.vim b/syntax_checkers/less.vim index 0d5044a2..71c20cf4 100644 --- a/syntax_checkers/less.vim +++ b/syntax_checkers/less.vim @@ -1,7 +1,7 @@ "============================================================================ "File: less.vim "Description: Syntax checking plugin for syntastic.vim -"Maintainer: Martin Grenfell +"Maintainer: Julien Blanchard "License: This program is free software. It comes without any warranty, " to the extent permitted by applicable law. You can redistribute " it and/or modify it under the terms of the Do What The Fuck You @@ -20,11 +20,11 @@ if !executable("lessc") endif function! SyntaxCheckers_less_GetLocList() - let output = system("lessc -c " . shellescape(expand("%"))) + let output = system("lessc " . shellescape(expand("%"))) if v:shell_error != 0 "less only outputs the first error, so parse it ourselves - let line = substitute(output, '^Syntax error on line \(\d*\):.*', '\1', '') - let msg = substitute(output, '^Syntax error on line \d*:\(.*\)', '\1', '') + let line = substitute(output, '^! Syntax Error: on line \(\d*\):.*$', '\1', '') + let msg = substitute(output, '^! Syntax Error: on line \d*:\(.*\)$', '\1', '') return [{'lnum' : line, 'text' : msg, 'bufnr': bufnr(""), 'type': 'E' }] endif return []