Lightly oil a large baking sheet. In a medium saucepan, combine the sugar and water and boil over high heat, stirring occasionally, until the sugar dissolves. Add the coconut and a pinch of salt and cook over moderate heat, stirring, until the syrup has evaporated and the coconut has a light, somewhat crystallized coating, about 20 minutes. Stir in the vanilla.
Working quickly, scrape the coconut candy onto the prepared baking sheet and spread it into a 10-by-9-inch rectangle; let cool to room temperature. Sprinkle a little nutmeg over the top. Using a large knife, cut the rectangle into 24 pieces and serve.