Yeah, I haven't quite figured out selectors and keys. They are mentioned in the API page, but since I haven't found much that defined what they actually are, I haven't messed with them.
That being said, I found that
view.scope_name(0) would return the syntax scope of the first character, and the first field was "
source.vhdl" so I wrote myself a utility method that just checks if the file is a VHDL language file using that.
So, now my header last updated field is saving each time I hit save with the new time. This is perfect.
I also wonder if what I've done might have been facilitated by selectors and keys now. Maybe I can dig around for examples that use those functions and see what comes up.