views:

625

answers:

4

Hello,

I tried using Visual Studio instead of VIM(+plugins), but to be honest - the only advantage of VS over VIM is it's ability to automatically manage my project.

I know of existence of ViEmu for VS, but I would like to do the opposite - is there any way to manage projects from within VIM?

I tried both c.vim plugin and Project plugins, but:

  • I have a problem while using c.vim on windows (from what I remember, there is an error with "slashes" in filepath ).
  • Project allows to organize projects, but it lacks features for generating makefiles / msbuild files (or am I wrong?).

Are there any tips / solutions / hacks, which would allow me to use VIM to manage my projects? (ideally, using both makefiles and MSBuild files, but just one type of build files would be enough.)

+3  A: 

My immediate thought was of the Eclim project which brings Eclipse functionality to Vim. Then you maybe able to manage your VS projects from Eclipse, I don't know any projects to do this, but I suspect some exist.

Dave Tapley
+2  A: 

Maybe I don't understand the question.

VS is full features IDE - you edit, compile and debug without leaving it.

vim in contrast is not IDE - its very powerful text editor. Yet vim has some build-in functionality oriented for programmers (e.g. :make command, compilation, automatic indentation etc.). vim is coming from Unix world where there several build tools (make, scons, cmake etc.). As you know you can "integrete" them using plugins which mostly very far from to be complete.

I think what you tried to do in the beginning is the right thing - bring vim editing power to VS world.

dimba
+2  A: 

Have you looked at other build tools (nant is the most popular for .net)?

Nant is far simpler than msbuild, you can create a simple build file in a few lines and easily integrate with vims makeprg.

flukus
+2  A: 

To integrate vim with devenv, you can use devenv from Visual Studio to complie the project in vim. The command as follows:

Devenv SolutionName /build SolnConfigName [/project ProjName [/projectconfig ProjConfigName]]

Typicatlly, the devenv should located in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE. Set it to the path of environment to make it callable from vim. We also need to make vim recognize the error messages thrown by the commandline build tool devenv. Just put the following lines in your vimrc:

" Quickfix mode: command line devenv error format
au FileType cpp set makeprg=devenv.com\ /Build\ Debug\ *[SolutionName]*
au FileType cpp set errorformat=\ %#%f(%l)\ :\ %#%t%[A-z]%#\ %m

Then You can use :make to compile and build the program from vim.

CyberMing