Paredit mnemonics for slurping and barfing Lisp symbolic expressions
1–10 of 17 posts
Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#2See also: the animated guide to paredit: http://danmidwood.com/content/2014/11/21/animated-paredit.ht... for an animated presentation of those commands, plus a few more.
Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#3I'm learning structural editing at work at the moment, the most useful ones for me so far have been:
- slurp forward
- raise
Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#4Congratulations, you came up with a programming verb that’s even more disgusting than “squelch”.
Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#5Congratulations, you came up with a programming verb that’s even more disgusting than “squelch”.
Came up with? Slurp/Barf are _at least_ ~35 years old. Possibly more?
Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#6vim-sexp-mappings-for-regular-people [1] uses really easy-to-remember shortcuts for these:
- "backward slurp" is "- "forward slurp" is ">)" (move closing paren to the right)
- "forward barf" is "- "backward barf" is ">(" (move opening paren to the right)
[1]: https://github.com/tpope/vim-sexp-mappings-for-regular-peopl...
Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#7next: paredit-convolute-sexp
Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#8Thanks, I will give paredit a shot.
I'm a regular emacs user, but I normally use expand-region[1] and cut/paste to edit lisp code. Expand-region usually knows what I want to move around after just one or two calls, only requires one key binding, and has visual feedback. And it works great in every language I have used.
Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#9Re: Paredit mnemonics for slurping and barfing Lisp symbolic expressions
#10Try smartparens. It's a successor to paredit and works for other languages as well.
I have never coded (and navigated code) faster than in Clojure on Emacs w/ smartparens.