Check out Kent Beckman&#x27;s Prune for ideas along this line: <a href="https:&#x2F;&#x2F;www.facebook.com&#x2F;notes&#x2F;kent-beck&#x2F;prune-a-code-editor-that-is-not-a-text-editor&#x2F;1012061842160013" rel="nofollow">https:&#x2F;&#x2F;www.facebook.com&#x2F;notes&#x2F;kent-beck&#x2F;prune-a-code-editor...</a>. It&#x27;s not quite the same since it&#x27;s more like an enforced paredit, but it contains a lot of similar ideas and also enforces indentation.