Adding carets to selection

xircon
Posts: 3
Joined: 20.06.2020 10:24

Adding carets to selection

Post by xircon »

Manjaro Linux, Plasma. UK laptop keyboard.

This is probably me doing something wrong :D

If I Ctrl+click and drag, the area is highlighted but no carets are added. My keyboard is heavily modified using xcape, but that shouldn't affect the held down state of the Ctrl key.

Ctrl + click works as expected, but is time consuming for large chunks of text.

Is there a command palette item for adding caret to selection? I couldn't see one.
tmsg
Posts: 120
Joined: 20.05.2020 12:08

Post by tmsg »

I tend to mark column blocks with Shift+Alt+Movement keys.

Ctrl+Mouse drag doesn't work for me either but Alt+Drag does. Small catch though... my distro uses Alt+MouseDrag to move a window. So what I do is FIRST click-and-hold the mouse button and THEN press the Alt key. Now if you start dragging it should work.

EDIT: I just realised :oops: that you want to ADD carets... Hm, that's true, doesn't work either way. I hope Alexey has some ideas.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Ubuntu here. Ctrl+click works, it adds caret. Ctrl+drag? it works, it adds caret with selection (caret is at the selection edge)
Make a video to show issue?

https://wiki.freepascal.org/CudaText#Mouse_shortcuts
tmsg
Posts: 120
Joined: 20.05.2020 12:08

Post by tmsg »

@Alexey: I can confirm that Ctrl+Click selects one additional caret (as it should) but Ctrl+Drag just selects whole lines and in the end there is only one further caret defined, at end of the selection.
xircon
Posts: 3
Joined: 20.06.2020 10:24

Post by xircon »

https://youtu.be/rEPFSIrM2Qg

Hope this is OK (I await my Oscar nomination :D)
tmsg
Posts: 120
Joined: 20.05.2020 12:08

Post by tmsg »

FWIW, xircon's video shows what I am seeing when Ctrl+Mouse dragging.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

no, it don't make sense, I dont see that ctrl+drag removes all carets.
my video - all OK here
http://uvviewsoft.com/c/Kazam_screencast_00000.mp4
tmsg
Posts: 120
Joined: 20.05.2020 12:08

Post by tmsg »

Well, your vid shows what's happening here as well. So it isn't Cud behaving badly :D It's perhaps rather a misunderstanding of what to expect.

I suspect that xircon had a column selection and then wanted ADD another, separate column selection to that (at least that was my case). I thought (and perhaps xircon did as well) that this would work with Ctrl+Mouse drag. I may be wrong though.

At any rate, how then do I select a second column block? Imagine a file with 100 lines like this:
line00
line01
...
line98
line99
I select a column block from the "i" of line01 to the "i" of line09. Next I want to select a second column block from the "i" of line80 to the "i" of line95. How? Clicking 16 times with Ctrl held is a possibility but tedious and not good for dozens of lines.
xircon
Posts: 3
Joined: 20.06.2020 10:24

Post by xircon »

I completely misunderstood the purpose - sorry.

I thought it was multiple cursors and it isn't, is there a way to add a cursor to the beginning of each line of a selection?

Like this (emacs):
https://i.imgur.com/qgrHOco.png
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

@tmsg
not possible to have 2+ column blocks- but it's possible via mul-carets.
you can make a plugin- it asks "start point of column", "end point", and adds mul-carets
in there. ed.set_caret() and dlg_input_ex()

maybe I will make it.
Post Reply