Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.

@LuZhang-Lou

This comment has been minimized.

Copy link

@LuZhang-Lou LuZhang-Lou commented Apr 19, 2016

wonderful!

@zbobyuan

This comment has been minimized.

Copy link

@zbobyuan zbobyuan commented Dec 31, 2016

great!

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