Strawberry Src
A slightly-less-simple code & text editor
Author: Matt Sutton / @xietanu.bsky.social
Version: 1.2.1
Overview
Strawberry Src is intended as an equivalent app to Picotron's in-built code or text editors, with a few quality or life improvements to make navigating and editing code and text easier.
Important notes
Sandboxing
For now, Strawberry Src should be unsandboxed - it's my aim that this won't be the case forever (it shouldn't need to be unsandboxed), but for now there are some serious bugs in Picotron with sandboxed carts permissions. The bugs are documented here: https://www.lexaloffle.com/bbs/?tid=149013
You can unsandbox the cart by either loading it using load -u #strawberry_src-4
, or by right-clicking on a local copy and clicking 'about strawberry_src.p64', then unchecking the box in the bottom-left corner.
Default app
There's a known bug in Picotron's filenav at the moment that means that even if you try to open a text or lua file with Strawberry Src, it will generally open in your default app anyway. To overcome this, the only real option is unfortunately to set Strawberry Src to be your default app for editing the files you want to use it with.
You can do this with this command in the terminal: default_app <file_extension> <path_to_strawberry_src>
.
e.g. default_app lua /strawberry_src.p64
Unfortunately, this one is out of my control. The bug is logged as part of this thread: https://www.lexaloffle.com/bbs/?page=9&tid=140647
Make sure you've not got the same file opened more than once
Also, make sure you've closed files in the in-built code editor (or close the editor entirely) before editting them in Strawberry Src.
The system should notify you about this, but it could lead to changes not being saved.
Remember the code editor automatically opens main.lua when you start Picotron.
Change log
Version 1.2.1
- FIX: Fixed a crash that could occur when a string preview was generated for a multi-line string. Multi-line strings currently not supported for string previews. Thanks to @klautless for the bug report.
Version 1.2.0
- FEATURE: Added string previews. Hover over strings to see how they would be rendered - useful when using control codes. Thanks to @CannonTheWildWulf for the suggestion. Option to disable provided.
- FEATURE: Added TODO: tracking in code files. Comments with TODO: are highlighted and logged, and can be seen in a sidebar similar to bookmarks. Clicking on the task will jump to it, clicking on the checkbox will complete it and clicking on the x will delete it.
- FEATURE: Added ctrl-pageup/pagedown to jump to the previous and next function defined.
- FIX: Fixed a freeze caused by the character ' and syntax error checking in some circumstances. Thanks to @demiskeleton for reporting the bug.
- FIX: General improvements to performance, especially with dense and large files. Should now maintain a stable 60fps under all reasonable circumstances. Thanks to @Sounds for help with this.
Version 1.1.0
- FEATURE: Added file previews. See features for more info. Thanks to @CannonTheWildWulf for the suggestion.
- FEATURE: Added ctrl-click/middle click on filepath strings to open the related file.
- FEATURE: Added filepaths to autocomplete, so if you start typing a string with a filepath, completions based on your filesystem will be offered. Thanks to @klautless for the suggestion.
- FEATURE: Strawberry Src now alerts you if you're running it sandboxed and prompts to unsandbox it.
- FIX: Fixed a rare crash related to the syntax error checking.
- FIX: Fixed some issues related to saving while sandboxed (however, other bugs beyond my control mean it should still not be used sandboxed)
Version 1.0.0
- Initial release
Features
Note, most features can be enabled/disabled/modified in the settings menu.
Syntax highlighting
Along with all the same highlighing as in-built code editor, user defined functions (within the same file), local variables and function variables are now all highlighted.
Syntax error highlighting
If there is a syntax error in your code, this will be highlighted with a red squiggly line. Hovering over this will give more information about the error.
Additionally, the footer indicates if there is an error, and one what line.

Function tooltips
Hovering over a function gives information about it. For inbuilt functions, these are drawn from the documentation. For user-defined function, they are drawn from comments immediately before or after the relevant function.

Autocomplete
When typing code, if you pause a list of suggestions to complete the currently typed section will appear. You can select an option with the up/down arrows and accept it with tab.
The suggestions are drawn from inbuilt functions, user-defined function and current local and function variables.

If you are typing a string with a filepath, completions are offered based on your current file system.
E.g. typing:
"gf
might offer completions of "gfx/"
and "gfx/0.gfx"

Bookmarks
Bookmarks allow for quickly jumping around between points in the current file - most commonly, jumping to the start of function definitions, but they can be defined quite flexibly, and even grouped.

Bookmarks for the current file can be shown / hidden with the bookmark button in the top right.
In code files, bookmarks are automatically created for each function. In text files, they are created for any line starting formatted like: '## title' or ' title '.
Additionally, in code files, you can create a bookmark at any point in the code by adding a comment formatted like: '--[[BOOKMARK:title]]'
Bookmarks can also be grouped. In code files, if you're using modules or classes, their associated functions will automatically be grouped. E.g. 'function module.func()' would be placed in the 'module' group, or 'function class:func()' would be placed in the 'class' group.
Additionally, groups can be manually created using a comment formatted like: '--[[GROUP:title]]'. Groups are ended either by starting a new group, or with '--[[GROUP]]'.
In text files, groups are started using a line formatted like '# title' or ' title '.
As an example, this file uses them!
The formatting of the bookmarks has been done to try to be broadly compatible and not cause any issues when viewing files in a another program. Happy to take feedback on if this could work better!
ToDo tracking
Comment lines in code files that include "TODO:" are tracked and can be viewed by clicking the checkbox in the top right. They are also highlighted a different colour.
Clicking on the task will jump to the line where it's defined, clicking on the checkbox completes it and clicking on the x deletes it.
e.g.
--TODO: Test out todos! --[[ A comment TODO: More todos. ]] |
would create a two tasks with the titles "Test out todos!" and "More todos."
Rainbow brackets
Matching brackets are highlighted by colour, with colours varying by level. Mismatched closing brackets are shown in white for easy identification. This can be turned on/off in the settings.

File previews
If you hover your mouse over a string with a reference to a file (e.g. "gfx/0.gfx"), a preview of that file may be shown. This currently works for text files (with syntax highlighting for lua files), pods and gfx files (where the first 24 sprites are previewed).
Ctrl-click or middle mouse click on the string to open the previewed file.

Changeable themes
There are currently 4 themes that can be selected, and can be set separately for editing text or code. Note that the system theme draws its colours from your current system theme.

Smooth scrolling
Scrolling is now smooth. Why was this so hard to implement?
This can be enabled/disabled in the settings.
Line wrapping
In text files, lines can now be automatically wrapped.
This can be enabled/disabled in the settings.
Keyboard shortcuts
Cut/Copy/Paste
Ctrl-x - cut
Ctrl-c - copy
Ctrl-v - paste
Shift-del - cut
Ctrl-insert - copy
Shift-insert - paste
Commenting
Ctrl-b - uncomment/comment line(s)
Ctrl-shift-b - block uncomment/comment selected text
Indent/unindent
Pressing tab with multiple lines selected indents all of the lines.
Pressing shift-tab unindents the current line(s).
Line manipulation
Alt-up/down - Move line(s) up/down
Ctrl-d - Duplicate line(s)
Search/Goto
Ctrl-f - open/close search box
Ctrl-g - repeat the current search
Ctrl-h - repeat the current replace
Ctrl-l - open/close the goto line box
Clicks
Double click - select whole token
Triple click - select whole line
How does this relate to SpaghettiCode?
I built this editor as an effort to de-scope and create a new, more robust basic editor. This will form the core of the next version of SpaghettiCode, which I intend to continue to develop as a more complete development environment. However, I think it's a pretty good editor by itself and addresses a lot of the issues with SpaghettiCode's central editor (like maintaining good performance on large files).
License
Strawberry Source (c) 2025 by Matthew Sutton is licensed under CC BY-NC-SA 4.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/



I've already started playing around with it, and didn't realize it was by the same person behind Spaghetticode! I haven't used either very much, but this feels very good to use so far. The addition of bookmarks is very nice! One thing I would like to see in the future is the ability to collapse nested code to save space.


Amazing. It really improves the experience. One thing: I tried to select text that extends beyond the visible screen using the mouse, but I couldn’t. It is possible by holding Shift and using the arrow keys, though.
[Please log in to post a comment]