Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exuberant Ctags on Mac

I'm currently using vim for my PHP development. A few weeks ago I bought myself a mac, and wanted to re-generate my tags for a new Zend Framework version.

I used the following script in the past (linux machine) to generate the tags:

#!/bin/bash cd ~/www/ZF/      ctags-exuberant -f ~/.vim/tags/zend \ -h ".php" -R \ --exclude="\.svn" \ --totals=yes \ --tag-relative=yes \ --PHP-kinds=+cf \ --regex-PHP='/abstract class ([^ ]*)/\1/c/' \ --regex-PHP='/interface ([^ ]*)/\1/c/' \ --regex-PHP='/(public |static |abstract |protected |private )+function ([^ (]*)/\2/f/' 

You can see I used the "ctags-exuberant" command. The problem is that this isn't found on my system (mac). I only have the ctags command. I tried installing the newest version of the ctags library (http://ctags.sourceforge.net/) but didn't gave me that command.

The ctags command does not have the same parameters as the ctags-exuberant. So 2 questions:

  • What's the difference between the 2 commands?
  • How can I install ctags-exuberant or use the normal ctags command for PHP?

Thanks! Ward

like image 956
Presnus Avatar asked Jul 24 '11 18:07

Presnus


People also ask

How do I install exuberant ctags?

To install Exuberant Ctags: Go to the following website and download the latest package labeled Source and binary for Windows: http://ctags.sourceforge.net. If the latest binary package is not available for download, go to the Download section and download the binary package for the previous version of Ctags.

What is exuberant ctags?

Exuberant Ctags is a multilanguage reimplementation of the Unix ctags utility. Ctags generates an index of source code definitions which is used by numerous editors and utilities to instantly locate the definitions.

Does ctags work with Python?

Ctags supports indexing of many modern programming languages. Python is a powerful scriptable dynamic language. Using Python to access Ctags index file is a natural fit in extending an application's capability to examine source code. This project wrote a wrapper for readtags.


2 Answers

Install Homebrew, then do:

brew install ctags 
like image 96
daniel Avatar answered Sep 21 '22 22:09

daniel


Install MacPorts, then do:

port install ctags 
like image 31
romainl Avatar answered Sep 23 '22 22:09

romainl