Problems encountered with the use of cscope
1. e568:duplicate cscope Database not added
At the prompt, the Cscope database was added repeatedly, I am using the vim7.2 version, and this version is already supported Cscope, and the Cscope function is turned on in its configuration file.
$ VI/ETC/VIMRC
32
if
has(
"cscope"
) && filereadable(
"/usr/bin/cscope"
)
33 set csprg=/usr/bin/cscope
34 set csto=0
35 set cst
36 set nocsverb
37 " add any database in current directory
38
if
filereadable(
"cscope.out"
)
39 cs add cscope.out
40 "
else
add database pointed to by environment
41 elseif $CSCOPE_DB !=
""
42 cs add $CSCOPE_DB
43 endif
44 set csverb
45 endif
|
Then, we add a plug-in to Vim, Cscope_maps.vim, the main role of this file is to make some shortcut key mapping, eliminating the hassle of entering the command, but the file has not been updated, it only mentions vim7 the following configuration method, in which the same code as shown above, So it causes a conflict to add the database repeatedly
$ VI ~/.vim/plugin/cscope_maps.vim
1234567 |
40 "add any Cscope database in current directory 41      if filereadable ( 42 CS Add cscope.out 43 "  else add The database pointed to by environment Variable 44 ElseIf $CSCOPE _db!= 45 CS add $CSCOPE _db 46 endif |
The way to resolve the conflict is simple, comment out the lines.
Using Cscope in Vim