ctags and cscope

This commit is contained in:
Hizenberg469
2025-08-26 13:58:22 +05:30
parent 6983b7b90a
commit 5c4a150def
2 changed files with 48 additions and 0 deletions

19
ctags-cscope/cscope.txt Normal file
View File

@@ -0,0 +1,19 @@
To use csope:
Use command:
cscope -R
In the project directory.
It will open a interactive UI which we can use to search for
various attributes in C or C++.
If we search for anything even for once. It will show the search
result in the csope interactive terminal
To use cscope in vim
Use command:
:cs or :cscope

29
ctags-cscope/ctags.txt Normal file
View File

@@ -0,0 +1,29 @@
Ctags:
-------
They are text-based, source code-based indexing tools.
How do they work?
* Point to the directory having the project.
* Create a database based on the project.
* Query through tools or text-editor.
How to use to it?
* Go to their codebase.
* Use command:
ctags -R
* It will create a database file. The name of the
file created is 'tags' file.
To use ctags in vim:
* Use command:
CTRL+]
Before using the command hover the cursor over the
text which might be a function, variable, class, etc.
* To go back to the file where you were previously present.
Use command: CTRL+t