Ctags tool is mainly used to traverse source files, quickly find the symbols in the location source code, then how to use Ctags to find the source code under Linux? Let's take a look at the way to find source code using Ctags under Linux.
Too many files prevent us from locating the implementation of a function or the location of a macro definition. Obviously, the reading of the source code and the personal study are very unfavorable. How you want a software to be able to accurately position the function by entering commands. Yes, there is now a tool like ctags, which needs to be used with the vim editor to make source code reading easier.
What is ctags?
Ctags(Generate tag files for source code) is a tool for reading code under vim. Although ctags can support other editors, it only officially supports VIM. And Ctags has been installed by default in VIM, which helps programmers to easily browse the source code.
ctags update address: http://ctags.sourceforge.net/, this website is the official website of ctags, you can download the latest content about ctags above.
What can ctags target?
1) Macros defined with #define
2) Values of enumerated variables
3) Definition, prototype and declaration of functions
4 ) namespace (namespace)
5) type definition (typedefs)
6) variables (including definitions and declarations)
7) class (class), structure (struct ), enum type (enum) and union (union)
8) class, structure, and union member variables or functions
2. Configure your own environment to satisfy ctags:
ctags installed, if it is RedHat, the direct use yum command to install:
tags generated source files in the specified location, and we add a lot of parameters to improve ctags function (in order to reflect its function powerful, I use it to generate tags linux source file):
then we see the tags content can be found, the original tags index is linux kernel code for each element, which is Ctags combined with vim can quickly locate the reason (query is through this ) To locate the pieces of content:
The above is a Linux system using Ctags find the source of the method described, Ctags use tools to quickly find the source you want, is not very easy to do? Give it a try.
openSUSE Linux is a kernel-based Linux operating system, has been upgraded to version 13.2, how many
Sometimes we want to log in to SSH through another account, usually we need to re-enter the password
An executable file is a portable executable file that is used for program execution
Installing Vagrant on Linux system is prone to various problems, for example, some people do not kno
How to deal with the problem of Linux system downtime
Ubuntu uses Steam Music method
Ubuntu 12.04 system boot space is insufficient to delete the old kernel
How to change the Linux default startup level
The specific steps of hard disk partitioning under Linux
Ubuntu removes the emulator failure prompt "the android "XXX" virtual solution
The specific usage of the tee command in Linux system
How Linux implements the transmission of UDP broadcast messages
How to kill pscan2 Trojan under Linux?
How to run py file in Win7 system
Win10 boot no sound and can not load the desktop background how to do?
Win8 Professional Edition does not work for most users to insist on using Win7 system
Experts have a trick to deal with Win8 network connection problems
Share the magic trick of open computer management under win7
How to disable hardware component sensors in Windows 7 system
How to exit the family group under Win10 system
Microsoft continues to consolidate Win8.1/WP8.1 enterprise market