vim-literate


Ⅰ. 插件描述

Vim syntax decriptions for literate programming

Ⅱ. 基本信息

创建日期:  2016-02-09
使用用户:  1
Github星:  1
插件作者:  Jan Staněk

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Making vim literate-friendly

This plugin provides syntax highlighting for [literate
programming][literate-programming] in vim. Currently supported language
combinations are listed below.

Please note that the literate variants presume that your Vim already know how to
do syntax highlighting for the component languages – it merely binds them

  1. So if you are missing for example a Coffeescript syntax
  2. definition, the literate Coffeescript won't work either.

Supported language combinations

  • Literate coffeescript: Coffeescript inside
    Markdown document.

    File names: *.litcoffee, *.coffee.md

    Dependecies: Syntax highlighting for Markdown (i.e.
    tpope/vim-markdown or
    plasticboy/vim-markdown) and
    Coffeescript (i.e.
    kchmck/vim-coffee-script).

    Notes: This feature was originally provided by plugin hosted at
    mintplant/vim-literate-coffeescript, which was
    removed at some point. It also depended specifically on
    tpope/vim-markdown plugin, which prevented its use with
    alternative markdown plugins.

  • Literate Haskell in Markdown

    File names: *.{md,mkd,markdown}.lhs

    Dependencies: Syntax highlighting for Markdown and Haskell (distributed
    with Vim itself).

    Notes: The literate Haskell syntax file distributed with Vim assumes that
    the surrounding document is either TeX, or free-form plain text. This syntax
    file highlights the surrounding document as markdown, without the
    relatively complicated guessing the original file does about the document
    format.

    Also note that you should not use ATX style headers (# before heading
    text) in the document, as the # is reserved character in Haskell, and ghc
    refuses to compile files with # at the beginning of line.

Installation

Use your favourite vim plugin manager, such as Vundle or
Pathogen.

Credits

Thanks to Maxy-B on SO, for
asking and then answering the question on how to combine multiple syntax
highlighting specifications:
https://stackoverflow.com/questions/5176972/trouble-using-vims-syn-include-and-syn-region-to-embed-syntax-highlighting

License

MIT. For details, see LICENSE file.

<!-- vim:set spelllang=en: -->

添加新评论