Is there any utility or plugin which provides cscope like functionality for C++. I am looking for
- all references to a symbol
- global definitions
- functions called by a function
- functions calling a function
- files including a file
Is there any utility or plugin which provides cscope like functionality for C++. I am looking for
Vim can interface directly with cscope out of the box. Type :h cscope
. This requires cscope functionality to be enabled when Vim is compiled and for cscope to be installed on your computer.
There is a Vim + cscope tutorial on the cscope web page.
There are some tools listed in the thread, https://www.reddit.com/r/emacs/comments/1qktcb/cscope_like_functionality_that_correctly_handles/:
clang-tag find-def
) / go to usage (clang-tag grep
). vim-clang-tags can be used to list all usages (:ClangTagsGrep
command); there is emacs plugin too ./bin/rdm
daemon) - has "follow-symbol" and "find-references". Intergates with emacs - "rtags.el"
; there are two projects for Vim: https://github.com/lyuts/vim-rtags (rich support of rtags) and https://github.com/shaneharper/vim-rtags (only 2 commands) both with "Find references" and "find definition" functionsSome other links
And there are some fast (indexed) greps like Russ Cox’ codesearch tools (It works with regex too - https://github.com/google/codesearch; example is https://codesearch.debian.net/about) or any other indexed grep...
And there are cross ref tools (GUI and web-servers) like LXR and other... https://github.com/oracle/opengrok/wiki/Comparison-with-Similar-Tools
Vim can interface directly with cscope out of the box. Type :h cscope
. This requires cscope functionality to be enabled when Vim is compiled and for cscope to be installed on your computer.
There is a Vim + cscope tutorial on the cscope web page.
Try YouCompleteMe.
It's got code completion, go-to-definition and refactoring not just for C & C++, but for Rust, Go, Java, C# and more.
Make sure to install it with support for clangd as described here.
© 2022 - 2024 — McMap. All rights reserved.