Fork me on GitHub

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


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.


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

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