From: Nicolas Boisselier Date: Mon, 18 May 2015 15:13:51 +0000 (+0100) Subject: vim json X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=a67ae28334896b027f745e05396fd22be5e9d649;p=nb.git vim json --- diff --git a/etc/vim/source/functions.vim b/etc/vim/source/functions.vim index e2fc4b03..740f44a4 100644 --- a/etc/vim/source/functions.vim +++ b/etc/vim/source/functions.vim @@ -123,6 +123,9 @@ func! FileInit(...) elseif (g:File['type'] == 'xml') let g:File['check'] = 'xmllint --noout' + elseif (g:File['type'] == 'javascript') + let g:File['check'] = "perl -MJSON -e 'JSON::from_json(join(qq||,<>))'" + elseif (g:File['ext'] == 'erb') let g:File['check'] = 'sh -c "cat | erb -x - | ruby -c" <'