Vim Configuration--ctags

Source: Internet
Author: User

First, on the following website:

Http://ctags.sourceforge.net

Next Ctags5.6 (ctags-5.6.tar.gz)


Then, CD to download the good directory and unzip

$ TAR-XZVF ctags-5.6.tar.gz

Unzip the CD to ctags-5.6 later.

CD ctags-5.6

Then compile and install

make//next to root permission make install

After all this is done, enter the directory where the code is stored

Input

Ctags _r

At this time will find that the directory is more than a file called tags

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/81/51/wKioL1dFzOSRYtwzAAAKYSbWiwA003.png "title=" 1.png " alt= "Wkiol1dfzosrytwzaaakysbwiwa003.png"/>

Then open the code file (here my is test.cpp)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/81/58/wKiom1dFzDXgQ7VOAACJGm9EpoQ036.png "title=" 2.png " alt= "Wkiom1dfzdxgq7voaacjgm9epoq036.png"/>

Here my main function calls the function fun_1 ()

In Vim's bottom bar mode (SHIFT +: Enter)

Input:

Set tags = (current path)/tags

For example, I entered:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/81/5F/wKiom1dFzLmBdHhVAAARkZ1vJw8124.png "title=" 3.png " alt= "Wkiom1dfzlmbdhhvaaarkz1vjw8124.png"/>

After execution in normal mode, move the cursor to the fun_1 () of the main function

Click CTRL +}

Will find that the cursor jumps to the place where the fun_1 () function is defined

Click CTRL + T

The cursor will go back to the previous position


Here, Ctag basic configuration complete

Vim Configuration--ctags

Related Article

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.