Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msbuild.vim doesn't escape file names #42

Open
coollambda opened this issue Apr 3, 2018 · 1 comment
Open

msbuild.vim doesn't escape file names #42

coollambda opened this issue Apr 3, 2018 · 1 comment

Comments

@coollambda
Copy link

So I opened up a Unity script in GVim 8.0 and got the following error

"Assets\Scripts\MapGenerator.cs" 156L, 3615C
Error detected while processing C:\Users\bulkycaf\.vim\plugged\vim-csharp\compiler\msbuild.vim:
line   33:
E518: Unknown option: Cave

which happens in the last line in the following code

execute 'CompilerSet makeprg=' . cs#get_net_compiler("msbuild") . "\\ " 
            \ . "/nologo\\ /clp:Verbosity=quiet\\ /property:GenerateFullPaths=true\\ "
            \ . s:build_file

so I echoed the s:build_file variable and it was .\Procedural Cave Generation - Tutorial.sln
and so I fixed it by escaping the file name with fnameescape Vim function

execute 'CompilerSet makeprg=' . cs#get_net_compiler("msbuild") . "\\ " 
            \ . "/nologo\\ /clp:Verbosity=quiet\\ /property:GenerateFullPaths=true\\ "
            \ . fnameescape(s:build_file)

and now it works fine!

@NgrNxk
Copy link

NgrNxk commented Mar 3, 2020

+1 for inclusion in the repo! It helped me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants