ctags is more compatible with OSX and homebrew.

This commit is contained in:
Kyle West 2012-01-24 13:42:00 -05:00
parent c0d8c402c3
commit ed5e906906
2 changed files with 13 additions and 10 deletions

View File

@ -3,8 +3,12 @@
# A script to run ctags on all .rb files in a project. Can be run on
# the current dir, called from a git callback, or install itself as a
# git post-merge and post-commit callback.
# More info here: http://vimeo.com/3989493
#
# This fork will work with homebrew installed ctags on OS X ("brew install ctags")
# Source: https://gist.github.com/1564787
CTAGS = '/opt/local/bin/ctags'
CTAGS = '/usr/local/bin/ctags'
HOOKS = %w{ post-merge post-commit post-checkout }
HOOKS_DIR = '.git/hooks'
@ -19,7 +23,7 @@ end
def run_tags(dir)
if File.executable?(CTAGS) and File.writable?(dir)
%x{find #{dir} -name \\*.rb | #{CTAGS} -e -f #{dir}/TAGS -L - 2>>/dev/null}
%x{find #{dir} -name \\*.rb | #{CTAGS} -f #{dir}/TAGS -L - 2>>/dev/null}
else
$stderr.print "FAILED to write TAGS file to #{dir}\n"
end

View File

@ -1,5 +1,5 @@
" set up automatic ctags
let Tlist_Ctags_Cmd='/opt/local/bin/ctags'
let Tlist_Ctags_Cmd='ctags'
" taglist defaults
let Tlist_Auto_Highlight_Tag=0
@ -16,4 +16,3 @@ let Tlist_Show_One_File = 1
let Tlist_Enable_Fold_Column = 0
let Tlist_Display_Prototype = 0
let Tlist_Use_SingleClick = 1