Has anybody else felt Atom editor screws up parens by "auto-fixing" them during cut-paste and indentation? /cc @seancorfield
I've followed https://medium.com/@jacekschae/slick-clojure-editor-setup-with-atom-a3c1b528b722 to setup Atom.
^^ /cc @jacek.schae
@kumarshantanu The short answer is "it depends". The long answer is "it works nearly every time but..."...
If you copy and paste a single form across multiple lines, that can go wrong. If you copy and paste entire blocks of lines and let parinfer sort things out, it works. I have had paredit slurp break sometimes...
@seancorfield Is there a way to disable this behavior? Perhaps I should try disabling Parinfer and see.
As of now, even pressing Enter
at the end of an inner form doesn't work - it doesn't move rest of the code to the next line where I could add something.
And one more question: How can I reindent some code in Atom? (Like pressing Tab
on any line corrects the indentation in Emacs/Clojure-mode and Eclipse/CCW.)
ctrl-alt-i
as I recall.
(i.e., alt-tab
)
Thanks, @seancorfield ctrl-alt-i
works!
@kumarshantanu :
> As of now, even pressing Enter
at the end of an inner form doesn't work - it doesn't move rest of the code to the next line where I could add something.
This takes a little while to get used to. If you start typing Parinfer will move that paren-trail down. (I have asked in #parinfer about if this behaviour could be altered, because even though I am used to it is still doesn't really play well with me. This is why Infer parens is an explicit command in Calva, and not something that happens as you type.)
@pez Thanks for chipping in. I'll try vscode with calva again - found no guide recently to set up vscode with bells and whistles like the one I linked above for Atom.
@kumarshantanu: It's extra ironic, because the guy who wrote that guide wanted to write a guide for Calva too, until he realized that it didn't infer parens as-you-type, at which point he thought Calva was so broken that he didn't want to write the guide. 😃
Haha, I have meanwhile disabled Parinfer on Atom and I like it better. I tried Calva long time back and I liked it then.
Full disclosure: Calva lacks some of the really cool stuff that ProtoREPL and Chlorine have. We're slowly closing the gaps, but anyway. However, there is little need for a guide as that one. Calva packs most things you need. I only add Clojure Warrior to the mix. (Which we might also incorporate into Calva down the road.)
The two big basic things lacking from Calva right now is a decent REPL window and jack-in functionality. Both will be fixed before Mars ends, I am hoping. Please feel invited to join #calva-dev for discussing Calva stuff further.
Actually, what threw me off was I found three packages Calva (1.3.63), Calva Clojure Formatter (0.0.38) and Calva Paredit (0.1.22) when I searched for Calva
on vscode - I didn't know which ones to choose etc.
Yeah, majorly confusing! We're fixing that too with the first release sporting that REPL window. Then there will only be Calva. (FYI, you only need to install Calva.)
(The reason I allowed that confusion was that I wanted people to have the choice to use only the formatter and/or paredit, but something else for REPL stuff, but I have been convinced that now we instead will make Calva so awesome that no-one will want to use anything else. 😃 )
Sounds good to me. 🙂