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

Combined command for backward/forwardSexp and backward/forwardUpSexp - backward/forwardSexpOrUp #1657

Closed
JJ-Atkinson opened this issue Apr 2, 2022 · 4 comments

Comments

@JJ-Atkinson
Copy link
Contributor

As per some discussion on slack, I'd like to request a new paredit command that will go up if at the end of an sexp.

Current forwardSexp behavior: (| is cursor, each line is an invocation of fwdSexp)

(def x (|inc 1))
(def x (inc |1))
(def x (inc 1|))
(def x (inc 1|)) ;; stopped moving

To more closely match some paredit behavior from Cursive that I use, it'd be nice to have this modified behavior:

(def x (|inc 1))
(def x (inc |1))
(def x (inc 1|))
(def x (inc 1)|) ;; Escaped the sexp
(def x (inc 1))| ;; Escaped the sexp
@corasaurus-hex
Copy link
Contributor

I agree this would be great! We could go even further, though, like in this issue: #1487

@corasaurus-hex
Copy link
Contributor

Specifically the movements here for curly braces and brackets https://github.com/luxbock/evil-cleverparens#movement

@corasaurus-hex
Copy link
Contributor

ohh this is just similar but not identical to my feature request. ignore me!

@JJ-Atkinson
Copy link
Contributor Author

@corasaurus-hex Peter actually pointed me at your issue - I've not considered that feature before. Unfortunately I have very little idea on how to implement that, so I'm working on the one I understand :P

PEZ added a commit that referenced this issue Apr 2, 2022
Add new `paredit.[backward/forwardSexpOrUp]`. Fixes #1657
@bpringe bpringe closed this as completed in 060b39e Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants