Skip to main content

rewrite-clj.paredit

B

  • barf-backward

    Returns `zloc` with leftmost node of the parent sequence pushed left out of the sequence. - `[1 2 [3 |4] 5] => [1 2 3...

  • barf-forward

    Returns `zloc` with rightmost node of the parent sequence pushed right out of the sequence. Comments and newlines pre...

J

  • join

    Returns `zloc` with sequence to the left joined to sequence to the right. Also works for strings. If sequence types ...

K

  • kill

    Returns `zloc` with the current node and all sibling nodes to the right removed. Locates `zloc` to node left of delete...

  • kill-at-pos

    Return `zloc` with found item starting at `pos` removed to its natural end. If `pos` is: - inside a string, remove...

  • kill-one-at-pos

    Return `zloc` with node/word found at `pos` removed. If `pos` is: - inside a string or comment, removes word at `po...

M

  • move-to-prev

    Move node at current location to the position of previous location given a depth first traversal - `(+ 1 (+ 2 |3) ...

R

  • raise

    Delete siblings and raise node at zloc one level up - `[1 [2 |3 4]] => [1 |3]`

S

  • slurp-backward

    DEPRECATED: we recommend [[slurp-backward-into]] for more control. Returns `zloc` with node to the left of nearest el...

  • slurp-backward-fully

    DEPRECATED: We recommend instead [[slurp-backward-fully-into]] for more control. Returns `zloc` with all left sibling...

  • slurp-backward-fully-into

    Returns `zloc` with all left sibling nodes of nearest eligible sequnece slurped into that sequence else `zloc` See al...

  • slurp-backward-into

    Returns `zloc` with node to the left of nearest eligible sequence slurped into that sequence else `zloc` unchanged. O...

  • slurp-forward

    DEPRECATED: we recommend [[slurp-forward-into]] instead for more control. Return `zloc` with node to the right of nea...

  • slurp-forward-fully

    DEPRECATED: We recommend [[slurp-forward-fully-into]]] for more control. Return `zloc` with all right sibling nodes o...

  • slurp-forward-fully-into

    Return `zloc` with all right sibling nodes of nearest eligible sequence slurped into that sequence else `zloc` unchanged...

  • slurp-forward-into

    Return `zloc` with node to the right of nearest eligible sequence slurped into that sequence else `zloc` unchanged. O...

  • splice

    See [[rewrite-clj.zip/splice]]

  • splice-killing-backward

    Return `zloc` with current and right siblings spliced into parent sequence. - `(a (b c |d e f) g) => (a |d e f g)` ...

  • splice-killing-forward

    Return `zloc` with left siblings spliced into parent sequence. - `(a (b c |d e f) g) => (a b |c g)`

  • split

    Return `zloc` with parent sequence split into to two sequences at current node. Location is retained. If split would r...

  • split-at-pos

    In-string aware split. Returns `zloc` with node found at `pos` split. If `pos` is inside a string, splits string into ...

W

  • wrap-around

    Wrap current node with a given type `t` where `t` can be one of `:vector`, `:list`, `:set`, `:map` `:fn`. - `|123 => ...

  • wrap-fully-forward-slurp

    Create a new seq node of type `t` left of `zloc` then slurp fully into the new node - `[1 |2 3 4] => [1 [|2 3 4]]`