Wednesday, April 29, 2020

Re: Help: ctags in vim ?

If we talk about gnu global is it far better than cscope.

If yes how can i install and use it on my ubuntu machine . 

On 29 Apr 2020 21:10, "Gary Johnson" <garyjohn@spocom.com> wrote:
On 2020-04-29, 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.?

I don't know why that is.  Ctags usually "just works" without any
fussing so I don't have much experience fixing ctags problems.
I don't have enough information about your situation to make any
further guesses about what might be wrong.

> 2. At each time i opened my source code i need to execute ctags again ?

No.  You need to execute ctags again only after you have made
a change to your source code.

> 3. How Can I use  ctags and cscope while I have already opened my file in vim.

First, make sure that the working directory of the current vim
window is the directory that should contain your tags and cscope.out
files.  If you started vim in that directory, and you haven't
executed any :cd or :lcd commands, and 'autochdir' is off (the
default), then any window in vim should be using the correct working
directory.  You can check with the following command:

    :pwd

For ctags, simply execute the following command:

    :!ctags -R

For cscope, execute the following two commands:

    :!cscope -b -R
    :cs add

I think those last two commands are right.  I haven't used cscope in
years.  I've been using GNU Global instead, and I have plugins that
do a lot of stuff automatically so that I don't have to think about
it.

You can find out more about Vim's cscope commands here:

    :help cscope

HTH,
Gary

--
--
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/20200429153936.GB29220%40phoenix.

--
--
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/CACEFAc26ZtT039Tn5K0D5Y-idu-Y9B0Jr%3D2hWHRywe9s5LrZGA%40mail.gmail.com.

No comments: