Ⅰ. 插件描述
Syntax highlighting for Extensible Binding Language (XBL)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/xbl-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/xbl-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/xbl-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/xbl.vim
Ⅳ. 文档说明
Syntax highlighting for Extensible Binding Language (XBL). The main purpose of the script is to syntax highlight javascript code contained in CDATA blocks.
The script is a hack; my understanding of VIM scripting is almost nil. I look forward to improvements made by anyone.
To have vim detect the file type from files with the .xbl extension,
just add the following two lines to the "filetype.vim" file in the
directory that contains the "syntax" directory:
" XBL
au BufNewFile,BufRead *.xbl setf xbl
To have xbl syntax coloration appear in the syntax drop-down menu, just
add the line:
an 50.120.240 &Syntax.WXYZ.XBL :cal SetSyn("xbl")<CR>
to the "synmenu.vim" file (the value 240 in 50.120.240 might differ
according to what is already in your own file).
-- Thanks to Xavier Grosjean <xavcap AT c-est-simple DOT com> for
information on file type detection and menu updating.
Use ":set syntax=xbl" to turn it on for non-xbl files after the file is opened.