3

I have some shortcuts for LaTeX in ./vim/after/latex.vim but when I open a LaTeX file, this shortcuts are not available, and I need to load the file manually. I guess this is related to the Latex-vim plugin.

How can I set these shortcuts to be loaded automatically?

3

Add them into ~/.vim/after/ftplugin/tex/.

:h 'rtp' IIRC and :h ftplugin

  • Can I throw stuff in whatever <filename>.vim in that folder? – Yotam Mar 19 '17 at 9:39
  • Yes. That's the idea. Anything in that directory will be loaded once per buffer of (La)Tex filetype you open, and after the equivalent (ft)plugins you've installed -- I'm simplifying what's happening, but that's the idea. Read the doc for more explanations. – Luc Hermitte Mar 19 '17 at 18:12

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.