[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-user
Subject:    [gentoo-user] Re: Recommend C source browser/editor?
From:       Nikos Chantziaras <realnc () gmail ! com>
Date:       2021-08-07 7:43:50
Message-ID: seldjn$21f$1 () ciao ! gmane ! io
[Download RAW message or body]

On 06/08/2021 23:25, Grant Edwards wrote:
> Would anybody care to recommend a tool for browsing around (and
> editing) a tree of somebody-else's C code?
> 
> I prefer emacs for day-to-day editing of my code (when I know what's
> where), but I'm looking for something to browse around a tree of
> unfamiliar source code and make minor changes. I briefly tried
> emacs+cscope at a few points in the past, but it just never worked
> very well.
> 
> It would be nice to have something that I can just point at a tree of
> source files and not to have to spend a lot of time setting up a
> "project" or "workspace" or whatever...

If emacs has support for compilation databases (a 
"compile_commands.json" file), then you can generate one. The easiest 
way to do that is with dev-util/bear:

   $ bear -- make -j16

This will build the project as usual, but a compile_commands.json file 
will be generated in the current directory. Load that file into an 
editor or IDE that supports compilation databases.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic