From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 791 invoked by alias); 11 Sep 2019 09:50:29 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 782 invoked by uid 89); 11 Sep 2019 09:50:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=navigate X-HELO: mail-io1-f50.google.com Received: from mail-io1-f50.google.com (HELO mail-io1-f50.google.com) (209.85.166.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Sep 2019 09:50:27 +0000 Received: by mail-io1-f50.google.com with SMTP id f4so43661934ion.2 for ; Wed, 11 Sep 2019 02:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wRW8uvbpYZPFe46kOSUHVQgbBAL1AIIn3XEMu6VklO8=; b=pcBOvr8RQCYu3tG5tNJt2JgeMN+JVFQ6ZdyGmqHyOX4kbcKUcUkps6azVOtdjD6alO 9w2hwhzClNEwb9BrFIpLYU9/3fI4aBfxDlbO3LZAThCumdj0jKIt0uJRuhk9uny/jE5n z2wBQUYHyqaRpn3YEyLIPb2SVnAtJ/SZXZ/w+28UkZ/W/wt3W/qGtnNmix+C/oTlMfq+ Ijhxbw62P8bVUq9kMhuV2QpuJt8P9ZbvO1kv+BovGw4g679n9RFTOmmZTTi21LsUCxbH HfGsH4Apl91OPee42RYAMuReeA2ugv+yTcDVOkZU2DhLCac7QmoB81So4xMCzgr/SXiB 9QYg== MIME-Version: 1.0 References: <382dec9f-4a34-20f4-e0cd-ef57debeaa0f@gmail.com> In-Reply-To: <382dec9f-4a34-20f4-e0cd-ef57debeaa0f@gmail.com> From: Hi-Angel Date: Wed, 11 Sep 2019 09:50:00 -0000 Message-ID: Subject: Re: Enabling Ctags Tree Wide for GCC To: Nicholas Krause Cc: Andreas Schwab , GCC Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00076.txt.bz2 On Wed, 11 Sep 2019 at 09:55, Nicholas Krause wrote: > > > On 9/11/19 2:30 AM, Andreas Schwab wrote: > > On Sep 11 2019, Nicholas Krause wrote: > > > >> I was wondering what is the easiest way to allow source tree wide > >> ctags. > > There is make TAGS, which uses etags. Note: over time on the internet appeared quite a few different "ctags" projects (exuberant ctags universal ctags, anjuta-ctags, you named it), AFAIK the currently maintained and developed project with the most number of supported languages is universal ctags, so I recommend using it. > Is there no way to build it for vim as thats what I would prefer to stay > with. (disclaimer: I'm just a random reader of the ML) Using ctags with any project is as simple as `ctags -R` in base directory of sources (add -e option if you use Emacs). There's no need for any complex setup, because the "tags" format is very dumb. It's just "tag name" (e.g. name of a function, struct, macro), line number, and the whole line where that name is defined. So, in particular, if you have 2 functions foo() defined, and you jump to a tag "foo()", there's no way a text editor can figure out which one "foo()" is that you wanted, so it would either jump to the first occurrence (vim does that, you need to use :tn :tp to navigate further) or present you with a list of occurences (Emacs does this). So, I doubt there's a "make tags" command, because it's one symbol bigger than "ctags -R" ;-)