Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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>"] } *)
<table>
 <tr><th>$header_number_1</th><th>$short</th></tr>
 <tr><td>$x</td><td>$y</td></tr>
</table>
(*END *)

would be displayed as:

 <table>
  <tr><th>$header_number_1</th><th>$short</th></tr>
  <tr><td>$x</td>              <td>$y</td>    </tr>
 </table>

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



-- Martin


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners