aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/lhaskell.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-04-28 21:06:44 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-04-28 21:13:55 +0200
commita53409b564458f7a94c8fcd0725d1953dee58dce (patch)
tree27bf0fa5f804d33455b66814c62a0f3358809d1b /runtime/syntax/lhaskell.vim
parentf09651ea78b833d6d05db89c41df603b741ab000 (diff)
downloadrneovim-a53409b564458f7a94c8fcd0725d1953dee58dce.tar.gz
rneovim-a53409b564458f7a94c8fcd0725d1953dee58dce.tar.bz2
rneovim-a53409b564458f7a94c8fcd0725d1953dee58dce.zip
vim-patch:89bcfda6834a
Updated runtime files. Remove version checks for Vim older than 6.0. https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Diffstat (limited to 'runtime/syntax/lhaskell.vim')
-rw-r--r--runtime/syntax/lhaskell.vim52
1 files changed, 16 insertions, 36 deletions
diff --git a/runtime/syntax/lhaskell.vim b/runtime/syntax/lhaskell.vim
index 077549a0c8..78207812f0 100644
--- a/runtime/syntax/lhaskell.vim
+++ b/runtime/syntax/lhaskell.vim
@@ -36,11 +36,8 @@
"
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+" quit when a syntax file was already loaded
+if exists("b:current_syntax")
finish
endif
@@ -84,15 +81,10 @@ endif
" If user wants us to highlight TeX syntax or guess thinks it's TeX, read it.
if b:lhs_markup == "tex"
- if version < 600
- source <sfile>:p:h/tex.vim
- set isk+=_
- else
- runtime! syntax/tex.vim
- unlet b:current_syntax
- " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell.
- setlocal isk+=_
- endif
+ runtime! syntax/tex.vim
+ unlet b:current_syntax
+ " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell.
+ setlocal isk+=_
syntax cluster lhsTeXContainer contains=tex.*Zone,texAbstract
else
syntax cluster lhsTeXContainer contains=.*
@@ -100,11 +92,7 @@ endif
" Literate Haskell is Haskell in between text, so at least read Haskell
" highlighting
-if version < 600
- syntax include @haskellTop <sfile>:p:h/haskell.vim
-else
- syntax include @haskellTop syntax/haskell.vim
-endif
+syntax include @haskellTop syntax/haskell.vim
syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack containedin=@lhsTeXContainer
syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,beginCodeBegin containedin=@lhsTeXContainer
@@ -115,23 +103,15 @@ syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained
syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}"
" Define the default highlighting.
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_tex_syntax_inits")
- if version < 508
- let did_tex_syntax_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
-
- HiLink lhsBirdTrack Comment
-
- HiLink beginCodeBegin texCmdName
- HiLink beginCodeCode texSection
-
- delcommand HiLink
-endif
+" Only when an item doesn't have highlighting yet
+command -nargs=+ HiLink hi def link <args>
+
+HiLink lhsBirdTrack Comment
+
+HiLink beginCodeBegin texCmdName
+HiLink beginCodeCode texSection
+
+delcommand HiLink
" Restore cursor to original position, as it may have been disturbed
" by the searches in our guessing code