what is the context of the word vigil

The context is how the word is used.

You could say --

The family kept an all-night vigil at the bedside of their dying grandfather.