Skip to content
Magnar Sveen edited this page Apr 3, 2015 · 3 revisions

il Introduce let

Place the current form inside a new let form.

Given this:

(defn handle-request
  {:status 200
   :body (find-body abc)})

With the cursor in front of (find-body abc), I do cljr-introduce-let:

(defn handle-request
  {:status 200
   :body (let [X (find-body abc)]
           X)})

Now I have two cursors where the Xes are. Just type out the name, and press enter.