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