Remove the pan from the heat, stir in the vanilla, and cool to room temperature. Transfer to a glass jar or bottle and refrigerate. The syrup will last for two weeks or more. Eventually, the sugar will begin to crystalize on the side of the jar or bottle, but the taste will likely still be fine.