First, I install Vim (Text Editor) in Typical type, on this Windows 7 laptop. And this user that I'm using is an administrator on this computer but couldn't open file in “Program Files” location for writing with Vim. So I change my :cd current directory to my $HOME.
Note: I already have installed Visual Studio Express for Windows Desktop. I just want learn how to use this.
- Can I compile C++ code using Vim in Typical type alone on Windows?
- If it's possible, then what's the process for compiling C++ code?
I have hello.cpp file but I can't compile it. I already use :comp gcc and :make and the output is: 'make' is not recognized as an internal or external command,
But when I use :comp msvc and :make, the output is: 'nmake' is not recognized as an internal or external command,
Now, what should I do? If it's not possible using Vim alone, how can I compile using Vim with the compiler on my VS Express for Desktop?
vimcannot compile C/C++ code by itself. You need to have a compiler for that.:!<CommandHere>to execute a command in vi. I never use this feature though, I always have a separate terminal open where I domakefrom because it is much easier to read and respond to compiler output that way.PATHenvironment variable properly for nmake to be found - it's located in one of the VS installation folders - or start vim from the "VS command line" shortcut.