Multiple word search and replace in Notepad++

notepad++

Solution

Install Python Script plugin from Plugin Manager.

Create a file with your substitutions (e.g., C:/Temp/Substitutions.txt), separate values with space:

good bad
great worse
fine not

Create a new script:

with open('C:/Temp/Substitutions.txt') as f:
    for l in f:
        s = l.split()
        editor.replace(s[0], s[1])

Run the new script against the text you want to substitute.

Problem

How can I replace several different words all at once in Notepad++? For example; I have "good", "great" and "fine" and I want to replace them with "bad", "worse" and "not", respectively, all at once. I know that I can replace them one by one, but the problem I am facing requires that I replace a lot of words, which is not convenient to do.

Original source