Discussion about all editors used for Clojure/ClojureScript
snoe 2015-11-23T16:26:26.000026Z

I think there's an opportunity to build editor agnostic refactoring/cider-nrepl plugins for clojurescript - I've been doing some stuff with neovim's node integration.

benedek 2015-11-23T16:29:13.000027Z

well both cider-nrepl and refactor-nrepl are editor agnostic. and they both have some cljs support

benedek 2015-11-23T16:29:41.000028Z

in fact cider-nrepl is used in vim fireplace, lighttable, and counterclockwise afaik

snoe 2015-11-23T16:37:09.000029Z

right, I mean that a clojurescript client library to the middleware that can be used in atom/light table/neovim should be possible - if our editor's plugins can give a refactoring library input text and handle the output text we'll be way ahead

timgilbert 2015-11-23T16:37:33.000030Z

Hey, possibly dumb question - does anyone know if there's a way in the Cursive repl to have it send the command I'm typing in even if the cursor isn't at the end of a line / s-expression?

benedek 2015-11-23T16:38:25.000031Z

@snoe I see what you mean. not sure how editor specific this client code needs to be tho

eraserhd 2015-11-23T17:05:50.000032Z

I’ve created #C0F4MB8AY where I intend to hang out while writing https://github.com/maitria/avi (avi is a vi written in Clojure).

cfleming 2015-11-23T20:28:22.000034Z

@timgilbert: Can you give me an example of what you mean? i.e. an expression and where the caret would be?

timgilbert 2015-11-23T22:09:31.000035Z

@cfleming: So I've just typed (+ 1 2) in the browser. My cursor is now between 2 and )

timgilbert 2015-11-23T22:09:49.000036Z

I want to just hit enter and have the form evaluated

cfleming 2015-11-23T22:10:07.000037Z

@timgilbert: So you’re in the REPL editor, or the main editor?

timgilbert 2015-11-23T22:10:11.000038Z

But right now it inserts a newline between 2 and )

timgilbert 2015-11-23T22:10:21.000039Z

In the little one-line REPL window

cfleming 2015-11-23T22:10:32.000040Z

CMD-enter will send it immediately

timgilbert 2015-11-23T22:10:35.000041Z

I know I can hit ctrl-enter to evaluate the line

timgilbert 2015-11-23T22:10:39.000042Z

Er, yeah

cfleming 2015-11-23T22:10:42.000043Z

Or Ctrl-enter… right

timgilbert 2015-11-23T22:11:20.000044Z

I'd just like an option so I don't have to either hold a modifier key or get my cursor to EOL before I can get results

cfleming 2015-11-23T22:11:34.000045Z

The thing is, that’s not actually a little one-line REPL window, you can drag it up to a multi-line editor

cfleming 2015-11-23T22:11:48.000046Z

Which people (me included) use all the time.

timgilbert 2015-11-23T22:12:48.000047Z

Yeah, I guess I just would like something that behaves a little more like a command-line repl. If I want a multi-line thing I'm more inclined to use the actual editor and send forms over that way

timgilbert 2015-11-23T22:13:25.000048Z

(I totally ge that this is a personal preference thing, BTW, I don't think my way is necessarily more correct)

cfleming 2015-11-23T22:13:29.000049Z

You can actually re-bind the action, but I’m not sure if you can re-bind it to just Enter. Go to Settings->Keymap, and search for Execute Current Statement

cfleming 2015-11-23T22:13:57.000050Z

You’ll see that’s bound to Ctrl-Enter if you’re on Win/Linux, you could try binding it to just Enter

cfleming 2015-11-23T22:14:04.000051Z

I’m not sure if that’s allowed, though.

cfleming 2015-11-23T22:14:20.000052Z

That command only affects the REPL editor, it won’t affect anything else.

timgilbert 2015-11-23T22:14:29.000053Z

I'm on os/x, but I'll give that a go

cfleming 2015-11-23T22:14:39.000054Z

Ok, it’ll be bound to Cmd-Enter then.

cfleming 2015-11-23T22:15:20.000055Z

BTW there’s a #C0744GXCJ channel here as well as #C050AN6QW

timgilbert 2015-11-23T22:15:49.000056Z

Oh, didn't see that, thanks

cfleming 2015-11-23T22:16:11.000057Z

No worries, here is fine too

timgilbert 2015-11-23T22:18:21.000058Z

Hmm, well I was able to re-bind enter to that command and it seems to work fine, despite giving me some mildly scary warnings - thanks @cfleming!

cfleming 2015-11-23T22:18:35.000059Z

Mildly scary warnings?

timgilbert 2015-11-23T22:19:12.000060Z

About re-binding enter, was a little nervous that I'd need to figure out all the things it used to be bound to and re-bind them

timgilbert 2015-11-23T22:19:21.000061Z

...but I didn't, phew

cfleming 2015-11-23T22:19:53.000062Z

No, in general you don’t have to worry about conflicts. Cursive will ensure that the Clojure-specific actions take precedence in Clojure contexts

timgilbert 2015-11-23T22:20:13.000063Z

Awesome. Thanks for the help!

cfleming 2015-11-23T22:20:19.000064Z

No worries!