Skip to content

Instantly share code, notes, and snippets.

@davidoram
Last active March 2, 2020 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidoram/6fd0a68ba82349e53147 to your computer and use it in GitHub Desktop.
Save davidoram/6fd0a68ba82349e53147 to your computer and use it in GitHub Desktop.
Shell script to build ctags for rails project, with details on how to configure your Atom editor to use
#!/bin/bash
#
# Generate the ctags for a rails/ruby project in the following files:
#
# .tags contains the tags for the project itself
# .tags_bundler contains the tags for all libraries
#
# The idea is your editor can rebuild the .tags file on file save
# which should be quite quick
#
# If you have OS X + Atom editor setup as follows:
#
# $ brew install ctags
#
# Install 'atom-ctags' plugin
# Configure as follows:
#
# - Build timeout: 15000
# - Cmd: /usr/local/bin/ctags
# - Cmd args: --exclude=.git --exclude=log -f .tags --fields=+KSn -R .
# - Extra Tag file: .tags_bundler
#
#
ctags --exclude=.git --exclude=log --fields=+KSn -f .tags -R .
ctags --exclude=.git --exclude=log --fields=+KSn -f .tags_bundler -R $(bundle list --paths)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment