From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>
To: John Eikenberry <jae@zhar.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ocaml/vim/tags
Date: Thu, 12 Jul 2001 09:14:45 +0200 (MEST) [thread overview]
Message-ID: <15181.20069.221159.316790@pc803> (raw)
In-Reply-To: <20010711165803.A30954@zhar.net>
John Eikenberry writes:
>
> Oh, and I found an example using etags and its regex... but I had little
> luck with it either. Seems etags' regex features have changed quite a bit
> since 1999/01.
I don't know vim, but I'm using the following hack to get tags for
Emacs using etags, and it still works nice (of course it is not as
satisfactory as tags based on a parsing of ocaml files)
======================================================================
find . -name "*.ml*" | sort -r | xargs \
etags "--regex=/let[ \t]+\([^ \t]+\)/\1/" \
"--regex=/let[ \t]+rec[ \t]+\([^ \t]+\)/\1/" \
"--regex=/and[ \t]+\([^ \t]+\)/\1/" \
"--regex=/type[ \t]+\([^ \t]+\)/\1/" \
"--regex=/exception[ \t]+\([^ \t]+\)/\1/" \
"--regex=/val[ \t]+\([^ \t]+\)/\1/" \
"--regex=/module[ \t]+\([^ \t]+\)/\1/"
======================================================================
The 'sort -r' is used to have .mli entries appearing first, then .ml
entries. Indeed, when looking for an identifier, you usually only want
its type declaration; if you also want its code, then use C-u M-.
Hope this helps,
--
Jean-Christophe Filliatre
mailto:Jean-Christophe.Filliatre@lri.fr
http://www.lri.fr/~filliatr
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next prev parent reply other threads:[~2001-07-12 7:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-11 23:58 John Eikenberry
2001-07-12 7:14 ` Jean-Christophe Filliatre [this message]
2001-07-12 7:46 ` John Eikenberry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15181.20069.221159.316790@pc803 \
--to=jean-christophe.filliatre@lri.fr \
--cc=caml-list@inria.fr \
--cc=jae@zhar.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox