I'm using OS X 10.8.5 and running MacVim. I was wondering how I would go about using a shortcut in MacVim to compile and run a c++ program in the Terminal? I'm completely new to programming, and even newer to using Vim, so sorry about asking what's probably a stupid question...
Asked
Active
Viewed 349 times
1
-
Vim is only an editor. For compiling you should use a compiler like Gnu C compiler (gcc). After compiling you run the executable from the terminal as you run any other executable. – RaviH Feb 10 '14 at 03:15
-
http://stackoverflow.com/a/18296266/1890567 – FDinoff Feb 10 '14 at 05:42
-
You should concentrate on learning programming: learning Vim is a (profoundly enjoyable) time sink but it will divert you from your ultimate goal. – romainl Feb 10 '14 at 08:56
-
http://stackoverflow.com/a/21477312/15934 is a better (redundant, and recent) answer. `:make` is to be preferred over `:!g++` – Luc Hermitte Feb 10 '14 at 17:55
-
For short programs you should try SingleCompile: http://www.vim.org/scripts/script.php?script_id=3115 – mMontu Feb 10 '14 at 19:13