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

Re: C Integrated Development Environment



On Fri, Feb 01, 2002 at 09:09:34AM +1000, john wrote:
| dman wrote:
| 
| > On Thu, Jan 31, 2002 at 01:35:38AM -0500, Scott Henson wrote:
| > | Im setting up a machine for a friend and he needs an IDE for developing
| > | C and C++.  Anyone have a recomendation on a good one he could use.
| >
| > I recommend Debian for the IDE!!
| >
| > What do I mean by that?  Well, here is a major difference between MS
| > Windows and UNIX (others have contributed to this conclusion as well) :
| 
| <snip>
| 
| > The moral of the story : learn to use UNIX to its full extent and
| > you'll need nothing else.  As a bonus, all those utilities are useful
| > even when you're not coding!
| 
| Actually, as much as it shames me to admit it, there is one feature
| in the VC6 M$ bloat thing IDE I really want to see on a Unix
| platform, and that's the incredibly powerful way it can back
| reference callers, classes etc. Perhaps it's me, but I just can't
| get ctags etc to work the same way, and my LISP is too weak to make
| emacs do it.

Is this what you're looking for?

    You have some file open in a buffer and it contains the following
    snippet of C code :

            local_var = my_function( an_argument ) ;

    You want to see what 'my_function' looks like.

If so, ctags is your man.


Here's how I use it :


Sit in "$my_proj_dir" and run
    ctags --recurse=yes --extra=+q --excmd=pattern src
(well, the options are really in ~/.ctags)
Now you have a file named "tags" that contains the tags.

Start up gvim or vim *with $my_proj_dir as $PWD*.  If you want to go
to a tag
    :tag <name>
(with tab-completion)

If you have the above senario, press ^] to jump to the tag matching
the text under the cursor.  Press ^T to jump back to the previous tag
on the tag stack (ie after you've press ^] a few times).

The key issues I ran into are

    1)  the tags file contains paths relative to the directory ctags
        was run from

    2)  your editor must be able to find the tags file

You can have multiple tags files, one for each subdirectory or
whatever, but that seems to me like it would be harder to manage.  Get
used to the commands so that you can just use tags or :e to open files
and keep the current directory always at the top of your project
directory.  (if you google a bit you'll surely come across an article
I read a while back explaining techniques for managing tags in a
project)

-D

-- 

I can do all things through Christ who strengthens me.
        Philippians 4:13



Reply to: