Skip to content

Instantly share code, notes, and snippets.

Embed
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 https://workshops.thoughtbot.com/vim video by @r00k, thanks man!
@gooooloo
Copy link

gooooloo commented May 31, 2014

Thanks man. It helps.

@wayneseymour
Copy link

wayneseymour commented Jun 10, 2014

This made my night! 👍

@hunterlodge
Copy link

hunterlodge commented Jun 15, 2014

great. it also helps me out. Thanks

@jpowell1218
Copy link

jpowell1218 commented Oct 4, 2014

Much appreciated.

@HackRanger
Copy link

HackRanger commented Oct 16, 2014

Thanks :)

@umangjeet
Copy link

umangjeet commented Nov 7, 2014

Thanks for this one, was struggling with this one since long

@conorliv
Copy link

conorliv commented Mar 12, 2015

Just what I was looking for!

@yuyan2do
Copy link

yuyan2do commented Apr 22, 2015

Thanks :)

@balaclark
Copy link

balaclark commented Jun 12, 2015

thanks!

@JonShepChen
Copy link

JonShepChen commented Jul 6, 2015

Awesome, thanks

@wynnej1983
Copy link

wynnej1983 commented Aug 28, 2015

thanks!

@rodlps22
Copy link

rodlps22 commented Oct 5, 2015

Thanks man!!! \o/

@tangyanlin
Copy link

tangyanlin commented Oct 19, 2015

Thanks :)

Copy link

ghost commented Oct 24, 2015

Thanks!

@sumardi
Copy link

sumardi commented Nov 17, 2015

Awesome. Thanks!

@rporrasluc
Copy link

rporrasluc commented Dec 3, 2015

This was useful, thanks!

@hbweb
Copy link

hbweb commented Dec 17, 2015

Great stuff - appreciated this command

Copy link

ghost commented Jan 1, 2016

It helps! 👍

@yuqiandoudou
Copy link

yuqiandoudou commented Jan 15, 2016

谢谢了

@tonatiuh
Copy link

tonatiuh commented Feb 20, 2016

Thanks!

@gccpacman
Copy link

gccpacman commented Mar 18, 2016

Works for me, thanks.

@ahcometrue
Copy link

ahcometrue commented Mar 25, 2016

Thanks!

@louis-she
Copy link

louis-she commented Apr 6, 2016

Thanks!

@ss998
Copy link

ss998 commented Apr 8, 2016

That's right, thanks!

@hvenables
Copy link

hvenables commented Apr 11, 2016

Thanks

@DmitryDD
Copy link

DmitryDD commented Apr 12, 2016

thx!

@David-99
Copy link

David-99 commented Apr 18, 2016

Thank you!

@minkikim89
Copy link

minkikim89 commented May 1, 2016

Thank you!

@pragmat1c1
Copy link

pragmat1c1 commented May 1, 2016

Perfect! Thanks!

@viswamy
Copy link

viswamy commented May 31, 2016

Awesome..

@calam1
Copy link

calam1 commented Sep 13, 2016

Thanks!

@mingrammer
Copy link

mingrammer commented Sep 13, 2016

Thanks!

@johnjhpark
Copy link

johnjhpark commented Sep 14, 2016

Great help! thanks!

@M-Kepler
Copy link

M-Kepler commented Oct 6, 2016

It works ,thank you

@surahmans
Copy link

surahmans commented Oct 27, 2016

Thank you! 👍

@bernstein7
Copy link

bernstein7 commented Nov 12, 2016

Awesome 👍

@chinmayv
Copy link

chinmayv commented Nov 23, 2016

Thanks!

@sub-maxims
Copy link

sub-maxims commented Nov 23, 2016

Thanks man! 👍

@lukalopusina
Copy link

lukalopusina commented Dec 1, 2016

Thanks!

@fonlang
Copy link

fonlang commented Dec 29, 2016

no working in Vim.

@shuizhongyueming
Copy link

shuizhongyueming commented Jan 2, 2017

Thanks

@amritendu-mondal
Copy link

amritendu-mondal commented Feb 5, 2017

Thanks a lot. Also we need to add '-e' option to load tag table in emacs.

@luyangco
Copy link

luyangco commented Feb 10, 2017

Much appreciated, thank you.

@yongbol
Copy link

yongbol commented Feb 24, 2017

