ctags -R
Index current directory recursively
ctags -R <dir>...
Index only these directories
ctags <file>...
Index specific files
ctags -f <tagfile> -R
Write to another file name
ctags -f - <file>
Write tags to stdout
ctags -a <file>
Append instead of overwrite
ctags -L <list>
Read file names from a list
find . -name '*.c' | ctags -L -
Read file names from stdin
ctags --tag-relative=yes
Store paths relative to tags file
ctags --sort=no
Keep tags unsorted
Vim's binary search expects sorted tags; use foldcase with
'tagcase'.
ctags --sort=foldcase
Sort ignoring case
ctags --totals
Print counts when finished
ctags -V
Verbose: show what is read
Select files and languages
ctags --exclude=<pattern>
Skip matching files or dirs
ctags --languages=<list>
Only parse these languages
ctags --languages=-<lang>
Disable one language
ctags --languages=+<lang>
Enable one more language
ctags --exclude=@<file>
Read exclude patterns from a file
ctags --exclude-exception=<pattern>
Re-include an excluded path
ctags --list-languages
List supported languages
ctags --list-maps
Show extension to language map
ctags --map-<lang>=+<ext>
Add an extension to a language
ctags --langmap=<lang>:<ext>
Set the extensions of a language
ctags --print-language <file>
Show the parser chosen for a file
ctags -G
Guess language from file content
ctags --links=no
Do not follow symlinks
Tag content
ctags --list-kinds=<lang>
List kinds of a language
ctags --kinds-<lang>=+<kinds>
Add kinds, e.g. --kinds-c=+p
ctags --kinds-<lang>=-<kinds>
Drop kinds
ctags --fields=+n
Add line numbers
ctags --fields=+S
Add function signatures
ctags --fields=+l
Add source language
ctags --fields=+K
Show kind as a long name
ctags --fields=*
Enable all fields
ctags --extras=+q
Add qualified names (Class.member)
ctags --extras=+f
Add a tag per file name
ctags --extras=+r
Add reference tags (includes)
ctags --list-fields
List available fields
ctags --list-extras
List available extras
ctags -n
Locate by line number, not pattern
ctags --pattern-length-limit=0
Never truncate search patterns
Config files
ctags --options=<path>
Read options from file or directory
ctags --options=NONE
Ignore preloaded config files
Must be the first option.
ctags --options-maybe=<path>
Like --options, no error if missing
~/.ctags.d/*.ctags
Per-user options, one per line
.ctags.d/*.ctags
Per-project options
ctags
--regex-<lang>=/<re>/<name>/<kind>/
Add a regex tag rule
ctags --langdef=<name>
Define a new language
ctags -I <ident>
Ignore a C macro identifier
ctags -D <macro>=<def>
Define a C preprocessor macro