Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c compiler



You could also map a key to compile for you in vi...
Put this in your .vimrc

if you use a Makefile

	:map <F8> :!make

or if you just want to compile what you are editing

	:map <F8> :!gcc % 

problem with that is that it is limited to compiling a full program
and only saving to the a.out name.

In both cases above you'll need to save first. I'm sure there are lots
of smart ways of doing it.

There are lots of IDEs I hear on freshmeat, but never used any as I
just use different terminals myself and like the control over where
stuff goes that you usually lose with an IDE.

Tom.

On Tue, Feb 06, 2001 at 09:21:07AM +0900, Jim Breen wrote:
> >> From: "pietro zuco" <pietrozuco@example.com>
> >> Date: Tue, 6 Feb 2001 00:51:40 +0100
> >> 
> >> Now I'm editing the source in Vi and after I compile with gcc. If there
> >> errors I have to reopen Vi and my file to correct then. Maybe I'm doing it
> >> in the more long and slow way.
> 
> The old-fashioned way to do that is to save the source (w!), suspend
> vi (Ctrl-Z), run gcc and any test executions, then return to the editor
> (fg). That way your vi is still set up and pointing where you were
> before.
> 
> Jim
> -- 
> Jim Breen  [jwb@example.com  http://www.csse.monash.edu.au/~jwb/]
> Visiting Professor, Institute for the Study of Languages and Cultures of 
> Asia and Africa, Tokyo University of Foreign Studies, Japan
> +81 3 5974 3880         [$B%8%`!&%V%j!<%s(B@$BEl5~30Bg(B]
> 
> -----------------------------------------------------------------------
> Next Nomikai Meeting:    Fri, February 16 19:30- Tengu Tokyo Eki Mae
> Next Technical Meeting:  March (date TBA)
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan
> 

-- 
Thomas O'Dowd                   Noop-de-Noop!
tom@example.com                  http://www.nooper.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links