# Snippets in DrRacket?

**URL:** <https://racket.discourse.group/t/snippets-in-drracket/1633>\
**Category:** Questions & Answers\
**Tags:** drracket\
**Created:** [January 11, 2023, 4:00pm UTC](https://racket.discourse.group/t/snippets-in-drracket/1633 "2023-01-11T16:00:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Panadestein](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/panadestein/32/949_2.png) [@Panadestein](https://racket.discourse.group/u/Panadestein)\
**Post date:** [January 11, 2023, 4:00pm UTC](https://racket.discourse.group/t/snippets-in-drracket/1633/1 "2023-01-11T16:00:19Z")

</div>

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](https://github.com/AndreaCrotti/yasnippet-snippets/tree/master/snippets/racket-mode).

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [January 11, 2023, 6:28pm UTC](https://racket.discourse.group/t/snippets-in-drracket/1633/2 "2023-01-11T18:28:30Z")

</div>

Maybe there is a QuickScript?

@Laurent.O

---

<div class="post-metadata">

**Author:** ![Laurent.O](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/laurent.o/32/18_2.png) [@Laurent.O](https://racket.discourse.group/u/Laurent.O)\
**Post date:** [January 11, 2023, 6:40pm UTC](https://racket.discourse.group/t/snippets-in-drracket/1633/3 "2023-01-11T18:40:36Z")

</div>

Writing code snippets with Quickcript is straightforward --- you won't get the [tab] movement though. See the [docs](https://docs.racket-lang.org/quickscript/index.html).

The [complete-word](https://github.com/Metaxal/quickscript-extra/blob/master/scripts/complete-word.rkt) quickscript from [quickscript-extra](https://docs.racket-lang.org/quickscript-extra/index.html) 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](https://github.com/racket/racket/wiki/Quickscript-Scripts-for-DrRacket).
