Fork me on GitHub

are there any vim emulation and cursive users? seems the navigation gets a little awkward when in normal mode.


There are, but since I don’t use it I’m not really sure what the state is. There’s some info in the wiki here: and here:


That’s a bit out of date actually, looking at it now. As of IntelliJ 2019.3 the action to return from the toolwindow to the editor can be remapped from ESC.


@U07S8JGF7 Any comments about the wiki sections there? Anything that would be useful to add, or which is no longer relevant?


Well, before I say anything, keep in mind my cursive bindings were hand-set and they’re very different from the defaults and from emacs mode.


afaik isn’t a problem (and I don’t even recall whether it actually was)


re: I mean, yes, technically. But this is completely intuitive for me. I would be a little mad if it weren’t the case.


And, yeah, still highly recommend re-training yourself to do ctrl-[.


Yeah for the most part, pretty accurate. I can’t think of anything else.


Yeah, I’m not sure whether it would be worthwhile trying to rebind the built-in IdeaVim commands to sexp-aware alternatives, or add new ones.


It seems like parinfer is a good solution for that problem, and Shawn is a vimmer I believe.


Yeah, I personally hate two-stroke sexpr movement/editing. So I might not be the target audience for that kind of change.


Fair enough. I guess as long as people can configure things how they want them (which is increasingly the case) then I’m happy.

truestory 4

@dpsutton Any issues in particular? I use ideavim and cursive together all the time.


There is some weirdness, but most of it’s infrequent enough that I chalk it up to fat fingers


for instance here. the cursor is at the end of the line and the opening paren is highlighted. but if i hit cmd-left i end up at the opening paren at loop


cmd-left ? what vim mode you using??? troll


i don't know the vim command for beginning of defun or backwards-sexp


i'm gently learning cursive and my hands have 6 years of emacs in them


Somewhat off-topic, but I was wondering what's driving you from Emacs to Cursive? Just asking because I'm currently headed the other way. 🙂


I'd like to know that too


I'm not sure driving is the right word. I'm incredibly comfortable in emacs and will use it. I have not needed heavy (or really any) java interop so the lack of the power of Intellij with java hasn't been a hindrance. But there's some polish that intellij has which emacs lacks. I'm also kinda drawn to a simpler repl without nrepl and let static tooling drive the code. Seems nice to crank up a very simple repl and then let cursive do all of its autocomplete and documentation and popups. I'm not sure this is grounded in reality however. I know there's lots of stuff going on under the hood for cursive and to get a good cljs experience it seems like its either nrepl based or tubular based which doesn't really remove any complexity. I think maybe my ideal setup would be cursive's smarts and inf-clojure's simpleness of just running a repl with a bit of font-locking


Thanks! Coming from the other direction, what you said definitely resonates. For me, static analysis is Cursive's biggest strength. Java interop, ease of use, and close(r) integration with the operating system are next on the list. What's pushing me toward Emacs is that at least for me, IDEA is prone to slowdowns and UI freezes. Moreover, it seems that they break their APIs quite often, making every IDEA update a somewhat risky proposition for Cursive users. I guess I also just wanted to see whether the grass is greener on the other side. I think static analysis is going to drive me back to Cursive sooner or later, but I think I'll give Emacs at least a couple of weeks before that. I might even write up an experience report on this topic if I get around to it.


so just learning a few movements and basics for now. but the structural movements and vim don't seem to align here. i can't get the cursor far enough such that the structural movement takes be to the beginning


Alternatively, you can use Cursive bindings: Navigate -> structural movement -> move backward (or move backward out of sexp)


Ah okay. So, generally speaking, cursive and ideavim are two different control sets. You can map vim actions to cursive (see if you like, but I highly recommend mapping paredit to single keystrokes.


yeah i figured. i need to learn how to get a vimrc or equivalent set up here. but was trying to learn the basics and navigation. i figure for a bit i'll just learn go to's, return from goto, and structural navigation along with the standard vanilla vim movements (already know these just been a while since i've used them)


Yeah, I’ve kinda wired my brain so that for code changes, I’m in cursive-mode. (This is most of the time.) If I’m in vim mode, I’ve fallen back to character-bashing mode.


one question. i seem to get this view where there aren't any windows and it seems to be in an invalid state. am i doing something wrong? I just hit open project and end up in this state.


Omg I've had this happen every once in a while too! I think it's from accidentally hitting some key combo that hides all the windows.


Yes, that one is very strange. I’ve seen that one myself occasionally recently (only under 2020.1, perhaps?) but I’ve never managed to reproduce it reliably.


@UDCGPTV9R Does that happen always for you?


yep, constantly reproducible.


it seems like it’s either cursive or intellij idea that’s doing some work that’s not supposed to be on Swing’s event dispatch thread and an assertion on that is blowing everything up (as can be seen in the log attached to the github issue.)


Ok, I’ll look at that, thanks.


i close the window and then open the project again and everything seems to be back to normal

AJ Jaro13:05:34

@cfleming Thanks for all of your work on Cursive, it’s definitely a great tool! This particular issue, however, is really a struggle for my team. Is there a way to help prioritize this task or a way that we can help resolve it? We do appreciate the tool you’ve built and want to continue supporting you as best we can. Let us know how we can help.


I’ll take a look at this and see if I can figure this out.


Ok, this is fixed for the next EAP. It was surprisingly tricky, keywords are complicated things in Cursive these days. But I think this should now be working correctly, hopefully without affecting anything else.

👍 4

Fantastic to hear that this will be fixed, thank you very much! This feature is a lifesaver when working on a re-frame project. :thumbsup:

AJ Jaro15:05:01

Wow! Great! Thanks a bunch @cfleming


This is out now in 1.9.2-eap2, let me know if it’s not working as you expect!

🎉 4
AJ Jaro12:05:31

@cfleming This is fantastic! Thanks a ton for expediting this fix. I’m about to tell our whole team it’s so exciting!


it seems like it’s either cursive or intellij idea that’s doing some work that’s not supposed to be on Swing’s event dispatch thread and an assertion on that is blowing everything up (as can be seen in the log attached to the github issue.)

Ben Grabow21:05:39

Sometimes Cursive will give me autocomplete suggestions when I am adding a dependency to my leiningen project. I love when this happens! It means I don't need to lookup the exact maven group, artifact, and id. However usually this autocomplete suggestion thing doesn't work at all, and I can't figure out why it occasionally works and why it doesn't. Seems like maybe at some point I upgraded version and it stopped working? Does anyone else see this?

Ben Grabow21:05:41

I'm on Intellj IDEA Ultimate 2020.1 and Cursive 1.9.2-eap1-2020.1

Ben Grabow21:05:50

I have maven central, clojars, a couple private corporate nexus repos, and my local m2 in my list of Indexed Maven Repositories and they all have been indexed in the last two weeks.


Does it fail consistently now on your current version, or is it intermittent?

Ben Grabow23:05:36

Consistently. I don't often restart the whole ide or restart my computer, but I can't remember it working since I upgraded last.

Ben Grabow23:05:14

I also can't remember the last time it did work, so it might not just be this version.


I’ve had this happen to me as well =)… I thought that it might be because my repos were out of date, but I just updated them and no luck.


Does Cursive + deps.edn have an equivalent of SBT's withSources()?


For the non-scala folks, here is what I am talking about: Scala devs using SBT can add withSources() to their dependency declarations to download source JARs. Scala IDE plugins use this to allow you to read the source of your dependencies from right within the editor.

Alex Miller (Clojure team)21:05:13

most clojure deps do not publish a sources jar (because the sources are in the main jar, b/c clojure libs usually aren't compiled)


Thanks @alexmiller. That makes sense. I am actually hoping to use this for Java and Scala projects that I am using via interop. I can understand that the community might be less interested in supporting this because most deps are Clojure.

Alex Miller (Clojure team)21:05:00

If you walk into a java lib, it will have a thing at the top of the file to download sources

Alex Miller (Clojure team)21:05:24

I do that all the time with java libs

Alex Miller (Clojure team)21:05:51

Although I guess that’s more IntelliJ than Cursive


I can download the sources jar for Scala and walk through the "Choose Sources..." prompt in IntelliJ and works fine. Maybe this is more of a deps.edn thing, but it would be neat if there was a way to declare the download of the sources in deps.edn and then Cursive could detect its existence and use it.


But that sounds like it might be a lot of work for something that would go relatively under utilized.


Yes, there’s no way to do this in deps itself, or in lein. Unfortunately the only way right now is to walk through the Choose Sources popup.


Alright, thanks!