Skip to content

Sexp move (and other structural edit navigation) #1238

@ypytomets

Description

@ypytomets

It's a question or feature request:

  • Is there a command(s) that would let user move sexp around, without explicit cutting/yanking, like:
function () {
  h█elper("move me")
  return true
}
there()
here()
  • Do sexp-up+sexp-next+sexp-down:
function () {
  return true
}
t█here()
here(helper("move me"))
  • And sexp-previous+sexp-over-down:
function () {
  return true
}
t█here(
  here(helper("move me"))
)
  • And sexp-down+sexp-transpose-nested:
function () {
  return true
}
h█ere(
  there(helper("move me"))
)

Maybe sexp-yank-after, sexp-yank-into, sexp-yank-around, sexp-yank-replace (with/without nested?) would be handy too. And/or some combinations of yank-ing and opening/shrinking the new line at certain part of the sexp (inside, around, etc). Also sexp-remove-upper (but keep nested), and sexp-remove-nested (or sexp-rm-down -- remove nested sexp without moving the cursor)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions