Found 1 entry, viewing 1 through 1.

Full Code Navigation: Cscope

Not long ago we discussed ctags here, and how it can quickly let you navigate your code, helping you find definitions of variables and functions. You'll have taken notice that sometimes you want to navigate in the reverse: where is this function called, who includes this file, etc. Cscope builds a database of such information (and more). We can include it with ctags and have very impressive code searching.

If you want a detailed introduction, there is a great cscope and vim tutorial available. I'll just give you a quick run down of using it.

  1. At the base of your C or C++ source tree run cscope -R -b -q

  2. Add this to your .vimrc:

    if has("cscope")
      set cst
      set csto=1
      if filereadable("cscope.out")
        cs add cscope out
      endif
    endif
    
  3. Start Vim in the same directory as the generated cscope.out file. (If not, just ...

Continue Reading

Permalink | Posted: Apr 18, 2008 | Tags: programming tips vim

Tags

42 | django | python | oggify | OSCON | OSCON07 | osx | utosc | mythtv | security | reading | music | gaming | programming | tips | shell | vim | pyobjc | cocoa | iphone | blog | git

Calendar

<< Jan >>
Mo Tu We Th Fr Sa Su
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 1 2 3

Search

This space reserved for a search box

A Django site. Hosted on a Slicehost Slice