Xi-editor: Support creating a line of vertical cursors with alt+drag

Created on 25 Jul 2018  Â·  7Comments  Â·  Source: xi-editor/xi-editor

According to frontend docs xi-editor allowing several types of gestures like range_select __(Shift+click)__, multi_word_select and etc, but unfortunately can't support multicursor (cursor shared between several lines but have same x-coordinate) like this:

multicursor

In most editors this can be selected via (Alt/Option + vertical drag). I tried multi_word_select, multi_line_select and line_select but any of this types not works as I expected.

Do you plan something like that? May be something like new type multi_point_select?

feature request help wanted

All 7 comments

Editing with multiple cursors is in actually supported already (cmd+click to add more cursors).
Paste with multiple cursors is not quite there, though (see #747).

I think this request might cover the alt-drag gesture to extend a cursor across multiple lines. That shouldn't be too hard to add, maybe a "help wanted" feature.

@raphlinus It will be great. Thanks!

@MaxGraey can you clarify the behaviour that you're describing? Is this using the _mouse_ to select multiple lines, with each line in the selection have its own cursor?

Currently you can add a cursor at the same position on the previous or next line with optionshift↑, but you can't add multiple cursors by dragging. This is definitely doable, though.

Yes, selecting with Option or Alt + mouse drag to up or down which create vertical cursors line or block selection like in this video

Hmm actually this seems like mostly a client issue? Handling drag gestures and sending new cursor requests to core.

I think of this feature as a special case of rectangle selection (where you can option+drag horizontally as well as vertically). Rectangle selection looks kind of tricky; it'll probably require some width-measurement stuff that I haven't figured out yet. But at some point I think we'll want it to be a type of gesture in the core.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cmyr picture cmyr  Â·  7Comments

zellyn picture zellyn  Â·  3Comments

scholtzan picture scholtzan  Â·  3Comments

cmyr picture cmyr  Â·  7Comments

cmyr picture cmyr  Â·  7Comments