Ⅰ. 插件描述
Updates a date stamp within a file whenever it is saved.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/updatemoddate-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/updatemoddate-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/updatemoddate-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/UpdateModDate.vim
Ⅳ. 文档说明
This script uses an autocmd hook to run a function whenever a file is saved.
The function then looks if it finds a special token (by default %DATE_TAG%) within the file, and if it's found, a datestamp on the same line is updated to the current date.
This script will run on all systems that provide date(1), so it should work on unix systems, as well as on cygwin.
If no special token is found, nothing is done at all.
If there are multiple tokens within the file, only the first one from the beginning of the buffer will be updated.
The date format and the special token are fully configureable.