Answer: The little black flies are probably fungus gnats. They tend to be attracted to (overwatered) houseplants where the soil surface never dries out. The solution is to water your plants less often so the soil surface dries and they have no place to breed. Or, if you have plants that actually require a constantly wet soil, you can place a layer of coarse sand or gravel over top of the soil. This fast draining layer will dry out and deprive them of their preferred location. The adults will die off and there will be no subsequent generations to replace them so you should see them disappear in about ten days.
Another control is to use a product called Gnatrol, read and follow the label directions. (It is a soil drench.)
As far as vinegar goes, if you set out a little plate or small glass of vinegar some of the adults will be attracted to that and drown in it. In my experience you will not catch all of them that way, though.
Q&A Library Searching Tips