This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-27
Channels
- # announcements (10)
- # bangalore-clj (1)
- # beginners (130)
- # calva (8)
- # cider (66)
- # circleci (2)
- # clojure (197)
- # clojure-europe (2)
- # clojure-italy (8)
- # clojure-nl (5)
- # clojure-spec (14)
- # clojure-uk (35)
- # clojurescript (46)
- # code-reviews (5)
- # cursive (4)
- # datomic (88)
- # duct (1)
- # emacs (2)
- # figwheel-main (15)
- # fulcro (20)
- # graalvm (1)
- # graphql (3)
- # jackdaw (2)
- # leiningen (2)
- # off-topic (64)
- # pathom (53)
- # re-frame (52)
- # reagent (12)
- # reitit (43)
- # rewrite-clj (1)
- # shadow-cljs (38)
- # spacemacs (3)
- # sql (17)
- # tools-deps (6)
- # vim (30)
If I have (map #(* % % [1 2 3]))
how do I move that collection out of the anon function into its correct spot? Where should the cursor be and is it slurping or barfing? I have vim-sexp
, vim-sexp-mappings-for-real-people
and parinfer-rust
and for some reason it just isn't clicking for me and I know I'm leaving some powerful structural editing capabilities on the table.
That moves the said parenthesis to the direction of the "arrow". It's barfing since it takes stuff out from between the parentheses.
yes! Thank you. Oh man, I must have tried every combo but the most obvious, correct one. How would you say that command out loud? "Slurp backwards?
the bracket and the parenthesis really do seem like an intuitive way to do this! It makes sense. I'm just absurdly slow on the pickup sometimes. haha. thanks again, I'll keep practicing.
the parinfer way to do this would be to place your cursor in insertmode after the last %
, then type )
. It should barf the collection out of the form.
also I'm curious how well it works to combine paredit (vim-sexp) and parinfer. I've switched between them, but never used them both at the same time.
interesting. I don't get that behavior, I wonder if it's because I am using the combination.
Yeah, I haven't quite committed yet so my plan is to kind of learn how to use paredit for structural editing but then have parinfer as my main tool allowing me to use indentation to get where I want.
yup. That's what I love about it. And then I can use paredit commands when indentation isn't the right method if that makes sense. that way I know basic paredit if I decide to switch back to that.
Say I go back to emacs or something, I didn't like parinfer in emacs at all. And Cursive and Calva use paredit style I think too.
i'm probably holding myself back in both instead of getting the best of both worlds like how I'm imagining but whatevs
I think it sounds like a cool approach. I'm only using parinfer now, and in some cases I wish I had my paredit commands.
and here I am wondering if I need the paredit commands. Your description of the parinfer way to do it sounds great so I might experiment going solely with parinfer. lol! Grass is always greener I guess
i think paredit and parinfer work well together. your setup with vim-sexp, vim-sexp-mappings-for-regular-people, and parinfer-rust is exactly my setup as well, and i haven't run into problems
i mostly find myself doing things the parinfer way at this point. i could probably do away with vim-sexp, come to think of it
hmm, i think i do use these pretty often, though: https://github.com/guns/vim-sexp#text-object-motions-normal-visual-operator-pending
in particular, i use (
and )
in normal mode to move to the nearest paired structural bracket. that one's super handy
...and i use <localleader>o
to raise the current form to replace its parent form. ok, so i do still use vim-sexp mappings fairly often, even if i don't realize it! 😄
Lol! Yes, I definitely use the (
and )
a lot but haven't taken advantage of all this other stuff yet.
I'm about to check out some parens of the dead again though and I know that's going to inspire me to level up my structural editing!
He is an emacs guy though but I don't remember if he uses evil or not. But check him out if you haven't.
You're going to be left in the dust when Magnar pulls out his custom Clojure-specific emacs macros 😁