This is related to my previous question that you can find here:

I am currently working on a large project (a PhD thesis with multiple chapters, each consisting of around 30 pages) and have found that my VIM setup, which includes numerous plugins, settings, and mappings for general use, is causing noticeable slowdown when scrolling through pages.

To address this, I want to create a local vimrc file specifically for this project, where most of the plugins are disabled except for a few essential ones: vimtex, deoplete, and undotree.

Additionally, I'd like to disable some of the settings and/or mappings that I have saved in ~/.vim/mappings.vim and vimrc files, but only for this specific project. I still want the settings I have for .tex files saved in .vim/after/ftplugin/tex.vim to be available, as well as some functions that I've kept separate in .vim/autoload/.

My question is: What is the best approach to achieve this selective setup for my LaTeX project? Any help or guidance would be greatly appreciated.

  • With delay loading most of the plugin should not be loaded if you only edit TeX files. Did you identified what is the plugin that makes the edition of the large TeX file slow (for startup the startuptime plugin may help)? Mar 15, 2023 at 12:06
  • From your question, I don't understand whether you already split your large thesis into one file per chapter using \include. If not, you might consider doing so.
    – Friedrich
    Mar 15, 2023 at 12:29
  • @VivianDeSmedt here is the startuptime: pasteboard.co/iZSo7r9K7vOq.png and here is the .vimrc: pastebin.com/9mLLfZth
    – Mafsi
    Mar 15, 2023 at 12:40
  • In what unit is the time expressed?
    – romainl
    Mar 15, 2023 at 12:45
  • 2
    You should identify the cause of the slowdown before considering such an ambitious and, essentially, impossible move. This is pure XY: you experience a slowdown -> you have no idea what causes it -> you consider something crazy -> you ask about that crazy solution instead of asking about your slowdown issue.
    – romainl
    Mar 15, 2023 at 12:53


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.