replace function
-
hello scott
yes, i think its what i was talking -
@kat75
Just to make it clear - you still can do this with notepad++
although it isn’t that intuitive.what you need to do is
select the text you want to be replaced and press ctrl+h
select the text which should replace the original text and press ctrl+c
click into the replace with field and press ctrl+vclick into the doc where you want the text to be replaced (click above the text)
press find next
press replaceDone
Cheers
Claudia -
thanks claudia
not easy but yes works
it will be great if some one could make a plugin to simplify this
or perhaps a next update of notepad++ -
@kat75, @Claudia-Frank :
Does this really work when there are multiple lines in the replace text? It doesn’t work for me; I find the behavior consistent with the discussion in this thread (https://notepad-plus-plus.org/community/topic/12973/multiple-line-replacing-doesn-t-work) where it doesn’t work for the OP and @guy038 concurs…
-
yes, tested on 7.3.3 and 7.4 (both 32 bit).
Scott, I do not fake screenshots :-DCheers
Claudia -
Ah, okay, this is good to know. You are way-more bleeding edge than I want to be, with the Notepad++ version you’re using. I try to not be too far behind, but reading about problems here (esp. recent 7.4 problems, for ex.) gives me strong hints about which version to (not) use.
I don’t see anywhere in recent “new features and bug-fixes” list where it mentions a change in this area. Nice.
It is good that it works as you describe now; takes care of the need of the OP in the thread I referenced earlier. And it is not overly burdensome to do (IMO), contrary to what @kat75 was saying.
-
a nice improvement would be, if you have a active selection and you click into
find what and/or replace with fields, it automatically replaces the previous used ones.So this would simplify it to,
Select the text block
open replace dialog (find what: is filled automatically)
select the text block you want to be used as replacement
click into replace with field, which than is updated with the current selected text.Cheers
Claudia -
@Claudia Frank:
I admire your Notepad++ savvy. You might be a bit bossy (even condescending) at times, but that’s OK with me. After Donald Trump in the White House, just about everybody is a saint(ess)!
The OP wanted a search/replace (in opened files or on disk) as the ‘Replace Text” freebie by Ecobyte. I presented that very productive and convenient feature here:
https://notepad-plus-plus.org/community/topic/13808/search-replace-of-multiline-text-blocs
I thought Notepad++ would do that in the ‘Extended (\n, r, …)’ search option. It doesn’t — and we can only hope the feature will be added in a future release.
I tried your procedure. The ‘Find what’ worked, although I didn’t see any special character between the copied lines.
Unluckily, the ‘Replace with’ box only copied the first line of text. See screenshot. I use 32-bit Notepad++ v7.3.3.
Extended Search/Replace in Notepad++
Hope you have influence on the highly skilled creator of Notepad++.
Ion Saliu
“A good man is an axiomatic man; an axiomatic man is a happy man. Be axiomatic!” -
Yea, I just tried the same test with 7.4 and it didn’t do the multiline thing in the replace-with box, so now I’m starting to think that @Claudia-Frank IS faking screenshots.
:-D
-
You might be a bit bossy (even condescending) at times, but that’s OK with me. After Donald Trump in the White House, just about everybody is a saint(ess)!
Might I ask what you are referring to?
Cheers
Claudia -
You might be a bit bossy (even condescending) at times…
Might I ask what you are referring to?
I don’t read every posting, but I cannot imagine there is even one where you were even in the neighborhood of bossy or condescending.
I’ve seen you reply admirably to posts that I wanted to respond to with some response along the lines of, “Come back when you have the faintest idea what you are doing”. The best I could do was resist the urge, but you put me to shame with your thoughtful, helpful answers. Keep up the tremendously good work!
-
-
@Claudia Frank:
There is something strange about you, axiomatico. Methinks you cook the books. Or, perhaps your version of Notepad++ is special and not available to programmers like me.
I did it again. Once again, the procedure didn’t work in my Notepad++ neck-of-the-woods. The replace box only copies the first line in the bloc. I used the ‘Edit’ menu and also the contextual menu (right-click). Look again at the screenshot:
Extended Search/Replace in Notepad++ClaudiaCheat
So, what you did: Cook the books. You created just one paragraph in a narrow screen with ‘Word-wrap on’. Why don’t you do on a page I know? Download this page from my website, open page source, copy-and-paste the content to a new Notepad++ file. Apply your procedure and show us a real screenshot.
The page is a little more complicated as it has ‘pre’ sections that show different fonts.
Statistical Page Pick-3 Lottery in Notepad++
If not, you have a serious behavioral problem (@Scott Sumner nods approvingly). Notepad++ is not served by fabricating things.
Ion Saliu
“A good man is an axiomatic man; an axiomatic man is a happy man. Be axiomatic!” -
Could it be that it is related to Unix? I’m running npp on ubuntu.
Would you give it a try to convert eols to unix and redo the test?What about my question? Do you wanna answer it or do you prefer to keep insulting me?
Cheers
Claudia -
Axiomatic Ones:
Maybe there is another scenario in play here. Maybe this multiline replace function WAS present in a previous version of Notepad++. Obviously, I didn’t check every version regarding this replace function. Was it really present in a previous versions? Was the function dropped consciously (e.g. for copyright reasons) or inadvertently?
Methinks it might be an overlooked property setting. Visual Basic has a property setting for the textbox: ‘Multiline = True’. Look at that under the property sheet of ‘Replace textbox’.
Now, this hyper active Claudia Frank maybe works with a previous version of Notepad++ that featured the multiline replace. She should have been honest and tell us what version of Notepad she used. She just posted that actually she works with a Linux version of Notepad++. Scott Sumner and I disclosed the versions we are using.
I run 32-bit Notepad++ on 64-bit Windows 10.
Now, I put the blame squarely on the author of this excellent editor. This replace thingy has been debated a lot — I mean, a lot. There are several threads with hundreds of posts in this very community. Why does the author hide in silence? He knows better than anybody else if the feature we are debating here IS PRESENT OR NOT IN NOTEPAD++. Just a few paragraphs will do. Posts by Claudia Frank won’t do. She is disingenuous. She cooks the books, even by Photoshopping…
Ion Saliu
“A good man is an axiomatic man; an axiomatic man is a happy man. Be axiomatic!” -
Claudia, why in the animated GIF when you right-click on the replace-with box does the popup menu appear so much different than mine? I can’t quite read yours in the graphic (too small, too fast) but it is definitely “different” and I don’t know why that would be…some side effect of running under Wine?
Anyway, Claudia, your last hint has solved the mystery of why this works for you and not me or Ion…Linux line-endings!! If I try to duplicate your procedure on text with LF only as the line-ending it works for me as it does for you (allows multiple lines in the replace-with box)…same test with CR+LF as line-ending fails (only puts first line of multiline select block in the replace-with box) as previously reported.
I thought it was pretty clear that my hint about “fakery” (“maybe Claudia IS faking screenshots”) was all in jest…that’s why I followed that with a :-D… If that was misinterpreted then I cannot apologize enough. However, if Ion is also jesting, he has taken it to a totally different level and personally I don’t find that warranted or acceptable. As Jim stated earlier, Claudia’s inputs to this community are invaluable, and when she disappears for a period of time (as she tends to do sometimes) she is sorely missed here. She always signs with “Cheers” but the real CHEERS go to Claudia!
And Ion, please don’t “nod my head approvingly” on my behalf–I can do that for myself if need be. :)
-
@Scott Sumner
Axiomatic One:
Claudia Frank does “fake the stake”. You wasn’t jesting about it. Look at her reply in another thread. She FAKES on-the-fly font changing in Notepad++, much like in Microsoft Word. That is NOT a real feature in Notepad++. She Photoshopped the screenshot:
https://notepad-plus-plus.org/community/topic/13829/improments-about-notepad-font
As for the animated image, methinks she also “faked the stake” or “cooked the books”. There was a bloc of empty space in a Notepad++ file. One can type text and presses the down arrow to create the impression of multiple lines. They ain’t real lines, but part of a single paragraph.
I did the following experiment in the same HTML file I used in my first screenshot. I selected a paragraph that consists of several lines. But those are NOT real lines. The appearance of multiple lines is created by word-wrap on.
Search/Replace in Notepad++SingleWrappedLine
What many posters in this community want is REPLACE OF MULTIPLE REAL LINES, NOT SINGLE LONG LINES. That’s why we are in this thread and several other threads on the same topic.
Again, I put the blame squarely on the author of this excellent editor. This replace thingy has been debated a lot — I mean, a lot. There are several threads with hundreds of posts in this very community. Why does the author hide in silence? He knows better than anybody else if the feature we are debating here IS PRESENT OR NOT IN NOTEPAD++. Just a few paragraphs will do. Posts by Claudia Frank won’t do. She is disingenuous. She cooks the books, even by Photoshopping. For what? For NO reason, because she has a problem, she is not a reasonable person. It makes people waste their time reading her posts, taking her procedures at face value, when, in fact, she fakes the stakes…
Ion Saliu
“A good man is an axiomatic man; an axiomatic man is a happy man. Be axiomatic!” -
Hi Scott,
Claudia, why in the animated GIF when you right-click on the replace-with box does the popup menu appear so much different than mine?
actually I don’t know - I once played with the different ui languages and now I do have
a German context menu but only in dialogs (it looks like). The context menu of the editor
is still English.I thought it was pretty clear that my hint about “fakery” … was all in jest
To me it was :-)
However, if Ion is also jesting…
I don’t think so, but not worth to worry about.
Not sure if I find the time to check why the two fields in the dialog
are handled differently but … let’s see.Cheers
Claudia -
@Claudia-Frank said:
why the two fields in the dialog are handled differently
I guess there are FOUR real differences:
- Find-what box with Windows line endings between lines
- Find-what box with Linux line endings between lines
- Replace-with box with Windows line endings between lines <-- the true troublesome one
- Replace-with box with Linux line endings between lines
-
it was not easy for me to succeed too, sometimes i succeed other time i dont succeed, perhaps its because of me i dont know
but notepad++ is a great tool hope it could be a next developement to make this more easy