Re: Text wrapping, text editing features, etc. in mlview

Scott White <[email protected]> Wed, 21 Jan 2004 20:09:03 -0500
Newsgroups gmane.editors.mlview.devel
Message-ID <[email protected]>
Hello Dodji and everyone!

i'm glad there is so much interest in this issue. i figured, while 
everyone is throwing pennies, i would add some of my sense (bad pun).

Dodji Seketeli wrote:
>>- we should have a wrap/non wrap mode for widgets
>>- we should have normalization functions for serialization
>>- these modes should apply to whole documents when they are switched on,
>>but xml:space="preserve" nodes can be displayed and serialized
>>'verbatim' everytime
>>
>>Do we agree on that ?  
> 
> Yup, I buy that ;)

i like that, too. for wrapping in the widget, i really think there 
"could" be three options for the user: wrapping, absolute no wrapping, 
and an "actual" wrap (possibly called "Reveal Formatting"). Wrapping 
would be the most user-friendly way to see the content in mlview. 
non-wrapping would be a super long line (perhaps this wouldn't even be 
useful). The "Reveal Formatting" option would not impose rules on the 
display of the information at all, leaving the user to see what the 
file's format will really look like.

Another thing, the "Reveal Formatting" option could also offer some 
customization. tabs could show up as arrows and spaces could be dots. 
Anjuta does this (i've included a screenshot)

Auto-formatting could also be boolean; i.e., let me forget about 
formatting versus don't touch my document. with auto-formatting on, the 
user should at least have the choice of line length, tab options (true 
tabs vs spaces, and how big a tab is), and what to do with extra spaces 
at the end of lines.

now, there is one possible problem with automatically maintaining an 
absolute line length. what if the xml document is highly nested, and a 
line that is heavily indented exceeds the designated line length. mlview 
would then force the code to break to the next line. could this not 
cause problems? i've never really broken my xml up like that, so i 
really don't know what happens.

finally, thanks to dodji and all who have helped in developing mlview. i 
really think it has the potential to become a very popular xml editor.


scott
Screenshot-Anjuta.png (image/png, 92.7 KB) - not displayed