Using Cscope in Vim

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.