How to reset Mac OS X text substitution? Whenever I type "foo" it gets replaced by "bar". It is working system wide. I can see this behavior in Chrome, TextEdit and other apps. Even partial text like "Somefoo" gets converted to "Somebar". After initial search, I tried changing settings in "Language &amp; Text". I can't find any entry for "foo" or "bar" in it. I tried disabling substitution. It didn't work. I tried "Restore Defaults". It didn't work. I even tried adding rule like "foo" to be replaced by "qux". It doesn't honor this rule and "foo" still gets replaced by "bar". I don't know what else I can try. How can I reset this substitution? Is their any system file or something which I look where these rules are written so I can change it?

I'm using Mac OS X 10.8.4.

Thanks!
Try running these commands:

defaults delete -g NSUserReplacementItems
defaults delete -g NSUserDictionaryReplacementItems


Then quit and reopen some application and test if it worked.

NSUserDictionaryReplacementItems is used in 10.9 and NSUserReplacementItems is used in 10.8 and earlier.