Toast pine nuts (or almonds) in a medium dry skillet over medium-low heat, stirring constantly, until lightly browned and fragrant, 2 to 3 minutes. Transfer to a small bowl to cool.
Add oil to the pan and heat over medium heat. Add onion and salt; cook, stirring occasionally, adjusting heat as necessary, until soft and golden brown, 15 to 20 minutes.
Meanwhile, steam broccoli until just tender, 4 to 6 minutes. Transfer to a large bowl. Add the nuts, onion, vinegar and pepper; toss to coat. Serve immediately.