Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8695435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:02:08+00:00 2026-06-13T01:02:08+00:00

I have a few questions and a few issues using vim as a C#

  • 0

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:

enter image description here

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:02:10+00:00Added an answer on June 13, 2026 at 1:02 am

    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:

    set errorformat=\ %#%f(%l\\\,%c):\ %m
    set makeprg=C:\\windows\\microsoft.net\\framework\\v4.0.30319\\msbuild.exe\ /nologo\ /v:q\ /property:GenerateFullPaths=true 
    

    Please note that this integrates MSBuild and so works with the full .sln file–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:

    set shellcmdflag=\/C
    

    because it ensures that the cmd window closes on its own.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have few questions about using lock to protect my shared data structure. I
I have a few questions on the various options and best practices when using
I have a few related questions about managing aligned memory blocks. Cross-platform answers would
Although I have read a few previously answered questions regarding a similar issue, I
I have few questions about ssis transction isolation levels. consider a scenario:I have an
I have few questions, I want to show the alert window on my Update
I have few basic questions on session management in GWTP. Now, we create a
I have few basic questions on session management in GWTP. Client : GWTP, Server
I have a few questions that will help me understand things better if answered:
I have a few questions about Xcode and interaction with GCC 4.2.1: It doesn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.