[libvirt] [PATCH] ctags: Generate tags for headers, i.e. function prototypes

Erik Skultety posted 1 patch 5 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/b916a25e8ac98e93da204855fc5a5ff85f95b2df.1537273482.git.eskultet@redhat.com
.ctags | 1 +
1 file changed, 1 insertion(+)
[libvirt] [PATCH] ctags: Generate tags for headers, i.e. function prototypes
Posted by Erik Skultety 5 years, 7 months ago
>From time to time it's handy to jump directly to a function prototype in
a header. However, generating tags for headers is disabled by default in
ctags, let's enable it by using --c-kinds=+p.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
 .ctags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.ctags b/.ctags
index 75e9753182..a4f17b589d 100644
--- a/.ctags
+++ b/.ctags
@@ -3,3 +3,4 @@
 --exclude=*.html
 --exclude=*.html.in
 --langmap=c:+.h.in
+--c-kinds=+p
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] ctags: Generate tags for headers, i.e. function prototypes
Posted by Michal Privoznik 5 years, 7 months ago
On 09/18/2018 02:24 PM, Erik Skultety wrote:
>>From time to time it's handy to jump directly to a function prototype in
> a header. However, generating tags for headers is disabled by default in
> ctags, let's enable it by using --c-kinds=+p.
> 
> Signed-off-by: Erik Skultety <eskultet@redhat.com>
> ---
>  .ctags | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.ctags b/.ctags
> index 75e9753182..a4f17b589d 100644
> --- a/.ctags
> +++ b/.ctags
> @@ -3,3 +3,4 @@
>  --exclude=*.html
>  --exclude=*.html.in
>  --langmap=c:+.h.in
> +--c-kinds=+p
> 

ACK, although I might post a patch to add some more fields later.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] ctags: Generate tags for headers, i.e. function prototypes
Posted by Erik Skultety 5 years, 7 months ago
On Tue, Sep 18, 2018 at 03:24:13PM +0200, Michal Privoznik wrote:
> On 09/18/2018 02:24 PM, Erik Skultety wrote:
> >>From time to time it's handy to jump directly to a function prototype in
> > a header. However, generating tags for headers is disabled by default in
> > ctags, let's enable it by using --c-kinds=+p.
> >
> > Signed-off-by: Erik Skultety <eskultet@redhat.com>
> > ---
> >  .ctags | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/.ctags b/.ctags
> > index 75e9753182..a4f17b589d 100644
> > --- a/.ctags
> > +++ b/.ctags
> > @@ -3,3 +3,4 @@
> >  --exclude=*.html
> >  --exclude=*.html.in
> >  --langmap=c:+.h.in
> > +--c-kinds=+p
> >
>
> ACK, although I might post a patch to add some more fields later.

If you think that they add any value then sure, let's do that, but please stay
away from c-kinds=+l, aka "local variables" as I actually find that one
counter-productive.

Thanks,
Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list