In a nonreactive 12-inch skillet, combine the oil, onions, sugar, vinegar and 1 teaspoon salt.
Cook over medium-high, uncovered and stirring occasionally, until the pan is almost dry and the onions are slightly softened (they will retain some texture, not turn jammy and soft), about 15 minutes.
Transfer to a bowl or container and let cool.
In an airtight container in the refrigerator, the onions will keep for up to 1 week; bring to room temperature before serving.