Collapsible functions in IDE
#7
(02-01-2023, 03:40 PM)mnrvovrfc Wrote:
(02-01-2023, 09:48 AM)RokCoder Wrote: I'm working on quite a big project. Not a HUGE project but quite a large one nevertheless. It's just crept over 3000 lines and is becoming quite cumbersome to navigate. I've experimented with splitting sections off into BM/BI files but it feels quite a clunk way of handling things when I'm working on the codebase as a whole and it isn't really suitable to be segmented into standalone libraries.

What would make life a lot easier would be if I could collapse functions, sections, regions, etc.

You're doing it wrong. There is some sense in how the professional C/C++ programmers do things, needing like 50 header files to go with 50 C-extension files. This doesn't only have to do with OOP. However, on BASIC's side I think an adjustment would have to be made toward the MAK-extension files a few people found convenient on QuickBASIC. QB64 is still specific on where certain things should be like initialization areas, subprograms and DATA statements. (I'm trying to indicate a weakness that this programming system has possessed since its inception.)

Using BI- and BM-extension files, sadly, is the only way to cope with the situation. For a big project like QB64PE itself, this is more important than when it came in a single file at least before v0.95.

Hmmm it leads to another feature request: open include file indicated by the cursor, if it's found in the current directory?

If your project is cumbersome to navigate, it must mean the large main loop has to be broken down further into subprograms or into include files. Code-folding is something that allows programmers to become lazy and sloppy. It is so annoying I disable it when I get the chance in Geany, Kate and programs like that. I am against it for the QB64 IDE. It might conflict with the automatic formatting, and you don't want to lose that, do you?

What sucks is that some of those text editors don't have a syntax-coloring and keyword-detection configuration exclusively for QB64. Usually a BAS-extension file is taken to be Freebasic. It's because this programming system has statements added to it in almost every release. So it requires someone to maintain such a configuration file for a given text editor. Keyword detection is not as easy as it might seem: try loading a BASIC file into Kate and observe closely a single-line "IF... THEN" statement.

Have to try not to add something to the QB64 IDE which makes it more CPU intensive. There's a thread going on around here about the IDE sucking up CPU just being left alone, right after it's started. At least for me, on Linux I just can't hold down an arrow key to move more quickly through a single line. Only for this program, I have to disable key-repeat for the whole OS.

Don't take this explanation the wrong way, but if you're complaining the program is becoming unwieldy, then it's time to consider breaking it down so it's more manageable. Because the QB64 IDE was designed for something to compose with, not to compete with VS-Code or any other unwieldy thing.

Don't take this explanation the wrong way?? Pfft...
Reply


Messages In This Thread
Collapsible functions in IDE - by RokCoder - 02-01-2023, 09:48 AM
RE: Collapsible functions in IDE - by Dimster - 02-01-2023, 02:01 PM
RE: Collapsible functions in IDE - by SMcNeill - 02-01-2023, 02:17 PM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-01-2023, 03:40 PM
RE: Collapsible functions in IDE - by RokCoder - 02-01-2023, 04:29 PM
RE: Collapsible functions in IDE - by RhoSigma - 02-01-2023, 04:11 PM
RE: Collapsible functions in IDE - by RokCoder - 02-01-2023, 05:03 PM
RE: Collapsible functions in IDE - by RhoSigma - 02-02-2023, 12:33 AM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-02-2023, 01:38 AM
RE: Collapsible functions in IDE - by bobalooie - 02-03-2023, 01:47 AM
RE: Collapsible functions in IDE - by RhoSigma - 02-10-2023, 10:08 PM
RE: Collapsible functions in IDE - by aurel - 02-02-2023, 07:47 AM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-02-2023, 02:33 PM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-06-2023, 07:50 PM
RE: Collapsible functions in IDE - by bert22306 - 02-06-2023, 11:04 PM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-07-2023, 09:39 PM
RE: Collapsible functions in IDE - by SMcNeill - 02-07-2023, 01:58 AM
RE: Collapsible functions in IDE - by bplus - 02-06-2023, 08:08 PM
RE: Collapsible functions in IDE - by bplus - 02-07-2023, 12:09 AM



Users browsing this thread: 8 Guest(s)