diff compiler/vimcrosoftsln.vim @ 0:5d2c0db51914

Initial commit
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 17 Sep 2019 13:24:24 -0700
parents
children 096e80c13781
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/vimcrosoftsln.vim	Tue Sep 17 13:24:24 2019 -0700
@@ -0,0 +1,28 @@
+" Compiler file for Visual Studio
+" Compiler: Visual Studio
+" Maintainer: Ludovic Chabant <https://ludovic.chabant.com>
+
+if exists("current_compiler")
+    finish
+endif
+let current_compiler = "vimcrosoftsln"
+
+let s:keepcpo = &cpo
+
+let s:prgargs = ''
+if !empty(g:vimcrosoft_temp_compiler_args__)
+    let s:tmpargs = map(
+                \copy(g:vimcrosoft_temp_compiler_args__),
+                \{idx, val -> escape(val, ' \"')})
+    let s:prgargs = '\ '.join(s:tmpargs, '\ ')
+endif
+
+let s:prgcmdline = fnameescape('"'.g:vimcrosoft_msbuild_path.'"').s:prgargs
+call vimcrosoft#trace("Setting makeprg to: ".s:prgcmdline)
+execute "CompilerSet makeprg=".s:prgcmdline
+
+CompilerSet errorformat&
+
+let &cpo = s:keepcpo
+unlet s:keepcpo
+