Vim displays json file without any quotes Vim displays json file without any quotes javascript javascript

Vim displays json file without any quotes


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.


Adding to the currently accepted answer, you can disable that behavior specifically for JSON by setting the following option in you .vimrc:

" Disable quote concealing in JSON fileslet g:vim_json_conceal=0

That way, you don't have to set conceallevel to 0 (disabled), which would also make useful plugins like indentLine (which was mentioned in a comment above) not work anymore.


Like already mentioned, one can check which plugin caused the increased conceal level:

:verbose set conceallevel?

If the conceal level is caused by the vim-json Plugin:

let g:vim_json_syntax_conceal = 0

If conceal is caused by the indentLine Plugin:

let g:indentLine_setConceal = 0

In vimrc, You can add both options for json files:

autocmd Filetype json  \ let g:indentLine_setConceal = 0 |  \ let g:vim_json_syntax_conceal = 0