Contents
In this case, you can run the following two commands to list all of the uses of a given : This will display a list of the tag definitions in another buffer. Switch to the new buffer ( C-x o ), scroll through the list of definitions to the one that you want, then press Enter to open the file.
Comments in gdb files start with ‘ # ’ so the above line is the first regex match line in gdbinit.ctags, so that subsequent regex matches are not tried for the input line. If an empty name pattern ( //) is used for the –regex- option, ctags warns it as a wrong usage of the option.
Is it safe to use ctags in regex parser?
Never use ‘ ’ in patterns for –regex- , and never use them in non-matching bracket expressions for –mline-regex- patterns. For the experimental –_mtable-regex- you can safely use ‘ ’ because that regex is not compiled with REG_NEWLINE.
Universal Ctags currently uses the same regex engine as Exuberant Ctags: the POSIX.2 regex engine in GNU glibc-2.10.1.
To switch back to your original buffer and expand it, use C-x o to switch to it, then C-x 1 to expand. Even the list of all definitions given by tags-apropos may be too large to find the definition that you’re looking for. This is mostly a problem for structs ( struct inode, for instance) that are used frequently in the kernel.
Which is the default option in ctags-R?
Despite the wealth of available options, defaults are set so that ctags is most commonly executed without any options (e.g. “ ctags * ”, or “ ctags -R ”), which will create a tag file in the current directory for all recognized source files. The options described below are provided merely to allow custom tailoring to meet special needs.
Finally, use the fourth command to jump back up in the tag “stack.” You’ll probably find that for some tags (common structures, for example), Etags finds hundreds or thousands of uses in the code, and jumping through them (with the third command above) to try to find the original definition is useless.