Reputation: 12465
Is there anyway to hook into vim's file save action to have it automatically write a log file the name of any file that has been changed?
Upvotes: 1
Views: 369
Reputation: 234654
Yes, there is. It's a feature called autocommands. Type :help :autocmd
to access the documentation. You probably want something like this:
:autocmd BufWrite * <command that appends to log>
You can use %
as a placeholder for the current file name.
Upvotes: 3