Ⅰ. 插件描述
Syntax highlight for NUWEB (Literate Programming), multi-language versionⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/nuweb-multi-language'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/nuweb-multi-language'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/nuweb-multi-language'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/nuweb-multi-language
Ⅳ. 文档说明
Almost entirely derived from by Patricio Toledo's original syntax file (http://www.vim.org/scripts/script.php?script_id=543) which highlits NUWEB scraps without any language-dependent syntax highlighting. I modified it in the following ways:
1) Scraps beginning with "@{/ C /" will be highlit as C
2) Scraps beginning with "@{# Python" will be highlit as Python.
3) For all other scraps, the opening "@{" must be followed by a newline.
It's very easy to extend this syntax file to handle other languages. If someone else could fix #3, so that "@{anything@}" scraps could work without a newline following "@{", I'd appreciate it. Also, other ideas on doing multi-language highlighting are welcome.