Sublime Forum

Multi-cursors shouldn't combine when going between lines

#1

When editing a set of things, the multi-cursors sometimes combine when going to an empty line or when they touch each other. My simplified example use case: (the actual use case was doing some repetitive bits for a Rainmeter widget that incremented each time)

Current text:

ItemF = GetDataForItemF.ItemF

ItemF = GetDataForItemF.ItemF

ItemF = GetDataForItemF.ItemF

Wanted text:

Item1 = GetDataForItem1.Item1

Item2 = GetDataForItem2.Item2

Item3 = GetDataForItem3.Item3

Trying to do it by selecting the three Fs on the first row, backspacing and then typing 1 works for that. However, when I then press the down key twice to get to the next row, the cursors combine and I only get the one at the end.

0 Likes

#2

Sorry for not answering your actual question at all (did not really understand what you meant, empty rows are no problem, only e.g. end of the file), but for that increment stuff maybe you should take a look at the arithmetic command, Odatnurd also has a good video on that: https://www.youtube.com/watch?v=taLCxwgcrVk

0 Likes

#3

I get what they’re asking for. It’s basically that the so-called xpos (some state tracking the column that a caret ideally wants to be on, regardless of whether the line it moves to has that many columns) doesn’t get washed away by a temporary caret merger.

0 Likes

#4

Sort of.
My point was that if you move the carets to the same position, they always merge without being able to separate again.
When the carets merge, the xpos seems to just take the xpos of the last caret in the line.

0 Likes