preview.vim


Ⅰ. 插件描述

Preview current file in selected browser.

Ⅱ. 基本信息

创建日期:  2003-10-18
使用用户:  1
Github星:  1
插件作者:  Mark Woodward

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/preview-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/preview-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/preview-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/preview.vim

Ⅳ. 文档说明

This has been tested on windows only. It  can probably be made to work on linux but is untested on that platform..(one day ;-))
(If anyone modifies this script to work on both platforms, please feel free to upload the modified script)

Pressing <S-F12> will prompt you for the browser you would like to preview the current file in. Browsers can be added by modifying the appropriately commented lines in the script.  (make sure to modify the current paths for browsers on your system).

There is also the option to include only files of a specific type. These are .php, .php3, .jsp, .asp, .html, .htm, and .vim at the moment but others can easily be added.

If the file is in your server directory (http:\localhost) or a sub directory of it, it will be previewed through the server - NOT as a local file.

egs http:\localhosttest.php
        http:\localhostexampleschapter04index.php

Otherwise it will be previewed simply as a local file
eg    c:mysiteindex.html

添加新评论