syntax editor line length

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

syntax editor line length

JeremyT
An easy one I hope!
How do you change the line length at which pasted syntax wraps? It currently wraps to fit my printed page setup and if I change this from say portrait to landscape in the data editor window it does not affect the syntax print layout.

Ideally I would just like to specify a character length for the syntax line

thanks, Jeremy
Reply | Threaded
Open this post in threaded view
|

Re: syntax editor line length

PRogman
I believe each syntax line is maximized to 251 characters, unsure if different with regards to character coding. Fortunately white space is non-significant so manually pleasant formatting is possible, as long it is not an empty line which acts as a command terminator. Automatic line wrapping is not available.
There is also a limit on the GPL statement, but I don't know the exact size 1024(?), or if it has changed in different versions.

/PR
JeremyT wrote
An easy one I hope!
How do you change the line length at which pasted syntax wraps? It currently wraps to fit my printed page setup and if I change this from say portrait to landscape in the data editor window it does not affect the syntax print layout.

Ideally I would just like to specify a character length for the syntax line

thanks, Jeremy
Reply | Threaded
Open this post in threaded view
|

Re: syntax editor line length

jkpeck
In reply to this post by JeremyT
This is a more complicated issue than one might expect.  Syntax pasted from a dialog box is wrapped at approximately column 80, but the maximum line length in the Syntax Editor or an INSERTed file is 261 characters when it is executed.  There is actually some slack with that to allow for characters that require multiple bytes.  If a line exceeds the limit, it is displayed in red.  There is a wrapping exception for pasted Python or R code, because the dialog system does not know where such code can be safely wrapped: it is pasted as is.

The display space in the SE depends on the font you are using and is unrelated to these limits or printed page size.  The width of the SE window does not affect the wrap point.
Reply | Threaded
Open this post in threaded view
|

Re: syntax editor line length

JeremyT
 There I was hoping for a way to adjust/set the wrap point.  It would be a nice feature
Reply | Threaded
Open this post in threaded view
|

Re: syntax editor line length

jkpeck
I agree that would be nice.  I sent the request to the Dev team, but that doesn't mean that it will actually happen.