Thanks, so helpful

@alexismansilla
Copy link

alexismansilla commented Mar 8, 2017

Thanks.

@josfaber
Copy link

josfaber commented Mar 23, 2017

Top. Thanks!

@commandocamel
Copy link

commandocamel commented Apr 9, 2017

🥇

@lyveng
Copy link

lyveng commented Jun 26, 2017

Thanks

@codercotton
Copy link

codercotton commented Jun 28, 2017

Still helping 6 years later, thanks!

@34code
Copy link

34code commented Jul 14, 2017

thanks!

@westonplatter
Copy link

westonplatter commented Aug 31, 2017

Thank you

@dkeesey
Copy link

dkeesey commented Oct 17, 2017

Thank you!

@jason316
Copy link

jason316 commented Nov 5, 2017

how to puts tags file into .gitignore? suppose I have create a global .gitignore file in my repository, and follow the instruction above already. I am new to command line scripting and I did google it but was unable to find an answer.

@luoxugeng
Copy link

luoxugeng commented Dec 7, 2017

3Q

@EdmundsEcho
Copy link

EdmundsEcho commented Dec 18, 2017

Thank you.

@Lazare-42
Copy link

Lazare-42 commented Jan 2, 2018

Thank you :)

@mpise
Copy link

mpise commented Jan 16, 2018

Thank you.

@acarist
Copy link

acarist commented Feb 1, 2018

thank you. (i'm gonna put alias to bashrc or zshrc)

@zehn
Copy link

zehn commented Feb 9, 2018

thank you

@sjsupersumit
Copy link

sjsupersumit commented Feb 13, 2018

Thanks. This helped.

@timbuckley
Copy link

timbuckley commented Feb 18, 2018

Thank you!

@movefast
Copy link

movefast commented Feb 18, 2018

Thank you!

@sharik709
Copy link

sharik709 commented Feb 21, 2018

Thanks

@joelturnbull
Copy link

joelturnbull commented May 18, 2018

Love you <3

@eunjicious
Copy link

eunjicious commented Jul 19, 2018

Thanks!!

@TedaLIEz
Copy link

TedaLIEz commented Feb 15, 2019

Thanks, this solves issues in VS code when using ctags to build symbols :)

@cstml
Copy link

cstml commented Feb 23, 2019

Cheers dude!

@gharieni
Copy link

gharieni commented Mar 10, 2019

Thanks !

@udayawati
Copy link

udayawati commented Mar 19, 2019

Thanks

@ehrktia
Copy link

ehrktia commented Apr 24, 2019

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

@domoench
Copy link

domoench commented May 20, 2019

👍

@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

@4slan
Copy link

4slan commented Jul 28, 2019

Thanks!

@aaboutaka
Copy link

aaboutaka commented Aug 15, 2019

Thanks man!

@29sohil89
Copy link

29sohil89 commented Aug 16, 2019

Much Appreciated !! Thanks

@cesar-turn
Copy link

cesar-turn commented Sep 3, 2019

u rock!

@SebastianTramper
Copy link

SebastianTramper commented Mar 14, 2020

Thanks it worked for me

@NashMiao
Copy link

NashMiao commented Mar 31, 2020

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

izikandrw commented Jul 29, 2020

nice job man!

@irvinghu07
Copy link

irvinghu07 commented Nov 30, 2020

Saved My Day! Thanks!

@kingofice007
Copy link

kingofice007 commented Dec 1, 2020

Thanks!

@vijaykiran225
Copy link

vijaykiran225 commented Jan 20, 2021

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

@dwolrdcojp
Copy link

dwolrdcojp commented Jan 31, 2021

Thanks it worked for me.

@wtffqbpl
Copy link

wtffqbpl commented Mar 31, 2021

thanks

@zebhuang
Copy link

zebhuang commented May 8, 2021

thanks!

@HarrisonHemstreet
Copy link

HarrisonHemstreet commented May 11, 2021

YOU. ARE. THE. MAN.

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

@reneruhr
Copy link

reneruhr commented Aug 25, 2021

Thanks

@ehzawad
Copy link

ehzawad commented Nov 4, 2021

Thanks!

@hougr
Copy link

hougr commented Nov 22, 2021

Thank you very much.

@sateesh12
Copy link

sateesh12 commented Dec 12, 2021

Helps even after 10 years , thank you.

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