Automatic splitting code across lines...
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Berikco: Seeing as your an Admin/Part of the PureBasic team, maybe you could speak to Freak/Fred about putting something like this actually in the editor for real. I don't think it could be too hard seeing the amount of code it takes?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Thanks. It would be great if the colour and indent amount could be user definable.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
That's not available as an option in Scintilla. I prefer slighly indented more - thus the +16 indent.
If you join the official scintilla mailing list, you could suggest that as an option?
If you join the official scintilla mailing list, you could suggest that as an option?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
> SendMessage_(scintilla,#SCI_SETWHITESPACEFORE,#True,RGB($70,$50,$d0)) ; <- colour of marker
Excellent! I've set mine to #Red and now I can see it on my black IDE background.
> I can add the option
If you do, then please make sure you give all 3 options:
(1) Wrap enabled/disabled.
(2) Indent size, with 0 if the user wants.
(3) Color of visual arrows (the #Red I just mentioned above).
Even though it's not true line continuation, it makes a great way to quickly
toggle long lines to see the parts not currently visible, without having to use
the scrollbar or reach for the mouse. Anything time-saving like that is great!
Excellent! I've set mine to #Red and now I can see it on my black IDE background.
> I can add the option
If you do, then please make sure you give all 3 options:
(1) Wrap enabled/disabled.
(2) Indent size, with 0 if the user wants.
(3) Color of visual arrows (the #Red I just mentioned above).
Even though it's not true line continuation, it makes a great way to quickly
toggle long lines to see the parts not currently visible, without having to use
the scrollbar or reach for the mouse. Anything time-saving like that is great!
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Thanks.
I think that the only real neat solution for that one will have to come from Fred himself and be built into the compiler.Now if you can hack in and force real split lines
I think that if the indicator is at the start then this may have to be 1 (this may be automatic?):(2) Indent size, with 0 if the user wants.
Scintilla Docs! wrote:The indention of sublines is independent of visual flags, but if SC_WRAPVISUALFLAG_START is set an indent of at least 1 is used.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
ic
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Freak: Do you think you will be able to put this in 4.30 (final) as an option?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Having the editor wrap is nice, but it doesn't solve the problem of posting
code here, where the long lines will still be long. A line continuation char
would still be the best solution (like space-underscore as in Visual Basic).
code here, where the long lines will still be long. A line continuation char
would still be the best solution (like space-underscore as in Visual Basic).
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
- Kwai chang caine
- Always Here
- Posts: 5353
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Automatic splitting code across lines...
This hack does not work with PB Version 4.50
Is any new solution out there?
Is any new solution out there?
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"
Re: Automatic splitting code across lines...
This works in 4.51RC1.
I tried to set the indenting to follow on from the previous line, but failed , using the following:
The "2" comes from:
I tried to set the indenting to follow on from the previous line, but failed , using the following:
Code: Select all
SendMessage_(scintilla,#SCI_SETWRAPINDENTMODE, 2, 0) ; <-- indent mode
SC_WRAPINDENT_INDENT 2 Wrapped sublines are aligned to first subline indent plus one more level of indentation
Win8.1, PB5.x, okayish CPU, onboard video card, fuzzy monitor (or is that my eyesight?)
"When the facts change, I change my mind" - John Maynard Keynes
"When the facts change, I change my mind" - John Maynard Keynes