Maybe I am missing something in the DrRacket workflow, but I find this to be a very useful feature in any text editor. I have been googling for a while, and I haven't found an answer for this. With snippets, I mean code templates like the ones defined in, say, yasnippet.
Maybe there is a QuickScript?
2 Likes
Writing code snippets with Quickcript is straightforward --- you won't get the [tab] movement though. See the docs.
The complete-word quickscript from quickscript-extra package further allows you to type an abbreviation in the editor, then call the complete-word script (with its keybinding or from the menu) and it turns the abbreviation into the template, placing the cursor at a convenience place.
For example you can type lbd|
(|
is the cursor), call the script, and it replaces it with (λ (|) )
.
There are also many other scripts here.
3 Likes