sent 14:37:23 20 December 2010, Monday
by Bouchtaoui@gmail.com:
If you want just to reduce the size of the file, --excmd=number does the job: on
my system (Gentoo, so I have header files for every package that provides them)
the following command takes 1,5 minutes to generate a 265 MiB file:
ctags -R --excmd=number \
--c++-kinds=+p \
--fields=+iaS \
--extra=+q \
-f ~/tmp/vim/uitags /usr/include
I don't know how to include only standart C headers, but you may try the
following (in **zsh**):
ctags --excmd=number \
--c++-kinds=+p \
--fields=+iaS \
--extra=+q \
-f ~/tmp/vim/uitags2 \
/usr/include/*(e%'man -w $REPLY:t &>/dev/null || man -w $REPLY:t:r
&>/dev/null'%)
It will try to index only files (and directories) whose names are man entries.
With this command it generates only 29 MiB file in 50 seconds. Please don't
forget that it is zsh, not bash. And join last two lines of command, they got
splitted by mail client.
Original message:
> Hello guys,
>
> Please help me with the following problem. I want to use Vim with
> ctags to benefit from OmniCppCompletion. I was searching the internet
> for a solution before I post here, but didn't succeed. So what's the
> problem:
>
> I want to add tags which is specifically targeted to standard C
> library. What I mean with standard C library, is stdio.h, stdlib.h,
> string.h, arp/net.h socket.h signal.h and so on...
>
> I found only examples like:
> ctags –R --c++-kinds=+p --fields=+iaS --extra=+q /usr/include
>
> When I run this, it takes a long time before it finishes so I
> terminated the process, looking at filesize, I saw it was already
> about 250 MB. If I let ctags finish it with building the table, it
> could be maybe 1 GB, which is huge in my opnion and I don't think
> that's how to do it.
>
> So please, how can I creat a tag file for standard C lib (in my case
> on a Debian) correctly. I don't want C++ (cause there are plenty of
> examples), just C!
>
> If you gave me the solution, you helped me with a problem I had for
> months (I switched to Code::Blocks to code).
No comments:
Post a Comment