ASPRecolor.vim : In ASPVBS buffers, give JS, ASP, and HTML sections different guibg colors
script karma |
Rating 14/9,
Downloaded by 1500 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Ross Presser |
|
script type |
ftplugin |
|
description |
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.
|
|
install details |
Either source this from your vimrc, or just drop it in a sytem or user plugins/ folder.
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.137.178.133
|