Fork me on GitHub
#editors
<
2019-02-22
>
Shantanu Kumar03:02:09

Has anybody else felt Atom editor screws up parens by "auto-fixing" them during cut-paste and indentation? /cc @seancorfield

seancorfield06:02:07

@kumarshantanu The short answer is "it depends". The long answer is "it works nearly every time but..."...

seancorfield06:02:49

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...

Shantanu Kumar06:02:06

@seancorfield Is there a way to disable this behavior? Perhaps I should try disabling Parinfer and see.

Shantanu Kumar06:02:43

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.

Shantanu Kumar06:02:46

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.)

seancorfield06:02:33

ctrl-alt-i as I recall.

seancorfield06:02:50

(i.e., alt-tab)

Shantanu Kumar06:02:03

Thanks, @seancorfield ctrl-alt-i works!

pez08:02:34

@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.)

Shantanu Kumar08:02:18

@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.

pez09:02:44

@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. 😃

Shantanu Kumar09:02:34

Haha, I have meanwhile disabled Parinfer on Atom and I like it better. I tried Calva long time back and I liked it then.

pez09:02:45

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.)

pez09:02:59

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.

Shantanu Kumar09:02:19

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.

pez09:02:53

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.)

5
pez09:02:33

(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. 😃 )

Shantanu Kumar09:02:10

Sounds good to me. 🙂