This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-07
Channels
- # announcements (2)
- # beginners (30)
- # calva (7)
- # cherry (15)
- # clerk (21)
- # clojure (1)
- # clojure-losangeles (12)
- # clojure-norway (1)
- # clojure-spec (3)
- # clojurescript (31)
- # conjure (2)
- # cursive (44)
- # datomic (13)
- # emacs (13)
- # honeysql (15)
- # hyperfiddle (7)
- # malli (2)
- # off-topic (17)
- # overtone (6)
- # reitit (7)
- # ring (58)
- # shadow-cljs (12)
- # squint (14)
- # tools-deps (14)
- # web-security (1)
- # xtdb (29)
How exactly are they broken?
i mean, i can balance them by undoing, or by commenting out and then inserting, but i figured, maybe there are better ways
First, keep an eye on them when closing parens, make sure we do not do too many or too few. Rely on indentation as we type. That tells us when we are off a little. option-cmd-L reindents after a lot of code juggling. Make sure the result is what we expect. Oh, when closing a parens, keep an eye on the status line showing what we just closed. I am NOT a fan, but some like Paredit or Parinfer. Bit of a learning curve there. Finally, walk out ) by ) to see what is being balanced. Most of all, give it time. It will be second nature in a month.
i cut a lot of code by selecting lines, if the parens are imbalanced per line, which they often are, it happens
Forget line-based in the land of parens. In a Lisp we edit more sensibly, in units of "forms" or expressions. Double-click a parens to grab the whole thing.
No Lisp for you! :rolling_on_the_floor_laughing:
Seinfeld reference ^^^
You can double-click any expr.
I never watched Seinfeld. But I know about "The Soup Nazi".
Show some text, plz. btw, nice to meet someone who hates typing more than I.
it's muscle memory to select a line, cut it and the paste it and remove what is not needed
It is harder for good programmers to learn new editing than to learn new languages.
It is funny, I started doing live coding videos and after a decade of using Cursive decided I should learn some keychords. Wow! And these are not Parinfer/Paredit, which is what fooled me. Let me know if you find any good ones.
Under the top-level "Edit" menu look all the way down to "Structural Editing". Learn one new one over coffee every morning. 🙂
nah, coffee is for later in the day, can't start the day with the coffee because then the crash coincides with food coma from lunch
You seem to have worked out your coffee drill in more detail than I. 👏
been drinking coffee for almost a decade longer than coding 😅 maybe in seven years i figure out my coding drill details too 😄
I adhere to the macrobiotic principle: when I crash, I crawl back into bed. On-site, I sleep in my chair. They hate that.
I got quite a kick out of vi
during a brief encounter. Could easily win me over from keychords. But as a wise language inventor once said, programming is not about typing, so I just get on with it.
If you want to cut and paste lines and have the parens automatically fixed up, parinfer is what you want. I use it myself, and I think it’s pretty great. Enable it at Settings | Editor | General | Smart Keys | Clojure.
I don’t have any documentation about it unfortunately, the OG website is here: https://shaunlebron.github.io/parinfer/, but the version in Cursive uses what’s called Smart Mode, which blends paren and indent modes. So, it should just do The Right Thing.
Selection expansion (which I think you were asking about) is here: https://cursive-ide.com/userguide/paredit.html#selecting-things