Fork me on GitHub
#calva
<
2022-12-21
>
Mendel14:12:31

Question: Is there a quick way to disable/comment out a form? I've been adding #_ before it, but that does mean I first need to move the curser to the beginning in the form. If that makes any sense.. Perhaps I'm just lazy

Mendel15:12:18

Ignore my question. found someone else their answer. basically what I am doing is already pretty quick (jump to the beginning of form with alt left and just type it in.

pez15:12:44

You can also use #C03DPCLCV9N. This function + keybinding does the trick:

;; Ignore the current (enclosing) form

(defn ignore-current-form []
  (p/let [[range text] (calva/ranges.currentEnclosingForm)]
    (calva/editor.replace vscode/window.activeTextEditor range (str "#_" text))))

;; Bind something like so:
;;     {
;;         "command": "joyride.runCode",
;;         "args": "(calva-api/ignore-current-form)",
;;         "key": "ctrl+alt+c i",
;;     },

🙏 1
Mendel20:12:08

Thank you so much, I'll have to take a look ay joyride I guess 🙂