sponsor Vim development Vim logo Vim Book Ad

JSON.vim : A syntax highlighting file for JSON

 script karma  Rating 151/93, Downloaded by 10472    Comments, bugs, improvements  Vim wiki

created by
Jeroen Ruigrok van der Werven
script type
Please use https://github.com/elzr/vim-json it's an updated version of my this script and is Pathogen compatible.

This script will NOT be updated anymore, again, see the version on the URL above.

A simple highlighting file for JSON constructs.
install details
To your filetype.vim just add something like:

au! BufRead,BufNewFile *.json set filetype=json

and in your generic list of autocommands add something like the following for indentation and folding:

augroup json_autocmd
  autocmd FileType json set autoindent
  autocmd FileType json set formatoptions=tcq2l
  autocmd FileType json set textwidth=78 shiftwidth=2
  autocmd FileType json set softtabstop=2 tabstop=8
  autocmd FileType json set expandtab
  autocmd FileType json set foldmethod=syntax
augroup END

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
json.vim 0.4 2009-06-16 7.0 Jeroen Ruigrok van der Werven Fixed some syntax highlighting for numbers.
Small improvements and fixes.
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo