I would like to see the Multipaste option for Scintilla implemented I hacked together something that works, but someone just needs to add a new option in Preferences somewhere to set it
add to sciwrappersc: void sci_set_multi_paste(ScintillaObject *sci, gboolean mpval) { SSM(sci, SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH, 0); }
add to sciwrappersh: void sci_set_multi_paste (ScintillaObject *sci, gboolean mpval);
What works for now, but requires that you modify something in Preferences at least once in the session to get it to fire is adding, the following to editorc: sci_set_multi_paste(editor->sci, 1);
To test it out turn on the setting, change a keybinding in Preferences
Then copy some text to the clipboard, select multilines (Alt+Shift Up/DownArrow) and paste!
Now you should see all pasted text onto each line in the editor
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/850
Instead of being an option that applies to all pastes forever after, it should be a separate paste command that turns on multi-paste before pasting, does the paste, and turns multi-paste off. Put it in the Edit menu and the popup menu after paste, and allow it to be keybound.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/850#issuecomment-168561493
I think this would fix #841 and #625.
It probably would make sense to just have this be the default behaviour for column insertions.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/850#issuecomment-168566714
It probably would make sense to just have this be the default behaviour for column insertions.
Neither behaviour is "right", only the user knows which they want, so they should get to choose. But a preference is very inconvenient to change whilst you have a big paste sitting on the clipboard.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/850#issuecomment-168569439
@elextr unless I misunderstood the extremely minimal Scintilla docs, what would be a use case for not wanting "multipaste"?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/850#issuecomment-168571387
From my uses, I think it makes sense to default to presuming the user means every line. I'm not sure I know why a user, especially if they have a big clipboard stored, would expect it to land on line one only if they have multilines selected.
Perhaps you could put it as a checkbox in Preferences->Miscellaneous.
I've recently seen several other IDE boards, that use Scintilla, having this discussion and most seem to agree that the preferred default is to have multiline pastes paste to each line as the default.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/850#issuecomment-168572368
Most likely the reason it's not the default in Geany is because it was not available when Geany was written and nobody fixed it yet :)
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/850#issuecomment-168573089
As of Geany 1.23.1 this seems to be working now. Thanks, I'm pretty sure this can be closed now.
It doesn't work on 1.29 and the word MULTIPASTE does not exist in the Geany sources, so I suspect you have confused it with something else.
Are you sure you know what I'm talking about? I don't have 1.29 to test, but hold `Shift+Alt` in geany and select a block of vertical text, then `Ctrl+C` and move down and enter some empty spaces (enough lines to cover your selection) and go to the top and `Ctrl+V` if you get pasted what you selected then the issue this Enhancement Request refers to is fulfilled. Before it would only paste one line.
Works for me on 1.29 (git) with <kbd>Shift</kbd>+<kbd>Alt</kbd>+arrows or using <kbd>Ctrl</kbd>+mouse drag.
@AdamDanischewski Thats not multipaste, thats pasting a rectangular selection as I suggested elsewhere. Multipaste is a different animal.
Closed #850.
@codebrainz Thanks, that's the functionality I was referring to when I opened this -- I am going to close this now.
It'd be nice if, inside multi-line mode (Shift+Alt+arrows or ctrl+mouse drag as @codebrainz pointed out), <kbd>Cntrl</kbd> + <kbd>V</kbd> was pasting the same content to every line currently being selected.
@Akronix thats been discussed many times in other places and so far rejected.
@Akronix It does that already, that's why this closed.
@Akronix its not clear if you are talking about 1) pasting a single line on the clipboard to each line in a rectangular selection, or 2) pasting multiple lines from the clipboard to the multiple lines of a rectangular selection.
If 1) my answer, if 2) @AdamDanischewski answer :)
@elextr I think I meant rather the first one.
I've done a demo using Atom of the behaviour that I find nice to have :wink: ![anim](https://cloud.githubusercontent.com/assets/2631430/18294391/1b2bdeb2-7499-11...)
![myanimated](https://cloud.githubusercontent.com/assets/10157303/18317818/3ea19b44-74ed-1...)
Is what I'm talking about.
Reopened #850.
Closed #850.
Reopened #850.
The multiple line past still needs work, as of Git 1.31. Here is what works: <img src="https://cloud.githubusercontent.com/assets/2631430/18294391/1b2bdeb2-7499-11e6-904b-d0b0db5d735d.gif"/>
What I would like to see working - is when you copy some text single line, then select multiple rows in a multi-line select and then paste the copied text into each multi-line row selected.
Instead this is what is happening as of Geany 1.31: ![geany](https://user-images.githubusercontent.com/10157303/27189120-5cbf5f18-51be-11...)
It would also be useful if you could copy multiple lines of text then select the same number or more lines of text and paste the multi-line text copied into the selected area. This doesn't work either.
@AdamDanischewski yeah! It took you nine months to understand what I was talking about :stuck_out_tongue_winking_eye:
Lol, I'm not sure of the Geany version at the time of the correspondence - yet your issue is now fixed to the best of my ability to discern. Now, it is this new "problem"/non-feature of not multi-pasting text from a single row that is copied. If you copy text from a single row then multi-select rows then it should be presumed that you expect the text to be copied into each row - otherwise, you would not have made the multi-row selection for the paste.
This has been discussed elsewhere. Scintilla supports multi-paste into multiple selections, but it is a choice, both single and multiple paste are useful in that situation. The paste command infers the answer from what is on the clipboard, if its a single thing it pastes single and if its a multiple thing it pastes multiple.
If the contents of the clipboard is a single entity the paste command cannot read the users mind and decide if they want to paste single or multiple. A separate command is needed (or an option but that is considered to be less user friendly) for the other choice. Pull requests are welcome.
Its not exactly "mind reading" to presume that someone wants a single row pasted into every row of a multi-line selection. An option being required to turn off this behavior? If you really want to paste to a single line to a single row then don't do a multi-line select beforehand - simply put the cursor where you want and paste it like normal.
I realize this enhancement request probably won't get implemented anytime soon, but it would save people time - at the moment to repeat a single row to multi-line paste selection semi-quickly I count the number of lines to paste to, then open up a new scratch tab, type in what I want pasted, hit Ctrl-d (copy line) for the amount of lines to paste to, copy the text, make the multi-line select, then paste, then close my opened scratch tab. Instead of - not counting the number of lines - simply selecting the text, copying it then doing a multi-line select, pasting it to all rows.
Its not exactly "mind reading" to presume that someone wants a single row pasted into every row of a multi-line selection. An option being required to turn off this behavior? If you really want to paste to a single line to a single row then don't do a multi-line select beforehand - simply put the cursor where you want and paste it like normal.
The problem with this argument is that both sides think their option is obvious and clearly the correct one and can't understand the other mob. :grin:
In fact they are both right, each solution is useful at times, so as I suggest, why not just have two pastes, one to paste single, and one to paste multiple. Then the only argument is which is default :grin:. And that could be solved with the option.
Its not exactly "mind reading" to presume that someone wants a single row pasted into every row of a multi-line selection. An option being required to turn off this behavior? If you really want to paste to a single line to a single row then don't do a multi-line select beforehand - simply put the cursor where you want and paste it like normal.
The problem with this argument is that both sides think their option is obvious and clearly the correct one and can't understand the other mob.
In fact they are both right, each solution is useful at times, so as I suggest, why not just have two pastes, one to paste single, and one to paste multiple. Then the only argument is which is default . And that could be solved with the option.
Sorry for seeming silly, but what are the two options?
Sorry for seeming silly, but what are the two options?
When there is a rectangular selection and a single item on the clipboard the choice is to paste the single item into the first row of the selection or to repeat the single item in every row of the selection.
Although from #2317 comes the suggestion that if the clipboard is multi-line that successive lines get pasted into successive rows of the selection, so now there are three options :grin:
Sorry for seeming silly, but what are the two options?
When there is a rectangular selection and a single item on the clipboard the choice is to paste the single item into the first row of the selection or to repeat the single item in every row of the selection.
Although from #2317 comes the suggestion that if the clipboard is multi-line that successive lines get pasted into successive rows of the selection, so now there are three options grin
I might be too closed minded here, but I sincerely don't see the user case for the first one. And when I say user case I mean actual user base demanding this one and complaining about having the second one.
@Akronix see #2328 for recent developments :grin:
@Akronix see #2328 for recent developments grin
Yep, I saw it and subscribed to the PR updates. Nice job @AdamDanischewski ! :clap:
Please implement this enhancement
github-comments@lists.geany.org