24

The vim editor on my Kubuntu 13.04 laptop seems to have some advance feature for latex edting, i.e. it can convert latex symbols to unicode chars on the fly and hide the source code when the cursor is not on the line.

This may be a great function to some people, but I find it a bit annoying. I am not sure whether this is built-in or provided by some extension, but I hope I can find out a way to disable it.

My vim version is 7.4b, the list of extensions installed:

clang_complete
emmet-vim
HTML-AutoCloseTag
neocomplete.vim
neosnippet
tabular
tagbar
tlib_vim
unite.vim
vim-addon-mw-utils
vim-airline
vim-colorschemes
vim-colors-solarized
vim-commentary
vim-easymotion
vim-eunuch
vim-fugitive
vim-repeat
VimRepress
Vim-R-plugin
vim-snippets
vim-surround
vim-table-mode
vim-unimpaired
vundle

cursor not on math line cursor on math line

qed
  • 22,298
  • 21
  • 125
  • 196

1 Answers1

40

This functionality is provided by Vim's "conceal" feature.

Vim's TeX plugin takes advantage of "conceal" if you have set 'conceallevel' to 2. See :h ft-tex-syntax.

Leave 'conceallevel' at its default value of 0 to disable concealing.

Alternatively, put the following line in your vimrc.

let g:tex_conceal = ""
glts
  • 21,808
  • 12
  • 73
  • 94
  • 1
    Hi there. I've put this option in my .vimrc but it doesn't do anything. However, when I type `set conceallevel=0` inside vim, it disables concealing. Any insight on this matter? – Vic Tor Jan 11 '21 at 09:57
  • @VicTor Enter `:verbose set conceallevel?` to find out which plugin modify `conceallevel`. For me, it was `indentLine` plugin that kept modifying `conceallevel`. Therefore, I add these two lines in my `ftplugin/tex.vim` file: ```let g:indentLine_enabled = 0 let g:indentLine_conceallevel = 0 ``` It worked like a charm afterwards, hope this helps. – Lee Jan 06 '23 at 14:56