ASPRecolor.vim


Ⅰ. 插件描述

In ASPVBS buffers, give JS, ASP, and HTML sections different guibg colors

Ⅱ. 基本信息

创建日期:  2003-02-12
使用用户:  1
Github星:  1
插件作者:  Ross Presser

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

I edit ASP code a lot.  There's usually three different langauges in the same file: HTML, Vbscript, and Javascript.  The ASPVBS filetype plugin handles this well, including the syntaxes from all three types, but it gets hard for me to distinguish them on the screen.  I wanted to assign different background colors to the different regions - but they're all highlight links, so if I change, say, Comment, then all of HTMLComment, AspVBSComment, and javascriptComment will all change too.

This plugin changes that.  After an ASPVBS buffer is loaded, it recolors every ASP and javascript syntax item with a new background color - by retrieving the underlying linked highlight definition and redefining the specific highlight item.  ASP becomes dramatically easier to read. See the included file compare.asp.html (also here: http://member.newsguy.com/~rpresser/compare.asp.html).

Requires the MultVals plugin http://www.vim.org/scripts/script.php?script_id=171; for array handling.

This technique could be applicable to other kinds of files that have multiple languages in them, like HTML/CSS, or C++ with embedded SQL, or maybe even someday XML.

添加新评论