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 ifhas("cscope") && filereadable("/usr/bin/cscope")33 set csprg=/usr/bin/cscope34 set csto=035 set cst36 set nocsverb37 " add any database in current directory38 iffilereadable("cscope.out")39 cs add cscope.out40 " elseadd database pointed to by environment41 elseif $CSCOPE_DB != ""42 cs add $CSCOPE_DB43 endif44 set csverb45 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