I have a folder llvm2.9 in which i ran this command.
$> ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++
This was indexing methods in *.html files also which were present in llvm2.9/docs. I found this out because when i pressed ctrl-] for some class, it went to the html file.
How do i force ctags to use .cpp/.h files alone or ignore a particular directory.
Thanks
You can exclude a filetype using --exclude='*.html'
If you need to exclude more than just .html files:
You can't comma separate a list inside an exclude option. This doesn't work:
ctags --exclude=*.html,*.js ./*
However, you can pass multiple exclude options:
ctags --exclude=*.html --exclude=*.js ./*
Pass the -V option to help with debugging:
ctags -V --exclude=*.html --exclude=*.js ./*
Gives the output:
Reading initial options from command line Option: --exclude=*.html adding exclude pattern: *.html Option: --exclude=*.js adding exclude pattern: *.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With