Also read the language guide.
Here are some tips on using the editor.
Tip: You can open projects by dragging the file into the browser window.
Make sure your browser is up-to-date, and check you can save before starting work! I recommend using Chrome, although Firefox should work too.
Safari warning: Safari unhelpfully names saved files as
Unknown-2 and so on, so your Mac won’t recognise them as Scratch files. You have to rename them manually; unfortunately this is a problem with Safari and so there’s no way I can fix this.
Buying the Mac app should fix saving-related issues :-) It also works offline, supports autosave, and can load bigger project files.
Select some tosh code and press Tab ⇥ to auto-indent.
Tosh supports "code completion" or "auto-complete":
You can also press Tab ⇥ to jump between inputs, just like in Scratch!
I’m using Phosphorus to play projects.
Phosphorus runs Scratch projects very fast, and integrates into tosh very well. Unfortunately, it works slightly differently to how Scratch does.
The following things are not supported:
ghost: that is
Shift-click the green flag for turbo mode. This is the same as both Scratch and Phosphorus.
To rename a variable, use find/replace, like in a normal programming language!
Renaming a variable does not automatically update all the places it’s used, like Scratch does, because it wouldn’t work if you currently had a syntax error.
Now you can use most vim-like keybindings; see the CodeMirror docs.
To change it back, just run:
Remember, when the project is focused you can press
For the Mac app, instead run the following commands in Terminal:
defaults write org.tjvr.tosh.Tosh toshSettings -dict keyMap vim
To change it back:
defaults write org.tjvr.tosh.Tosh toshSettings -dict keyMap default
See Vim mode above, but use
emacs instead of
Some Scratch projects use “hacked” blocks: these are special blocks made by editing the JSON files by hand, which cannot be made using the normal Scratch editor.
There are currently no plans to support these. Sorry!