How to Make It
Wash a wide-mouth 1-qt. canning jar and lid in hot, soapy water and rinse well. Set a round metal rack or a few biscuit cutters in a stockpot, fill with water, and bring to a boil. Lower jar into water, add lid with ring, and boil for 10 minutes. Reduce heat to a simmer and keep jar and lid in water until needed.
Put vinegar, 2/3 cup water, sugar, peppercorns, 1 rosemary sprig, salt, and onion in a large, non-reactive saucepan. Bring to a boil, covered. Reduce heat and simmer, covered, until onions turn pink and somewhat translucent and tender, 10 minutes. They should be neither stiff nor floppy; they'll soften more after the heat is turned off. If brine doesn't cover onions, turn slices occasionally so they all get cooked evenly.
Put fresh rosemary sprig in jar and set a wide-mouth funnel in neck of jar. (If you plan to keep the pickle for more than a week, skip the rosemary here--it will get too strong over time.) Discard rosemary from pot and add onions to jar. Pour in brine, leaving about 1 in. airspace at top. Stir in remaining peppercorns.
Close the lid just until tight. Let the pickles cool to room temperature, and then chill at least overnight before eating and preferably 1 week.
Make ahead: Up to 6 months, chilled.