Open mikavilpas opened 8 years ago
Also: have this in a FAQ, others might wonder this too.
I have three patterns:
2(
in lispy. If it's multiple nested, it's not as effective(let ((return-value-of-function|)))(some-function-call "hello")
Just call slurp the paredit way (C-)
) three times. Even though it's a chord, it's simple and easy.
ESC > > >
, using evil cleverparens binds.These are good suggestions. I've been using the 2nd way myself, but the third I didn't know about. It's definitely more evil-like.
At the moment I think a paredit-like binding could be a good compromise between comfort and "the evil way". But I'll have to look at evil cleverparens as well, to see if they have more good ideas that could be used.
Ah there's another way which I forgot, but I actually use a bit, which is M-(
mapping for lispy-wrap-round. Successive calls to this each time you'd open a paren gives the result we'd want.
Here is a sample use case:
I start with this (point is at
|
):Now I want to create a
let
form and give the return value a name. So I start to write this:Now I would obviously like to have the function call after the variable name, so in other words I want to slurp three times. Here is the end result:
Question: what is a natural way of doing this?