Kunal Chauhan wrote:
> 1. I have added simple a new function to my source dir and running the
> ctags - R but still at new functions tag is not working.?
>
>
> 2. At each time i opened my source code i need to execute ctags again ?
>
> 3. How Can I use ctags and cscope while I have already opened my file
> in vim.
>
1: As I understand things, you haven't compiled your code (yet). Simple
syntax errors, typically caught by a compiler, can occasionally cause
problems for ctags. Assuming that you've gotten rid of your "tags"
folder so that the ctags can successfully generate a "tags" file, try
running ctags on your C files one at a time. Does that work (ie. tags
are produced)? Note that each invocation of ctags will wipe out the
previous work, so this is not a suggestion of how to generate all the
tags you want, rather a way to find what files are causing issues for ctags.
2. Only when you feel the need -- ie. when you've installed new
functions, changed functions' argument lists/types, etc. Of course,
ctags can tag more than just functions -- local typedefs, etc.
3. When in vim, and editing one of your source files, use :tag
FUNCTIONNAME , for example, with FUNCTIONNAME being one of your
functions' names. That will exercise your ctags feature (assuming you
have +tag_binary as a feature).
For cscope, first check that you have +cscope as a feature (vim
--version). If you do, then read up on :help cscope.
Regards,
Chip Campbell