indentLine icon indicating copy to clipboard operation
indentLine copied to clipboard

Intereference with Latex Syntax

Open darnir opened this issue 10 years ago • 7 comments

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?

darnir avatar Mar 30 '14 00:03 darnir

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.

cswartzvi avatar Apr 05 '14 16:04 cswartzvi

Exactly. The same issue brought me to the same commit of issue #79.

ghost avatar Apr 13 '14 17:04 ghost

Because set conceallevel=1 is completely sufficient for this plugin, why set conceallevel=2?

This would resolve a lot of these Latex issues.

ghost avatar Apr 16 '14 18:04 ghost

+1: is there a way to avoid having indentLine modify the conceallevel setting?

jucor avatar Jul 05 '15 11:07 jucor

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...

lindhe avatar Oct 07 '15 16:10 lindhe

Try

let g:indentLine_concealcursor = ''
let g:indentLine_conceallevel = 1

and see how it goes. Otherwise resort to

let g:indentLine_fileTypeExclude = ['tex', 'markdown']

Konfekt avatar Nov 01 '15 18:11 Konfekt

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.

mqudsi avatar Apr 22 '18 16:04 mqudsi