[HN Gopher] Paredit mnemonics for slurping and barfing Lisp symb...
       ___________________________________________________________________
        
       Paredit mnemonics for slurping and barfing Lisp symbolic
       expressions
        
       Author : susam
       Score  : 64 points
       Date   : 2022-03-10 19:51 UTC (2 days ago)
        
 (HTM) web link (susam.net)
 (TXT) w3m dump (susam.net)
        
       | thewakalix wrote:
       | Congratulations, you came up with a programming verb that's even
       | more disgusting than "squelch".
        
         | casion wrote:
         | Came up with? Slurp/Barf are _at least_ ~35 years old. Possibly
         | more?
        
           | charcircuit wrote:
           | That doesn't make those terms any less disgusting to use.
        
       | agumonkey wrote:
       | next: paredit-convolute-sexp
        
       | volforix wrote:
       | 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.
        
         | Jim_Heckler wrote:
         | 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.
        
         | tut-urut-utut wrote:
         | For Lisps I prefer parinfer. It just works, no need to learn
         | any new shortcuts.
        
       | clircle wrote:
       | 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
        
       | db48x wrote:
       | https://emacsrocks.com/e14.html
        
       | melony wrote:
       | Any good pre-made keybinding options for VS Code Vim?
        
       | servytor wrote:
       | 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...
        
       | redsid wrote:
       | cannot do clojure without paredit, which is all finger memory now
        
       | Snarwin wrote:
       | 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...
        
       | draven wrote:
       | 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.
        
       | slifin wrote:
       | I'm learning structural editing at work at the moment, the most
       | useful ones for me so far have been:
       | 
       | - slurp forward
       | 
       | - raise
        
       ___________________________________________________________________
       (page generated 2022-03-12 23:01 UTC)