Skip to content
Advertisement

How to set the path to the tags file?

I’ve tried to set the path to my project’s ctags file each time when I close the *.c file and go to terminal. I want the tags file to have been set when I open my code file.

Or, maybe … can I set the tags file only for special directory?

Advertisement

Answer

Usually the path of the ctags file is not put in ~/.bashrc but rather in your editor’s config file.

For vim, for example, usually the following lines are put in ~/.vimrc:

set tags+=tags
set tags+=.tags
set tags+=../tags
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement