textadept icon indicating copy to clipboard operation
textadept copied to clipboard

Request change of behaviour for rectangular selection to ignore line ends

Open chrisgeli opened this issue 1 year ago • 2 comments
trafficstars

Quite frequently, I'd like to remove/replace the ends of multiple lines, as in the following example where I want to keep the line starts but delete/replace everything past the capital letters:

keep me A delete me
keep me B I should go as well
keep me C don't need to keep this
keep me D delete!

My intuition (trained through years of using Notepad++) makes me hold down Alt while dragging the mouse from A to line C's column where this (in the line above) ends.

Unfortunately, this doesn't work, I cannot select a block of line endings - unless the last of the lines is the longest of them all, in which case it works as I'd expect. I don't like to have "virtual space" enabled either but thought it might help, which it didn't: The selection behaviour is still the same.

Any chance this could be changed such that whenever a rectangle is selected, the caret doesn't care about where the lines currently end?

chrisgeli avatar Dec 12 '23 05:12 chrisgeli

In addition to the above, I remembered that there's another use case for rectangular selections being able to start/end at any column number (including past line ends): Turning this

First line
Second longer line
Third short line

into that:

First line         -- new comment
Second longer line -- new comment
Third short line   -- new comment

Again, I'd simply Alt-drag vertically where I want the -- to begin at a random column after First line, but am currently limited by its line length.

chrisgeli avatar Dec 13 '23 02:12 chrisgeli

I'm not aware of a Scintilla option that changes Alt+Click-and-drag behavior of creating rectangular selections to do what you describe :( I wonder what Notepad++ does...

orbitalquark avatar Dec 14 '23 15:12 orbitalquark