Page 1 of 2
Adding carets to selection
Posted: 20.06.2020 10:33
by xircon
Manjaro Linux, Plasma. UK laptop keyboard.
This is probably me doing something wrong
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.
Posted: 20.06.2020 12:47
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

that you want to ADD carets... Hm, that's true, doesn't work either way. I hope Alexey has some ideas.
Posted: 20.06.2020 16:22
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
Posted: 20.06.2020 16:48
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.
Posted: 20.06.2020 20:49
by xircon
https://youtu.be/rEPFSIrM2Qg
Hope this is OK (I await my Oscar nomination

)
Posted: 21.06.2020 08:41
by tmsg
FWIW, xircon's video shows what I am seeing when Ctrl+Mouse dragging.
Posted: 21.06.2020 10:53
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
Posted: 21.06.2020 11:42
by tmsg
Well, your vid shows what's happening here as well. So it isn't Cud behaving badly

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.
Posted: 21.06.2020 12:29
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
Posted: 21.06.2020 13:45
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.