Fork me on GitHub
#cursive
<
2015-12-15
>
danielcompton02:12:53

@rantingbob: you need to use the shortcut

mostr08:12:20

@cjmurphy: regarding this one https://clojurians.slack.com/archives/general/p1450167976001842 (“delete” key), it breaks parens balance, right? So both parens need to be removed separately?

cjmurphy08:12:24

Yes it stuffs everything up so I quickly go to the other paren and do the same.

cjmurphy08:12:52

I suspect it is wrong headed to be in such a situation, but it happens often for me. A video of seeing someone edit as they are supposed to would help us.

mostr08:12:44

yeah, I learn most of the Cursive “incantations” by watching some videos of people playing with it, sadly there is not much of it around

cjmurphy08:12:17

But I suspect it would not be nearly as impressive as the same edits being done in emacs

cjmurphy08:12:41

It should become better over the next few years. My current fav winge is with Cntl Backspace.

mostr08:12:31

Emacs… will learn how to use it properly one day, but jumping into both Clojure and Emacs at the same time is just asking for troubles I guess simple_smile

cjmurphy08:12:47

I never will. Maybe some vim editor, but most likely stick with Cursive, because those others will never give you proper IDE context that is higher level than just text, that I am so used to from Java.

jaen08:12:15

For deleting parens without unbalacing the forms, you can splice, I think.

jaen08:12:38

I think it's Alt+S by default.

mostr08:12:38

True, I do Scala on daily basis (coming for Java in the past) and just yesterday I had to add some java stuff to clojure project (it was easier to code stuff using lib I had to use in java: builders, factories etc.). With IntelliJ + Cursive I just have all things in one place, no matter if I work on java/scala/js/clojure file at the moment.

cjmurphy08:12:56

Alt S just takes me the the VCS menu.

mostr08:12:25

Alt S gives me polish language-specific character Ś 😄, but will try - thanks for hint @jaen

cjmurphy08:12:30

Ctrl + ; - Splice

sveri08:12:23

What's worse, none of the default keybindings work on windows with a different keyboard layout (I use neo). I never took the time to define my own except for the surroundings

jaen08:12:56

@mostr: Well, right alt also gives me ś (gotta love Polish keyboard layout, I can easily write things like ß™®©–ðþ with just my alt, Window's not as nice), I was talking about left alt.

jaen08:12:07

But I guess maybe it was a keybinding I didn't have by default

jaen08:12:12

And set it up by myself

jaen08:12:39

So you'd have to set the shortcut up for yourself

cjmurphy08:12:32

Cntl Del will delete one of them. Easier than highlighting.

jaen08:12:04

I suppose, but splice should do what you want, that is remove both parens from around the current form, without unbalancing.

mostr08:12:05

yep! splice works as @jaen says

mostr08:12:08

:thumbsup:

mostr08:12:39

one more win today simple_smile

sveri08:12:30

Hm, but splice only deletes the parens. Would be nice if something deleted the whole expression

jaen09:12:18

Kill sexp?

jaen09:12:34

Didn't use it yet, but looking at the internet it seems to do just that.

jaen09:12:03

Actually, just tried, seems to work as advertised.

sveri09:12:05

Hm, I have to try out some more

jaen09:12:01

But dang, the default shortcut is under meta. Not helpful with xmonad at all ; d

mostr12:12:11

@cjmurphy @jaen looks like Raise is the command we look for (well… the name might have suggested it) to delete redundant parens pair. David has just dropped this hint on #C03RZGPG1. Now I need to discover “practical” differences in usages of Splice/Raise simple_smile

jaen12:12:29

Yeah, I've noticed. Splice is a bit like * (splat) in Ruby, or ~@ (unquote splice) in Clojure macros - it explodes the form into the surrounding form.

jaen12:12:39

Raise seems to replace the surrounding form with the form you're raising

jaen12:12:21

(comp
  (a "c" :d) ; cursor before this form
  (b 2 3))
with splice will result in
comp
(a "c" :d)
(b 2 3)
but with raise it will result in
(a "c" :d)

jaen12:12:34

conversely if you move the cursor inside that form, before a

jaen12:12:39

With splice you'll get

jaen12:12:55

(comp
  a "c" :d ; cursor inside this form
  (b 2 3))

jaen12:12:02

But with raise - just a.

jaen12:12:05

So it depends entirely on what you want to accomplish.

jaen12:12:23

Raise behaviour is maybe a bit more confusing at first.

mostr12:12:05

:thumbsup:

sveri16:12:45

@cfleming: Hi, are you here? I have that weird error again

meow18:12:38

@cfleming: Just a ping to let you know that if you resent my license key I still haven't received the email. Unless it was the "RUSSIAN beauties looking for love!" one with the blinking hearts.

rantingbob18:12:37

@meow: Don't judge, @cfleming was merely declaring his undying love 😛

meow18:12:33

Seriously, I haven't looked in my spam folder in forever so I was surprised to see so many blinking gifs - does that work?

timgilbert19:12:29

In my experience after a brief period of initial infatuation, the love fades into a sort of humdrum comfortability

danielcompton20:12:05

Kibit uses core.logic rules, they might be similar to Cursive’s PEG?

dmi3y20:12:03

Anyone here using Cursive with ClojureScript? Would appreciate any help on how to start Node.js REPL in Cursive.

cfleming20:12:48

@dmi3y: There’s no built-in REPL for CLJS right now. In general, I think the current best practice is to use a quickstart-type REPL using the clojure.main REPL type.

dmi3y20:12:34

@cfleming: yup, I can do this, thought there’s a way to connect to it from Cursive since it exposes a port.

cfleming21:12:14

If it uses nREPL, you can connect to it using a Remote REPL config

dmi3y21:12:21

Sadly, ClojureScript REPL for node.js doesn’t seem to be using nREPL

cfleming21:12:53

Hmm - so when you say it exposes a port, what sort of port is it?

cfleming21:12:44

@meow: Sorry, I was busy moving house yesterday, I’ll get you your licence soon.

cfleming21:12:13

But feel free to forward that other mail over. I love the blinking hearts.

dmi3y21:12:43

@cfleming: it’s a TCP port, right now it’s 56177

dmi3y21:12:09

apparently, there’s https://github.com/cemerick/piggieback, which should serve as a bridge between nREPL and ClojureScript REPL

cfleming21:12:20

@dmi3y: Yes, you can use piggieback, but it’s a bit of a house of cards and I would try to use a bare REPL if you can.

dmi3y21:12:20

@cfleming: Agree, I’m trying to figure out how to do that without piggieback. Remote repl doesn’t connect to the remote port exposed by clojurescript repl started as described in ClojureScript getting started guide ...