vim: Fix syntax highlighting for tex

read comments in file for drawbacks
This commit is contained in:
Simon Bruder 2020-05-25 16:07:48 +02:00
parent 55ef8a792d
commit b6d757eee6
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -85,6 +85,13 @@ let g:vimtex_quickfix_ignore_filters = [
\'Package hyperref Warning: Token not allowed in a PDF string',
\'Package typearea Warning: Bad type area settings!',
\]
" When using math environments vim does not know if if it currently is in one
" or outside of one unless it parses the file from the start. Parsing the
" file from the start each time fixes this but leads to a performance drop
" (depending on the number of lines).
" Also, somehow using FileType tex does not work, so this will enable slow
" syntax highlighting everywhere once a *.tex file is opened.
autocmd BufEnter *.tex syntax sync fromstart
" Color schemes
Plug 'altercation/vim-colors-solarized'