Suppose there is a particular plugin that I wanna tweak part of its functionality (and it is not under active development anymore), I'd like to test the modified version without pushing to my forked repo and :PlugUpdate. (I use vim-plug)

What is a convenient way to do this?

P.S. A simple example is that I would like to know the output of a (multiline) function which starts like function! s:some_action()

  • I added the plugin tag and changed the title because this seems to be specific to that plugin: if you weren't using that plugin then you could just go ahead and modify the code. Using vim-plug changes things, though, because I don't know where that plugin actually saves the plugins it downloads and whether it would overwrite any changes you made. Feel free to edit further if you actually want the question to be more general, but be sure not to make it "too broad" in the process! :) – Rich Mar 14 '18 at 11:23

If you installed the plugin with vim-plug, then all the files from the plugin will be located at ~/.vim/plugged/<NAME>. You can just modify these files, and test the changes (re-source the modified files or simply restart vim). This way you don't need to interact at all with vim-plug or with the Github fork.

Since ~/.vim/plugged/<NAME> contains just a clone of a git repo, you can also do all things you know from git. E.g. create a new branch for the changes. Then you can simply swap between the original plugin and the modified one by git checkout master / git checkout new_feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.