Go Read source code under Linux: (g) vim+taglist+ctags

Source: Internet
Author: User

Linux read the source code a lot of ways, smart people from the title should be able to know, need (g) vim+taglist+ctags. 3 cooperation, is a perfect match, the skill unlimited Ah!

Vim/gvim
What is Vim/gvim, if crossing even VI do not know, then don't look down. Some people on the Linux smattering said, VI is a and win under the note pad like the tool? In fact, if it is just the same function as the note pad, it has long been called VI.

Taglist
TagList is a vim source code browsing plug-in, the specific function of the introduction also please crossing yourself Google. Many things need to be experienced to use, others do not do.

Need to install this plugin, plugin: Taglist

http://www.vim.org/scripts/script.php?script_id=273

There are many versions available to download the latest version: http://www.vim.org/scripts/download_script.php?src_id=7701

After downloading, the first decompression, how to extract? Find a way to do it yourself.
Then create a hidden folder in the user's home directory. Vim, and copy the plugin from the TagList extracted directory into the. Vim directory. Of course, it's no problem to copy it along with other catalogs.

Ctags
Ctags is a software for the production of tags files. , or search the Internet, or say it: http://ctags.sourceforge.net.
Download has to unzip the installation can be compiled. How do I unzip the build installation? Of course, than win under the direct double-click Setup.exe to be more complex, but different worlds have different rules, no way, hehe.

If under Ubuntu, directly using the new stand to install, no longer introduced, is not worth introducing.

Read the source code
First go to prepare to view the source code of the directory, mister into a tags file.
$ ctags-r

Then use VIM to open a C file. If you want to know where a person's function or struct is, simply move the cursor over the function, then press CTRL +], and the Ctrl+o will return to the original place after reading it.

View the list of functions. Also need to start taglist, in Vim's command state input: Tlisttoggle, the function list will appear to the left of the Vim interface. Ann Ctrl+ww (2 times W), you can switch to the Function list area, move to the function name line and press ENTER to view the function code.

Gvim
Many crossing may not be familiar with the command operation of Vim, or are not accustomed to keyboard operation, then you can use Gvim plus the above two tools. Simply double-click the function name to jump to the function as soon as you open the C file with Gvim and then enable the function list. Press CTRL + mouse around the button to track or fallback, more convenient operation, more than the win under a lot of tools are better.

Go to: http://www.linuxdiyf.com/viewarticle.php?id=110944

Go Read source code under Linux: (g) vim+taglist+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.