Fork me on GitHub
#editors
<
2015-11-23
>
snoe16:11:26

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.

benedek16:11:13

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

benedek16:11:41

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

snoe16:11:09

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

timgilbert16:11:33

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?

benedek16:11:25

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

eraserhd17:11:50

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

cfleming20:11:22

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

timgilbert22:11:31

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

timgilbert22:11:49

I want to just hit enter and have the form evaluated

cfleming22:11:07

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

timgilbert22:11:11

But right now it inserts a newline between 2 and )

timgilbert22:11:21

In the little one-line REPL window

cfleming22:11:32

CMD-enter will send it immediately

timgilbert22:11:35

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

cfleming22:11:42

Or Ctrl-enter… right

timgilbert22:11:20

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

cfleming22:11:34

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

cfleming22:11:48

Which people (me included) use all the time.

timgilbert22:11:48

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

timgilbert22:11:25

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

cfleming22:11:29

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

cfleming22:11:57

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

cfleming22:11:04

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

cfleming22:11:20

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

timgilbert22:11:29

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

cfleming22:11:39

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

cfleming22:11:20

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

timgilbert22:11:49

Oh, didn't see that, thanks

cfleming22:11:11

No worries, here is fine too

timgilbert22:11:21

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!

cfleming22:11:35

Mildly scary warnings?

timgilbert22:11:12

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

timgilbert22:11:21

...but I didn't, phew

cfleming22:11:53

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

timgilbert22:11:13

Awesome. Thanks for the help!

cfleming22:11:19

No worries!