[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ctags/etags: rc file?
From: |
Masatake YAMATO |
Subject: |
Re: ctags/etags: rc file? |
Date: |
Thu, 20 Nov 2014 21:19:12 +0900 (JST) |
Hi,
Yes, ctags has such ability.
--options=file
Read additional options from file. The file should contain one
option per line. As a special case, if --options=NONE is spec‐
ified as the first option on the command line, it will disable
the automatic reading of any configuration options from either
a file or the environment (see FILES).
There is more advanced feature.
Look at my work at fishman/ctags:
https://github.com/fishman/ctags/blob/master/docs/f-optlib.rst
Optlib may be the feature you want.
fishman/ctags was a branch of exuberant-ctags. However, these days
fishman/ctags people are talking about merging the result into
exuberant-ctags:
https://github.com/fishman/ctags/issues/101
Masatake YAMATO
> Would it be possible for ctags/etags to read a simple .etags (or
> something) file that contains the command line arguments? The reason
> for it is that often projects have a bunch of default arguments that
> are being passed to etags, which are not just regexps and it is
> annoying to keep track of them at times.
>
> If .etags (one argument per line) contains,
>
> --language=none
> --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/'
> --regex='/###key \(.*\)/\1/'
> --regex='/[ \t]*global[ \t].*/'
> *.m
>
> And then issuing "etags -Z" (or some other sensible short option) it
> would be equivalent to running,
>
> etags --language=none --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[
> \t]*(/\1/' --regex='/###key \(.*\)/\1/' --regex='/[ \t]*global[ \t].*/' *.m
>