mirror of
https://github.com/Hizenberg469/Makefile-tutorial.git
synced 2026-04-19 22:02:24 +03:00
ctags and cscope
This commit is contained in:
19
ctags-cscope/cscope.txt
Normal file
19
ctags-cscope/cscope.txt
Normal 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
29
ctags-cscope/ctags.txt
Normal 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
|
||||||
Reference in New Issue
Block a user