Ⅰ. 插件描述
Automatically reload the current file when it changesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'chiedojohn/vim-live-reload'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'chiedojohn/vim-live-reload'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'chiedojohn/vim-live-reload'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/chiedojohn/vim-live-reload
Ⅳ. 文档说明
Vim-live-reload - Automatically reload the current file when it changes
When running, the current file will automatically update whenever it's contents are changed.
This is not original work. It has been brought over from work by David Fishburn and Tyler Rick with minor modifications.
Installation
Pathogen Install
- Navigate to your [VIM_ROOT]/bundle directory in your local Vim setup
- git clone https://github.com/chiedojohn/vim-live-reload.git
Usage
To start live reload for the current file, run the following:
:LiveReloadTo start live reload for all current files:
:LiveReloadAllTo start live reload only for the current buffer:
:LiveReloadWhileInThisBufferTo stop live reload, just run the same command that you used to start it. The commands toggle the functionality on and off.
With any of the commands above, add a bang (!) after the command (eg. LiveReload!) to make the file auto update without first prompting you.
License
Distributed under the same terms as Vim itself. See :help license.
Credits
David Fishburn and Tyler Rick - http://vim.wikia.com/wiki/Have_Vim_check_automatically_if_the_file_has_changed_externally