It is permitted to recite a Davar Shebikedushah in the presence of vomit. However, if the vomit smells, one should try to distance themselves from it. If the vomit was cleaned up, then one can be lenient even though there is a smell. An example of where the above Halachos apply is if while travelling in a car or bus someone vomited.