For the pickled onion, heat the oil in a medium saucepan. Add the sliced onion and cook over a medium heat for 4-5 minutes, stirring regularly until softened but not coloured. Stir in the sugar, vinegar, capers and cook for a few seconds more, stirring constantly. Remove from the heat and stir in the herbs.