Vim displays json file without any quotes
$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
3; the default is
0 (off). Likewise, you see the quotes in visual mode because of your
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
" Disable quote concealing in JSON files let 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
I find this annoying because the lines ‘jump’ as quotes are hidden and unhidden.
Setting conceallevel=1 replaces the ” with space (rather than hiding them) which stops the jumping while still making json more readable.