From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 384A07F20B for ; Sat, 16 Feb 2013 21:34:12 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of aplusbi@gmail.com) identity=pra; client-ip=209.85.214.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="aplusbi@gmail.com"; x-sender="aplusbi@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of aplusbi@gmail.com designates 209.85.214.174 as permitted sender) identity=mailfrom; client-ip=209.85.214.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="aplusbi@gmail.com"; x-sender="aplusbi@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ob0-f174.google.com) identity=helo; client-ip=209.85.214.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="aplusbi@gmail.com"; x-sender="postmaster@mail-ob0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkCAB/sH1HRVdauk2dsb2JhbABFhkmnZzKJHQGIH3kIFg4BAQEBCQkLCRQEI4IfAQEEASMdARsSCwEDAQsGBQsaHQICIgERAQUBChIGExKHbQEDCQYMnxKLY0+Ce4N8ChknAwpZiHsBBQyPJwQHgi2BEwOIZ41FgR2NWRYphEg X-IPAS-Result: AhkCAB/sH1HRVdauk2dsb2JhbABFhkmnZzKJHQGIH3kIFg4BAQEBCQkLCRQEI4IfAQEEASMdARsSCwEDAQsGBQsaHQICIgERAQUBChIGExKHbQEDCQYMnxKLY0+Ce4N8ChknAwpZiHsBBQyPJwQHgi2BEwOIZ41FgR2NWRYphEg X-IronPort-AV: E=Sophos;i="4.84,678,1355094000"; d="scan'208";a="3176023" Received: from mail-ob0-f174.google.com ([209.85.214.174]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 16 Feb 2013 21:34:11 +0100 Received: by mail-ob0-f174.google.com with SMTP id 16so4594637obc.19 for ; Sat, 16 Feb 2013 12:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=sJb2Q2SSeSUvyoxCZtJ2WnywsrM3IBCC9VWj+xnIfLE=; b=u2m4u6HNFyDy99X4+IChjw78JTYt2nGm5xk3rCS+vSPo0akNykBLym/V8eIxqbR8hz WqgWguKeRNaXzhEUCD5HzlhoYsP8FdjpsGLbOJqlCLrPvASpFbM2AoCkLm8RpuotDid8 UcxPxRP5V9SJZIDu3jxqEOgM7KYjO7SaJaxX8u5rRILBUxRS4ER8DMgtYYR1no2eSSHO 4ZGLI2fAUpWOekSuEkx1JdVRzHjLjnbv9HQEy+zpmaZ6379DsfO8YeJwpz+9bhSVLa0b U6e76/ZlJnLNf7XvB1/7z9SAuUeaLjV53XI2/xXvMl52XW7R3g/aYb47FgliPKQBLNg2 cbeg== MIME-Version: 1.0 X-Received: by 10.182.26.114 with SMTP id k18mr4012746obg.94.1361046850046; Sat, 16 Feb 2013 12:34:10 -0800 (PST) Received: by 10.60.23.4 with HTTP; Sat, 16 Feb 2013 12:34:09 -0800 (PST) In-Reply-To: <201302151457.30892.louis.gesbert@ocamlpro.com> References: <201302081625.29881.louis.gesbert@ocamlpro.com> <201302151457.30892.louis.gesbert@ocamlpro.com> Date: Sat, 16 Feb 2013 15:34:09 -0500 Message-ID: From: Niki Yoshiuchi To: Louis Gesbert Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=14dae93a1773050a8804d5dd6ac7 Subject: Re: [Caml-list] ocp-indent 1.0.0 release --14dae93a1773050a8804d5dd6ac7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I've started using this with vim and I've noticed a few things. I'm not sure if it's by design or if they are bugs. First, I have vim setup to use 4 spaces for indentation. When editing an OCaml file, it continues to respect the 4 space indent while writing code. In other words, while writing code I'll end up with something like this (dots represent spaces): let my_fun f =3D . . . . let nested_fun g =3D . . . . . . . . (* content *) However if I then select the text and and hit "=3D" it re-indents it using two spaces per nesting level. The second thing I've noticed is that "=3D" indents only relative to the selected text. In other words, if I have let my_fun f =3D . . let nested_fun g =3D . . . . (* content *) . . . . (* more content *) and I hit "=3D" while the cursor is on the third line I end up with: let my_fun f =3D . . let nested_fun g =3D (* content *) . . . . (* more content *) Doing something like "ggVG=3D" will properly indent the text. Thanks for the great work on making OCaml more usable! My code has never looked cleaner. -Niki Yoshiuchi On Fri, Feb 15, 2013 at 8:57 AM, Louis Gesbert wrote: > Thanks for all the feedback and few bug reports during the past week of > beta- > test. > > We can now announce the 1.0.0 release of ocp-indent, available on opam. > > Enjoy! > > -- > Louis, OCamlPro > > Le vendredi 8 f=C3=A9vrier 2013 16:25:29, Louis Gesbert a =C3=A9crit : > > OCamlPro is proud to announce the beta-release of ocp-indent. > > > > Ocp-indent is a simple tool, entirely written in OCaml, which sole > purpose > > is to indent OCaml code. It can plug-in seamlessly into emacs' tuareg > > mode, or be run from vim. > > > > You can try it now with: > > > > $ opam install ocp-indent > > > > $ INSTDIR=3D"$(opam config var prefix)/share/typerex/ocp-indent" > > > > $ echo '(load-file "'"$INSTDIR/ocp-indent.el"'")' >>~/.emacs > > > > $ echo 'autocmd FileType ocaml source '"$INSTDIR"'/ocp-indent.vim' > > >>~/.vimrc > > > > > > Or check it out at https://github.com/OCamlPro/ocp-indent > > > > > > > > It presents many improvements over the tuareg indentation engine, a much > > better understanding of the syntax, linear complexity, specific handling > > for many cases. Also, it was intentionally provided with much less > > customisation options. > > > > Feel free to submit any code snippet that is not indented to your taste, > to > > help us improve ocp-indent further. > > > > > > Some comparison with tuareg on a few big OCaml projects can be seen at > > http://htmlpreview.github.com/?https://github.com/AltGr/ocp-indent- > > tests/blob/master/status.html > > > > > > -- > > Louis Gesbert, OCamlPro > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs --14dae93a1773050a8804d5dd6ac7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I've started using this with vim and I've noticed a few things.=C2= =A0 I'm not sure if it's by design or if they are bugs.

