Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/lhaskell.vim @ 34:e170173ecb68 current-release
before ack base protocol.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 26 Nov 2008 15:02:10 +0900 |
parents | 76efa0be13f1 |
children | c16898406ff2 |
comparison
equal
deleted
inserted
replaced
33:7d0d8b831f5a | 34:e170173ecb68 |
---|---|
2 " Language: Haskell with literate comments, Bird style, | 2 " Language: Haskell with literate comments, Bird style, |
3 " TeX style and plain text surrounding | 3 " TeX style and plain text surrounding |
4 " \begin{code} \end{code} blocks | 4 " \begin{code} \end{code} blocks |
5 " Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org> | 5 " Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org> |
6 " Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl> | 6 " Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl> |
7 " Last Change: 2004 Aug 31 | 7 " Last Change: 2008 Jul 01 |
8 " Version: 1.01 | 8 " Version: 1.02 |
9 " | 9 " |
10 " Thanks to Ian Lynagh for thoughtful comments on initial versions and | 10 " Thanks to Ian Lynagh for thoughtful comments on initial versions and |
11 " for the inspiration for writing this in the first place. | 11 " for the inspiration for writing this in the first place. |
12 " | 12 " |
13 " This style guesses as to the type of markup used in a literate haskell | 13 " This style guesses as to the type of markup used in a literate haskell |
27 " 2004 February 18: New version, based on Ian Lynagh's TeX guessing | 27 " 2004 February 18: New version, based on Ian Lynagh's TeX guessing |
28 " lhaskell.vim, cweb.vim, tex.vim, sh.vim and fortran.vim | 28 " lhaskell.vim, cweb.vim, tex.vim, sh.vim and fortran.vim |
29 " 2004 February 20: Cleaned up the guessing and overriding a bit | 29 " 2004 February 20: Cleaned up the guessing and overriding a bit |
30 " 2004 February 23: Cleaned up syntax highlighting for \begin{code} and | 30 " 2004 February 23: Cleaned up syntax highlighting for \begin{code} and |
31 " \end{code}, added some clarification to the attributions | 31 " \end{code}, added some clarification to the attributions |
32 " 2008 July 1: Removed % from guess list, as it totally breaks plain | |
33 " text markup guessing | |
32 " | 34 " |
33 | 35 |
34 | 36 |
35 " For version 5.x: Clear all syntax items | 37 " For version 5.x: Clear all syntax items |
36 " For version 6.x: Quit when a syntax file was already loaded | 38 " For version 6.x: Quit when a syntax file was already loaded |
69 " one of the following occurs anywhere in the file: | 71 " one of the following occurs anywhere in the file: |
70 " - \documentclass | 72 " - \documentclass |
71 " - \begin{env} (for env != code) | 73 " - \begin{env} (for env != code) |
72 " - \part, \chapter, \section, \subsection, \subsubsection, etc | 74 " - \part, \chapter, \section, \subsection, \subsubsection, etc |
73 if b:lhs_markup == "unknown" | 75 if b:lhs_markup == "unknown" |
74 if search('%\|\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0 | 76 if search('\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub \)*section\|\\chapter|\\part','W') != 0 |
75 let b:lhs_markup = "tex" | 77 let b:lhs_markup = "tex" |
76 else | 78 else |
77 let b:lhs_markup = "plain" | 79 let b:lhs_markup = "plain" |
78 endif | 80 endif |
79 endif | 81 endif |
80 | 82 |
81 " If user wants us to highlight TeX syntax, read it. | 83 " If user wants us to highlight TeX syntax or guess thinks it's TeX, read it. |
82 if b:lhs_markup == "tex" | 84 if b:lhs_markup == "tex" |
83 if version < 600 | 85 if version < 600 |
84 source <sfile>:p:h/tex.vim | 86 source <sfile>:p:h/tex.vim |
85 set isk+=_ | 87 set isk+=_ |
86 else | 88 else |