Maintainer: | Cameron Eagans <me@cweagans.net> |
---|
This part of the documentation is written by Cameron Eagans, a co-maintainer of Universal-ctags and the maintainer ofthe OSX packaging of this project.
I believe ctags defaults to sort=yes so these edits are not necessary. I'm wondering if the edits are useful. JohnBeckett 23:32, May 28, 2010 (UTC) The autocompletion does.NOT. work for boost shared pointers. So for example, if there is a section of code that looks like. Mac OS X's default ctags is the basic ctags, Exuberant ctags is an improvement over ctags. – romainl Jul 25 '11 at 7:52 6 people, we are supposed to downvote innaccurate or misleading answers, not perfectly valid answers that happen to not use our prefered tool. – romainl Mar 17 '13 at 18:28.
Build Prerequisites¶
Building ctags on OSX should be no different than building on GNU/Linux. The same toolchains are used, and the Mac OSpackaging scripts use autotools and make (as you’d expect).
You may need to install the xcode command line tools. You can install the entire xcode distribution from the App Store,or for a lighter install, you can simply run
xcode-select--install
to only install the compilers and such. Seehttps://stackoverflow.com/a/9329325 for more information. Once your build toolchain is installed, proceed to the nextsection.At this point, if you’d like to build from an IDE, you’ll have to figure it out. Building ctags is a pretty straightforwardprocess that matches many other projects and most decent IDEs should be able to handle it.
Building Manually (i.e. for development)¶
You can simply run the build instructions in README.md.
Building with Homebrew¶
Homebrew (https://brew.sh/) is the preferred method for installing Universal-ctags for end users. Currently, the processfor installing with Homebrew looks like this:
Eventually, we hope to move the Universal-ctags formula to the main Homebrew repository, but since we don’t have anytagged releases at this point, it’s a head-only formula and wouldn’t be accepted. When we have a tagged release, we’llsubmit a PR to Homebrew.
If you’d like to help with the Homebrew formula, you can find the repository here:https://github.com/universal-ctags/homebrew-universal-ctags
Differences between OSX and GNU/Linux¶
There other things where building ctags on OSX differs from building on GNU/Linux.
- Filenames on HFS+ (the Mac OS filesystem) are case-preserving, but not case-sensitive in 99% of configurations. If auser manually formats their disk with a case sensitive version of HFS+, then the filesystem will behave like normalGNU/Linux systems. Depending on users doing this is not a good thing.
Contributing¶
Ctags Golang
This documentation is very much a work in progress. If you’d like to contribute, submit a PR and mention @cweagans forreview.
Developer(s) | Ken Arnold |
---|---|
Repository | |
Operating system | Unix and Unix-like |
Type | Programming tool(Specifically: Code navigation tool) |
License | BSD |
Ctags is a programming tool that generates an index (or tag) file of names found in source and header files of various programming languages to aid code comprehension. Depending on the language, functions, variables, class members, macros and so on may be indexed. These tags allow definitions to be quickly and easily located by a text editor, a code search engine, or other utility. Alternatively, there is also an output mode that generates a cross reference file, listing information about various names found in a set of language files in human-readable form.
The original Ctags was introduced in BSD Unix 3.0 and was written by Ken Arnold, with Fortran support by Jim Kleckner and Pascal support by Bill Joy. It is part of the initial release of Single Unix Specification and XPG4 of 1992.
Editors that support ctags[edit]
Tag index files are supported by many source code editors, including:
- CodeLite (as its tag indexer for code completion)
- Cloud9 IDE (uses it internally but does not expose it)
- Emacs and XEmacs
- Far Manager (via Ctags Source Navigator plugin)
- Gedit (via gedit-symbol-browser-plugin)
- jEdit (via plugins CodeBrowser, Tags, ClassBrowser, CtagsSideKick, or Jump)
- mcedit (Midnight Commander builtin editor)
- Notepad++ (via OpenCTags plug-in)
- TextMate (via CodeBrowser-PlugIn)
- vi (and derivatives such as Elvis, Nvi, Vim, vile, etc.)
Variants of ctags[edit]
There are a few other implementations of the ctags program:
Etags[edit]
GNU Emacs comes with two ctags utilities, etags and ctags, which are compiled from the same source code. Etags generates a tag table file for Emacs, while the ctags command is used to create a similar table in a format understood by vi. They have different sets of command line options: For those options which only make sense for vi style tag files produced by the ctags command, etags could not recognize them and would ignore them.[1]
Exuberant Ctags[edit]
Exuberant Ctags, written and maintained by Darren Hiebert until 2009,[2] was initially distributed with Vim, but became a separate project upon the release of Vim 6. It includes support for Emacs and
etags
compatibility.[3][4]Exuberant Ctags includes support for over 40 programming languages with the ability to add support for even more using regular expressions.
Universal Ctags[edit]
Universal Ctags is a fork of Exuberant Ctags, with the objective of continuing its development. A few parsers are rewritten to better support the languages.[5]
Language-specific[edit]
Hasktags creates ctags compatible tag files for Haskell source files.[6] It includes support for creating Emacs etags files.[7] Ultraman fighting evolution 3 ps2 iso converter.
![Ctags Ctags](https://www.ultraedit.com/assets/images/powertips/ue/ctags_projstgs.png)
jsctags is a ctags-compatible code indexing solution for JavaScript.[8] It is specialized for JavaScript and uses the CommonJS packaging system. It outperforms Exuberant Ctags for JavaScript code, finding more tags than the latter.[9]
Tags file formats[edit]
There are multiple tag file formats. Some of them are described below. In the following, x## represents the byte with hexadecimal representation ##. Every line ends with a line feed (LF, n = x0A).
Ctags and descendants[edit]
The original ctags and the Exuberant/Universal descendants have similar file formats:[10]
Ctags[edit]
This is the format used by vi and various clones. The tags file is normally named 'tags'.
The tags file is a list of lines, each line in the format:
The fields are specified as follows:
- {tagname} – Any identifier, not containing white space
- t – Exactly one tab (x0b) character, although many versions of vi can handle any amount of white space.
- {tagfile} – The name of the file where {tagname} is defined, relative to the current directory
- {tagaddress} – An ex mode command that will take the editor to the location of the tag. For POSIX implementations of vi this may only be a search or a line number, providing added security against arbitrary command execution.
The tags file is sorted on the {tagname} field which allows for fast searching of the tags file.
Extended Ctags[edit]
This is the format used by Vim's Exuberant Ctags and Universal Ctags. These programs can generate an original ctags file format or an extended format that attempts to retain backward compatibility.
The extended tags file is a list of lines, each line in the format:
The fields up to and including {tagaddress Express scribe 5.63 keygen 2017. } are the same as for ctags above.
Optional additional fields are indicated by square brackets ('[.]') and include:
- ;' – semicolon + double quote: Ends the {tagaddress} in a way that looks like the start of a comment to vi or ex.
- {tagfield} – extension fields: tab separated 'key:value' pairs for more information.
Ctags Mac Os Install
This format is compatible with non-POSIX vi as the additional data is interpreted as a comment. POSIX implementations of vi must be changed to support it, however.[10]
Etags[edit]
This is the format used by Emacs etags. The tags file is normally named 'TAGS'.
The etags files consists of multiple sections—one section per input source file. Sections are plain-text with several non-printable ascii characters used for special purposes. These characters are represented as bracketed hexadecimal codes below.
A section starts with a two line header (the first two bytes make up a magic number):
The header is followed by tag definitions, one definition per line, with the format:
{tagname}x01 can be omitted if the name of the tag can be deduced from the text at the tag definition.
Example[edit]
Given a single line test.c source code:
The TAGS (etags) file would look like this:
The tags (ctags) file may look like:
or more flexibly using a search:
Ctags For Macbook
See also[edit]
References[edit]
- ^
etags.emacs(1)
– Linux General Commands Manual - ^'Exuberant Ctags'. ctags.sourceforge.net.
- ^'Vim documentation: version6: ctags-gone'. Retrieved 2007-04-28.
- ^
etags.ctags(1)
– Linux General Commands Manual - ^'Universal Ctags Documentation'. Retrieved 2018-08-02.
- ^'GHC documentation: Other Haskell utility programs'. Retrieved 2010-03-05.
- ^'hasktags: Produces ctags 'tags' and etags 'TAGS' files for Haskell programs'. Retrieved 2010-03-05.
- ^'pcwalton github repository for jsctags'. Archived from the original on 2010-08-22. Retrieved 2016-09-10.
- ^Patrick Walton. 'Introducing jsctags'. Retrieved 2010-05-25.
- ^ ab'Proposal for extended Vi tags file format'. Retrieved 2007-06-30.
External links[edit]
The Wikibook Guide to Unix has a page on the topic of: Commands |
Exuberant Ctags
ctags
: create a tags file – Commands & Utilities Reference, The Single UNIX Specification, Issue 7 from The Open Group
Ctags For Mac Download
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Ctags&oldid=972397004'