vim --clean:packadd! matchit:echo exists("loaded_matchit"), or something similar like :echo g:loaded_matchitThe plugin should be activated, since that's what the docs say.
Quote from :help matchit-install:
To start using the matchit plugin, add one line to your vimrc file:
packadd! matchit
8.2, patches 1-2914
Debian 10.11
Note: it *does* work to install the plugin like so: `:runtime macros/matchit.vim` Apparently that is the old, pre-8.0 way of doing things? I found out about that from reading the answers to [this SO post](https://stackoverflow.com/questions/7281459/matchit-not-working). So, either there is some bug with `packadd`, or with how `matchit` is bundled in Vim currently, or the docs are simply wrong and the `:runtime ...` command is the proper way. I'm not sure which is the case.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
The help says to write this line in your vimrc; not to execute it interactively from the command-line:
To use the matchit plugin add this line to your |vimrc|: >
packadd! matchit
With a bang, :packadd only manipulates the runtimepath. That works when the vimrc is being read, and the plugins have not already been sourced. After that, it's too late.
If you want to enable the plugin after Vim has started, you need to remove the ! from :packadd:
:packadd matchit
For more info, see :help :packadd:
When the optional ! is added no plugin files or
ftdetect scripts are loaded, only the matching
directories are added to 'runtimepath'. This is
useful in your .vimrc. The plugins will then be
loaded during initialization, see |load-plugins| (note
that the loading order will be reversed, because each
directory is inserted before others).
If this needs to be documented, then here is a suggested patch:
diff --git a/runtime/pack/dist/opt/matchit/doc/matchit.txt b/runtime/pack/dist/opt/matchit/doc/matchit.txt index 7b2b92111..ae0cde7db 100644 --- a/runtime/pack/dist/opt/matchit/doc/matchit.txt +++ b/runtime/pack/dist/opt/matchit/doc/matchit.txt @@ -148,6 +148,9 @@ To use the matchit plugin add this line to your |vimrc|: > The script should start working the next time you start Vim. +To use the matchit plugin after Vim has started, execute this command: > + packadd matchit + (Earlier versions of the script did nothing unless a |buffer-variable| named |b:match_words| was defined. Even earlier versions contained autocommands that set this variable for various file types. Now, |b:match_words| is
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thus this is working as expected. I'll add that line to the help.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Closed #9389.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
I'll add this to my copy as well
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()