Skip to content

Instantly share code, notes, and snippets.

@nazgob
Created January 6, 2012 13:44
Show Gist options
  • Save nazgob/1570678 to your computer and use it in GitHub Desktop.
Save nazgob/1570678 to your computer and use it in GitHub Desktop.
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 https://workshops.thoughtbot.com/vim video by @r00k, thanks man!
@domoench
Copy link

👍

@hdfelix
Copy link

hdfelix commented Jun 19, 2019

Still helpful!

@nazgob
Copy link
Author

nazgob commented Jun 20, 2019

Still helpful!

amazing, it's been 8 years! <3

@42lan
Copy link

42lan commented Jul 28, 2019

Thanks!

@aaboutaka
Copy link

Thanks man!

@29sohil89
Copy link

Much Appreciated !! Thanks

@cesar-turn
Copy link

u rock!

@SebastianTramper
Copy link

Thanks it worked for me

@NashMiao
Copy link

Thanks!

@ehrktia
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.

@deividaspetraitis
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: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
 Optional compiled features: +wildcards, +regex

Solution is to setup currently maintained ctags implementation ( https://github.com/universal-ctags/ctags ), install steps are provided according the platform in their website, specifically for MAC can be found here: https://docs.ctags.io/en/latest/osx.html#building-with-homebrew

@izikandrw
Copy link

nice job man!

@irvinghu07
Copy link

Saved My Day! Thanks!

@kingofice007
Copy link

Thanks!

@vijaykiran225
Copy link

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

@dwolrdcojp
Copy link

Thanks it worked for me.

@wtffqbpl
Copy link

thanks

@zebhuang
Copy link

zebhuang commented May 8, 2021

thanks!

@HarrisonHemstreet
Copy link

YOU. ARE. THE. MAN.

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

@reneruhr
Copy link

Thanks

@ehzawad
Copy link

ehzawad commented Nov 4, 2021

Thanks!

@houxiab
Copy link

houxiab commented Nov 22, 2021

Thank you very much.

@sateesh12
Copy link

Helps even after 10 years , thank you.

@w7shdev
Copy link

w7shdev commented Mar 14, 2022

Thanks!

@danilol
Copy link

danilol commented Mar 22, 2022

One more here 🙌 ! Thank you!

@alinauf
Copy link

alinauf commented Apr 16, 2022

Thanks!

@StefanCobeli
Copy link

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

Worked perfectly for me as well.

@realshovanshah
Copy link

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: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
 Optional compiled features: +wildcards, +regex

Solution is to setup currently maintained ctags implementation ( https://github.com/universal-ctags/ctags ), install steps are provided according the platform in their website, specifically for MAC can be found here: https://docs.ctags.io/en/latest/osx.html#building-with-homebrew

I also ended up using this implementation for Clojure support, thanks for the help.

@vysogot
Copy link

vysogot commented Mar 6, 2023

Thanks!

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