TIC-80 icon indicating copy to clipboard operation
TIC-80 copied to clipboard

Separate tabs in code editor

Open trelemar opened this issue 6 years ago • 14 comments

The idea is you could keep your code better organized with different tabs to switch between within the editor. Another solution MonstersGoBoom had was to add "tags" users could easily navigate to.

Fubuki, MGB, and myself all think this would be very useful.

trelemar avatar Mar 15 '18 21:03 trelemar

Any options that allow quick jumping to parts of code is a good idea, implementation isn't really a concern, as long as it's within a key or mouse click to jump to functions and such.

+1 for this idea.

hseiken avatar Mar 15 '18 22:03 hseiken

How does the bank switching work currently? Can a bank access code from another bank? Can variables store functions from other banks?

ambyra avatar Mar 20 '18 18:03 ambyra

Yeah, in the latest PICO-8 version, there are tabs at the top in the code editor.

The-Beesh-Spweesh avatar Apr 08 '18 01:04 The-Beesh-Spweesh

Other than Lua, will it support for JavaScript too (and Wren)?

AnastasiaDunbar avatar Jun 22 '18 06:06 AnastasiaDunbar

Support for MoonScript, JavaScript, Wren and Fennel has been added already.

carlsmith avatar Sep 08 '18 22:09 carlsmith

I meant if these tabs would work the same for other languages (if all of them are executed).

AnastasiaDunbar avatar Sep 09 '18 07:09 AnastasiaDunbar

When this gets added, can we put the shader in a tab instead of a bank if it's possible? (And also, again, if all of the tabs aren't executed on runtime (as in that the shader shouldn't be read as game code).)

AnastasiaDunbar avatar Sep 09 '18 07:09 AnastasiaDunbar

I'm thinking to remove banks for code and make it works like tabs, because it generates a lot of problems with error handling, code loading and etc. And yes, we can put shader to the second tab in this case.

nesbox avatar Sep 09 '18 08:09 nesbox

Great idea! In Qbasic for DOS, you could put new functions in their own tab. So instead of tab numbers (1,2,3,4) you could have a drop down box with assignable function names (main, TVshader, physics, animation, etc). Tab 1 would be hardcoded with name Main, and must have TIC() function in it. Tab 2 would be named Shader, must have screen shader. The rest would take the name of the outermost function that was put in them.

ambyra avatar Sep 10 '18 12:09 ambyra

Just a reminder: Any solution has to work with the supported languages, and ideally, future language additions.

carlsmith avatar Sep 12 '18 22:09 carlsmith

@nesbox Were you concatenating all of the code banks together with a newline separating each bank?

It would've been better if you implemented each code bank as 8 text banks concatenated together before compiling the code.

The-Beesh-Spweesh avatar Aug 04 '19 18:08 The-Beesh-Spweesh

Any update on this?

ghost avatar Nov 20 '20 16:11 ghost

not yet, only bookmarks have been added in the latest version :)

nesbox avatar Nov 20 '20 18:11 nesbox

Hello, is there any update on this?

sedyh avatar Jan 09 '24 22:01 sedyh