Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I create a ctags file recursively?

Tags:

vim

ctags

taglist

I would like to create a tags file using ctags for a complete source tree. Now I generally would run ctags *.c but the problem is in the top directory, there's no source files. Also, I'd like it to pick up *.c,*.h,*.cpp & *.hpp files, how can I do this?

like image 845
stdcerr Avatar asked Dec 11 '22 15:12

stdcerr


2 Answers

You can use ctags --recurse or ctags -R to recursively descend into a directory tree.

like image 155
William Pursell Avatar answered Dec 15 '22 00:12

William Pursell


If you want to generate tags for c/c++/javascript/java/python files present in your git repo (respecting .gitignore) :

git ls-files | ctags --links=no --languages=c,c++,javascript,java,python -L- 
like image 43
me_astr Avatar answered Dec 14 '22 23:12

me_astr