From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 8758BBCAE for ; Fri, 8 Jul 2005 17:34:23 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j68FYN0b025438 for ; Fri, 8 Jul 2005 17:34:23 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA30204 for ; Fri, 8 Jul 2005 17:34:22 +0200 (MET DST) Received: from ms001msg.fastwebnet.it (ms001msg.fastwebnet.it [213.140.2.51]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j68FYMtw025432 for ; Fri, 8 Jul 2005 17:34:22 +0200 Received: from dalamar (37.10.140.105) by ms001msg.fastwebnet.it (7.2.059.7) id 42A58FDB00850DCD for caml-list@inria.fr; Fri, 8 Jul 2005 17:34:22 +0200 Received: by dalamar (Postfix, from userid 3148) id 0A17B4D4067; Fri, 8 Jul 2005 17:29:09 +0200 (CEST) Date: Fri, 8 Jul 2005 17:29:08 +0200 From: Stefano Zacchiroli To: Inria Ocaml Mailing List Subject: Re: [Caml-list] ANNOUNCE: LablGtkSourceView Message-ID: <20050708152908.GA32007@takhisis.invalid> Mail-Followup-To: Inria Ocaml Mailing List References: <20050708101716.GA31200@takhisis.invalid> <42CE90C9.4050708@ens-lyon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42CE90C9.4050708@ens-lyon.org> User-Agent: Mutt/1.5.9i X-Miltered: at concorde with ID 42CE9CFF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42CE9CFE.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; zacchiroli:01 caml-list:01 ocaml:01 ocaml:01 syntax:01 gedit:01 emacs:01 vim:01 cheers:01 zacchiroli:01 unibo:01 ...:98 preservation:98 ...:98 zack:01 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: On Fri, Jul 08, 2005 at 04:42:17PM +0200, David Baelde wrote: > Many people probably want to know: is there a OCaml.lang for > specifying OCaml syntax/indentation for GtkSourceView ? Could be > useful for that ongoing OCamlIDE project... I'm not aware of such a .lang and at the moment I'm not interested in writing it. That said, writing a .lang is relatively easy and there are a lot of examples in gedit (the more widespread application which uses GtkSourceView), also monodevelop uses it and probably has an archive of .lang files but I've never looked at them. > But I haven't found anything about auto-indent customization. Is it > possible ? GtkSourceView support auto-indent and in LablGtkSourceView you can enable it either from the constructor (?auto_indent param) or with set_auto_indent. However the supported form of automatic indentation is more limited than those found in emacs or vim. GtkSourceView indeed support only indentation preservation (i.e. when starting a new line copy the amount of indent of the last one). On top of that implementing automatic indentation similar to vim's smartindent (i.e. augment the indentation if last line ends with a word in a given set, e.g. "then", "do", ...) should be relatively easy and I plan to do it in next releases of LablGtkSourceView. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/ If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. -!-