Skip to content

Instantly share code, notes, and snippets.

@iamatypeofwalrus
Last active February 11, 2019 10:17
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamatypeofwalrus/957619514b3d648dfef1 to your computer and use it in GitHub Desktop.
Save iamatypeofwalrus/957619514b3d648dfef1 to your computer and use it in GitHub Desktop.
Generate ctags for Atom (or for any other reason) on Mac os X

Why?

Atom can automagically picks up any tags file in your current directory which enables you to:

  • shift+cmd+r search for any function in your project
  • alt+cmd+down GoTo a function declaration

How

Get brew if you don't already have it. Then:

brew install ctags

You probably already have another version of ctags installed. You can check which -a ctags. We'll be using the brew install in /usr/local/bin.

In your project directory run:

/usr/local/bin/ctags -R --exclude=.git

If you're in a Rails project like I am then maybe you want to:

/usr/local/bin/ctags -R --exclude=.git --exclude=log --exclude=app/assets --exclude=vendor

You may notice I didn't include any Javascript...ahem.

GO WILD WITH RECKLESS GOTO DECLARATION ABANDON.

@longbowlu
Copy link

wonderful!

@zbobyuan
Copy link

great!

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