1

I am not new to Vim but I am new to using plugins to upgrade the Vim experience. I recently installed vim-plug; the goal being what is usually the goal of anyone installing vim-plug: to automate the process of installing, upgrading and using Vim plugins.

I am facing an issue when I add the line

:PlugUpdate

in my .vimrc file. Indeed, when this is the case whenever I try to open a file through Vim I get a page like this:

[Plugins]  .vimrc                                                             X
  1 Updated. Elapsed time: 1.007506 sec.                                        
  2 [==]
  3 
  4 - Finishing ... Done!
  5 - vimtex: Already up to date.
  6 - NERDTree: Already up to date.

This is an expected behavior and I do not worry about it. My issue is however when I try to move on from this page to access the document I was trying to open. Trying the usual

:q

Does not work: it seems to open an empty document. My question is then: what am I doing wrong?

2
  • 1
    Short answer: don't put :PlugUpdate in your vimrc. For a more thorough answer, you would need to edit and share a minimal vimrc that exhibits the behavior.
    – Friedrich
    Commented Mar 6 at 12:00
  • Have you tried :bd to close the vim-plug buffer instead of :q ?
    – n0p
    Commented Mar 6 at 14:57

1 Answer 1

2

I can't reproduce your exact issue. Although when I put :PlugUpdate into a random spot in my vimrc, I get different problems like buffer-local variables not being defined.

Without offering much of an explanation or root cause, the fix is simply not to put :PlugUpdate into your vimrc.

Vim-plug's usage instructions only mention the following commands:

call plug#begin()
Plug 'author/plugin'
call plug#end()

Note the absence of :PlugUpdate. It's fair to assume that the commands above are the only ones to be added to vimrc.

Anyhow, running :PlugUpdate slows opening Vim down. One of the main reasons I personally use Vim is because it's fast (even when burdened with some plugins). I wouldn't want to sacrifice any of its speed to pointless checks for updates.

Also, most Vim plugins are reasonably stable and don't need to be updated every hour or so. Doing :PlugUpdate manually every few months or so works well for me (but then I don't have any cutting edge plugins installed).

By the way, for any plugin that uses tags, I only update to the latest tag. In my day-to-day work, I really don't want to put up with broken experimental features. It's as easy as appending the following dictionary:

Plug 'author/plugin', {'tag', '*'}

If you want to have regular updates, I'd schedule running something like vim +PlugUpdate +qa.

2
  • 1
    Sometimes 6 months or more go by before I update… but no Neovim/Lua for me ?? Commented Mar 6 at 22:21
  • @D.BenKnoble I'm glad I'm not the only one :-D
    – Friedrich
    Commented Mar 7 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.