Skip to content

Instantly share code, notes, and snippets.

@hail2u
Created June 7, 2014 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hail2u/25048dbe53161be08d02 to your computer and use it in GitHub Desktop.
Save hail2u/25048dbe53161be08d02 to your computer and use it in GitHub Desktop.
Vim compiler pugin for JSON Lint
if exists('current_compiler')
finish
endif
let current_compiler = 'jsonlint'
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=jsonlint\ --compact\ %
CompilerSet errorformat=%ELine\ %l:%c,
\%Z\\s%#Reason:\ %m,
\%C%.%#,
\%f:\ line\ %l\\,\ col\ %c\\,\ %m,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment