#
# Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003
#	Tama Communications Corporation
#
# This file is part of GNU GLOBAL.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# *
# Configuration file for GNU GLOBAL source code tag system.
#
# GLOBAL doesn't need 'gtags.conf' because it has the default values in it.
# But if you have this file as '/etc/gtags.conf' or "$HOME/.globalrc"
# then GLOBAL system overwrite default values with the values from the file.
#
# 'gtags.conf' is termcap style file.
# 'default' is default target.
# You can specify target with GTAGSLABEL environment variable.
#
# Variable 'suffixes' is obsoleted but is acceptable because it is needed
# for plugged-in parser. If you use gtags-parser(1) then you should use
# variable 'langmap' instead.
#
default:\
	:tc=gtags:tc=htags:
#---------------------------------------------------------------------
# Configuration for gtags(1)
# See gtags(1).
#---------------------------------------------------------------------
common:\
	:skip=GPATH,GTAGS,GRTAGS,GSYMS,HTML/,HTML.pub/,html/,tags,TAGS,ID,y.tab.c,y.tab.h,.notfunction,cscope.out,.gdbinit,SCCS/,RCS/,CVS/,CVSROOT/,{arch}/,.svn/,.git/,.cvsrc,.cvsignore,.gitignore,.cvspass,.cvswrappers,.deps/,autom4te.cache/,.snprj/:\
	:langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.cpp.cxx.hxx.hpp.C.H,php\:.php.php3.phtml:
#
# [gtags-parser]
#
# This command is distributed as part of GLOBAL.
# The %s is replaced with the path of source file.
# You need not use --langmap=xxx option. Gtags-parser(1) get the value
# from environment variable.
#
gtags:\
	:tc=common:\
	:GTAGS=gtags-parser -dt %s:\
	:GRTAGS=gtags-parser -dtr %s:\
	:GSYMS=gtags-parser -dts %s:
#
# [Exuberant Ctags]
#
# This ctags is distributed as a part of Vim editor.
#
# [Installation]
# % cd /src/ctags
# % make
# # cp ctags /usr/local/bin/ctags-exuberant
#
ctags|Exuberant Ctags|ctags by Darren Hiebert:\
	:tc=common:\
	:suffixes=s,a,sa,asm,C,H,cpp,cxx,hxx,hpp,cc,c,h,y,rb:\
	:extractmethod:\
	:GRTAGS=gtags-parser --langmap=java\:.rb -dtr  %s:\
	:GSYMS=gtags-parser --langmap=java\:.rb -dts  %s:\
	:GTAGS=/usr/bin/ctags-exuberant -xu %s | sed -e 's/singleton method/method/' | perl -ne '\
		if (/^operator \\S+\\s+function\\s/) { s/^operator //; }\
		($name, $type, $no, $path, $line) = split(/[ \\t]+/, $_, 5);\
		printf(STDOUT "%-16s %4d %-16s %s", $name, $no, $path, $line);':
#---------------------------------------------------------------------
# Configuration for htags(1)
# Let's paint hypertext with your favorite colors!
# See htags(1).
#---------------------------------------------------------------------
htags:\
	:body_begin=:body_end=:\
	:table_begin=:table_end=
:\ :title_begin=

:title_end=

:\ :comment_begin=:comment_end=:\ :sharp_begin=:sharp_end=:\ :brace_begin=:brace_end=:\ :warned_line_begin=:warned_line_end=:\ :reserved_begin=:reserved_end=:script_alias=/cgi-bin/:\ :ncol#4:tabs#8:normal_suffix=html:gzipped_suffix=ghtml:\ :definition_header=no: # # Use rtags for extracting Ruby sources info # I am using a modified rtags file that supports '-x' parameter to # dump a cross reference file format # # We need to change some of the output that rtags dumps # # Module::Submodule is NOT found by global (don't know why) # Module:Submodule IS found # So we replace :: with : # # Also, dotnames are not allowed in tags # So, when rtag parses this # class User ; def self.validate ; end ; end # as: # User.validate line_no file_name line # global doesn't find it with `global -c User` # So we need to replace any dots in the firts column with # # User#validate line_no file_name line # # So we need to to this: # rtags -x %s | awk '{ sub(/^::/, "") ; sub(/::/, ":"); sub(/\\./, "#", $1); print}' # rtags:\ :tc=common:\ :suffixes=s,a,sa,asm,C,H,cpp,cxx,hxx,hpp,cc,c,h,y,rb:\ :extractmethod:\ :GTAGS=rtags -x %s | awk '{ sub(/^\:\:/, "") ; sub(/\:\:/, "\:"); sub(/\\./, "#", $1); print}':\ :GRTAGS=gtags-parser --langmap=java\:.rb -dtr %s:\ :GSYMS=gtags-parser --langmap=java\:.rb -dts %s: #