I'm trying to keep track of my hours for work, and I have to keep very specific details of which files I was editing and when. In my .vimrc script, I have:
:silent !clock_in_script.sh %:p
This clock_in_script.sh takes the location of the file as an argument and just writes the name of the file and time to a log.
Is there a way to similarly invoke a script when I exit vim? If not, is there a way I can write the name of the file I'm editing and the time to a logfile from vim?
Thank you in advance!