Created
May 1, 2022 14:31
-
-
Save trapd00r/06524d80bba6264cc8e904d7bbb0cd95 to your computer and use it in GitHub Desktop.
trying to conditionally load different versions of same plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for myplugin in ['yankmatches.vim', 'currentline.vim', 'cccp.vim', 'LS_COLORS.vim'] | |
let path = expand("%:~") | |
" developing, use dev version of plugin | |
if path =~ '\vdev[/]' . myplugin | |
echo 'match!' | |
let project_dir = fnamemodify(path, ":h:h") | |
Plug project_dir | |
" use stable version | |
else | |
Plug 'trapd00r/' . myplugin | |
endif | |
endfor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment