-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vundle should be more automatable #325
Comments
you can just write a executable vim script and execute that every day or week or whenever you want:
See |
Sure, that's an OK workaround for update. It's not ideal since it would hide any error output. In addition, I also want to automatically run BundleClean and BundleInstall on vim startup. |
Think about why you want to run BundleClean automatically? Disk is cheap today. Also see #367 - eventually rm -fr everything and checking out everything from scratch is better for the reason given there. It looks like you're an advanced vim user - thus looking at bundles code should allow you to duplicate those viml lines you need (get list of plugins, use glob to find out about install, diff, then run rm -fr or so). I also suggest learning about "lazy loading" #364 which will change your view on this topic eventually. |
For #364, it's better to install all bundles at once, and then configure actually loading each plugin based on file type. For #367 BundleClean should delete the old repo, and BundleUpdate should check out the new one. In my automated startup I would run clean before update. For the viml lines -- I can look at that, but wouldn't it be better to avoid duplicating those lines between vundle and my .vimrc? I'd much rather have a callable function. It makes for more seamless package management. This is not a high priority enhancement, but in the long term, it would make Vundle better. |
In VAM it would be but that would slow, (and still incomplete). The best option would be to glob the install directory and compare with directory names returned by vam#PluginDirFromName (tlib implements list diffing or such) - or use filter and index() or such - then pass to rm -fr. In VAM its complicated because names can be translated to directory names. The solution mentioned last would work in for default setups pretty well. |
BundleClean, BundleInstall, etc are great for running plugin management operations manually. But what if you want to automate them?
For example, I would like to automatically run BundleClean each time I start vim, in case my .vimrc has been modified on another computer. BundleInstall may be good to run as well, if it's fast enough. BundleUpdate is probably too slow to run each time, but I could script running it once a month, or something along those lines.
But I can't just add :BundleClean to my .vimrc, since it opens a buffer. I tried scripting closing the buffer immediately after it opens, but the screen still flashes annoyingly, and it still shows the buffer in the console after I quit vim.
I would love to see some kind of quiet-bundle-clean, quite-bundle-install, quiet-bundle-update, etc functions, that perform their operations without any user interaction (and raise any errors that occur in a visible way).
The text was updated successfully, but these errors were encountered: