Line Wrap

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
mmcarling
Posts: 4
Last visit: Thu Dec 03, 2020 8:18 am

Line Wrap

Post 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.
User avatar
mmcarling
Posts: 4
Last visit: Thu Dec 03, 2020 8:18 am

Line Wrap

Post 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.
User avatar
djlurch
Posts: 294
Last visit: Tue Oct 29, 2013 11:04 am

Line Wrap

Post 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?
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Line Wrap

Post 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
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
djlurch
Posts: 294
Last visit: Tue Oct 29, 2013 11:04 am

Line Wrap

Post 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?
User avatar
mmcarling
Posts: 4
Last visit: Thu Dec 03, 2020 8:18 am

Line Wrap

Post 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.
User avatar
donj
Posts: 416
Last visit: Thu May 29, 2008 5:08 am

Line Wrap

Post 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.
User avatar
mmcarling
Posts: 4
Last visit: Thu Dec 03, 2020 8:18 am

Line Wrap

Post 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.
User avatar
EBGreen
Posts: 18
Last visit: Wed Mar 20, 2013 8:45 am

Line Wrap

Post 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.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Line Wrap

Post 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

Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 15 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.