1

My LaTeX files contain lots of acronyms and they are often highlighted as spelling errors. I tried to ignore acronyms by adding

syn match AcronymNoSpell '\<\(\u\|\d\)\{3,}s\?\>' contains=@NoSpell

(as suggested here) to my ~/.vim/after/syntax/tex.vim file but the acronyms are still highlighted. I'm wondering if I'm leaving out a setting or if the settings are being overwritten by something else?

Thanks for any help!

My .vimrc file:

syntax on
filetype plugin indent on

" Enable backspace to work like normal text editors
set backspace=indent,eol,start

" vim-latex-live-preview settings
let g:livepreview_previewer = 'open -a Skim'

" Enable Spell Checking
set spelllang=en
set spell
  • 1
    Idk how to ignore them, but you could always add them to your dictionary (zg, i think) – D. Ben Knoble Feb 8 at 4:42
  • I would add all those acronyms to a project specific spell file. Following plugin helps you with that github.com/dbmrq/vim-dialect. – Hotschke Feb 8 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.