1

For some reason, when I switch TextEdit to plaintext mode, the find and replace menu changes, so if I want to "replace all" I have to manually hit replace a bunch of times, or flip it into rich text mode, replace all, then flip it back.

Rich Text mode:

enter image description here

Plain Text mode:

enter image description here

Am I missing a setting? Is this intended behavior?

(macOS Monterey)

Glorfindel
  • 4,057
Zaya
  • 111
  • 1
  • Note: I noticed today that if I set TextEdit to start in plain text mode by default, the bug reverses. So if it boots in plain text mode, I can replace all, but then if I flip it to rich text mode there's no longer that option. May just be a bug that'll be patched in a later update – Zaya Jun 29 '22 at 14:34
  • Most problems using plain text in TextEdit can be fixed by using BBEdit instead. It's been the 'serious' Mac text editor for 30 years. – benwiggy Jun 30 '22 at 08:55

1 Answers1

-1

With reference to your first picture, in the upper right part you may see the words "Replace|All" inside a button - this is in fact a combination of two buttons, one is "Replace", the other is "All". Hover over each one to see a description of what it does. So, for replacing "all", at once, tap on "All".

If you often use .txt files, the behavior of TextEdit can be improved as follows:

  • In TextEdit|Preferences, tap on the tab "Open and Save" and under the label "Plain Text File Encoding" set to "Automatic" both items "Opening Files" and "Saving Files".

This way you will operate each time on strict .txt files, not messing with .rtf types.

Another good way is to use a dedicated text editor - on MAC there is VIM and PICO, from terminal. It is simple and more efficient to use such editor. For example, with vim the commands in terminal would be:

$vim myfile.txt            # this opens the file 
:%s/old-word/new-word/g    # substitute old-word with new-word globally; use gc to change one by one
:wq!                       # save to file and exit
Yoan
  • 1,287
  • Setting it to boot into plain text mode fixed the issue. However, if I cmd+shift+t and flip it back into rtf the replace all option vanishes again. I think it's just a bug in the program. Also, I wouldn't exactly describe VIM as simpler than a GUI editor.. but yeah I guess that works too – Zaya Jun 29 '22 at 14:35
  • What os version do you have? I use Monterey 12.4 and I do not have the behaviour described by you. And while working on .txt file why do you need to switch to .rtf? I configured the TextEdit to startup a new file in .rtf mode and process .txt files as described in my answer. – Yoan Jun 30 '22 at 12:27
  • The vim application is not GUI, is terminal editor. It has a GUI, named Gvim or MacVim for macOSX. The reason I mentioned it is it already embedded in osx. – Yoan Jun 30 '22 at 12:30
  • I'm also running 12.4. And I don't need to switch to .rtf, I'm just saying that when/if I do the bug appears. The "replace all" option only disappears after hitting cmd+shift+t and trying to find and replace again. Booting into .txt makes the bug not affect me, but it's still present – Zaya Jun 30 '22 at 19:34