Peel the onion and cut it in half lengthwise. Slice very thin. Sprinkle ground black pepper over the sliced onions. Pack into a pint jar tightly but without crushing.
Pour the vinegar in a medium bowl. Add the salt and the sugar and whisk until dissolved. Pour the vinegar in the jar to the top. Discard any leftovers.
Cover and let stand at room temperature for 4-6 hours or overnight, then refrigerate for up to 2-3 weeks. The onions are ready for consumption after only a few hours but only get better over time.