Fork me on GitHub
#spacemacs
<
2018-07-24
>
Pak10:07:14

Also, there’s M-x cider-repl-history, there’s some additional customizations you can do to persist the repl history to file too, although not sure how it works if you have multiple repls open

Josh Horwitz16:07:30

So I’m really struggling with how to wrangle the parens , mostly when going back in and having to add code, writing brand new code is no problem. I’m not sure what to do

eggsyntax20:07:36

@joshua.d.horwitz @joshua.d.horwitz (?) are you using some flavor of structural editing? It's pretty much the only way to do it -- I almost ever only insert/copy/delete at the sexp level, ensuring that parens stay matched at all time. Happy to help you get started with that if you're not already.

practicalli-john20:07:41

@joshua.d.horwitz the deliciously sounding slurp and barf are your friends along with other structural editing tools (as Egg mentioned. There is a secion on Lisp mode in the Spacemacs ABC screencasts that should give you a good start. Go to 10 mins 35 seconds in this video https://www.youtube.com/watch?v=fYsqaAL8HSU&amp;list=PLrJ2YN5y27KLhd3yNs2dR8_inqtEiEweE&amp;index=5

practicalli-john20:07:26

I started working on structural editing in my book, but this section needs a bit of work. A quick glimpse through this section will hopefully give you some ideas https://practicalli.github.io/spacemacs/structured-editing/

Chase23:07:31

this was something i was really looking for too! thanks folks.

Josh Horwitz23:07:07

I’ll check that out now

Chase23:07:19

i also had a vim-fu meta kind of question. is that preferred in the vim channel? it's not necessarily about clojure in vim either so i can go to the vim irc or something. basically there is a long, repetitive function in the brave book at: https://www.braveclojure.com/do-things/#The_Shire_s_Next_Top_Model What kind of vim commands would you use to make writing that function out a lot less painful. (obviously i could copy paste but i'm looking for general vim improvement and see many clojure functions that are kind of like this.

Aleksander08:07:26

There is a #vim channel as well

Chase23:07:22

right now i just yanked the map of {:name "head" :size 3} and pasted it 18 more times and am manually going to each line, changing the word in quotes using cw, changing the size number using r, going to the next line, hitting enter to move the next copy pasted line to the next line, leaving insert mode to go to the next word in quotes, and repeating the whole thing. how would you do it instead?