Skip to content

Instantly share code, notes, and snippets.

@trapd00r
Created May 1, 2022 14:31
Show Gist options
  • Save trapd00r/06524d80bba6264cc8e904d7bbb0cd95 to your computer and use it in GitHub Desktop.
Save trapd00r/06524d80bba6264cc8e904d7bbb0cd95 to your computer and use it in GitHub Desktop.
trying to conditionally load different versions of same plugins
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