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 65D997F20B for ; Fri, 8 Feb 2013 18:50:07 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.84,630,1355094000"; d="scan'208";a="2045938" Received: from dhcp-rocq-57.inria.fr (HELO [128.93.62.57]) ([128.93.62.57]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 08 Feb 2013 18:50:07 +0100 Message-ID: <51153ACE.6070909@inria.fr> Date: Fri, 08 Feb 2013 18:50:06 +0100 From: Romain Bardou User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11 MIME-Version: 1.0 To: caml-list@inria.fr References: <201302081625.29881.louis.gesbert@ocamlpro.com> In-Reply-To: <201302081625.29881.louis.gesbert@ocamlpro.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Validation-by: romain.bardou@inria.fr Subject: Re: [Caml-list] ocp-indent beta release I tried it very quickly, it seems to work fine. I'm curious though, when did this way of indenting pattern-matching became a thing? When I started programming in OCaml, the default Tuareg behavior was: match x with | A -> b Now it seems everywhere I go it's like this never existed. Cheers, -- Romain Bardou Le 08/02/2013 16:25, Louis Gesbert a écrit : > 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="$(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 >