caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocaml/vim/tags
@ 2001-07-11 23:58 John Eikenberry
  2001-07-12  7:14 ` Jean-Christophe Filliatre
  0 siblings, 1 reply; 3+ messages in thread
From: John Eikenberry @ 2001-07-11 23:58 UTC (permalink / raw)
  To: caml-list


I'm looking for a tagging program for use with ocaml and vim. I dug through
the archives and found references to 3 different tag programs; otags,
ocamltags and mletags. Otags' tag files don't seem to be compatible with
vim, ocamltags is a emacs lisp script and mletags seems to never have been
ported beyond caml-light. That is... none of them work.

Other suggestions? 

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.

Thanks in advance for any help.

-- 

John Eikenberry
[jae@zhar.net - http://zhar.net]
______________________________________________________________
"A society that will trade a little liberty for a little order
 will deserve neither and lose both."
                                          --B. Franklin
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] ocaml/vim/tags
  2001-07-11 23:58 [Caml-list] ocaml/vim/tags John Eikenberry
@ 2001-07-12  7:14 ` Jean-Christophe Filliatre
  2001-07-12  7:46   ` John Eikenberry
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Christophe Filliatre @ 2001-07-12  7:14 UTC (permalink / raw)
  To: John Eikenberry; +Cc: caml-list


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] ocaml/vim/tags
  2001-07-12  7:14 ` Jean-Christophe Filliatre
@ 2001-07-12  7:46   ` John Eikenberry
  0 siblings, 0 replies; 3+ messages in thread
From: John Eikenberry @ 2001-07-12  7:46 UTC (permalink / raw)
  To: caml-list


The version of etags I have on my system (5.0.1) doesn't support --regex
arguments. It supports --regex-[lang] where you have to define [lang] with
--langdef. I messed around a bit trying to get it working after finding it
in the archives without results.

I recieved a simple perl script from Christian Lindig that does the basics
and will work for now.

Thanks.

Jean-Christophe Filliatre wrote:

> 
> 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,

-- 

John Eikenberry
[jae@zhar.net - http://zhar.net]
______________________________________________________________
"A society that will trade a little liberty for a little order
 will deserve neither and lose both."
                                          --B. Franklin
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-12  7:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-11 23:58 [Caml-list] ocaml/vim/tags John Eikenberry
2001-07-12  7:14 ` Jean-Christophe Filliatre
2001-07-12  7:46   ` John Eikenberry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).