Chop onion and garlic and cut ham into 1/4-inch dice. In a 3-quart saucepan cook onion, garlic, and ham in oil over moderate heat, stirring occasionally, until onion is pale golden. While onion mixture is cooking, discard stems and center ribs from collards and finely chop leaves. Add collards, broth, and water to onion mixture and simmer until collards are tender, about 20 minutes. Rinse and drain black-eyed peas. In a bowl mash half of peas with a fork. Stir mashed and whole peas into soup and simmer 5 minutes. Season soup with salt and pepper and stir in vinegar.