tags:

views:

609

answers:

5

I have been researching coding editors but everytime I run up against some issue that is 1/2 coded or in the process of getting better. VIM offers everything in terms of a real powerhouse tool without all the UI fluff.

What I want to know is how can I use it to build and compile .Net projects, .cs fro within VIM without shelling out to devenv.exe...

Thoughts?

+6  A: 

I'm not connected with the company in any way, but I've heard very good things about ViEmu. If the price were a little lower, I'd get it myself, because I love the editing power of Vim.

ReadySquid
ViEmu rocks. I got it at a lower price point but it's been worth every penny i paid
JaredPar
thats very interesting - cool!
Tab
I tried the trial a while back (6-12 months ago). I was impressed but it doesn't offer all the vim commands you're used to. It was a little frustrating to switch mentally to 'I'm editing with VI but only a subset of the commands'
Daniel
+1  A: 

MSBuild is a very powerful analog to Ant.

Use msbuild project files to manage your .NET projects, and write a nmake file that calls msbuild.

Map your vi make command to nmake

You can just use :make to do a build

John Weldon
I imagine I could call msbuild at some command level and pass .proj (msbuild files) files
Tab
exactly correct.
John Weldon
+3  A: 

Here is a guide on Vim C# compiling.


In response to the comments -

It sounds like your goal is to have a fully functional IDE that works cross platform for C# development, not necessarily to use VIM. If that's the case, you can use MonoDevelop on all platforms (including Windows, but that's a bit trickier), and since you're probably already using the mono compilers on your other platforms, this might be a nicer option.

Reed Copsey
Tab specifically wanted to avoid shelling out to devenv...
John Weldon
Not much else in the way of options, using VIM directly.
Reed Copsey
ya, except for msbuild, which rocks!
John Weldon
you're still going out to a command line for msbuild, though....
Reed Copsey
I have coded with vs.net ide since it was a beta in MS's eyes - I am interested in having the same experience across all platforms.
Tab
I can live going out to a command line tool like csc.exe, etc - I just did NOT see the value in letting all my memory getting sucked into the ms whirlpool (spell that right?) everytime I want to compile
Tab
If you're writing code in C#, you can just use VS's IDE everywhere. An alternative is to use Monodevelop, since you're probably using Mono on your other platforms for C# dev. anyways... http://monodevelop.com/
Reed Copsey
to Reed - see my comment under the original question
Tab
Reed - This is was very helpful - mostly what I was looking for - thanks to John Weldon for his comments as well.
Tab
+2  A: 

If you are on the latest versions of VS, then the solution files can be built with MSBuild, which is basically a NAnt equivalent.

Otherwise, call csc to compile the files yourself.

Lou Franco
+1  A: 

I use nant as a build file (very simple and flexible) then call :set makerpg=nant\ compile.all

Then whenever you wan't to compile just type :mak

This can be extended with custom error formats etc.

flukus