Tip 102 | Meet ctags |
To use Vim’s tag navigation features, we must first install ctags. Then we’ll learn how to execute the program and understand the index that it generates.
Installing Exuberant Ctags
Linux users should be able to get ctags with their package manager. For example, on Ubuntu you can install it by running the following:
=> | $ sudo apt-get install exuberant-ctags |
OS X ships with a BSD program called ctags. Beware: this is not the same thing as Exuberant Ctags. You’ll have to install Exuberant Ctags yourself. Using homebrew, it’s as easy as this:
=> | $ brew install ctags |
Check that ctags is installed and that it’s in your path by running the following:
=> | $ ctags --version |
<= | Exuberant Ctags 5.8, Copyright (C) 1996-2009 ... |
Get Practical Vim, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.