Skip to content

khardix/vim-literate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Making vim literate-friendly

This plugin provides syntax highlighting for 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 together. So if you are missing for example a Coffeescript syntax highlighting 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.

About

Vim syntax decriptions for literate programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published