calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
pez 2021-02-08T09:14:04.247700Z

@cb.lists, about wordwise movement in comments and strings. You have that in strings already, right? In comments it is trickier, because most often I want to skip past comments when moving by sexpressions. Maybe we could do something about it when actually inside a comment…

Cris B 2021-02-13T00:11:40.324700Z

@pez & @brandon.ringe - I've added a PR for this. Happy to edit/rewrite/whatever if it steps on any toes. I've tested somewhat though I don't very easily stray from the happy path.

Cris B 2021-02-13T00:27:04.324900Z

One thing I forgot to do was look at your test suite. If you typically keep it up with changes I'll need to add something there.

bringe 2021-02-13T00:45:56.325100Z

Awesome! I'm looking at it now

pez 2021-02-13T07:21:56.325700Z

Super. Taking a look as well. Yes, this should be covered with some tests. I found a test pattern the other day that might come in handy. Will show you.

pez 2021-02-13T08:22:25.325900Z

Left a comment on the PR now. Rather long, because these contexts really interests me. I hope it makes sense. 😃

Cris B 2021-02-13T08:45:43.326100Z

Terrific, thanks @pez - I shall read with interest (when I'm less cognitively challenged than I am this evening).

pez 2021-02-13T09:21:08.326300Z

Evening, huh? Where in the world are you? 8PM… Jamaica?

Cris B 2021-02-13T09:31:49.326500Z

Australia. Rural North NSW. A tad quieter than Jamaica ...

pez 2021-02-13T09:40:36.327600Z

Haha. Of course. But you have to cope with walking upside-down. 😀

Cris B 2021-02-13T09:50:22.327800Z

You've been misinformed: https://i.redd.it/a4ugvipxivd11.jpg

😂 2
pez 2021-02-13T10:10:37.328300Z

OMG

pez 2021-02-13T11:06:36.328500Z

Phew, now I see that your map must be fake, because there is only two hours time difference between Kingston and Rural North.

Cris B 2021-02-08T09:41:12.247800Z

Strings - not exactly, as punctuation doesn't seem to be treated as word boundaries as it is in text files. An example came up for me today editing Compojure routes - with all the / and : 'wordwise' movement jumps over the whole thing. Comments - yes I do mean strictly within the comment. It could be even tricker if you had something like an ignore form within a comment. Probably unfair to expect Calva to deal with that ... My typing self slips into a different mode when editing anything that feels more like text than a structured syntax tree, and I automatically edit as if I'm in a standard text field in a browser. I'm quite willing to believe I'm unusual in that respect!

pez 2021-02-08T10:13:15.248Z

I think we could add “when clause contexts” for if the cursor is in a string or a comment. Then people can use that to modify their keybindings. (So, then in the keybinding for forwardSexpr you could say !calva:inString to let the default keybindings kick in.

Cris B 2021-02-08T10:47:45.248500Z

That sounds like a reasonable approach.

clyfe 2021-02-08T18:22:48.249400Z

Can this be reopened? https://github.com/BetterThanTomorrow/calva/issues/380

clyfe 2021-02-08T18:23:12.249900Z

paredit-kill != killListForward

clyfe 2021-02-09T16:20:27.256800Z

@pez Your example 4 is already supported by both kill sexp and kill list. Should I leave it out? Or is it something I don't follow?

pez 2021-02-08T18:54:20.250300Z

What are you missing?

clyfe 2021-02-08T19:01:12.250500Z

kill all forms that start after the cursor

clyfe 2021-02-08T19:01:53.250700Z

* that start on the current line after the cursor

clyfe 2021-02-08T19:02:40.251Z

In maps/lets kills in pairs in they're on the same line

clyfe 2021-02-08T19:04:39.251200Z

Also - kills comments

clyfe 2021-02-08T19:05:01.251400Z

And is generally more useful, and it's what I want for my Alt+d

Cris B 2021-02-08T20:39:25.251600Z

I know in general (& for good reasons) you're resistant to too many settings being added , and have no idea how many users feel like me about this. But if it's something you want to go ahead with, I'd be happy to scratch my own itch and put in an issue & PR (if I can figure out how to do it).

pez 2021-02-08T21:22:06.252200Z

If we do this by adding contexts for cursor in string and in comment it wouldn’t add settings to Calva. It would be an API we need to keep adhering to, but it would be almost zero cost and the leverage for users is quite big. I would merge the PR without hesitation. I’m not sure where we would be managing the contexts, but I’d be happy to asses it together with you,. There are a some more cursor/structure contexts we can consider managing so it would be well invested time just to figure out the basic mechanism.

Cris B 2021-02-08T21:46:03.252700Z

OK how about I add a github issue when I get a moment, and we discuss it further there.

pez 2021-02-08T21:47:48.252900Z

Works for me!

bringe 2021-02-08T22:34:32.253200Z

Would you mind providing before/after examples on that linked issue of what Calva's killListForward does and what you want this potentially other command to do so we can get a better idea? I do better with examples :simple_smile: