Fork me on GitHub
#rewrite-clj
<
2022-01-25
>
orestis19:01:29

Is there a technique to insert nodes and keep the previous line indentation? In my case I want to add an entry to a require clause at a specific location and match the current file’s indentation

orestis19:01:32

Also, am I correct to think that since the insert-* functions don't move the position of the zipper, the correct sequence is: 1. Find sibling node 2. Insert-right new ns 3. insert right new line 4. Insert right n spaces

orestis19:01:05

I'm trying to figure this out at the REPL but for some reason I get confused. Probably a morning task :)

lread20:01:37

@orestis if you scroll back to Sept 25th-ish of last year in this channel, you’ll find a Q&A that might cover your issue. Lemme know!