Basic ctags usage

Source: Internet
Author: User

The most basic and basic usage of ctags.

1. Create an index,

Ctags-r name of the folder to be indexed

For example:

Ctags-r testdb

2.CodeRead

A) open the file, Vim, which is similar to the common Vim command. Note that executing the vim command must be in the same directory as tags.

In the directory where the tags file is located, run

Vim testdb/test. cpp

B) Ctrl +]: Enter the definition of a function variable.

For example, if the current cursor is located at the test function, press Ctrl +] to enter the definition of the test function.

C) Ctrl + O, jump out

Press Ctrl + O to jump out of the test function definition and return to the original position.

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.