Tip #210: compiling the actual file with gcc
tip karma |
Rating 138/81, Viewed by 4067
|
Read and edit this tip on the
Vim tip wiki.
The wiki may have a more recent version of this tip.
created: |
|
February 3, 2002 6:37 |
|
complexity: |
|
basic |
author: |
|
elian |
|
as of Vim: |
|
6.0 |
if you use set makeprg=gcc\ -o\ %<\ % in your .vimrc, and your actual file is file.c, then :make will compile file.c with the output file. (gcc file.c -o file).
<< backtracking your movements in a file |
Rotate color themes >>
Additional Notes
Anonymous,
April 9, 2005 12:37
|
You don't even have to make that change. Just :make %:r and you'll get the same effect.
|
[email protected],
July 16, 2005 7:22
|
very good. it works!
|
|