[Quickscript] Newline, but don't move the comments

Link to the quickscript.

Suppose you have the following code:

(define pairs
  '([a b]
    [c d])) ; This pair is special

and you want to add a new pair [e f]. You press Enter after the [c d] but you get:

(define pairs
  '([a b]
    [c d]
    )) ; This pair is special

and now you need to move the comment back to its original line.
With this quickscript, instead you just need to press Control-Enter instead of Enter to get:

(define pairs
  '([a b]
    [c d] ; This pair is special
    |))

with the cursor at | ready to type the next pair.

4 Likes