0

I have recently setup vimtex and ycm as the associated autocompleter. These work great in their intended scenario, however I believe the autocompleter is giving suggestions when I am typing plain text and I want to avoid that. This is causing some lag and I want to get rid of this. Is there anyway to set up vimtex with ycm so that I do not get suggestions when typing plain text?

EDIT: To clarify I want to configure YCM (if possible) so that in a *.tex file I do not have autocomplete popups for plain text. I would only like popups for LaTeX specific syntax to appear, e.g, commands, environments, labels, etc.

2
0

From :help YCM

YCM has a g:ycm_filetype_blacklist option that lists filetypes for which
YCM shouldn't be turned on. YCM will work only in filetypes that both the
whitelist and the blacklist allow (the blacklist "allows" a filetype by _not_
having it as a key).

My blacklist (in my .vimrc) looks like this, and YCM isn't triggered for plaintext files:

let g:ycm_filetype_blacklist = {
            \ 'tagbar': 1,
            \ 'notes': 1,
            \ 'netrw': 1,
            \ 'unite': 1,
            \ 'text': 1,
            \ 'vimwiki': 1,
            \ 'pandoc': 1,
            \ 'infolog': 1,
            \ 'leaderf': 1,
            \ 'mail': 1
            \}
4
  • I think the OP means typing text in LaTeX documents that is not supposed to be completed. But who knows... :p Apr 27 at 7:06
  • As @KarlYngveLervåg has indicated, I am trying to stop autocompletion of text in LaTeX documents. Apr 27 at 7:07
  • @Zeta-Squared I suggest you update your question to make this clear. Note: this is not really a question on how to setup VimTeX, but on how to set up YCM. VimTeX does not have any autocomplete features, YCM do. So the lag you are discussing is due to YCM, and you will need to properly configure YCM. Unfortunately, I don't know much more about YCM than what's in the VimTeX docs. Apr 27 at 7:10
  • oh I see - in that case does the above work if you add a line to blacklist 'tex' files?
    – mattb
    Apr 27 at 8:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.