Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Printing text with holes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-09-30 (17:49)
From: Martin Jambon <martin_jambon@e...>
Subject: Re: [Caml-list] Printing text with holes
On 30 Sep 2003, skaller wrote:

> You have it easy. You're mainly concerned with nice line breaks.
> Consider if you were formatting a plain text table and needed
> to have a view of *column* positions. That's where you start
> renaming all your variables to exactly 4 letters so you can check
> that things line up vertically .. :)
> I have this kind of problem (vaguely) in Felix and the only
> solution I found was "suck it and see".
> [I'm generating C++ and I want the output layout to look nice ..]

So we need some kind of WYSIWYG editors.
Imagine your source code contains "special regions", that you can edit
using a custom WYSIaWYG editor (what you see is almost what you get),
called from your favorite text editor.
Maybe it would be enough to specify line-breaking keywords and tabulation
marks to generate a minimalist WYSIaWYG editor.

(*BEGIN { tabs = [Before "<td>"; Before "<th>"; Before "</tr>"];
          newlines = [After "<br>"; After "</tr>"] } *)
(*END *)

would be displayed as:

  <tr><td>$x</td>              <td>$y</td>    </tr>

(+ syntax highlighting for fake spaces, insertions, keywords, ...)

-- Martin

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: