Skip to content

Instantly share code, notes, and snippets.

@anthonygelibert
Created February 25, 2021 21:03
Show Gist options
  • Save anthonygelibert/e543facf0c893e335d4d885079b18754 to your computer and use it in GitHub Desktop.
Save anthonygelibert/e543facf0c893e335d4d885079b18754 to your computer and use it in GitHub Desktop.
Generate tags using `ctags` from classical C/C++ system headers
#!/bin/sh
FILES="/usr/include/stddef.h \
/usr/include/stdint.h \
/usr/include/stdio.h \
/usr/include/stdlib.h \
/usr/include/string.h \
/usr/include/errno.h \
/usr/include/math.h \
/usr/include/pthread.h \
/usr/include/unistd.h \
/usr/include/sys/errno.h"
rm -f .tags
ctags -f .tags --sort=yes --languages=+C,C++,C#,Sh,Python,Java,JavaScript,Make,Perl,Tex --c-kinds=+cdefgmnpstuvx --c++-kinds=+cdefgmnpstuvx --c#-kinds=+cdeEfgimnpst --java-kinds=+cefgimp --javascript-kinds=+fcmpv --python-kinds=+cfmvi --make-kinds=+m --perl-kinds=+cflps --sh-kinds=+f --tex-kinds=+csubpPG --format=2 --fields=+afiKlmnsSzt $FILES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment