Wednesday, April 29, 2020

Re: Help: ctags in vim ?

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

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/f990da08-a941-496b-446e-331fd4f256b1%40drchip.org.

No comments:

Post a Comment