Text wrap in editor

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
xeir
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 35
Joined: Thu Jul 03, 2008 5:54 am

Text wrap in editor

Post by xeir » Thu Dec 03, 2009 2:36 am

Here's a simple one perhaps, or have I simply missed the option somewhere?

Is there a way to enable text/line/word wrap in the editor?
It would make editing a lot easier within Rev if you could see the entire line in a glance instead of having to scroll left and right constantly.

I know there is the character to soft wrap a line manually, but it's not the same, and quite honestly it is cumbersome.

Any thoughts?

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Re: Text wrap in editor

Post by ale870 » Fri Dec 04, 2009 9:38 am

I don't think you can enable wrapping in the editor.
Sorry.
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Re: Text wrap in editor

Post by malte » Fri Dec 04, 2009 3:37 pm

You would need to patch the revScriptEditor stack. I recommend against it, but it is possible.

set the dontwrap of fld "script" of stack "revSETemplate" to false

If you like the behaviour then save that stack. However. It is patching the IDE. Maybe not a good idea.

Cheers,

Malte

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Text wrap in editor

Post by FourthWorld » Fri Dec 04, 2009 5:51 pm

The difficulty with soft wraps in a script editor is that in RevTalk line endings have a functional purpose, delimiting the end of a statement. While introducing a soft wrap won't affect execution, it will mean that the visible representation of the script differs from what it actually is, which could complicate reading the script to track down errors.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

xeir
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 35
Joined: Thu Jul 03, 2008 5:54 am

Re: Text wrap in editor

Post by xeir » Mon Feb 22, 2010 8:24 pm

Hey guys, appreciate the info, forgot to get back and put up a response as I'd been trying out the external editor form the bundle. It has it's ups and downs.

malte -- thanks, may give that a try. I scanned the IDE code in the past but did not find anything that caught my attention.

Forthworld -- I think the tab indent is typically enough to get the idea of line separation, yet I suppose it's possible to also include a symbol/graphic a the end of the soft wrapped lines to fully indicate what is occurring.

Thanks again.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Text wrap in editor

Post by FourthWorld » Mon Feb 22, 2010 10:36 pm

I think I'm just old: I tend to limit my script lines to about 80 characters out of habit. :)

If it helps, you can continue lines with the "\" character, e.g.:

Code: Select all

if this true \
  AND this is true \
  OR this is not true then
  blahBla
end if 
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

RRobert
Posts: 151
Joined: Sat Feb 28, 2009 8:20 pm

Re: Text wrap in editor

Post by RRobert » Mon Feb 22, 2010 10:39 pm

tRev got a Wrap Source code option by the way.

Robert

arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Re: Text wrap in editor

Post by arkstar » Sun Mar 07, 2010 8:47 pm

tRev is an AWESOME product. As a newbie, it has made learning, and working in Rev a million times better and easier!
Go to reveditor.com. Watch the videos. Believe me, you won't regret it!
The editor in Rev should be replaced with tRev!

And that's all I have to say about that!
Rob Glassman
ArkStar

Post Reply