Peel the onions. Cut in half through the root. Thinly slice into half-moon shapes.
Set electric skillet to 300°F Add oil and wait until it shimmers. Add a layer of onion and sprinkle with a little salt. Continue layering onion and salt until all the onions are in the pan. Cover and let stand, untouched, 20 minutes.
Sprinkle in black pepper to taste, then sugar. Cook, stirring often, 10 minutes, until onions look fairly dry.
Add vinegar and cook, covered, stirring occasionally, 1 hour, or until onions are very soft and a dark mahogany brown. Serve warm or at room temperature. It will keep, refrigerated, up to 1 month.