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.
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
@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.
As an IntelliJ newbie, I feel Alt+Arrow
should not be bound to jumping forms by default, since Cmd+Arrow
already does that job.
I find this super annoying too. I noticed yesterday Calva treats strings as a list of words wrt some strucural editing commands like this
@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
This could simply be an oversight wrt default keybinds by @cfleming
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.
That’s a really nice solution @pez, I think I’ll steal that 🙂
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)
has anyone gotten cljfmt to get compatible results with cursive/intellij's formatter?
Anyone else find that REPL history is not always “remembered”?
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?
I eventually did click on “Add as Leiningen project” from intellij file
tab
Did that fix the problem?
yes, thank you!
For the record, I also asked in beginners channel
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")
Not sure, but the best workaround I've found is to do "Paste as Plain Text" instead of normal paste : Ctrl - Alt -Shift - V
thanks - that works for me