Lisp editing

From WikEmacs
Revision as of 11:51, 15 September 2015 by Elvince (talk | contribs) (started page on how to edit lisp code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Built-in modes

With evil-mode

Lispy, a vi-like paredit

Lispy makes it easier to edit lisp code when we use evil-mode.

It offers very short keybindings. For example, going to the next parenthesis is bound to j, s moves down the current expression, e to eval and xe to edebug, xd turns current lambda into a defun, etc

The price to pay is that the bindings are only active when:

  • the point is before an open paren: (, [ or {
  • the point is after a close paren: ), ] or }
  • the region is active

Installation

Via MELPA:

   M-x package-install RET lispy RET

(you might want to M-x package-refresh-content beforehand).


Tips and tricks

Make "dd" delete an expression

di( or da( isn't specific to lisp, they are just evil text objects.

See also

The emacs lisp page.