To search for a word inside of a text-files in directory use
grep -rni "string" *
grep -R --include="*.txt" "foo" ~/projects/