Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[idea] virtual files (or tabs) inside cartridges.. for organize libs, classes, etc #2414

Open
atesin opened this issue Dec 22, 2023 · 4 comments

Comments

@atesin
Copy link

atesin commented Dec 22, 2023

that is... often when our code grows it got more difficult to navigate, and coding turn less efficient tangled and consuming

there are some code snippets, functions, libs, classes, etc, that would be much better organized in separate files (or TABS)... often in more "serious" programs these elements are separated in files/packages and invoked with include or require

i read tic80 also supports require function to load external lua files (and other languages?), but these must also be distributed along with cartridge in order to function correctly :( ... this idea comes to surpasses this limitation while keep code organized and easy at same time (like in arduino ide)

maybe inside tic80 the require function is not even needed, should be enough with dividing entire code area in cartridge storage/ram in "pages" with some kind of deliniter (like an unlikely custom comment like -- tab1 foobarbazqux for example) that is read as a whole by interpreter, but editor separates in fixed tabs (tab1-tab9?)

the only real care i see is the import/export code file.lua new format, could be code1, code2, etc... or tab1, tab2... new paramenters for code tabs

@blueloveTH
Copy link
Contributor

I agree with this. If tic-80 supports virtual files, import can be used in python, too!

@atesin
Copy link
Author

atesin commented Dec 28, 2023

i imagine the editor are watching for user puts a comment like -- page: <name> and then separate code in another tab, so the user just need to add or delete that comment to editor show code paged in tabs... like:

imagen

then the user inserts a comment like

imagen

and the editor create a tab and show the code from this comment below (it trims the name to some chars)

imagen

hovering the "shapes" tab shows a list of all active tabs.....

imagen

and to delete a tab (merge 2 consecutive tabs) is enough with delete the -- page: <name> comment at the top

@TripleCubes
Copy link

Isnt this just bookmark with extra steps? I think the real solution to this is to make bookmarks saved between sessions

@runemoennike
Copy link

Just some oldschool input: in qbasic, each function/subroutine was separated and the editor showed only one at a time. A hotkey would bring up a window with the full list, sorted by module if other modules had been imported. I remember being shocked when I moved to other IDEs and realised this was not normal 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants