Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Magnar Sveen edited this page Apr 3, 2015 · 1 revision

ml Move to let

Move the current form to the closest let.

Given this:

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

With the cursor in front of 200, I do cljr-move-to-let:

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

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

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

Pretty handy. And it works with if-let and when-let too.

Clone this wiki locally
Morty Proxy This is a proxified and sanitized view of the page, visit original site.