Skip to content

Commit

Permalink
merge: doc about lazy loading
Browse files Browse the repository at this point in the history
refer: #2560
  • Loading branch information
lervag committed Nov 6, 2022
2 parents 8824c24 + 491cb17 commit d4be7a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ Or use some other plugin manager:
* [neobundle](https://github.com/Shougo/neobundle.vim)
* [pathogen](https://github.com/tpope/vim-pathogen)

**Note**: Many plugin managers provide mechanisms to lazy load plugins. Please
don't use this for VimTeX! VimTeX is already lazy loaded by virtue of being
a filetype plugin and by using the autoload mechanisms. There is therefore
nothing to gain by forcing VimTeX to lazily load through the plugin
manager. In fact, doing it will _break_ the inverse-search mechanism, which
relies on a _global_ command (`:VimtexInverseSearch`).

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
Expand Down
4 changes: 4 additions & 0 deletions doc/vimtex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5503,6 +5503,10 @@ 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: Many plugin managers provide mechanisms to lazy load plugins. There is
no need to use such a mechanism for VimTeX, and in fact, doing it will
prevent Vim/neovim from loading the `:VimtexInverseSearch` command.

==============================================================================
LATEX DOCUMENTATION *vimtex-latexdoc*

Expand Down

0 comments on commit d4be7a2

Please sign in to comment.