Page 1 of 2

MultiEditing

Posted: Sat Jun 22, 2019 9:06 pm
by RSBasic
Hello :)

In Notepad++ and in other editors there is the function "Multi Editing" to mark and edit several code areas at the same time.
This is how it looks in another program: https://learn.microsoft.com/en-us/visua ... diting.gif

PureBasic and SpiderBasic can not use this function. With my new tool it is now possible.

How to?
Ctrl key + Left mouse button: You can create multiple cursors and write or delete text in multiple lines at the same time.
Shift key + Alt key + Left mouse button pressed: Several lines are marked within a rectangle and you can write or delete text in several lines at the same time.
Shift key + Alt key + Arrow key (up, down, left or right): Several lines are marked within a rectangle and you can write or delete text in several lines at the same time.

Screenshot:
Image

Installation:
Image

Download: https://www.rsbasic.de/downloads/downlo ... diting.zip
Image

I would be very pleased about feedbacks, improvement suggestions, error messages or wishes. Thanks :)

Re: MultiEditing

Posted: Sun Jun 23, 2019 2:14 am
by BarryG
:shock: https://www.youtube.com/watch?v=IumBp15irvM

I installed it and worked out I need to double-click each text selection to edit them simultaneously, but it also adds what I type to where the cursor is, which is unwanted.

Re: MultiEditing

Posted: Tue Apr 18, 2023 2:17 pm
by dige
I just had the use case of developing in two different places in the code at the same time and remembered the MultiEdit tool.
Unfortunately, it no longer seems to work.

Or do I still have to do something to activate the screen split?

Re: MultiEditing

Posted: Sat Aug 26, 2023 5:41 pm
by RSBasic
dige wrote: Tue Apr 18, 2023 2:17 pm I just had the use case of developing in two different places in the code at the same time and remembered the MultiEdit tool.
Unfortunately, it no longer seems to work.

Or do I still have to do something to activate the screen split?
I tested it with PureBasic 6.02 LTS. It works. Are you still having this problem?

Re: MultiEditing

Posted: Sun Aug 27, 2023 7:42 am
by Little John
Hi, this sounds promising!

I have installed the tool, but unfortunately I don't have any idea how it is going to be used. Can you explain it, please?
RSBasic wrote: Sat Jun 22, 2019 9:06 pm In Notepad++ and in other editors there is the function "Multi Editing" to mark and edit several code areas at the same time.
This is how it looks in Notepad++: https://notepad-plus-plus.org/assets/im ... tiEdit.gif
That link is dead now.

Re: MultiEditing

Posted: Sun Aug 27, 2023 9:10 am
by RSBasic
Thanks for the hint. I updated the link to the external image.

Here's a new example of what that looks like:
https://learn.microsoft.com/en-us/visua ... vsmac-2022

With the MultiEdit function you can edit several lines at the same time.

Re: MultiEditing

Posted: Sun Aug 27, 2023 12:09 pm
by Little John
RSBasic wrote: Sun Aug 27, 2023 9:10 am With the MultiEdit function you can edit several lines at the same time.
Yes, I know what the purpose of your tool is, and that was not my question. ;-)
Little John wrote: Sun Aug 27, 2023 7:42 am [...] I don't have any idea how it is going to be used.
I don't have experience with Notepad++. Do I have to hold down the [Alt] key while dragging the mouse (doesn't seem to work) in order to get multiple cursors or multiple selections, or what else is to be done in order to active multiediting mode with your tool?

Re: MultiEditing

Posted: Sun Aug 27, 2023 1:16 pm
by RSBasic
Hello Little John

If you have added my program as a tool in PureBasic (see installation guide), then restart PureBasic.
In the editor you put the cursor in a line, e.g.:
Image

Press Shift key and Alt key at the same time while pressing e.g. down arrow key:
Image

Then you can remove with DEL key and write what:
Image
Image

Re: MultiEditing

Posted: Sun Aug 27, 2023 2:21 pm
by Little John
RSBasic wrote: Press Shift key and Alt key at the same time while pressing e.g. down arrow key:
This is the information I was missing, thank you.

However, after doing so, I get e.g. a rectangular selection that spans 5 lines. When I then press say the "x" key, an x will only be written in the 5th line, and after the key press, there is no selection anymore and only one caret in the 5th line. :? Lines 1 to 4 remain unchanged.
Tested with PB 6.03 beta 5 (x64) on Windows.

Re: MultiEditing

Posted: Sun Aug 27, 2023 5:09 pm
by RSBasic
I can not confirm. I can also use Shift and Alt with my mouse to mark a rectangle and when I write something, it replaces in all lines at the same time.
Can you create a video or gif animation?

Re: MultiEditing

Posted: Mon Aug 28, 2023 8:50 am
by highend
Can't confirm either on PB 6.03 beta 5 (x64) on Windows. Works as expected.

A feature wish: Can you add the option to define the hotkey(s) to press?

E.g. through an .ini file in the same folder as the MultiEditing.exe file (so that it stays 100% portable)

I'm used to just press Alt in all my editors that support multi-line editing. Not Shift+Alt.
So I'd like to switch (if you don't mind to implement that)...

Thanks for the nice tool! :mrgreen:

Re: MultiEditing

Posted: Mon Aug 28, 2023 9:03 am
by Little John
RSBasic wrote: Sun Aug 27, 2023 5:09 pm Can you create a video or gif animation?
Today doing the same as yesterday, now it works as expected. :?

Re: MultiEditing

Posted: Mon Aug 28, 2023 10:02 am
by Caronte3D
Nice feature, I missed it when was posted :wink:

Re: MultiEditing

Posted: Tue Aug 29, 2023 11:08 am
by RSBasic
I added a guide in the first post:
How to?
Ctrl key + Left mouse button: You can create multiple cursors and write or delete text in multiple lines at the same time.
Shift key + Alt key + Left mouse button pressed: Several lines are marked within a rectangle and you can write or delete text in several lines at the same time.
Shift key + Alt key + Arrow key (up, down, left or right): Several lines are marked within a rectangle and you can write or delete text in several lines at the same time.

highend wrote: Mon Aug 28, 2023 8:50 am A feature wish: Can you add the option to define the hotkey(s) to press?

E.g. through an .ini file in the same folder as the MultiEditing.exe file (so that it stays 100% portable)

I'm used to just press Alt in all my editors that support multi-line editing. Not Shift+Alt.
I'll check this.

Re: MultiEditing

Posted: Wed Aug 30, 2023 6:31 pm
by highend
I'll check this
Thanks!