On Sep 16, 9:38 am, Ben Fritz <[email protected]> wrote:
>
> Perhaps I don't need the -i at all when using "cscope add" within Vim?
> After building the database with cscope.exe, all that information is
> in the database file. The text "taken from a version of the cscope man
> page" contained in :help cscope-intro says:
>
> > On a subsequent call, cscope
> > rebuilds the database only if a source file has changed or the list of
> > source files is different.
>
> Does this apply only to cscope.exe, but not to cscope called through
> Vim? If Vim never rebuilds the database, there is probably no need for
> the -i flag at all.
>
> This should probably be mentioned in the help if it's the case.- Hide quoted
> text -
>
This does seem to be the case.
Here's something like what I eventually ended up with to aid my
connecting to the database:
command! -bar CsProjname
\ source $HOME/cscope_win32/projname.setup.vim |
\ exe 'silent !'.&cscopeprg." -b ".expand(
\ "-f $HOME/cscope_win32/projname.cscope.out ".
\ "-i $HOME/cscope_win32/projname.cscope.files") |
\ exe "cscope add ".
\ expand("$HOME/cscope_win32/projname.cscope.out")
projname.setup.vim just uses glob(), split(), filter(), and writefile
() to get a list of files in the project.
The expand() calls are important for some reason...not sure why.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---