Split selections into lines should remove final cursor?


When complete lines are selected, editor:split-selections-into-lines (shift-cmd-l) creates more cursors than there are selected lines. For example, I used cmd-l three times here to highlight “b” through “d”:

When I press shift-cmd-l I get four cursors, not three, on “b” through “e”.

This may be mathematically correct or algorithmically correct given the placement of the cursor before triggering it, but it is certainly not what someone would expect and is also different than other editors.

One cannot argue that it is more efficient since the cursor is on the end of three lines but at the beginning of the fourth, requiring more keys to move them all to the beginning or end.

(It also is probably less efficient due to the way the brain works. Having to keep one line visually different for something the brain treats as a “set” adds minor cognitive load possibly disrupting flow. It certainly does for me since I have to stop myself from selecting the next line (interruption) and change focus to getting the cursors lined up again.)


Yeah I agree with this, coming from Sublime I always have to remember to select one less line and then reselect the last line.


Yep, see https://github.com/atom/atom/issues/1704


Good news, a commit was made to fix this: https://github.com/atom/atom/issues/1704#event-145731290

I’m looking forward to the next Atom build…