Firs= t, I have vim setup to use 4 spaces for indentation.=C2=A0 When editing an = OCaml file, it continues to respect the 4 space indent while writing code.= =C2=A0 In other words, while writing code I'll end up with something li= ke this (dots represent spaces):

let my_fun f =3D
. . . . let nested_fun g =3D
. . . . . . . . (* = content *)

However if I then select the text and and hit "=3D&q= uot; it re-indents it using two spaces per nesting level.

The second= thing I've noticed is that "=3D" indents only relative to th= e selected text.=C2=A0 In other words, if I have


let my_fun f =3D
. . let nested_fun g =3D
. . . . (* content = *)
. . . . (* more content *)

and I hit "=3D" while the= cursor is on the third line I end up with:

let my_fun f =3D
. . = let nested_fun g =3D
(* content *)
. . . . (* more content *)

Doing something like &qu= ot;ggVG=3D" will properly indent the text.

Thanks for the great= work on making OCaml more usable!=C2=A0 My code has never looked cleaner.<= br>
-Niki Yoshiuchi

On Fri, Feb 15, 2013 = at 8:57 AM, Louis Gesbert <louis.gesbert@ocamlpro.com> wrote:
Thanks for all the feedback and few bug repo= rts during the past =C2=A0week of beta-
test.

We can now announce the 1.0.0 release of ocp-indent, available on opam.

Enjoy!

--
Louis, OCamlPro

Le vendredi 8 f=C3=A9vrier 2013 16:25:29, Louis Gesbert a =C3=A9crit :
> OCamlPro is proud to announce the beta-release of ocp-indent.
>
> Ocp-indent is a simple tool, entirely written in OCaml, which sole pur= pose
> is to indent OCaml code. It can plug-in seamlessly into emacs' tua= reg
> mode, or be run from vim.
>
> You can try it now with:
>
> $ opam install ocp-indent
>
> $ INSTDIR=3D"$(opam config var prefix)/share/typerex/ocp-indent&q= uot;
>
> $ echo '(load-file "'"$INSTDIR/ocp-indent.el"&#= 39;")' >>~/.emacs
>
> $ echo 'autocmd FileType ocaml source '"$INSTDIR"= 9;/ocp-indent.vim'
> >>~/.vimrc
>
>
> Or check it out at https://github.com/OCamlPro/ocp-indent
>
>
>
> It presents many improvements over the tuareg indentation engine, a mu= ch
> better understanding of the syntax, linear complexity, specific handli= ng
> for many cases. Also, it was intentionally provided with much less
> customisation options.
>
> Feel free to submit any code snippet that is not indented to your tast= e, to
> help us improve ocp-indent further.
>
>
> Some comparison with tuareg on a few big OCaml projects can be seen at=
> http://htmlpreview.github.com/?https://github.c= om/AltGr/ocp-indent-
> tests/blob/master/status.html
>
>
> --
> Louis Gesbert, OCamlPro

--
Caml-list mailing list. =C2=A0Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
<= br> --14dae93a1773050a8804d5dd6ac7--