Chop the onions, finely mince the ginger and garlic. For spicier curry slit or chop the green chilies otherwise leave them whole or avoid altogether.
In a heavy bottomed pan, heat 2 tbsp oil. When the oil is hot add the mustard seeds. Once the mustard seeds splutter add 2 C of the chopped onions, ginger, garlic, curry leaves, and the green chilies. Keep the heat at medium. Sprinkle 1/2 tsp salt over the onions. Cook till the vegetables are soft, 4-5 minutes, stirring a few times in between.
Once the onions become soft add the turmeric powder and mix well. Pour 1 & 1/2 C of the thin coconut milk or water and bring it to a boil. Reduce the heat to low, add the vinegar (optional). Slowly break the eggs into the pan , one by one. Cover and turn the heat to medium and cook for 4 to 5 minutes.
Open the lid and check on the eggs. If the eggs look runny flip them gently place the lid back on and cook for a few more minutes, or scoop a little of the curry and pour over the eggs to let firm up.
Add the (thick) coconut milk, reduce heat and stir or swirl the pan to mix . Taste and adjust salt. Turn off the heat and let rest a few minutes before serving .
Notes
If using fresh coconut milk use the thin coconut milk instead of water and finish off the dish with the thick milk.
Vinegar is added to help coagulate the egg whites. It helps the eggs to stay in place and not spread too much.
You can optionally add tomatoes (to avoid vinegar), cilantro and other aromatic spices according to your taste.