I often need to swap s-expressions. How can I do that with paredit? I want to do things like the following:
(list |1 0)
(list 0 |1)
or:
(list 1 |0)
(list |0 1)
I often need to swap s-expressions. How can I do that with paredit? I want to do things like the following:
(list |1 0)
(list 0 |1)
or:
(list 1 |0)
(list |0 1)
Emacs comes with such command out of the box, transpose-sexps
. It's bound to C-M-t by default.
C-M-t
. – DoMiNeLa10 Sep 2 '18 at 15:14C-M-f
orC-M-b
to move forward/backward over sexps.) But different people use Emacs differently. – Drew Sep 2 '18 at 22:49