Use of ctags under VIM

Source: Internet
Author: User
use of ctags under Vim 1. Installation of Ctags

Source Installation:

Download source code
./configure
Make
sudo make install

under Ubuntu or Debian:

sudo apt-get install ctags 2. tags file

Create tags

Ctags-r * or Ctags-r.

Configure VIMRC to let vim find tags automatically

Vim ~/.VIMRC
Set tags=./tags;
Where./tags represents the directory where the current open file is located (not the current directory, if removed./then the current directory) under the tags file, semicolon; Indicates automatic upward recursion looking for tags files 3. Common Operations

Vim opens the file where "tag" is located

Vim-t tag

opens the tag list for the identifier where the cursor is located

: TS

jumps to the identifier where the cursor is defined

CTRL +] or CTRL + W]
The latter will open the jump horizontally split screen

Jump Back

Ctrl + t

jump to the next tag in the tag list

: TN

jumps to the previous tab of the tag list

: TP

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.