Ctags basic operations

Source: Internet
Author: User

Ctags basic operations

Ctags usage

Note:

A. ctags can analyze the program to generate the tags file;

B. The generated tags file can be searched by vi-t for struct, data type, and function name location, which is convenient;

Ctags installation:

Sudo apt-get install ctags

Usage:

A. If you want to find the struct, function type, variable type, and function name location contained in a file in a directory, you can generate

A tags file;

To generate a tags file in a directory:

You can first go to alias to check if an alias is defined for it. Generally, ctags is installed. If the command to generate tags is long, the alias is redefined.

For example, the command for generating the tags file defines the alias cindex, So input cindex will generate the tags under this directory;

If cindex fails to be used, sudo + is followed by the full name;

B. vi +-t + the struct name to be searched, data type name, function name, or macro name defined by the System

C. ctrl +] Jump

If a data type is an alias defined by typedef, You need to select the type of the alias, press ctrl +]

If the data type is defined by define macro, find and define its macro, press ctrl +]

Note: When searching, if there is a duplicate name, you can select the serial number and select one at will;

D. ctrl + t implement return

Vim integrates Ctags and Taglist

Use Ctags in Linux to find the source code

Use of Ctags in Ubuntu

Use Sublime Text 2 Ctags under Fedora 19

Create a Vim + Taglist + csags + Ctags editor in Ubuntu

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.