Log In  

Hello.

@zep, could you please add a hotkey like CTRL+W to turn on and off word-wrap for code ?

For instance we have this one line which extends beyond the screen:

However, if you press CTRL+W then it would wrap around the screen like so, showing the at the beginning to let you know it is a wrapped line and you can navigate the area and easily edit all 4-lines. When done, press CTRL+W again to return it back to a full and single line that scrolls off the edge of the screen.

Ignore the color changes above, this is just me putting that character in front of the code to show what it would look like.

Now I know this isn't perfect, I mean Pico-8 only has 32-characters across using a 3x5 pixeled font. Yet I think this will help some of us work on large lines.

It could also be that you do not see this word-wrap except for lines that do exceed 32-characters AND the cursor must be on that line in order to access it.

Just an idea that would help me and possibly help others using the Pico-8 GUI for their editor as I do.

P#120878 2022-11-17 22:04 ( Edited 2022-11-18 06:18)

>It could also be that you do not see this word-wrap except for lines that do exceed 32-characters AND the cursor must be on that line in order to access it.

That sounds like a great way to implement this to me. I spend too much time making all my stuff fit on the tiny screen. I basically never write lines over 32 characters cause scrolling sideways is such a pain. So a lot of the time I end up with weird ugly stuff where i do like

function some_function()
 if whatever then
   if (something == something) and 
    (somethingelse != false) then
    --now it's weird and confusing that the if check up there is spread across 2 lines
    --but if i make it one line i won't see both conditions without scrolling.
    --i generally do this with other programming languages in real life 
    --but my screen is > 220 chars wide there
 end
end

having it wrap the currently selected line would make easy to see whats happening when i'm looking at that line but keep things looking clean when i'm just scrolling past it.

P#120945 2022-11-18 19:30 ( Edited 2022-11-18 19:31)

I'm glad you like the idea, @b0b89.

One simple solution would be for Pico-8 allow an extended resolution and only for source-code. Where instead of being limited to 128x128 you have 256x256, but only for source-code editing.

Mind you sometime back I did request different resolutions for Pico-8 that ALL still take exactly 8192-bytes, the same total we have now for our 128x128 by 16-color screen.

https://www.lexaloffle.com/bbs/?tid=47549

I still like my idea for infinite color and resolution by not tracking the screen at all - certainly for sourcecode editing this would be beneficial.

Yet if all of these ideas are too far-fetched, I would settle with Word-Wrap for editing source-code in any case.

P#120964 2022-11-18 22:06 ( Edited 2022-11-19 00:09)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 13:03:55 | 0.019s | Q:11