caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stefano Zacchiroli <zack@bononia.it>
To: Inria Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] ANNOUNCE: LablGtkSourceView
Date: Fri, 8 Jul 2005 17:29:08 +0200	[thread overview]
Message-ID: <20050708152908.GA32007@takhisis.invalid> (raw)
In-Reply-To: <42CE90C9.4050708@ens-lyon.org>

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. -!-


  reply	other threads:[~2005-07-08 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-08 10:17 Stefano Zacchiroli
2005-07-08 14:42 ` [Caml-list] " David Baelde
2005-07-08 15:29   ` Stefano Zacchiroli [this message]
2005-07-08 17:42   ` Eric Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050708152908.GA32007@takhisis.invalid \
    --to=zack@bononia.it \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).