Select all marked text
-
Re: Is there a way to select all marked text?
I came across the old post above since I was having the same question. As you were asking why someone would want that, I had this scenerio:first I looked up specific parts of a text with a regex.
After that I want to to a search/replace in only those found parts. Now I can highlight or copy those parts, but there is no way to select them.
In that case it would be handy to just be able to select all marked text. -
As you read that post, did you also read the answer? In that case and your post, the final reason to do so seems a bit unclear (to me).
If a regex can select text which is all you wish to edit, then the regex can also alter the text which was selected with the addition of the “replace with” field being filled with what you require.
If the regex just selects a line that has some text you are searching for and you want to edit something (else) in that line, you could firstly prepend every line with a line number (column editor, number to insert). Use the regex to “mark” which lines, cut those marked lines and paste into another (new) tab. Edit those lines then paste them back and re-sort by the line numbers, then remove those line numbers.
These are just a couple of ideas. As I said, I’m unclear on what your intention is. But often I find it works better when the problem has been broken down into more easily managed chunks. Then work on each step in turn.
Terry
-
The simple answer is: there is not a Notepad++ feature to select text after the Mark action has been completed.
You haven’t specified what you will do with the selected text after you select it. @Terry-R enumerated the major actions one normally takes after doing a selection (copy, delete, replace, or typeover), all of which can be handled through the Replace or Mark dialogs, or the Search>Bookmark> submenu if you bookmarked-while-Marking).
So what’s specific about your need that you need there to be an actual selection after it’s marked, rather than doing one of the other described actions? -
Maybe I can see it… You mark text via several different operations, as you evaluate data. Then you decide, or you always knew from the beginning, that anything you’ve marked you will need to delete, but for some reason you didn’t want to do the deletion until you were done marking… only to find there is no way now to delete that text. I’ve never had such a scenario, but maybe I could see it occurring.
But, there are a limited number of things you can do with selected text. Deleting and typing-to-fill each occurrence with the same things are the obvious ones.