From ed0da303a187d0373efff7723ded56150639ad2b Mon Sep 17 00:00:00 2001 From: Daniel Walker Date: Mon, 10 Sep 2012 18:29:08 -0700 Subject: [PATCH] Adds a syntax checker for C# using Mono --- syntax_checkers/cs.vim | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 syntax_checkers/cs.vim diff --git a/syntax_checkers/cs.vim b/syntax_checkers/cs.vim new file mode 100644 index 00000000..411d4ae4 --- /dev/null +++ b/syntax_checkers/cs.vim @@ -0,0 +1,30 @@ +"============================================================================ +"File: cs.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Daniel Walker +"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 +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists('loaded_cs_syntax_checker') + finish +endif +let loaded_cs_syntax_checker = 1 + +if !executable('mcs') + finish +endif + +function! SyntaxCheckers_cs_GetLocList() + let makeprg = "mcs --parse ".shellescape(expand('%')) + let errorformat = '%f(%l\,%c): %trror %m' + let loclist = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) + return loclist +endfunction +