cursive

Issues at: https://git.io/cursive-issues
Endre Bakken Stovner 2021-04-13T15:44:28.195Z

How do you comment a form in cursive?

Endre Bakken Stovner 2021-04-14T13:55:45.202500Z

Thanks!

👍 1
Endre Bakken Stovner 2021-04-13T15:44:37.195200Z

Comment out that is

imre 2021-04-13T15:45:12.195300Z

#_

imre 2021-04-13T15:45:46.195500Z

This applies to all of clojure, not only cursive though

imre 2021-04-13T15:45:59.195700Z

So I might have misunderstood your question

Endre Bakken Stovner 2021-04-13T15:46:01.195900Z

Ah, so there is no comment form like in emacs.

imre 2021-04-13T15:47:17.196100Z

There isn't an intellij action for it, no

imre 2021-04-13T15:47:48.196300Z

There's an open issue however https://github.com/cursive-ide/cursive/issues/1047

Endre Bakken Stovner 2021-04-13T15:58:11.196600Z

Good to know!

2021-04-13T16:01:02.196800Z

I mean, the block comment action works. It just prefixes all the lines which isn't always nice. Parinfer does the right thing though

imre 2021-04-13T16:06:23.197Z

Hmm. block comment action is disabled for me no matter whether I'm in paredit or infer

2021-04-13T16:06:54.197200Z

That's strange... I'm using it on a regular basis

2021-04-13T16:07:09.197400Z

Via the keyboard shortcut anyway

imre 2021-04-13T16:13:22.197600Z

do you have anything selected when you invoke it?

2021-04-13T17:29:20.197900Z

well yeah… I don’t see how else you’d use it

2021-04-13T17:30:43.198100Z

pushing ⌘/

Phil Shapiro 2021-04-13T17:42:17.199100Z

I use comment. It’s not specific to cursive but works very well. https://clojuredocs.org/clojure.core/comment

🙏 1
raspasov 2021-04-13T17:58:31.199300Z

You can record an IntelliJ macro (nothing to do with Clojure macros) https://stackoverflow.com/questions/9638895/rubymine-shortcut-to-insert/9639266#9639266

imre 2021-04-13T17:58:34.199600Z

Thanks for the explanation. Although I believe that still triggers the line comment action

raspasov 2021-04-13T17:58:54.199900Z

(before 1. make sure you’re actually inside an Sexprs) 1. Edit | `Macros` | `Start Macro Recording`

raspasov 2021-04-13T17:59:40.200100Z

2. Navigate | Structural Movement | Move backward out of Sexpr

raspasov 2021-04-13T18:00:29.200400Z

3. Type #_ whenever the cursor is (should be at the beginning of an Sexprs)

raspasov 2021-04-13T18:00:39.200600Z

4. Edit | `Macros` | `Stop Macro Recording`

raspasov 2021-04-13T18:00:55.200800Z

5. Give your “macro” a name

raspasov 2021-04-13T18:01:04.201Z

6. Go to Keymap and assign a keyboard shortcut for it

raspasov 2021-04-13T18:01:29.201200Z

Just tried it, it works! It’s a nice idea.

raspasov 2021-04-13T18:01:58.201400Z

You can be anywhere inside an Sexprs, press your shortcut, and comments out the whole form via #_

raspasov 2021-04-13T18:07:46.202Z

You can add “Format Code” as a last action of your macro, then it looks even better 🙂

👍 1