When you want to generate a ctags file for your standard headers, you may have know the following command: ctags –R --c++-kinds=+p --fields=+iaS --extra=+q /usr/include Yes, this could really work, but sometimes you may got a HUGE tags file, with some extra symbols that has nothing to do with your project. This tip will give you a solution: generate a tags file including symbols of your C/C++ files and their including headers. The following shell script would do this for you: Assuming you have saved the code as ctags_with_deps.sh, simple execute

AttributesValues
rdfs:label
  • Generate ctags file for a C/C++ source file with all of their dependencies (standard headers, etc)
rdfs:comment
  • When you want to generate a ctags file for your standard headers, you may have know the following command: ctags –R --c++-kinds=+p --fields=+iaS --extra=+q /usr/include Yes, this could really work, but sometimes you may got a HUGE tags file, with some extra symbols that has nothing to do with your project. This tip will give you a solution: generate a tags file including symbols of your C/C++ files and their including headers. The following shell script would do this for you: Assuming you have saved the code as ctags_with_deps.sh, simple execute
Version
  • 7(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 0(xsd:integer)
Category
  • ctags
Text
  • ProjectTag
Subpage
  • /201202
Complexity
  • basic
Created
  • 2012-02-21(xsd:date)
ID
  • 0(xsd:integer)
  • 3219(xsd:integer)
NEXT
  • 0(xsd:integer)
abstract
  • When you want to generate a ctags file for your standard headers, you may have know the following command: ctags –R --c++-kinds=+p --fields=+iaS --extra=+q /usr/include Yes, this could really work, but sometimes you may got a HUGE tags file, with some extra symbols that has nothing to do with your project. This tip will give you a solution: generate a tags file including symbols of your C/C++ files and their including headers. The following shell script would do this for you: #!/bin/sh gcc -M $* | sed -e 's/[\\ ]/ /g' | \ sed -e '/^$/d' -e '/\.o:[ ]*$/d' | ctags -L - --c++-kinds=+p --fields=+iaS --extra=+q Assuming you have saved the code as ctags_with_deps.sh, simple execute /path/to/ctags_with_deps.sh file1.cpp file2.c file3.cpp then a tags file containing the symbols of the source files and headers included will be generated. The ProjectTag plugin can also do this, and can work on Windows, but it requires you have your Vim built with Python enabled.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software