indentLine
indentLine copied to clipboard
Intereference with Latex Syntax
indentLine seems to be interfering somehow with my latex syntax.
The issue occurs with text surrounded in textit{}
blocks.
With indentLine enabled, the textit{ }
is removed and only the text within the blocks remains. If I disable the plugin, everything works as expected.
What is the issue at hand and can I help debug this?
I too have seen this issue. I believe it comes from set conceallevel=2
in the plugin.
I think that for files in g:indentLine_fileTypeExclude
the plugin should revert to conceallevel=0
. Perhaps when it's handled in function! s:Setup()
?
Beyond modifying the plugin you can add the following to your .vimrc
to disable both the plugin and revert the conceallevel
in your latex files.
let g:indentLine_fileTypeExclude = ['tex']
au Filetype tex setlocal conceallevel=0
EDIT: However, the above .vimrc
settings will be overwritten by IndeantLineReset
in certain situation when you switch between different buffers.
Exactly. The same issue brought me to the same commit of issue #79.
Because set conceallevel=1
is completely sufficient for this plugin, why set conceallevel=2
?
This would resolve a lot of these Latex issues.
+1: is there a way to avoid having indentLine modify the conceallevel
setting?
It was a joke trying to work with latex with this plugin installed! It showed \sum as a sigma - in the code!! Oh, everything was a pain. It displayed only some text. Oh the trauma...
Try
let g:indentLine_concealcursor = ''
let g:indentLine_conceallevel = 1
and see how it goes. Otherwise resort to
let g:indentLine_fileTypeExclude = ['tex', 'markdown']
The first suggestion does not cut it as the $
symbols in $\square$
are still hidden at conceal level 1. Globally disabling indentLine for Latex and Markdown seems to be the only solution.
I think the real problem is with people having differing definitions of when what should be concealed, such that some syntax files like markdown or latex use it to "render" the results, which is the real bug, imho.