# Is there a way to get DrRacket to indent all on save?

**URL:** <https://racket.discourse.group/t/is-there-a-way-to-get-drracket-to-indent-all-on-save/2009>\
**Category:** Questions & Answers\
**Tags:** drracket\
**Created:** [June 13, 2023, 7:27pm UTC](https://racket.discourse.group/t/is-there-a-way-to-get-drracket-to-indent-all-on-save/2009 "2023-06-13T19:27:30Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [September 10, 2023, 3:25pm UTC](https://racket.discourse.group/t/is-there-a-way-to-get-drracket-to-indent-all-on-save/2009/9 "2023-09-10T15:25:08Z")

</div>

Now that Quickscript has hooks (see [here](https://racket.discourse.group/t/any-way-to-hook-running-a-quickscript-script-on-events-in-dr-racket/1887/6)), it should be fairly easy to format as you wish:

From [this script](https://gist.github.com/Metaxal/2628c2d4909cee135e5f6dd8254602a0), just replace the line that removes trailing spaces with

```scheme
       (define new-str (program-format str))

```

This requires Racket ≥v8.10.3 (which is in the snapshot for now). Let me know if that works — or not!

---

_[View the full topic](https://racket.discourse.group/t/is-there-a-way-to-get-drracket-to-indent-all-on-save/2009)._
