Sublime Text – CTags Package Errors

My co-worker Eric has been pushing me to get into Laravel and since I’m at PHP World I figured, what better time to get into it. After opening up a project and looking at all the classes that extend other classes, like:

class App extends Facade {
    // things and stuff

… I was curious how all of these tied together so I had to do a “Find” on the folder to get to where the origin was located. This became tedious, so Eric, who was hovering over my shoulder recommended the CTags package for Sublime Text 3 (the champion of text editors, I’ll fight you if you say otherwise…seriously let’s rumble. Is this too much text for inside parentheses?

Anyway, after finally getting package control installed (blog post about that later) I searched for and found the CTags package.

I fired it up to build the tags by hitting Ctrl+t,Ctrl+r then applied the CTags to my directory. Or at least I thought that was going to happen. Instead I got this error message:

/Applications/ illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file

“Huzzah, I hath broken another thing!” I exclaimed. Some googling led to a GitHub thread talking about the error. I tried all those things. Restarted Sublime Text, nothing. Went to Terminal and typed in ‘ctags’ and bingo, non-existent.

Still in Terminal I typed:

brew install ctags

table_flipBeep, boop, bleep, it went to work installing ctags onto my computational device. Once installed I restarted Sublime Text (3rd time total in this process). ctrl+t,ctrl+r, enter. Same error.

After checking terminal with a

which ctags

it came to pass that the location for ctags was jacked up.

At this point everything went black and when I woke up I found CTags.sublime-settings open in ST3 with the following code.

   "command": "/usr/local/bin/ctags",

I restarted ST3 (#4) and tried it one more time. Boom, building tags. After that it was easy, just click inside the Class you want to explore, then hit ctrl+t,ctrl+t and it takes you to that file, opening in a new ST3 tab.

Good gravy, was it all worth it? In the long run yes. I’m looking forward to using it moving forward with Laravel.

Notify of
Inline Feedbacks
View all comments

John Hartley is a Director of Product Engineering at Beam Dental in Columbus, OH. With 7+ years of leadership experience he has worked in startups, agencies, and began his career as a freelance Front End Developer. Always looking to iterate, this blog is a place for him to share his knowledge as well as hone his craft, challenge assumptions, and build a strong base of leadership and management knowledge. Connect with him on LinkedIn

Would love your thoughts, please comment.x