diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-17 17:40:10 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-17 17:40:10 +0200 |
commit | 518d733369fb6f2e4652e9649a78546ce6493079 (patch) | |
tree | 4fe3bbecd68b2270fb6949e0862154198108015b /syntax/nim.vim | |
parent | 00213842594d8262c35b64b03b176d6e831a6e94 (diff) | |
download | vim-polyglot-518d733369fb6f2e4652e9649a78546ce6493079.tar.gz vim-polyglot-518d733369fb6f2e4652e9649a78546ce6493079.zip |
Make sure custom scripts.vim are respected as well
Diffstat (limited to 'syntax/nim.vim')
-rw-r--r-- | syntax/nim.vim | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/syntax/nim.vim b/syntax/nim.vim index 37f8d9fa..e1317056 100644 --- a/syntax/nim.vim +++ b/syntax/nim.vim @@ -2,30 +2,30 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded -if version < 600 +if v:version < 600 syntax clear -elseif exists("b:current_syntax") +elseif exists('b:current_syntax') finish endif " Keep user-supplied options -if !exists("nim_highlight_numbers") +if !exists('nim_highlight_numbers') let nim_highlight_numbers = 1 endif -if !exists("nim_highlight_builtins") +if !exists('nim_highlight_builtins') let nim_highlight_builtins = 1 endif -if !exists("nim_highlight_exceptions") +if !exists('nim_highlight_exceptions') let nim_highlight_exceptions = 1 endif -if !exists("nim_highlight_space_errors") +if !exists('nim_highlight_space_errors') let nim_highlight_space_errors = 1 endif -if !exists("nim_highlight_special_vars") +if !exists('nim_highlight_special_vars') let nim_highlight_special_vars = 1 endif -if exists("nim_highlight_all") +if exists('nim_highlight_all') let nim_highlight_numbers = 1 let nim_highlight_builtins = 1 let nim_highlight_exceptions = 1 @@ -158,8 +158,8 @@ syn sync match nimSync grouphere NONE "):$" syn sync maxlines=200 syn sync minlines=2000 -if version >= 508 || !exists("did_nim_syn_inits") - if version <= 508 +if v:version >= 508 || !exists('did_nim_syn_inits') + if v:version <= 508 let did_nim_syn_inits = 1 command -nargs=+ HiLink hi link <args> else @@ -202,7 +202,7 @@ if version >= 508 || !exists("did_nim_syn_inits") delcommand HiLink endif -let b:current_syntax = "nim" +let b:current_syntax = 'nim' endif |