mikavilpas / evil-lispy

precision Lisp editing with Evil and Lispy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marking the first symbol

Andre0991 opened this issue · comments

Hi.

I'm wondering how to select the first symbol of a sexp.

In https://www.youtube.com/watch?v=BverGxP41cE, abo-abo selects it with mi.

When I press m, the whole defmacro gets selected. Is this expected?

Seems that originally i is special-lispy-flow in Lispy and it's not bound in evil-lispy. Do you use a to select the symbols?

(defmacro lispy-from-left (&rest body)
  "Ensure that BODY is executed from start of list."
  (let ((at-start (cl-gensym "at-start")))
    `(let ((,at-start (lispy--leftp)))
       (unless ,at-start
         (lispy-different))
       (unwind-protect
            (lispy-save-excursion
              ,@body)
         (unless (eq ,at-start (lispy--leftp))
           (lispy-different))))))

Thanks.

Oh, it's mf, as i and f are swapped :)