Skip to content

Instantly share code, notes, and snippets.

@davidoram
Last active Mar 2, 2020
Embed
What would you like to do?
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