in vim, how to combine ^] and arge, to follow a tag and also add it to the arg list? -


I can get under the cursor or words, and I could use to open the file I and ARG I can add to the list. For example, with a cursor on the name of a Java class, at line 45:

 : arge +45 mydirhere / & lt; Cword & gt; .java  

But I do not know how to pass in tag mechanism, so it will return the filename (and line number), which is arge

I think my question is special: "How do you say tag mechanisms?" I expect something:

  string getFileAndLineforTag (string tag)  

You can use the tag list () function. From to: Tag list () (in VIM 7.1) to help the tag list:

  Tag list ({expr}) * tag list () * Regular expression Provides a list of matching tags {expr}. Each list item has at least one dictionary containing the following entries: Tag Name Name. Name of file name where file is defined It is in relation to the current directory or full path. Command to locate tag in Cmd Ex file. Type of type tag The value of this entry depends on the values ​​of the language specific type. Only available when using the tag file generated by the prevailing CTA or HDRTAg. Fixed a file specific tag. Static-tag | Refer to for more information. Can tag more entries based on the contents of the file access, implement, manage and sign. See ctags documents for information about these areas. Field "Structure", "Class" and "Enum" can appear for the C code, they give the name of the entity in the tag. Pre-command 'CMD' is a pre-search pattern, a line number, or a line number followed by a byte number. If there is no matching tag, an empty list is returned to get the exact tag match, the anchor '^' and '$' should be used in {expr}. Tag-regexp | Refer to Tag Search for more information about regular expression patterns. 'Tag' | To see information about how the tag file is located by VIM. Tag-file-format | Refer to  

For the format of the tag file generated by various CTAg tools, you can specify the custom command -complete = tag or -complete = tag_listfiles . If you can use -complete = custom, {func} or -complete = customlist, {func} If you need something more elaborate. See : help: command-completion for more on this.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -