VIM + csags + ctags

Source: Internet
Author: User

-------------------------------------------------------

Sudo apt-Get install Vim

Sudo apt-Get install cscope

Sudo apt-Get install ctags

-------------------------------------------------------

1: cs1_rbkq

2: Run in VIM
CS add cscope. Out

3: CS find * XXX
--------------------------------------------------------
S: Find the symbols of the C code.

G: search for this definition.

D: Find the function called by this function.

C: Find the function that calls this function.

T: search for this string.

E: Find the current egrep mode.

F: Find this file.

I: Find the file that contains this file.
--------------------------------------------------------
Ctrl k: delete the part from the cursor to the end of the row
Ctrl u: delete the part from the cursor to the beginning of the line
Alt D: delete the part from the cursor to the end of the current word
Ctrl w: delete the part starting with the cursor to the current word
Ctrl a: move the cursor to the beginning of the line
Ctrl e: move the cursor to the end of the row
Alt A: move the cursor to the current word Header
Alt E: move the cursor to the end of the current word
Ctrl y: insert the recently deleted word
--------------------------------------------------------
CTRL +]: Jump to the Function Definition place where the function is called.
CTRL + T: return the last lookup location
--------------------------------------------------------
Ctags usage:
1. $ ctags-R * ($ is a Linux system shell prompt. This command has been described above)
2. $ vi-T tag (replace the tag with the variable or function name you want to find)
3.: TS (the command starting with ":" In tagslist is the command line mode command in VI)
4.: TP (TP note: tagspreview) --- this command is not commonly used and does not need to be remembered
5.: tn (TN mnemonic: tagsnext) --- this command is not commonly used and does not need to be remembered.
6. CTRL +] Jump to the definition of the function or struct where the cursor is located
7. CTRL + t return to search or jump
---------------------------------------------------------

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.