cursive

Issues at: https://git.io/cursive-issues
Shantanu Kumar 2021-01-12T06:00:19.018800Z

Hi, can anybody tell me how to jump (the caret) from word to word inside a docstring in Cursive? <Alt+Arrow> jumps directly to the other end of the docstring.

➕ 3
imre 2021-01-12T10:43:51.019Z

Just checked this. It seems both cmd+sidearrow and alt+sidearrow (on a mac) are bound to cursive's structural editing move forward and move backward actions out of the box. As I use cmd+arrow for those, I unbound alt+arrow and it now works the way you describe

Shantanu Kumar 2021-01-12T12:45:56.019200Z

@imre I saw it was bound to both Cmd+Arrow and Alt+Arrow, so I deleted the latter (as you also suggested) and it works for me now. Thanks.

Shantanu Kumar 2021-01-12T12:48:08.019400Z

As an IntelliJ newbie, I feel Alt+Arrow should not be bound to jumping forms by default, since Cmd+Arrow already does that job.

alexmiller 2021-01-12T13:24:35.021100Z

I find this super annoying too. I noticed yesterday Calva treats strings as a list of words wrt some strucural editing commands like this

AJ Jaro 2021-01-12T14:37:02.021300Z

@kumarshantanu The work-around that I use inside string is opt + shift + arrow . This will highlight the text of course but then you can get to where you want. It’s not ideal, but it’s a trick that I use

imre 2021-01-12T15:15:08.021800Z

This could simply be an oversight wrt default keybinds by @cfleming

pez 2021-01-12T23:03:35.026500Z

Shortcuts are notoriously tricky. Calva Windows users run into problems with the default binding of ctrl+left/right for barf/slurp. It makes such sense on Mac, but on Windows I’ve learnt that it is supposed to move by words (which I never use in Clojure code, but apparently some do.) Treating strings as a shallow lists of words is great though. It makes moving by words, grow/shrink selections and split/join and such quite natural.

cfleming 2021-01-13T07:07:30.026700Z

That’s a really nice solution @pez, I think I’ll steal that 🙂

❤️ 1
🤘 1
cfleming 2021-01-28T01:40:26.057800Z

This is fixed in the next build. Rather than using @pez's solution, which was somewhat tricky for boring internal reasons, the move forward/backward action just delegates to the standard IntelliJ one when invoked within a string or comment (https://github.com/cursive-ide/cursive/issues/2097)

🤘 1
🎉 1
2021-01-12T16:45:37.022500Z

has anyone gotten cljfmt to get compatible results with cursive/intellij's formatter?

2021-01-12T16:59:08.022800Z

Anyone else find that REPL history is not always “remembered”?

agata_anastazja (she/her) 2021-01-12T20:28:56.024200Z

Edit: solved 😊 Hello, I have a question around repl set up in intellij with the cursive plugin. I used the `lein new app app_name`  command, and can run the app from my terminal. I haven’t changed anything at all in the scaffolded app. When I try to run the repl, I get Error: Could not find or load main class clojure.main Caused by: java.lang.ClassNotFoundException: clojure.main and all the function names in the text editor are highlighted as not resolved. Any idea what might be causing that?

agata_anastazja (she/her) 2021-01-13T10:06:26.027800Z

I eventually did click on “Add as Leiningen project” from intellij file tab

cfleming 2021-01-15T01:15:32.000100Z

Did that fix the problem?

agata_anastazja (she/her) 2021-01-15T13:38:29.002200Z

yes, thank you!

agata_anastazja (she/her) 2021-01-12T20:29:12.024300Z

For the record, I also asked in beginners channel

2021-01-12T21:55:08.025900Z

When I paste inside a string "\n" characters are added instead of actually inserting newlines. Is there anyway to disable this (I want the newlines, not the character "\n")

isak 2021-01-12T22:06:31.026Z

Not sure, but the best workaround I've found is to do "Paste as Plain Text" instead of normal paste : Ctrl - Alt -Shift - V

☝️ 1
2021-01-12T22:14:09.026200Z

thanks - that works for me

1