Joel Z. Joel Z. - 3 months ago 33
JSON Question

Vim displays json file without any quotes

I have a validated json file that will display without any quotes in Vim. The only time it displays the json file correctly is under Visual mode.

I have tried disabling eslint, jshint, youcompleteme

MacVim 7.4
Vim 7.4 in Terminal

enter image description here

enter image description here


The built-in $VIMRUNTIME/syntax/json.vim uses Vim's conceal feature to hide the quotes, presumably to remove unnecessary clutter.

You must have enabled concealing by setting the 'conceallevel' option to 2 or 3; the default is 0 (off). Likewise, you see the quotes in visual mode because of your 'concealcursor' setting.

Inside a JSON file, check where the conceal options got set:

:verbose set conceallevel? concealcursor?

Then, you can adapt your settings to suit your preferences.