In a skillet, heat 1 tablespoon vegetable oil and 1 tablespoon butter over medium heat.
When the butter has melted, add the finely chopped onion. Cook, stirring constantly until the onions begin to caramelize (time – about 25 minutes).
Add vinegar, sugar, and 2 tablespoons of water. Stir well, lifting from the bottom anything that might settle during the cooking of onions in oil. Cook until the liquid has completely evaporated.
Oil 1 side of all bread slices. Place 6 slices butter side down. Top with thinly sliced Gruyere cheese. Then the caramelized onions. Cover with another slice of bread (butter side up).
Heat a skillet over medium heat. Layout the sandwiches and cook until the cheese starts to melt and the bread begins to acquire a golden brown color (time – 2-4 minutes). Turn over and wait until the bread on the other side is golden brown.