From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA28692; Sat, 6 Oct 2001 12:53:05 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 MAA28694 for ; Sat, 6 Oct 2001 12:53:05 +0200 (MET DST) Received: from fichte.ai.univie.ac.at (fichte.ai.univie.ac.at [131.130.174.156]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f96Ar4D11098 for ; Sat, 6 Oct 2001 12:53:04 +0200 (MET DST) Received: (from markus@localhost) by fichte.ai.univie.ac.at (8.9.3/8.9.3/Debian 8.9.3-21) id MAA07540; Sat, 6 Oct 2001 12:53:00 +0200 Date: Sat, 6 Oct 2001 12:53:00 +0200 From: Markus Mottl To: Jeremy Fincher Cc: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] Vim6 and O'Caml. Message-ID: <20011006125300.A6453@fichte.ai.univie.ac.at> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from tweedgeezer@hotmail.com on Sat, Oct 06, 2001 at 01:52:30 -0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 06 Oct 2001, Jeremy Fincher wrote: > I've tried the new vim6 indent files, but it doesn't seem to apply > the same rules that emacs applies, which I'm both accustomed to, and > which almost all the source code I've seen is writte in. It actually isn't capable of correctly indenting OCaml-code. The reason is simple: you'd need a complete parser and pretty-printer to do so. This is an awful lot of work and slows down some operations considerably. Currently, the indent file for OCaml does an approximate job: it only considers the current and the last line to compute a suitable shiftwidth. This works remarkably well in the majority of cases. > Surely all the source code I've seen written hasn't been written > in emacs, so I assume there's some way to make vim indent code like > emacs does. Does anyone know how to do so? You can also program Vim (though not in Lisp). Considering the richness of builtin functions in Emacs and the still large amount of Lisp-code required to implement automatic indentation (~ 1500 LOCS), I wouldn't dare to do the same for Vim. Anybody want to give it a go? ;) Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- 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