Page 1 of 1

Enable Multi-Cursor Editing

Posted: Mon Mar 19, 2018 2:39 pm
by Tristano
I've noticed that currently PB IDE does allow multi-cursors: pressing up/down arrow keys while holding Alt + Shift will add cursors above/below the current line; but then editing only actually affects a single cursor. Multi-line rectangular selections can be deleted correctly though, which is already a full-fledged multiple-selection feature (even though the selection area is a single one, it actually consists in multiple selections from different lines).

Mouse "Column Selections", via Alt + Shift and Left-Mouse Button, also works and, again, the resulting multi-line "rectangular selection" can actually be deleted correctly, but not edited (editing would affect a single cursor).

I think that this is due to Scintilla native behavior, as this is the way Notepad++ uses multi-cursor editing — ie: via Alt + Shift and arrows or mouse, except that Notepad++ supports multiple selections text editing.

So it looks like multi-cursor editing support could be implemented in PB IDE, and it's just a step away, as multiple cursors and selections are already supported — and indeed user eddy has provided some good Scintilla examples of this:

http://www.purebasic.fr/english/viewtop ... lla+static

Being able to enter/delete text on multiple lines would be a great IDE improvement, especially for those of us who are used to work with this feature on other editors and really miss it in PB IDE.

Implementing text-editing support for multiple selections would immediately pave the way to lot's of editing features (borrowing from Sublime Text, as an example):

- Alt+F3 (Find All) — to add all occurrences of the current word to the selection
- Ctrl+Shift+L — to split a selection into Lines
- Ctrl+D — to add the next occurrence of the current word to the selection

For a full list of multiple selection features of ST, see:

https://www.sublimetext.com/docs/3/mult ... board.html

Also, it would be worth mentioning in the Documentation the currently supported multiple-selections features (even if it only applies to deletions, it's still a very useful feature, yet it's undocumented).

Re: Enable Multi-Cursor Editing

Posted: Wed Feb 06, 2019 10:35 pm
by Sicro