caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ANNOUNCE: LablGtkSourceView
@ 2005-07-08 10:17 Stefano Zacchiroli
  2005-07-08 14:42 ` [Caml-list] " David Baelde
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Zacchiroli @ 2005-07-08 10:17 UTC (permalink / raw)
  To: Inria Ocaml Mailing List, LablGTK Mailing List

I'm pleased to announce the first public release of LablGtkSourceView,
OCaml binding for GtkSourceView (http://gtksourceview.sourceforge.net/),
a GTK widget which extends the standrd GTK text widgets implementing
syntax highlighting, automatic indentation, and other typical features
of source editors.

ATM not many methods of the widget are bound, but it is already possible
to instantiate widgets, load .lang files which describe syntax
highlighting, and enable/disable core features like automatic
indentation, tab sizes, line numbers, ...

Bound widgets properly fit in the LablGtk class hierarchy.

LablGtkSourceView is distributed under the term of the GNU Lesser
General Public License (LGPL) and is available for download here:

  http://helm.cs.unibo.it/software/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. -!-


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ANNOUNCE: LablGtkSourceView
  2005-07-08 10:17 ANNOUNCE: LablGtkSourceView Stefano Zacchiroli
@ 2005-07-08 14:42 ` David Baelde
  2005-07-08 15:29   ` Stefano Zacchiroli
  2005-07-08 17:42   ` Eric Cooper
  0 siblings, 2 replies; 4+ messages in thread
From: David Baelde @ 2005-07-08 14:42 UTC (permalink / raw)
  To: Inria Ocaml Mailing List

Hi,

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

But I haven't found anything about auto-indent customization. Is it 
possible ?

Thanks for that useful widget,

David


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ANNOUNCE: LablGtkSourceView
  2005-07-08 14:42 ` [Caml-list] " David Baelde
@ 2005-07-08 15:29   ` Stefano Zacchiroli
  2005-07-08 17:42   ` Eric Cooper
  1 sibling, 0 replies; 4+ messages in thread
From: Stefano Zacchiroli @ 2005-07-08 15:29 UTC (permalink / raw)
  To: Inria Ocaml Mailing List

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ANNOUNCE: LablGtkSourceView
  2005-07-08 14:42 ` [Caml-list] " David Baelde
  2005-07-08 15:29   ` Stefano Zacchiroli
@ 2005-07-08 17:42   ` Eric Cooper
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Cooper @ 2005-07-08 17:42 UTC (permalink / raw)
  To: caml-list

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

Here's a first cut at one:
    http://www.cs.cmu.edu/~ecc/ocaml.lang

On Debian at least, you can put this in
    ~/.gnome2/gtksourceview-1.0/language-specs/

You will also need MIME types recognized for OCaml programs.
Put the following in ~/.local/share/mime/globs:
    text/x-ocaml:*.ml
    text/x-ocaml:*.mli

(On other systems, it might be useful to run
    strace -e trace=file gedit foo.ml
to find out where it's looking for these definitions.)

-- 
Eric Cooper             e c c @ c m u . e d u


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-08 17:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-08 10:17 ANNOUNCE: LablGtkSourceView Stefano Zacchiroli
2005-07-08 14:42 ` [Caml-list] " David Baelde
2005-07-08 15:29   ` Stefano Zacchiroli
2005-07-08 17:42   ` Eric Cooper

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