I spent some time yesterday searching for a small, customizable and free source code editor and finally found SynWrite (Windows only).
I then spent a few hours making this simple SmileBASIC lexer, trying to replicate the original 3DS app's code editor.
3DS editor on the left, SynWrite on the right:
It needs the SmileBASIC font to be installed on your system, which I included of course. It can be downloaded from the Supplements section of SmileBASIC's website, anyway.
To load the lexer, go to Options > Customize lexers library...
Click on the icon to import the lexer from a file and then select it.
It will be used automatically when you load files with the .prg extension.
You can also select it manually from the lexer menu, at the bottom of the editor screen.
To make SynWrite more similar to the original editor, go to Options > Customize (or hit F9) and:
In Editor > View Settings
-Disable "Show right margin"
-Set Line spacing to 0
-Disable "Last line shows on top"
In Editor > Carets
-Disable "Allow caret position after end-of-line"
Also. set the line endings to "Unix(LF)".