Vi Editor setup

Oct 16, 2013 at 7:42pm
I suppose this is a unix question, i'm using WIndows 7 but this is about the vi editor. Anyways, for school we use the vi editor to make c++ programs, the one at my uni is setup to where when it starts, it asks for your school id and pw, you input it, it gives you a white screen, you go to bash, and you can input unix commands to create files and what not, I downloaded the vi editor on my personal laptop and it's completely different, I try entering unix commands and it just gives me errors, do I have to set it up with a compiler for it to work? I'm trying to create cpp files, compile and execute them.

edit: In order to compile programs, we type something like g++ -o programName programName.cpp

then ./a.out or something similar to execute them, if that helps. I'm trying to write a file and give it a name then run it.
Last edited on Oct 16, 2013 at 7:57pm
Oct 16, 2013 at 9:45pm
vi is an editor. Login, shell, commands, ... are you sure that you already had the vi running?

Anyway, vi is not bash and other commands. It may let you run bash, but then you have to have bash installed as well as other commands.

Which version of compiler have you installed?
Oct 16, 2013 at 9:57pm
http://www.vim.org/download.php#pc

This would be the one I installed, ms-dos/ms-windows.
Oct 16, 2013 at 10:00pm
I did ask: Which version of compiler have you installed?
Oct 16, 2013 at 10:12pm
7.4
Oct 17, 2013 at 7:46am
vi is an editor, like Notepad. vi is not a compiler.
Oct 17, 2013 at 9:37am
I don't think you were using vi directly, it sounds like you were logging into a Unix shell account.

If you want the same sort of thing on Windows, try cygwin.
http://www.cygwin.com/install.html

It creates a Unix shell-like experience. The cygwin installer can install a huge number of open source packages like vi, gcc, openssh, ...

So once you install cygwin, run the installer again and install the packages you need. You can remove individual packages. And you can remove the whole thing by removing C:\cygwin64.
Oct 17, 2013 at 10:04am
mingw (Minimal GNU for Windows) is similar to cygwin. It includes msys (minimal system) environment.

The difference between mingw and cygwin is in libraries, i.e. how the compiled programs (which probably do not expect Windows environment) will interact with Windows system libraries.
Topic archived. No new replies allowed.