From 5e8a8d947b4a38b957eca0def8311dc2c6cc759e Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sat, 5 Nov 2022 21:46:57 +0100 Subject: [PATCH] doc: Note on discouraged lazy loading of VimTeX Using lazy loading of certain plugin managers with VimTeX is discouraged. Add a note on this in installation notes in the README. One particular reason is a complication for inverse search. Add a corresponding note in the documentation. --- README.md | 6 ++++++ doc/vimtex.txt | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index b464998ee2..ef6e090457 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,12 @@ Or use some other plugin manager: * [neobundle](https://github.com/Shougo/neobundle.vim) * [pathogen](https://github.com/tpope/vim-pathogen) +Note that some plugin managers provide mechanisms for lazy loading of plugins, +e.g., based on the filetype. This is explicitly _discouraged_. Firstly, it +complicates some mechansims, e.g., inverse search through PDF viewers. +Secondly, there is also little gain in this since VimTeX is already lazily +loaded as a filetype plugin. + If you use the new package feature in Vim, please note the following: * Make sure to read and understand the package feature: `:help package`! * Use the `/pack/foo/start` subdirectory to make sure the filetype plugin is diff --git a/doc/vimtex.txt b/doc/vimtex.txt index 334c9fa180..cbc9da2b97 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -5503,6 +5503,11 @@ This may be avoided, or at least reduced, with the following variants: > Note: Vim users should be aware that one may need to ensure that the server is really running, see |vimtex-clientserver|. +Note: Various plugin managers support lazy plugin loading, e.g., based on the + filetype. It is discouraged to use this feature with VimTeX. In + particular, the above command lines for inverse search would need work + around this. + ============================================================================== LATEX DOCUMENTATION *vimtex-latexdoc*