News for hackers. Stuff that matters.
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by Snarwin on Saturday March 12, 2022 @08:11AM (#30651101)
vim-sexp-mappings-for-regular-people [1] uses really easy-to-remember shortcuts for these:

- "backward slurp" is "<(" (move opening paren to the left)

- "forward slurp" is ">)" (move closing paren to the right)

- "forward barf" is "<)" (move closing paren to the left)

- "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 ... by clircle on Saturday March 12, 2022 @08:30AM (#30651195)
Thanks, 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.

[1] https://github.com/magnars/expand-region.el

Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by draven on Saturday March 12, 2022 @07:19AM (#30650870)
See 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 ... by volforix on Saturday March 12, 2022 @09:42AM (#30651688)
Try 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.
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by Jim_Heckler on Saturday March 12, 2022 @09:48AM (#30651723)
Also try Lispy (only for lisps). Works just like SP and Paredit except most commands require a single unmodified key press, but can only be used when point precedes or follows a delimiter or text is selected. Feels like magic.
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by tut-urut-utut on Saturday March 12, 2022 @12:01PM (#30652754)
For Lisps I prefer parinfer. It just works, no need to learn any new shortcuts.
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by db48x on Saturday March 12, 2022 @11:35AM (#30652517)
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by servytor on Saturday March 12, 2022 @11:44AM (#30652604)
I'm racking my brains, but in the #lisp channel I read a discussion about dealing with parentheses before paredit, and it was really interesting. I entirely forget the key-chords that were mentioned though...
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by agumonkey on Saturday March 12, 2022 @08:20AM (#30651139)
next: paredit-convolute-sexp
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by slifin on Saturday March 12, 2022 @07:20AM (#30650875)
I'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 ... by melony on Saturday March 12, 2022 @01:09PM (#30653370)
Any good pre-made keybinding options for VS Code Vim?
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by redsid on Saturday March 12, 2022 @12:14PM (#30652871)
cannot do clojure without paredit, which is all finger memory now
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by thewakalix on Saturday March 12, 2022 @07:21AM (#30650881)
Congratulations, you came up with a programming verb that’s even more disgusting than “squelch”.
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by casion on Saturday March 12, 2022 @08:10AM (#30651094)
Came up with? Slurp/Barf are _at least_ ~35 years old. Possibly more?
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by charcircuit on Saturday March 12, 2022 @09:41AM (#30651684)
That doesn't make those terms any less disgusting to use.
Re:Paredit mnemonics for slurping and barfing Lisp symbolic ... by shakna on Saturday March 12, 2022 @07:50PM (#30656721)
Squelch is a disgusting verb? Is this one of those "I can't stand the word moist" things?