Split editor area

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Christian Uceda
User
User
Posts: 67
Joined: Thu Jul 29, 2010 10:53 am

Split editor area

Post by Christian Uceda »

Hi,

Being able to split horizontally the edit area is something I find myself missing on the PB IDE from time to time.

If the Scintila lib makes this functionality easy to implement I think it would make a good addition to the IDE.

Being able to see and edit at two different places of the same file at once comes very handy when refactoring, as one can avoid having to scroll up and down all the time.

Note: As a sustitute I use markers, but most of the time it is not good enough.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Re: Split editor area

Post by Joakim Christiansen »

Having the option of splitting the editing area in two would be nice indeed, both horizontally and vertically.
I like logic, hence I dislike humans but love computers.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Split editor area

Post by Kukulkan »

+1
jamirokwai
Enthusiast
Enthusiast
Posts: 796
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: Split editor area

Post by jamirokwai »

Great idea.
I am scrolling like crazy up and down my code. And it's only some 1000 lines... :-)
Regards,
JamiroKwai
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Split editor area

Post by srod »

I'm not 100% sure, but I don't think Scintilla supports this kind of thing.
I may look like a mule, but I'm not a complete ass.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Split editor area

Post by blueznl »

Why keep scrolling? Typically you're checking code in another section, ie. its a one way activity. Why not simply load the code into an external viewer?

I'm using two screens, and when I need something I launch CodeCaddy and keep it, showing the appropriate part of the code, on the second screen.

Works like a dream :-)

In fact, I've been trying to use multiple views, and found it rather confusing in most applications, except perhaps for Excel.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
hallodri
Enthusiast
Enthusiast
Posts: 208
Joined: Tue Nov 08, 2005 7:59 am
Location: Germany
Contact:

Re: Split editor area

Post by hallodri »

@srod

Scintilla has a few features for a sci-window with the same content

Code: Select all

Procedure sci_cb(Gadget, *scinotify.SCNotification)
    
EndProcedure


Procedure Main()
    
    If OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 480, "")
        
        InitScintilla()
        
        ScintillaGadget(0,0,0,0,0,@sci_cb())
        ScintillaGadget(1,0,0,0,0,@sci_cb())
        
        SplitterGadget(2, 0, 0, 640, 480, 0, 1)
        
        dp = ScintillaSendMessage(0,#SCI_GETDOCPOINTER)
        ScintillaSendMessage(1,#SCI_SETDOCPOINTER, 0, dp)        
        
        Repeat
        Until WaitWindowEvent() = #PB_Event_CloseWindow   
        
    EndIf
    
EndProcedure:Main()
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Split editor area

Post by srod »

Wow, that is cool. 8) I did say that I wasn't 100% sure! :wink:

I've not encountered that before. Thanks hallodri.

Right, in that case,...... + 1. :)
I may look like a mule, but I'm not a complete ass.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Split editor area

Post by c4s »

Yeah, this would be a really handy feature. I just needed it today (well, more like every coding day ;))!
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
GBeebe
Enthusiast
Enthusiast
Posts: 263
Joined: Sat Oct 09, 2004 6:52 pm
Location: Franklin, PA - USA
Contact:

Re: Split editor area

Post by GBeebe »

User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Split editor area

Post by DoubleDutch »

+1 :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Split editor area

Post by Tenaja »

Axolotl
Addict
Addict
Posts: 802
Joined: Wed Dec 31, 2008 3:36 pm

Re: Split editor area

Post by Axolotl »

I support the request and want to update it to the present.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Post Reply