Catalysis of the reaction: substrate + ATP + CoASH = AMP + diphosphate + substrate-CoA. [ GOC:ai ]