]> git.nbdom.net Git - nb.git/commitdiff
vim json
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 18 May 2015 15:13:51 +0000 (16:13 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 18 May 2015 15:13:51 +0000 (16:13 +0100)
etc/vim/source/functions.vim

index e2fc4b0333d27816342bee26a8bca0389bfcc8c9..740f44a420d86ee104455fd14b10dd4e2de0fcea 100644 (file)
@@ -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" <'