kevinoid/vim-jsonc

Apply for json files as well

gerazov opened this issue ยท 2 comments

It would be useful to add the option to apply this for *.json files as well, or at least document how to in the Readme.

I did it via including this in my init.vim as suggested here:

autocmd BufRead,BufNewFile *.json set filetype=jsonc

Good suggestion @gerazov, thanks!

I'm hesitant to recommend using jsonc for all .json files at the moment (both to avoid confusing users about the JSON format and due to known bugs in jsonc). However, documenting how to apply jsonc to file patterns in general is a great idea!

I've created #10 with some docs. Perhaps people interested in applying jsonc to *.json can make the leap from the *.mycjson example? I'd appreciate your thoughts.

Ok great - thanks ๐Ÿ‘

I've seen that people use comments in .json on a regular basis nowadays so it would be very useful ๐Ÿ˜‰