Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ericr86/vim-firefox-autorefresh'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ericr86/vim-firefox-autorefresh'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ericr86/vim-firefox-autorefresh'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ericr86/vim-firefox-autorefresh
Ⅳ. 文档说明
## About
This vim plugin will automatically refresh your Firefox after editing and
saving your HTML, CSS, Javascript, python, php, etc. It requires the [Remote
Control](https://addons.mozilla.org/en-us/firefox/addon/remote-control/) plugin for Firefox.
It should work on any operating system when vim is installed with python
support.
Getting Started
- Download the files.
I would recommended way installing through Vundle.
However, you can simply download the repo and install directly into your vim plugin directory. - Install and turn on Remote Control in Firefox for the tab you want to automatically refresh.
Note that after installing Remote Control, you may need to add the toolbar icon manually if it doesn't show up. - Turn on auto-refresh in vim by using the command :StartFFRefresh. To stop
automatically refreshing the browser, use the command :StopFFRefresh.
Additional Configuration
If your browser isn't refreshing for the filetypes you're working on, you might
need to change the global g:firefox_refresh_files which contains a list of
extensions to monitor. Currently it defaults to:
g:firefox_refresh_files = '*.html,*.htm,*.php,*.py,*.css,*.js'To change it, modify the global in your .vimrc:
" I want to add a custom .django file extension and also ruby filetypes to auto refresh
let g:firefox_refresh_files = g:firefox_refresh_files . ',*.django,*.rb'
" Maybe I just want to refresh for html, and html only...
let g:firefox_refresh_files = "*.html"