This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-21
Channels
- # adventofcode (47)
- # aleph (18)
- # announcements (20)
- # babashka (81)
- # beginners (23)
- # biff (6)
- # calva (5)
- # cider (50)
- # clojure (34)
- # clojure-europe (19)
- # clojure-norway (11)
- # clojure-spec (6)
- # clojure-uk (1)
- # clojurescript (2)
- # conjure (2)
- # cursive (14)
- # datomic (1)
- # humbleui (11)
- # hyperfiddle (3)
- # introduce-yourself (5)
- # joyride (1)
- # nbb (7)
- # off-topic (19)
- # podcasts-discuss (1)
- # reagent (3)
- # reitit (19)
- # releases (1)
- # ring-swagger (1)
- # shadow-cljs (29)
- # sql (6)
- # squint (56)
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
I just made that part of the Calva API example here: https://github.com/BetterThanTomorrow/joyride/blob/master/examples/.joyride/src/calva_api.cljs