New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marked text needs to be copyable #6095
Comments
Some workarounds are discussed here: https://notepad-plus-plus.org/community/topic/12710/marked-text-manipulation/ Workarounds include:
But the workarounds use techniques that are a bit advanced for the typical Notepad++ user, even a user that is familiar with scripting and/or regular expression operations. There should be an easier method. |
Delimiter between marked matches: So for the presented regular expression marking operation,
where a line-ending serves as the delimiter between matches. However if we change the regular expression to something that matches across line-boundaries, say Because that has embedded line-endings in the match, is a line-ending a good choice for a delimiter between matches?:
Or would it be best in this case to have a double line-ending to really emphasize where one match ends and the next begins?:
...Or...some other way of doing it? |
... as long as copy and paste is only done inside npp you can add whatever you want to separate each match but if this should be usable in other applications as well you need to stay close to the |
@Ekopalypse Not sure I'm following you. I hadn't thought about it to this point, but I'm sure the format would be CF_UNICODETEXT. I was talking about what, if anything, should delimit the chunks of marked text. First thought is that a line-ending would be best, but as pointed out above, it has some limitations. Further thoughts from you on this are definitely encouraged. [It should be assumed that we aren't simply staying "inside npp" with such a feature...an outside target for the paste is very reasonable.] |
Then from my point of view, the only reasonable approach would be to append an CRLF on each match, to get multiple lines when pasting, I don't assume one wants to get the matches merged into a single string. This should ensure that the data is still CF_UNICODETEXT compliant. |
Unconsidered to this point, but maybe the text styled with |
From my point of view it doesn't make sense to make StyleX copyable. |
True, maybe not a valuable additional feature. I was thinking of the user that would "style" unique text (so there's only ONE occurrence of it) for some sort of later followup...then do a bunch of that in the same color...then only later realize that it would be valuable to be able to "copy out" what they've extensively styled -- and realize that it isn't possible. [I think you have convinced me that it isn't something that is needed -- thank you @Ekopalypse ]. |
Edit / Copy to clipboard seems more adapted. To me, Copy / Paste Special is related to "content conversion". |
Or maybe the command to copy marked text belongs on the Search menu (similar to the way bookmark handling is -- could be right below the Bookmark entry). Or maybe it should (also) be a button right on the Mark tab. |
To me, anything related to the clipboard (all Copy and Paste operations, among others) should be at least in the Edit menu. But that's just me... |
Description of the Issue
When I use the
Mark...
feature to mark some large amount of text, often I want to copy only that marked text to a different place. Currently there is no easy way to do that.Steps to Reproduce the Issue
Create the following text in a new Notepad++ editing view tab:
A baseball team from the fictional town of "Mudville" (implied to be the home
team) is losing by two runs in its last inning. Both the team and its fans
(a crowd of 5,000, according to the poem) believe they can win if Casey,
Mudville's star player, gets to bat. However, Casey is scheduled to be the
fifth batter of the inning, and the first two batters (Cooney and Barrows)
fail to get on base. The next two batters (Flynn and Jimmy Blake) are
perceived to be weak hitters with little chance of reaching base to allow
Casey a chance to bat. Surprisingly, Flynn hits a single, and Blake follows
with a double that allows Flynn to reach third base. Both runners are now in
scoring position and Casey represents the potential winning run. Casey is so
sure of his abilities that he does not swing at the first two pitches, both
called strikes. On the last pitch, the overconfident Casey strikes out
swinging, ending the game and sending the crowd home unhappy.
Invoke the
Search
>Mark...
function.In the
Find what
box enter(?-s)\bb.*?\b
Tick the
Wrap around
box.Select
Regular expression
forSearch mode
.All other options unticked.
Press the
Mark All
button.Observe text marked like so:
Expected Behavior
I expected to find a way to copy my marked text to the clipboard.
Actual Behavior
No easy way to copy marked text to the clipboard for use elsewhere.
Debug Information
Notepad++ v7.7.1 (32-bit)
Build time : Jun 16 2019 - 21:14:50
Path : C:.........\npp.7.7.1.bin\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS : Windows 10 (64-bit)
Plugins : ColumnTools.dll Explorer.dll LocationNavigate.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConverter.dll NppExec.dll NppExport.dll PythonScript.dll
The text was updated successfully, but these errors were encountered: