Unfortunately, homebrew does not support --with-universal-ctags option
for global (on the state of April 2018)
The reason is that universal-ctags is not officially released yet.
Run brew install --HEAD universal-ctags/universal-ctags/universal-ctags
(See https://github.com/universal-ctags/homebrew-universal-ctags repo)
If you're on macOS, you might have an old ctags installed with command line tools for XCode.
To fix this, simply run alias ctags="
brew --prefix/bin/ctags"
To check that universal-ctags installed correctly, run the ctags --version
command.
You must see the following output:
Universal Ctags 0.0.0(8e09804), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Apr 8 2018, 10:06:38
URL: https://ctags.io/
Download GNU Global from https://www.gnu.org/software/global/download.html Uncompress and configure it with universal ctags
./configure --with-universal-ctags=/usr/local/bin/ctags
and then
make & make install
To check that gtags was installed correctly, you could run which gtags
.
It must point out to /usr/local/bin/gtags
Now, running the gtags --gtagslabel=new-ctags
should not produce any errors!