I have a few questions and a few issues using vim as a C# editing environment. Firstly I am new to vim, so it all is a bit of a learning process for me, I would appreciate any advice and guidance you may have to offer. Secondly I am having some issues getting any cs file to compile.
I am using this as my cs.vim compiler:
if exists("current_compiler")
finish
endif
let current_compiler = "cs"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet errorformat&
CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m,
\%trror%*[^:]:\ %m,
\%tarning%*[^:]:\ %m
execute 'CompilerSet makeprg=' . cs#get_net_compiler("csc.exe") . "\\ %
Not sure exactly where I found this. But if I am in a directory with spaces in the dir name I get an error that the file cannot be found to compile. I think I need to tell it to escape the spaces, but how do I do this?
even if I switch back to the original cs.vim compiler file, i get weird issues and it does not appear to compile:

above and beyond that is it possible to work with C# projects in vim and when you compile have it recognize references etc?
EDIT: for clarification, I have and use Visual Studios as my main IDE. I would like to learn to use vim better, so thus I ask these questions.
Thanks!
Personally, I use a combination of Vim and Visual Studio (with VsVim installed) for my day to day C# coding. I do the longer spurts of editing with pure Vim because VsVim, as nice as it is, just isn’t the same as the full Vim environment with its ecosystem. Nothing beats Visual Studio for interactive debugging.
To get the compiler, I use the following settings in my vimrc, stolen and transmogrified from some section of the internet:
Please note that this integrates MSBuild and so works with the full
.slnfile–the whole build just works, no need to muck around with individual files. All you have to do to perform a full build is run:make.While not strictly required, I also like this flag:
because it ensures that the
cmdwindow closes on its own.