In the case of active region, h in lispy will
do what you want. See my recent intro post.
In the first case, you need to M-m h.
update: all options that you have with lispy
Starting with:
(defn foo [x] (+ x ~42|))
Here, ~
denotes the mark (the start of the region), and |
denotes the point (the end of the region).
With h you get:
(defn foo [x] |(+ x 42)~)
With l you get:
(defn foo [x] ~(+ x 42)|)
With k you get (undoable with j):
(defn foo [x] (+ ~x| 42))
With 2k or kk you get :
(defn foo [x] (~+| x 42))
With d you get:
(defn foo [x] (+ x |42~))
With d> you get (undoable with <):
(defn foo [x] (+ |x 42~))
With d2> or d>> you get:
(defn foo [x] (|+ x 42~))
With m you get:
(defn foo [x] (+ x 42|))
Just to summarize, when region is active, h, j, k, l
are the arrows that move the region. > grows the region by one semantic unit in
the direction of the point. < shrinks the region by one semantic unit in the direction
of the point. m deactivates the mark. i selects the first element of the region,
and d exchanges point and mark.