Slice the red onion lengthwise. Slit the green chili.
Arrange the onion in a wide mouthed bottle or jar adding the chili or other herbs in between. Keep this ready.
Boil the water adding sugar, salt and pepper corns. Stir well cover and when it begins to boil add the vinegar wait for a minute or two switch off heat and immediately pour it over the prepared onions in the jar. The heat will soften the onion as it sits.
Make sure all the onion is immersed. Close the jar tightly and refrigerate. Use next day for best results. Can be stored the refrigerator for upto a month.