What is the simplest way to make a text editor "color" spefic words, AND, even if you load a file containing these words it should auto color them in the color wanted.

I've downloaded a script before and learned how to do it, but is there a simple way to understand how the procedure is written? And how to make it check up words when you load a file into the editor.