Yes, the focus thing is something I’ve been meaning to fix forever - I’ll look to do that now. Hiding the input area (possibly even by default) is also something I’ve considered, especially once I get inline evaluation done - I’m working on that now, but I’ve had to have a detour to work on my website.
There’s a very indignant (with good reason!) issue in the tracker which I have assigned to the current milestone about the focus issue: https://github.com/cursive-ide/cursive/issues/1579
@tony.kay iirc you can press esc to return back to the main editor. In fact, if you’re in any of the editors (project, structure, lein, etc.), pressing ESC will return you back to the main editor (the one that you write code with)
Is there some way to make your run configuration automatically use deps aliases selected in deps tab?
This requires me to name every single alias, and it might be out of sync with what I have selected in my deps tab
@roklenarcic 'run with intellij classpath'
why is that some namespace aliases don't show their symbols in autocomplete ?
yes e.g. if I (require '[clojure.tools.namespace.parse :as np])
I don't get any autocomplete for (np/)
whereas if I do for (clojure.tools.namespace.parse/)
what's stranger is that I sometimes get autocomplete for a completely different namespace. For example I have required datomic.client.api :as d
but when I ctrl-space for (d/)
I get completions for kixi.stats.distribution
Does File -> Invalidate Caches and Restart help this? It sounds to me like your indexes are funky somehow.
Also, which version of IntelliJ are you on? If you’re on 2021.1 and haven’t upgraded to 2021.1.1 yet, I think they had a bunch of indexing bugs which were fixed in the point release.
I tried invalidate caches & restarting but same problem. It happens with one project and not another. I suspect it's because I'm using libraries in my REPL from ~/.clojure/deps.edn
which are not in my project's deps.edn
Thanks, I guess in the past I was using it in a way that didn’t work for me
I think I sometimes need to do a 'refresh deps projects' after changing what's ticked in the list for ij to pick those changes up
Does anybody know if there’s a way to “cycle” through a number of commands in IntelliJ ?
@cfleming Thanks for the input! I think specifically the switch between editor and input is super common and there will be very little overhead of keeping track of where I am at the moment. Perhaps it makes sense to add a separate action if it’s easy on your side to determine the current state. “Switch between REPL input and code editor” or something like that. But if you want to keep them only separate, I understand. It’s not a huge difference, still works well enough for my use case.
(I know there’s specific commands to cycle through some items, but I think a generic “cycle” that is you define can be useful)
like a macro?
if it's the same n commands you want to cycle through in the same order, then you could record a macro
Yes, I know macros, but they always run all the commands from start to finish. As I typed this, I realized it’s probably harder to implement in practice that I initially thought.
My idea was to replicate the “Alt+Tab” experience in say, MacOS where it jumps to the previous active window.
For example, if you cycle: “Jump to REPL Editor” “Focus Editor” … you’d be able to assign one shortcut to those and that would be convenient. But I realize that it’s hard to do, because IntelliJ has to keep the state of where the focus is at the moment.
Not “hard” but not super trivial like I thought for the first 30 seconds 🙂
there's a Jump to Last Tool Window
command
and esc puts you back in the editor
if that's your usecase
Oh, I know 🙂
The Escape is too annoying to hit because of Apple keyboard decisions 😂 (first world problems)
I guess I hit my limit of knowledge then 🙂
but I also think esc can be rebound to something more convenient
I tried that, for some reason it does not work reliably (at all?)
For example, if I add an additional shortcut in Keymap for “Escape” it actually doesn’t jump back to source, for example. So it’s weird.
Hence my “cycle shortcuts” idea 😆
gotcha
In any case, I added two different shortcuts, CMD+1, CMD+2 for those two commands. It works fine.
I am just complaining. Back to work! 🙂
Not sure it’ll help you, but I use Find Action for tasks like this all the time. I hit command-shift-a to bring it up, type a few letters to select the command, and hit return. Much faster than using the mouse.
@pshapiro For sure. I try to eliminate most mouse “activity”.
In actions that I do on a daily/hourly basis.
Has anybody here switched from emacs/vim to cursive? What did you like more?
I switched from emacs when cursive first came out. never going back 😛
What made you stay with cursive or move out of emacs?
got tired of my emacs config breaking and having to configure every little thing manually
cursive just works and does what I want
(I also have used IntelliJ for many years before in my Java days so it was an easy choice)
I guess I’m in a similar position as you back then, thank you for your feedback