Yes, you can spray vinegar on your hummingbird feeder to deter ants. Ants are repelled by the strong smell and taste of vinegar, and they will avoid climbing on the feeder or getting near it. To use vinegar as an ant deterrent, mix equal parts of water and vinegar in a spray bottle and spray it on the feeding station and the surrounding area. Reapply the mixture regularly, especially after rain or when you refill the feeder. Keep in mind that vinegar may also affect the taste of the nectar, so it's best to clean the feeder thoroughly with soap and water before refilling it with fresh nectar.