Skip to content

How is wrapAround supposed to work? #20

@PEZ

Description

@PEZ

I expect paredit-wrapAround to wrap the current expression if nothing is selected. Currently it wraps the next (forward) expression, and includes whatever of the current expression is forward from the cursor. For instance, if the cursor is on the i in printlin here:

(println (parting "Mark"))

the result is

(pr(intln (parting "Mark")))

Inside strings things get a bit more strange. If the string is the last thing inside some parens en empty list is inserted. So if the cursor is on s in "es" in the below expression:

(println (parting "Mark" "es"))

Result is:

(println (parting "Mark" "e()s"))

But if the string is somewhere else in a paren-enclosed form it often wraps to, and including, the end of the defn/toplevel expression. So if the cursor is on r in "Mark" in the above expression, I get:

(println (parting "Ma(rk" "es")))

which, since the first paren is inside the string, gives an unbalanced expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions