Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
#try again!
ctags -R --exclude=.git --exclude=log *
#puts tags file into you .gitignore (probably global) and you're all set!
#PS. i was inspired to install ctags by video by @r00k, thanks man!
Copy link

gharieni commented Mar 10, 2019

Thanks !

Copy link

udayawati commented Mar 19, 2019


Copy link

ehrktia commented Apr 24, 2019

Helped me in 2019 nice tip thank you very much for the help

Copy link

domoench commented May 20, 2019


Copy link

hdfelix commented Jun 19, 2019

Still helpful!

Copy link

nazgob commented Jun 20, 2019

Still helpful!

amazing, it's been 8 years! <3

Copy link

42lan commented Jul 28, 2019


Copy link

aaboutaka commented Aug 15, 2019

Thanks man!

Copy link

29sohil89 commented Aug 16, 2019

Much Appreciated !! Thanks

Copy link

cesar-turn commented Sep 3, 2019

u rock!

Copy link

SebastianTramper commented Mar 14, 2020

Thanks it worked for me

Copy link

NashMiao commented Mar 31, 2020


Copy link

ehrktia commented Apr 1, 2020

nice one thanks , recently switching from old to new machine and had to re-run all setup things.This helped me a lot.

Copy link

deividaspetraitis commented Apr 18, 2020

Despite this solution is working one thing to note, - it will install older version of ctags that might lack support for some programming languages ( in my case it was go ).
You can check version by running ctags --version once you finished following steps above and likely you will see something like:

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
 Compiled: Oct  6 2019, 20:31:35
 Addresses: <>,
 Optional compiled features: +wildcards, +regex

Solution is to setup currently maintained ctags implementation ( ), install steps are provided according the platform in their website, specifically for MAC can be found here:

Copy link

izikandrw commented Jul 29, 2020

nice job man!

Copy link

irvinghu07 commented Nov 30, 2020

Saved My Day! Thanks!

Copy link

kingofice007 commented Dec 1, 2020


Copy link

vijaykiran225 commented Jan 20, 2021

Its 2021, still the right and required solution .. Thanks .. !

Copy link

dwolrdcojp commented Jan 31, 2021

Thanks it worked for me.

Copy link

wtffqbpl commented Mar 31, 2021


Copy link

zebhuang commented May 8, 2021


Copy link

HarrisonHemstreet commented May 11, 2021


THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Copy link

reneruhr commented Aug 25, 2021


Copy link

ehzawad commented Nov 4, 2021


Copy link

hougr commented Nov 22, 2021

Thank you very much.

Copy link

sateesh12 commented Dec 12, 2021

Helps even after 10 years , thank you.

Copy link

w7shdev commented Mar 14, 2022


Copy link

danilol commented Mar 22, 2022

One more here 🙌 ! Thank you!

Copy link

alinauf commented Apr 16, 2022


Copy link

StefanCobeli commented Jun 22, 2022

Friend, you are amazing!
Thanks a lot for sharing this!

Worked perfectly for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment