Learn to use lispy.el with emacs-doom/evil proficiently

After I disabled lipy.el with emacs-doom, as I miss much of its functionality, I will re-enable it. Even though sometimes, it’s annoying with “Lisp expression:” prompt at the minibuffer when I
enter a symbol name. The frustration is that I have no way to escape from the
prompt. As long as I have a way to escape/abort, it would be fine,

I decide to bite the bullet and spend time to learn to use it properly.

If you have tips or experience, please share here. I, especially, wish to figure out how to escape the “tyranny” of “Lisp expression:” prompt, at the minibuffer.

I found the author did provide documentation and demonstration on YouTube. But it seems to me that its style may not be pedagogical enough for beginners. Let’s share notes on how to master it enough for productive lisp writing and editing.

I plan to study and practice it by major scenarios or work-flows. lispy provides many commands. It might be overwhelming. With the purpose of productivity, we only need to use the ones that enable us to be productive, and be able to avoid the ones that we don’t need.

So far, I enjoy lispy the most are the following:

  1. slurp after closed bracket

  2. comment whole expression at the beginning of the expression

  3. Insert newline to indent the whole expression

What are your favorite ones?

For the case of emacs-doom with lispy.el, it actually integrates with lispyville.el
so to properly use it, one may need to consult lispyville.el’s documentation, which can be found on github.com

Here are the related information from emacs-doom’s information for lispy integration:

If evil is enabled, lispyville would also be activated for every mode where
lispy is active

The default key themes that are set are as follows:

#+BEGIN_SRC emacs-lisp
'((operators normal)
c-w
(prettify insert)
(atom-movement normal visual)
slurp/barf-lispy
additional
additional-insert)
#+END_SRC

To change the key themes set ~lispyville-key-theme~. Think of
~lispyville-key-theme~ as the equivalent of ~parinfer-extensions~. See
lispyville’s [[lispyville/README.org at master · noctuid/lispyville · GitHub][README]] for more info on the specific keybindings of each key theme
(starting [[GitHub - noctuid/lispyville: lispy + evil = lispyville][here]]).

So for emacs-doom uses, the entry point of learning to use lispy is actually lispyville!

1 Like

Here is a some question that I’m looking for answers:

Given that lispyville implement safe operators in vi sense, for example,
one can delete the word after the cursor inside a list, while keeping the list structure.
Here is an illustration:
(+ 1 2)
where ‘’ indicate the cursor position on ‘(’ in normal mode (in vi sense)
typing dw, yielding
(1 2)

I wonder what would be the object (in vi sense) to delete the whole list?
(+ 1 2)
dx
x is stakeholder for the unknown object name?

I tried ds (for sentence), it still expects more input.
dd would just delete the current line while maintaining balance of parenthesis.

It’s a bit weird to use lispy with evil, since lispy switch modes based on your cursor position. How about symex?

Yes, I’ve studied a bit of symex.

The idea of additional mode for symex manipulation sounds neat.
But when trying it, I found the extra mode of symex between input, and normal mode a hindrance.
While with lispy in the input mode, when I know how to use it properly, it does the job well without much friction.

By the way, to me to learn lispy, I’ve annotated abo-abo’s Youtube demo by timestamps. I hope it helps others.
https://www.youtube.com/watch?v=BverGxP41cE

lispy is under-appreciated, due to its mass amount of functionality, and subtle conflicts with evil/lispyville, and lack of structure in its introduction.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.