This drives me crazy, I do
:set ft=text
To see something, otherwise all the links disappear in markdown and quotes in JSON.
How do disable this once and for all?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityThis drives me crazy, I do
:set ft=text
To see something, otherwise all the links disappear in markdown and quotes in JSON.
How do disable this once and for all?
(guessing here, please provide a screenshot/more information)
You may want to change your conceallevel
setup:
:h 'conceallevel'
'conceallevel' 'cole' *'conceallevel'* *'cole'*
number (default 0)
local to window
{not in Vi}
{not available when compiled without the |+conceal|
feature}
Determine how text with the "conceal" syntax attribute |:syn-conceal|
is shown:
Value Effect ~
0 Text is shown normally
1 Each block of concealed text is replaced with one
character. If the syntax item does not have a custom
replacement character defined (see |:syn-cchar|) the
character defined in 'listchars' is used (default is a
space).
It is highlighted with the "Conceal" highlight group.
2 Concealed text is completely hidden unless it has a
custom replacement character defined (see
|:syn-cchar|).
3 Concealed text is completely hidden.
conceallevel
is reset every time you open a file. Any way to make it always stick with 0?
– yktoo
Apr 14 '17 at 12:05
conceallevel
to be set to 2 by default for every file. This can be disabled with: let g:indentLine_setConceal = 0
– yktoo
Sep 26 '17 at 8:01
g:indentLine_setConceal = 0
essentially makes it so the indentline plugin no longer works. I found let g:indentLine_fileTypeExclude = ['json']
worked better for me.
– Matt Greer
Nov 24 '17 at 18:20
If you are using the 'indentLine' plugin or other plugins that can change 'conceal' features in vim. It is because these plugin enables the Vim 'conceal' feature which automatically hides stretches of text based on syntax highlighting. This setting will apply to all syntax items. Specifically, in 'indentLine' plugin, it will overwrite "concealcursor" and "conceallevel" to:
let g:indentLine_concealcursor = 'inc'
let g:indentLine_conceallevel = 2
So, I change it to the following value in my .vimrc file:
let g:indentLine_setConceal = 2
" default ''.
" n for Normal mode
" v for Visual mode
" i for Insert mode
" c for Command line editing, for 'incsearch'
let g:indentLine_concealcursor = ""
another set is to let g:indentLine_concealcursor = "nv"
which make the hidden text surround your cursor only show in 'insert' mode and 'visual' mode. Hope that can help you.
If you are using plasticboy/vim-markdown plugin, put in your .vimrc
:
let g:vim_markdown_conceal = 0
let g:vim_markdown_conceal_code_blocks = 0
If you are using indentLine and want to keep it working but want to prevent Vim from hiding things in JSON and Markdown, the solution is to ask your syntax highlighting to not use the conceal feature.
For the JSON and Markdown syntax files included in vim-polyglot, that's accomplished using the following three lines:
let g:vim_json_syntax_conceal = 0
let g:vim_markdown_conceal = 0
let g:vim_markdown_conceal_code_blocks = 0
g:vim_markdown_conceal
functioned as a master kill switch, so the edit brought it more in line with my intent.
– ssokolow
Aug 4 '20 at 3:39
I met the same problems (issues/512) when using plasticboy/vim-markdowd plugin.
I have removed all other plugins and grep conceal in .vim folder, it's confirmed there is no conceal related settings except in .vim/bundle/vim-markdowd.
The answer from @Karlo Guidoni Martins seems didn't work for me. I add the 2 lines into the start and into the end of vimrc file.
:redir > foo
,:hi
(browse through all the highlight groups pressing space),:redir end
, and add the contents of the newly createdfoo
file here. – muru Apr 8 '16 at 9:25