scope vs ctags in terms of features
Asked Answered
B

1

10

I am a big fan of ctags Hence I am wondering if I have cscope, will I benefit more there two programs. Seems like the latter has the same features as ctags, namely, facilitating the finding of symbols.

What are the features scope offers that can further increase my productivity with VIM?

Thanks

Buster answered 8/9, 2009 at 11:41 Comment(0)
S
15

cscope can certainly improve your productivity.

ctags only allows you to navigate to the declaration of a symbol (one-way lookup).

cscope allows you to:

  • Go to the declaration of a symbol
  • Show a selectable list of all references to a symbol
  • Search for any global definition
  • Functions called by a function
  • Functions calling a function
  • Search for a text string
  • Search for a regular expression pattern
  • Find a file
  • Find all files including a file

Tutorials:

Related SO questions:

Swadeshi answered 8/9, 2009 at 15:8 Comment(2)
Tim - as a long-time cscope user (maybe close to 20 years?) I've never had great success using it with C++ projects. Not the "hello world" kind of projects, but industrial-grade C++ with heavy use of polymorphism, templates, etc... I'm wondering if you've used it with "heavyweight" C++ and what your experience has been. Unfortunately I can't give specific examples of problems, just things like not finding symbols/definitions, etc...Ungual
@Dan: My experience with cscope has been limited to use with C ... mostly on projects that involve embedded systems.Swadeshi

© 2022 - 2024 — McMap. All rights reserved.