Strawberry Src
A slightly-less-simple code & text editor
Author: Matt Sutton / @xietanu.bsky.social
Version: 1.2.3
Overview
Strawberry Src is intended as an equivalent app to Picotron's in-built code or text editors, with new quality or life improvements to make navigating and editing code and text easier.
TIP:
You can set Strawberry Src as your default editor using the default_app
command in the terminal.
Go to the terminal and type:
default_app <extension> <path to Strawberry Src cart>
E.g.
default_app lua /desktop/strawberry_src.p64
Change log
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 Src (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.



It's great. I'm glad to hear you're still working on Spaghetticode.
I hope the ‘jump to definition’ feature is still in the cards.
As nice as the tooltips are, exploring code “with F12” really boosts discoverability and comprehensibility.
It reminds me of the BlitzBasic/Max days, with the basic IDE (...) and great IDEs like Blide. Without Blide, I'd never have created games or enjoyed Blitz as much. I'm pretty sure it will be the same with Picotron.



Hey, on the current version, each time I restart Picotron while having S-SRC as my default code editor, it gives me an error that it is trying to index a 'nil' value. I believe this is because it is trying to reload a previously opened file that was not reloaded on restart. (Maybe the RAM cart), However, the traceback points to '/appdata'
Please forgive my screen resolution, but will also submit another photo highlighting the point of termination within the code



@STVRCHLD - sorry, I don't see any image? Happy to help if I can, but I've not encountered this myself so without an error message it's pretty hard to diagnose.



Hey, sorry, im not sure why the images didnt attach. Here is a direct link to the two images using a third-party file sharing service.
https://gachi.gay/osDYzG
https://gachi.gay/5wtWw2



I am in the Picotron discord server, so if you need to get more info from me, im listed as Chase in there.



Seems super nice, but can't figure out how to get it to appear as an editor tab, or even open anything in it. I am running it unsandboxed. (edit: i found the default app command)



@ImBadEZ - You can open files in it the same way as the standard editor, either by clicking on the three lines in the top left and then clicking 'Open File' , or clicking on the plus next to the current filename to create a new tab. Both of those should give you an open file dialog box.
To set it as your default app for editing files, you can go to the terminal and type: default_app <file extension> <path to strawberry src>
. E.g default_app lua /desktop/strawberry_src.p64



found out how to make it appear as an editor tab:
go in terminal
type default_app lua (path to strawberry src)
open any lua file (go in ram/cart/main.lua)
now it is open as an editor tab



This is great! Nice to have a picotron text editor with actual word wrapping. Also, not a big deal, but would it be in scope to have support for markdown headers like Notebook has? (Alternatively, just knowing where the code for the text mode bookmark detection is would be handy)



Excellent work! Configurable keybinding wanted from a pair of VIM/Emacs hands :)



@sunroses - Oh, huh, I didn't know the Picotron text editor did that, I wonder if that's relatively new? In principle that would be doable, I think? I'll add to a list of future ideas, but am working on other things at the moment. In the source code, the bookmark detection is in lib/xi_gui/text_ed/content.lua
, starting around line 220
@brucehoudev - Also will add this to the list, but this would be tricky because a lot of it is very hardcoded and a bit spread out. I'm planning this to be more configurable for the next version of SpaghettiCode, which I'm working on at the moment
[Please log in to post a comment]