Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for existence of g:vim_json_warnings #32

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions syntax/json.vim
Expand Up @@ -46,7 +46,7 @@ syn match jsonEscape "\\u\x\{4}" contained
syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>\ze[[:blank:]\r\n]*[,}\]]"

" ERROR WARNINGS **********************************************
if (g:vim_json_warnings == 1)
if exists("g:vim_json_warnings") && (g:vim_json_warnings == 1)
" Syntax: Strings should always be enclosed with quotes.
syn match jsonNoQuotesError "\<[[:alpha:]]\+\>"

Expand Down Expand Up @@ -111,7 +111,7 @@ if version >= 508 || !exists("did_json_syn_inits")
HiLink jsonBoolean Boolean
HiLink jsonKeyword Label

if (g:vim_json_warnings == 1)
if exists("g:vim_json_warnings") && (g:vim_json_warnings == 1)
HiLink jsonNumError Error
HiLink jsonCommentError Error
HiLink jsonSemicolonError Error
Expand Down