Page 1 of 3

Line Wrap

Posted: Wed Dec 06, 2006 7:16 am
by mmcarling
Maybe I am missing something but is there a way to do a line wrap? Meaing rather than have a line run off the side of the screen and have to scroll to it you use line wrap so all the line is visible without scrolling. I hope I am just missing something but I have been unable to find it.

Line Wrap

Posted: Wed Dec 06, 2006 8:00 am
by mmcarling
I tried searching the knowledgebase and was unable to find anything. What is it under or what should I search on? I have tried Line Wrap, Word Wrap, Wrap but nothing turns up anything of value.

Line Wrap

Posted: Wed Dec 06, 2006 8:25 am
by djlurch
Steve:As mentioned, Wrap returns no results. There was a long discussion about the topic on the old forum, which is no longer available.IMHO, long lines need to be addressed somehow by PS. As it stands, PS chokes on very long lines (8K characters or greater) and handles long lines poorly. The horizontal scrollbar doesn't work correctly for lines over a few hundred characters.The word wrap issue may be too fundamental to fix. Why don't we open up the discussion again here for those that missed it on the old forum?

Line Wrap

Posted: Wed Dec 06, 2006 8:43 am
by Alexander Riedel
Word wrap is for word processors. If you write letters it makes perfects sense.
We write code in PrimalScript, so the vast vast majority of users prefers to NOT have their environment mess with their code formatting.

Specially in languages like VBScript where line endings actually have a statement termination function, displaying a "wrong" picture is very undesirable.

I have not seen any language or code format that would require a line to be 8K or longer. I'll be happy to listen if anyone can tell me why it would be desirable to have lines of that enormity in your code, regardless whether they get wrapped automatically or not.

I am sure I have started quite a discussion now. Please rest assured I will eventually read all 1051 posts that will follow. :-)

Thanks.

Alex
alexr@sapien.com2006-12-06 15:46:10

Line Wrap

Posted: Wed Dec 06, 2006 10:41 am
by djlurch
Alex:Reason #1) Most of my HTML pages are in excess of 5000K characters. All on one line.Why? Because of the way I write/process HTML code. I don't manually add VbCrLf to any of my Response.Write code unless it is required for a specific reason, like textarea formatting. Adding VbCrLf to my code would make it a lot more difficult to read.The resultant HTML code ends up being one big long line. I don't often have to look at the resultant HTML code, but there are times when it is useful. Having an editor that comfortably handles the HTML code is essential.Reason #2) Compressed Javascript FilesSome of the fancy Javascript components that I use employee code compression. In doing so, the resultant code contains very long lines of code. I recently had to hack a Javascript component that did this. I literally was unable to use PS to edit the file. I _HAD_ to use notepad. What a disappointment to have to degrade to notepad when PS is so powerful.Reason #3) Coding StyleIn this case, the line length is usually under 700 characters. There are times when I refactor that I eliminate line breaks to enhance code clarity. When I output certain HTML data sets (like a whole form)...it is often easier to have it all on one line since a given form may not change very often, but I will continue to touch the page regularly.Does that make sense?

Line Wrap

Posted: Wed Dec 06, 2006 10:40 pm
by mmcarling
When I bring code from other places to view it and edit it, using cut and paste, it often comes in as one long line which is unwieldy to work with without the word wrap. I also use it for encapsulating SQL code in VBScript but for clarity I break the code up along the SQL code satements which can be pretty long sometimes.
What I want is something similar to the way Textpad works. Where if you turn on line numbering and word wrap you can clearly see that it is one line because all ten lines that are wrapped only show up as one line number. I have been using PrimalScript for at least 3 years and have really wanted to get away from using TextPad but this one feature is a killer. I find myself going back to Textpad frequently to edit code because of this one feature. I don't see the harm in putting it and then just letting users select whether they want it on or not.

Line Wrap

Posted: Wed Dec 06, 2006 10:53 pm
by donj
I've ensured that the official SAPIEN policy regarding this feature request is available in our knowledge base by searching for "word wrap." Please understand that while we absolutely respect your conviction and desire for this feature, it is not something SAPIEN is pursuing at this time.

We realize that HTML is one area in which word-wrapping has a legitimate use. However, given our development resources, other features, usage scenarios, and other factors, it is simply a feature which we are not planning to pursue. The best we can do is be forthright about our plans so that you can make appropriate decisions.

Line Wrap

Posted: Wed Dec 06, 2006 11:13 pm
by mmcarling
I appreciate your forthrightness about your product plans. What really bothers me about your response is your satement about the way you see scripting. You basically said that if people don't script the way you think they should, then it is not a "legitimate" way to script. I think there are multiple ways to script and I don't believe that because one group thinks they have the best way, that makes the other ones wrong.

With that being said, this has become a big enough issue for me that I guess I will have to consider switching scripting editors to one that supports that feature, which is too bad because PrimalScript is an excellent editor.

Line Wrap

Posted: Thu Dec 07, 2006 12:05 am
by EBGreen
I believe that what Don said is "We believe that more people want our development resources spent on other features than this..." not "Script our way and our way only...".I use GVIm when I want to edit a file with long lines. I do it rarely enough that it is no particular burden to do so. There are imo much more important things to fix in PS.

Line Wrap

Posted: Thu Dec 07, 2006 1:36 am
by Alexander Riedel
Please note that I said I will read anything posted here regarding that subject.
It is of great importance for us to understand the use cases and items that make you wish for a soft word wrap.

Right now we get about one or maybe two comments every six month about this, which simply is not enough to give this a high priority.

Understanding what your intended use is will give us insight in your world and may just enable us to come up with something better than a soft word wrap.

Example: HTML output in a single line. I am not gonna comment on whether this is good or bad, just accept that this is out there. I believe two functions,
one to PROPERLY format HTML with indentations and one to compress it
without whitespaces is ultimately much more useful here.
A soft word wrap would just give you gibberish compressed into multiple lines instead of one line.

So please keep posting and let us know what you do.

Alex