Fork me on GitHub
#cursive
<
2018-06-18
>
kennytilton00:06:19

I cannot find it with the google, but there is an Emacs mouse command I had access to in one editor that was wonderful: move point somewhere, now right click an expression (a word, a fifty-line form) to have it copied to the point. Counter-intuitive until I got addicted. Control-right-click moved instead of copying. Does Cursive have that? If not…please?????! I can go for ten minutes using nothing else when refactoring.

cfleming00:06:44

@hiskennyness I’m pretty sure Cursive doesn’t have that, but I’m also not sure I understand how it works. So you put the caret somewhere, then right click on some other form and it gets copied to where the caret is?

kennytilton00:06:34

Absolutely. Weird, right? It is an incredible tool. I learned about it when JP Massar a long time Lisper joined our team and asked why our IDE of choice AllegroCL did not have it in their Emacs mode.

cfleming00:06:53

That is extremely weird.

cfleming00:06:32

If you want to copy a 50-line form, how do you reliably select it? Do you click on either the opening or closing paren?

kennytilton00:06:34

The Franz team responded, “OMG Yes. We remember that!!” and implemented it in half a day.

cfleming00:06:51

Ha, no pressure 🙂

kennytilton00:06:12

Click on opening or closing parens. Pray “undo” has been implemented well. 🙂

cfleming00:06:34

One issue is that in IntelliJ right click is for context menus, but I’m sure there’s some modifer combo that is free.

cfleming00:06:43

Cmd-right click or something.

kennytilton00:06:12

I am not kidding, it is a gold mine. You know, I would have to remind my self. It might have been option click.

cfleming00:06:40

Sounds like it might have been the alternative one they talk about?

cfleming00:06:46

That talks about copying though, not pasting automatically.

kennytilton00:06:53

Bingo, though Emacs has its own langauge, so I am not sure. Use it for a day and you will bug out at how often you end up reaching for it.

kennytilton00:06:50

Yeah, you want it to paste automatically, perhaps as a move so the original gets tossed.

kennytilton00:06:35

I was LMAO when I saw the Franz team jumping up and down over JP’s suggestion.

kennytilton00:06:56

Maybe “There is an alternative mouse-copy minor mode that lets you copy or yank an s-exp under the mouse cursor to point by holding down a modifier key (C or C-M, respectively) and left-clicking. ” “s-exp under the mouse cursor” sounds better than some commands that talk about first selecting a region.

kennytilton00:06:47

It is the ultimate in structural editing. Well, one ultimate. 🙂

kennytilton00:06:01

Note that it pulls this off without using the normal copy/cut buffer, so anything in there is undisturbed. That proves to be DWIM.