Closed infokiller closed 5 years ago
After some digging (and reading on autoload
), seems that the issue is that the way I use the plugin is by a mapping such as nmap <C-r> <plug>(RepeatRedo)
, but that does not trigger the autoload mechanism, which IIUC will only trigger when the filename#funcname call is made.
Other than putting this file in a plugin
dir (which means I won't use it with vim-plug), is there anything I can do so that the plugin is loaded properly?
Thanks
The idea is that it's lazily loaded by the first call to repeat#set()
. Before that, there's no need for the maps to exist.
Can you please clarify? Do you mean I'm expected to call repeat#set()
explicitly after vim is opened?
No, the load is triggered by a plugin calling repeat#set()
. If you don't have any plugins that do that, then repeat.vim never gets loaded, and that's as intended.
Got it, thanks for the explanation!
This plugin isn't loaded by vim-plug, seemingly because vim-plug doesn't load files from an
autoload
directory- it looks for one of['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']
.I'm not really familiar with the required directory structure of vim plugins so can't really say what's the correct way.