tex-conceal.vim
A vim plugin extends the Conceal feature for LaTeX.
Without conceal
With conceal
With conceal and this plugin
Output
Installation
Plugin 'KeitaNakamura/tex-conceal.vim' " for Vundle
Plug 'KeitaNakamura/tex-conceal.vim', {'for': 'tex'} " for VimPlug
vimtex user
Forvimtex started using its own conceal feature from v2. Those changes break this plugin for now. So you should choose vimtex v2 or the latest version v1.6 that tex-conceal works.
Plug 'lervag/vimtex', {'tag': 'v1.6'}
Options
Super/sub-scrips
To avoid having inscrutable utf-8 glyphs appear, set g:tex_superscripts
and g:tex_subscripts
:
let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
See :h tex-conceal
in more detail.
Fraction
To conceal fraction (Β½β β ΒΌβ β β β β β β β β β )
let g:tex_conceal_frac=1
Recommended settings
set conceallevel=2
let g:tex_conceal="abdgm"