开发者

How to have VIM automatically log files that were changed in a logfile?

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