"Linux"--cscope

Source: Internet
Author: User

Cscope is a Linux software, its function is mainly used in reading code, called Windows under the source Insight, but with the use of vim, the efficiency is unparalleled. For specific use, install Vim first, then perform the VIM command at the terminal and execute it at the command line: Help CS. The following configurations are available for testing. The following are the configurations in ~/.VIMRC.

Set Nuset shiftwidth=4Set TabStop=4Set Softtabstop=4Set Autoindentnmap<f2>s:cs Find S <c-r>=expand ("<cword>") <CR><CR>Nmap<f2>g:cs Find G <c-r>=expand ("<cword>") <CR><CR>Nmap<f2>d:cs Find D <c-r>=expand ("<cword>") <CR><CR>Nmap<f2>c:cs Find C <c-r>=expand ("<cword>") <CR><CR>Nmap<f2>t:cs Find T <c-r>=expand ("<cword>") <CR><CR>Nmap<f2>e:cs Find e <c-r>=expand ("<cword>") <CR><CR>Nmap<f2>f:cs Find F <c-r>=expand ("<cword>") <CR><CR>Nmap<f2>i:cs Find I <c-r>=expand ("<cword>") <CR><CR>ColorScheme DesertifHas ("Cscope") Set CSPRG=/usr/local/bin/Cscope Set Csto=0 Set CST set nocsverb set Cscopequickfix=s-,c-,d-,i-,t-,e-"Add any database in current directory    ifFilereadable ("Cscope.out") CS Add cscope.out"Else Add database pointed to by environmentElseIf $CSCOPE _db! =""CS Add $CSCOPE _db endif set Csverbendif

With the above configuration, the following methods are used:

F2 + S Find this C symbol

F2 + G Find this definition

F2 + D Find functions called by this function

F2 + C Find functions Calling this function

F2 + t Find This text string

F2 + e Find this egrep pattern

F2 + F Find This file

F2 + i Find Files #including This file

Let the code fly up on the keyboard!

end!

"Linux"--cscope

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.