Install Ctags and taglist under Ubuntu

Source: Internet
Author: User

1. First install the Ctagssudo apt-get install ctagsAbout Ctags use 1 under the document you want to view.$ctags-R * (for all documents-R (Recursive lookup))2.$vim-t Tag (please replace the tag with the name you want to find, such as main)Macros defined with # define
The value of the enumeration type variable
Definitions, prototypes, and declarations of functions
Namespaces (namespace)
Type definition (typedefs)
Variables (including definitions and declarations)
Class (Class), struct (struct), enum type (enum), and Union (Union) class, struct, and union member variables or functions 3. Enter a document to view the contents of the file, and through c+] can enter the definition of the function (), c+t can return. Note: When running VIM, it must be in the tags generated by the directory, if not using VIM when you want to add set tags = path section referenced from the following two blog http://blog.csdn.net/u012814360/article/details /41443215https://courses.cs.washington.edu/courses/cse451/10au/tutorials/tutorial_ctags.html 2. Install taglisthttp://www.vim.org/scripts/script.php?script_id=2731 According to Vim's documentation. First download the TAGLIST2. Extract two directories doc and plugin, copy to ~/. vim/, that is, generate~/.vim/docAnd~/.vim/pluginTwo folders,start vim run: helptags command to execute taglist Help file, if you do not have this step, you are not able to transfer to TagList's help document using Taglist1. You can have taglist open when you edit the text, you can choose a tag (a variable, a function, a class can be a tag) and jump to it, TagList will automatically generate tag.2 when you edit the document. You can automatically open the desired taglist in the edit, set the shortcut key in order to jump to a tag into the new window, Press o-------------------------------------------------------------------------------------can add other file contents to your taglist by command. 1. Use : Tlistaddfiles and: The first example of the tlistaddfilerecursive command : tlistaddfiles /my/project/dir/*.cAdd all C language files in dir to taglist. Note; If the file is delayed by the General Assembly, wait a while. A second : tlistaddfilesrecursive /my/project/dir *.cNote: There is a space before *.c, there are two parameters, the first is the directory, the second is a C language file, the addition of recursion.------------------------------------------------------------------------------------------- *taglist-keys* Taglist-keys
Taglist window key list Taglist Windows key listing
The following table lists the description of the keys that can be used the following table describes the keys used in the TagList window
In the TagList window.

Key Description Key Description

<CR> jump to the location where the tag under cursor is <CR> (Carrige return) Jumps to the location of the tag definition specified by the current cursor
Defined.
O Jump to the location where the tag under cursor is O in a new window, jumps to the position specified by the tag defined by the current cursor
Defined in a new window.
P jump to the tag in the previous (ctrl-w_p) window. P jumps to the tag p display in the previous window, the tag definition in the File window and P The list window keeps its own cursor
Keep the cursor in the TagList window itself.
T jump to the tag in a new tab. If the file is already T jumps to the tag in the New tab, if the document is already open in tab, jump directly to the previous tab
Opened in a tab and move to that tab.
Ctrl-t jump to the tag in a new tab. CTRL-T jump tag to the new tab
<Space> Display The prototype of the tag under the cursor. <Space> shows the prototype of the tag below the cursor, and for the file name, displays the full pathname, file type, and number of tags. For the tag type, write is the tag type and the number of tags for file names, display the full path to the file,
File type and the number of tags. For tag types, display the
Tag type and the number of tags.
U update the tags listed in the taglist window u update tags list in taglist
s change the sort order of the tags (by name or by order) s changes the order of tags (by name or order)
D Remove the tags for the file under the cursor D remove tags under the files cursor
x zoom-in or zoom-out the TagList window x hides or appears taglist windows
+ Open a fold + opens a fold
-Close a fold-closes a fold
* Open All folds * opens all folds
= Close all folds = turn off all folds
[[Jumping to the beginning of the previous file [[Skip to the beginning of the previous file]
<Backspace> jump to the beginning of the previous file <Backspace> jumps to the beginning of the previous file
]] jumps to the beginning of the next file]]
<Tab> jump to the beginning of the next file <Tab> jumps to the beginning of the next document
Q Close the TagList window Q off Taglistwindow
<F1> Display Help <F1> Show assistance documents
  
The above keys would work in both the normal mode and the insert mode.           The keys above work both in normal mode and in insert mode---------------------------------------------------|:tlistdebug|        Start Logging of TagList debug messages.|:tlistmessages| Display the logged taglist plugin debug messages. can be done byctrl+wshortcut keys or mouse clicks switch focus between TagList window and edit area let Tlist_use_right_window =1. Display on the right

Install Ctags and taglist under Ubuntu

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.