# How to generate tags file with ctag(1).



## fender0107401 (Sep 22, 2010)

Hi all:

I have a lot of header files, when I open my project I have to open these header file one by one.
That is so boring. 

So, I am trying to use ctag(1) to generate a tags file and include it in gvim to accomplish auto-completion with the supertab plugins.
I mean I don't want open these header file one by one.

I really don't want install "Exuberant Ctags".
Utilities included in FreeBSD userland are prefered.
So, I put the following lines into a Makefile:


```
################################################################################
#
# Run cscope and ctags for the project.
#
################################################################################

all:
	cscope -Rbq
	find src include -name \*.c -o -name \*.h | xargs ctags

clean:
	rm -rf tags cscope.in.out cscope.out cscope.po.out

################################################################################
```

However, I find the generated ctags file only contains the function declaration.

Why no variable declaration?


----------

