*tag* *tags*
    A tag is an identifier that appears in a “tags” file. It is a sort of label that can be jumped to. For example: In C programs each function name can be used as a tag. The “tags” file has to be generated by a program like ctags, before the tag commands can be used.
    With the “:tag” command the cursor will be positioned on the tag. With the CTRL-] command, the keyword on which the cursor is standing is used as the tag. If the cursor is not on a keyword, the first keyword to the right of the cursor is used.
    The “:tag” command works very well for C programs. If you see a call to a function and wonder what that function does, position the cursor inside of the function name and hit CTRL-]. This will bring you to the function definition. An easy way back is with the CTRL-T command. Also read about the tag stack below.
    When there is no other message, Vim shows which matching tag has been jumped to, and the number of matching tags:
    tag 1 of 3 or more
    ** The ” or more” is used to indicate that Vim didn’t try all the tags files yet. When using “:tnext” a few times, or with “:tlast”, more matches may be found.**

 

 posted on 2018-10-16 14:37  severush  阅读(383)  评论(0编辑  收藏  举报