From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 29E8DBC75 for ; Fri, 25 Feb 2005 19:59:50 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1PIxnoC000856 for ; Fri, 25 Feb 2005 19:59:49 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA22461 for ; Fri, 25 Feb 2005 19:59:49 +0100 (MET) Received: from bernache.ens-lyon.fr (bernache.ens-lyon.fr [140.77.167.10]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1PIxmoi000849 for ; Fri, 25 Feb 2005 19:59:49 +0100 Received: by bernache.ens-lyon.fr (Postfix, from userid 103) id 5DFB37ABD4D; Fri, 25 Feb 2005 19:59:48 +0100 (CET) Received: from [140.77.129.98] (unknown [140.77.129.98]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by bernache.ens-lyon.fr (Postfix) with ESMTP id BEAC47ABD45; Fri, 25 Feb 2005 19:59:47 +0100 (CET) Message-ID: <421F74AE.40604@ens-lyon.fr> Date: Fri, 25 Feb 2005 19:55:42 +0100 From: David Baelde Reply-To: david.baelde@ens-lyon.org User-Agent: Mozilla Thunderbird 1.0 (X11/20041231) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Cc: Olivier Grisel Subject: Re: [Caml-list] New Ocaml indentation for VIm References: <42058167.4030700@ens-lyon.fr> <421EFC68.6060002@ensta.org> In-Reply-To: <421EFC68.6060002@ensta.org> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA85B3C3847F97807A97286D3" X-Miltered: at nez-perce with ID 421F75A5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 421F75A4.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ens-lyon:01 caml-list:01 ocaml:01 vim:01 wrote:01 foo:01 foo:01 tuareg:01 vim:01 luther:01 ocaml:01 markus:01 mottl:01 minor:01 annotations:01 X-Attachments: type="application/pgp-signature" name="signature.asc" name="signature.asc" X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA85B3C3847F97807A97286D3 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Olivier Grisel wrote: > I have just tried it for a few seconds and I found the following > identation a bit too wide: > > let f = function > | [] -> foo > | x::l -> bar That was a known issue, I had a (not so visible) page on my website about that. It was the "relative vs. incremental dilemn"... With a naive implementation, I couldn't base the indentation of line 2 on the beginning of line 1, so I based it on the keyword "function". Here is an idea of what you get if you base the indentation on the beginning of the line of the base keyword, without taking care: let _ = something first_arg second_one (if a then foo bar else bar foo) This week I was away from the network, but kept coding a bit... I tried to figure out what tuareg does (cannot read that amount of elisp), and did the same in OMLet. I will release it soon on vim.org. I also added customization. The current implementation base the indentation on the beginning of the line, or the last "(", "[" or "{" before the keyword, on the same line, if there's one. As far as I've tried, it's a good trick. The 4 spaces proposed by S. Luther a nice compromise between the strict old indentation and the tricky and meaningless (but nice) new indentation. But I think it would require more work for me, and for the script, which is already so slow... And I don't think people want it so much. Regarding integration of omlet with the official ocaml support, as far as I'm concerned I think it could be done within a few months, when OMLet will be considered stable. But Markus Mottl didn't give me his advice. There's only a very minor issue about code annotations, because I don't like being warned that my VIm is not compiled with python support everytime I open a OCaml file, and I'd like to find a good solution without Python. Also, I didn't work at all on .mll and .mly support. Packaging omlet separately is OK. Samuel Mimram could do that. I would just suggest to wait a bit. Hope you'll like release 0.7! -- David --------------enigA85B3C3847F97807A97286D3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCH3Suwd3I+DcVnIIRAjCFAJwMIaT9Xpm9b1KJjhrwPOjTUX7AMwCfSL5H r/AYoHcEuRcsFFA3+UKKKlI= =qUnX -----END PGP SIGNATURE----- --------------enigA85B3C3847F97807A97286D3--