Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keybinding for evaluating current form #1720

Closed
ryepesg opened this issue Apr 26, 2016 · 5 comments
Closed

Keybinding for evaluating current form #1720

ryepesg opened this issue Apr 26, 2016 · 5 comments

Comments

@ryepesg
Copy link

ryepesg commented Apr 26, 2016

C-c C-c evaluates the top level form, but some times you want to evaluate just the most near current form. For example in the following code when you have the cursor on the word reduce, there is not an easy way to evaluate just (reduce + [1 2 3]):

(defn f []
  (inc (redu|ce + [1 2 3])))

My suggested keybinding for this functionality is C-c C-v.

@expez
Copy link
Member

expez commented Apr 26, 2016

You should use C-x C-e. Just move your cursor a little :)

@ryepesg
Copy link
Author

ryepesg commented Apr 26, 2016

Thank you, I know it is a possibility, but still you have to come back again to continue editing your form. Also, in nested forms is not that easy find the correct parenthesis without move, visually check highlighted parenthesis, move again, visually check...

@bbatsov
Copy link
Member

bbatsov commented Apr 26, 2016

I think such a command makes sense. From time to time I've wondered myself why no (few?) Emacs modes have it.

@Malabarba
Copy link
Member

I've had several people ask me why cider evals the previous sexp instead of the current one, so I guess this command would make sense to a lot of people.

@ryepesg
Copy link
Author

ryepesg commented Apr 29, 2016

So fast! Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants