Skip to content

lispy 0.24.0

Compare
Choose a tag to compare
@abo-abo abo-abo released this 08 Mar 18:33
· 1664 commits to master since this release

Fixes

  • DEL behaves properly after a string and one space.
  • C-k works better for expressions preceded with "#".
  • 3 should not add a space when there is one already.
  • # will not add a space after a comma.
  • C-j works better in comments after a quote.
  • lispy--eval-elisp-form first arg is now named lispy-form instead of form. It was impossible
    to evaluate an unrelated form variable with the previous behavior.
  • F again works properly when jumping to a jar (e.g. to defn) from Clojure source.
  • C-k won't call delete-region in some obscure branches.

Enhancements

  • P (lispy-paste) will add a newline when called from start of line. This way,
    nP becomes equivalent to c (lispy-clone). Of course, it's more flexible: you
    can do e.g. nkP.
  • xb (lispy-bind-variable) now works on regions as well. Use it to bind the current
    sexp or region as a let-bound variable: it will put you in iedit. When you're done with iedit, press
    M-m (lispy-mark-symbol) to exit iedit. If you need to move the let binding around, use
    a combination of C (lispy-convolute) and h (lispy-left).
  • g will ignore loaddefs.el for Elisp.
  • M-m works better in unbalanced buffers, which should be an rare thing.
  • add defhydra to lispy-tag-arity: now g will recognize defhydra statements.
  • The tag logic was improved to do less parsing.
  • lispy-outline was updated to match the standard ^;;; outline regex. Try pressing I
    in e.g. org.el, it's quite beautiful.
  • All lispy-eval functions will preserve the match data.
  • > will delete the extra whitespace while slurping.
  • Added undercover/Coveralls test coverage report.
  • H (lispy-ace-symbol-replace) is now a Hydra: type h to delete more, type
    u to undo.
  • Q (lispy-ace-char) now uses avy to jump. This change allows to cover this
    function with a test.

New features

p can now iterate dolist variables in Elisp.

(defun range (a b)
  (message "called range")
  (number-sequence a b))
(dolist |(i (range 1 3))
  (message "i=%d" i))

Pressing p with point where | is, will

  • call range and set i to 1
  • set i to 2
  • set i to 3
  • set i to nil
  • call range and set i to 1

This is another step toward edebug-less debugging, adding to special behavior for let, cond
and labels.

Incompatible changes

  • lispy-helm-columns is now a list '(60 80). The first number is the width of the tag name
    column, the second number is the width of both tag name and tag file.
  • j and k should now move to outline when at beginning of comment. The previous
    behavior was to look for the first sexp in the direction. You can still do that with f.
  • I (lispy-shiftab) is now a two-way cycle, instead of three-way, like org-mode.
    The contents can be obtained with C-u I or C-u C-TAB.