I am new to vim and I am using a mac with vimtex, UltiSnips plugins. I am using the vim latex snippets found here (the tex.snippets file).

Whenever I type "()", "{}", the text gets automatically replaced by "()<++>" and "{}<++>" respectively. I don't know what is causing this problem. Please help.

Edit: If I simply type "$", it gets replaced by "$$<++>".

  • If the users of this forum feel that this naturally fits in the TeX forum, please let me know. I can post it there. Thank you. – Spai Sep 29 '20 at 3:20
  • This fits here, no need to worry. I would guess that the snippets insert these markers; I’ve seen them used before as a sort of “jump to here and keep typing” placeholder. – D. Ben Knoble Sep 29 '20 at 12:39
  • 1
    That behavior seems to be coming from another plugin... perhaps vim-latex? – husB Sep 30 '20 at 3:23
  • @husB: Maybe yes! Do I just delete the files corresponding to that plugin? Actually, frustrated with the situation, I rewrote my own simple tex.snippet file. I am adding snippets as I go along. – Spai Sep 30 '20 at 7:45
  • 1
    Glad you found the problem! I recommend using a plugin manager, such as vim-plug, or even Vim 8's own package manager. These allow you to turn on specific plugins selectively. Yes, adding snippets as you go along is a good approach -- only add stuff that you need – husB Sep 30 '20 at 13:41

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.