-
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
submodule #226
Comments
A matter of opinion, I guess, since I, for one, disagree. My bundle directory is in a git repo and I wouldn't like bundles to be added as submodules because that would mean I'd be tracking the bundles for no good reason. Not only I think this is making vundle too clever, but what's wrong with tracking your vimrc on your repo, adding the bundles directory to gitignore and then simply running BundleInstall? |
my vim directory is in a repo, so when vundle installs a bundle, if the On Wed, Oct 17, 2012 at 12:19 PM, Jacobo de Vera
|
There is nothing wrong with what you are describing, and you don't need to add those repos as submodules. The easiest thing to do is to make git ignore the bundle directory in your outer repo, at least that's what I'm doing. |
I see we're of a different mindset on how this should be handled. Thanks
|
It was always a suggestion that didn't involve changing the tool. If you still think the tool should change, by all means keep the issue open. I can't really close this, I'm just another user :) |
oh, i was mobile so didn't realize :) either way, i don't think most people keep their vim dir in a git repo so ... so, i wouldn't say it should be a default. but, i think using On Wed, Oct 17, 2012 at 2:45 PM, Jacobo de Vera notifications@github.comwrote:
|
Another reason why submodule should not be introduced is that submodule is mainly for tight integration, it is only useful that parent project is strongly sensitive to the sub project's commit revision. In this case, commit revisions of the plugins is irrelevant to the vim configuration, there is really not necesssary to commit plugins commit infor into vim configuration, so, it is probably not a good idea to use submodule managing the plugins, jdevera's way is much better. |
Yes, i agree. After that i cant "git clone" my .vim, problem with No submodule mapping found in .gitmodules for path 'bundle/Align' |
That sounds more like you accidentally added bundles or something than an issue caused by Vundle itself. My .vim and .vimrc are tracked with GIT and I get no such errors. |
@xeross Just try do git clone. And then ls bundle/* |
Okay, show me the commands you execute that cause the problem then |
#backup |
Why are you doing a submodule init? Alternatively if you didn't mean to add the bundles to your repository: Alternative
This also adds your bundles to your repository, registering them as a submodule but without the mapping to a remote repository. You need to add it to your .gitignore file so you don't add them when using that command: ## Backup
mv .vim vim.bak
mv .vimrc .vimrc.bak
## Create bundle folder
mkdir -p .vim/bundle
## Clone Vundle
git clone git://github.com/gmarik/vundle.git .vim/bundle/vundle
## Configure vimrc
echo filetype off >> .vimrc
echo 'set rtp+=~/.vim/bundle/vundle/' >> .vimrc
echo ' call vundle#rc()' >> .vimrc
echo "Bundle 'gmarik/vundle'" >> .vimrc
echo "Bundle 'file-line'" >> .vimrc
echo filetype plugin indent on >> .vimrc
## Install bundles
vim +BundleInstall +qall
## Initialize git repository
git init
## Add bundles to .gitignore
echo ".vim/bundle/" >> .gitignore
## Add all files
git add .
git commit -a -m 1
## Clone test repo
mkdir -p ~/tmp
cd ~/tmp
git clone ../.vim ./vim
ls bundle/file-line |
Oh, yes. I doesnt say this. I deploy my .vim to all my servers with puppet, and perfect module 'vcsrepo' Why you do echo ".vim/bundle/" >> .gitignore ? |
So then why use Vundle in the first place if you're using submodules in that way? Also an option would be to run |
Why? Erm. Vundle is pretty nice and i like it, thats why ;) Its do wrong only one thing ("git clone" instead "git submodule add" if .vim contains .git). And i just want to help Vundle be better. Yes, for now after :bundleinstall, i do boring 100 steps. git remote -v, remember url,rm -rf , git submod ... , git commit , git pull etc. Its solve my problem, but really boring. |
Thing is that it would require Vundle to: add the bundles as submodules, commit those changes, update the submodules with the update command and commit those new versions too, etc. This would make it far more complicated than it is now. You could make an easy bash script to do the submodule adding for you probably. |
I have a similar setup to yours. I just added |
As I said earlier, this is a matter of preferences, I suppose. I also have my .vim directory under git but I do what @deiga just said. If vundle assumed that I wanted modules, not because I say so, but because I happen to have my .vim under .git, I'd be annoyed, tbh (have you tried removing a module? it's a pain). I still believe it makes no sense to use vundle and submodules at the same time. Vundle is all about keeping everything up to date, submodules are all about locking into a specific version. Actually, once of the planned features to add to vundle is to lock certain plugins in a specific branch or tag or commit, which would then make submodules even more useless. With submodules, you are doing the work, without submodules, vundle does it for you. I think if somebody really want to have their submodules, they should use simpler tools like pathogen, that do not interfere with the version control at all, they just add stuff to the rtp. So, I don't think we'll replace the current cloning with submodules, especially not as a default or as a inference from some condition that happens to be true for some users, e,g., .vim is under git. If we end up supporting submodules, it will be by explicit request somewhere in the config. In the meantime, I recommend trying out the solutions presented here (they are all the same solution, to be honest). |
What I had imagined when I first made the request is a variable in .vimrc On Tue, Feb 19, 2013 at 10:44 AM, Jacobo de Vera
|
Just stumbling upon this thread. I've been keeping my .vim/ as a list of git submodules in my dotfiles repo. https://github.com/kevinSuttle/dotfiles/tree/master/vim/.vim/bundle This works well. I clone my dotfiles, run the setup script, |
Why not supporting this as an option? The benefit of submodules is to track exact versions of plugins (while |
Since I posted my original thoughts above, I stopped tracking my /.vim/ directory in my repo. Vundle makes dealing with Vim plugins a much more elegant and less contraining task. |
Keep ./vim in git have additional abilities. I do easy deploy .vim with puppet/git. |
Very true, but that's not an advantage that the /.vim directory provides, so much as an advantage of using Puppet. You can automate the Vim plugin installation through Vundle and your shell of choice with 3 lines of code (and that's taking the long way around). https://github.com/kevinSuttle/dotfiles/blob/master/install.zsh#L16 |
@kevinSuttle yep. But it not the same. |
Allow me to humbly offer my opinion: I have vim/bundle in .gitignore and I very much like the fact that vundle doesn't use submodules. This is my primary reason for using it instead of pathogen. With vundle, installing/updating plugins is separate procedure from changing other vim configurations. I have no desire to "track" a submodule for every single plugin, no desire to deal with submodules every time somebody updates a plugin. When checking in my dotfiles configuration, I am only interested about what I changed in my setup. Having submodules, with pathogen, was a pain, because I would change one line in my vimrc and do git status and get a list of a dozen submodules that 'need to be udapted and checked in.' I just don't care. Manage my plugins and get out of my way. |
@pacemkr +1 |
I'm currently maintaining a fork of vundle that adds git submodule support, with a pending pull request. It's been working great for me so far. Being able to control which version of a plugin you use makes it much easier to figure out when updating your plugins breaks things for you. I usually only commit the updated submodules after using them for some time and making sure that the update didn't break anything. In some ways, using submodules is sort-of like committing your Gemfile.lock in ruby projects. Nevertheless, the arguments mentioned above against using submodules are all reasonable. Honestly, it all eventually comes down to personal preference. I think a good compromise would be to use submodules if I just implemented this in my fork. Trying to add a submodule to an ignored directory would've been a potential bug anyway. Please if you're interested check it out and help me iron out any remaining bugs or edge-cases, even if only by trying to use it and reporting any bugs you encounter. Thanks 👍 |
@maljub01 nice! |
@deiga #267 and #116 both allow for tighter control over plugins and their versions. However, I still think submodule support should be added so vundle wouldn't mess up your git repo if you chose not to ignore Still, I would like to see #253 implemented in vundle, and #267 goes a long way towards that. |
might be related #292 (version lock file). Now git also supports subtrees (which is somewhat related to submodules). The allow to import foreign repositories into your own - and update in some way. Thene there is no need to git submodule init etc. Changes can be "exported" to the original repositories. see #198 |
Vundle bundles are git checkout themselves, adding these bundles to the dotfiles repository causes problems. Best not commit them and ignore them. See: VundleVim/Vundle.vim#226
It looks to me like #185 allows you to bootstrap your vundled-vim by ignoring your bundle directory, adding vundle itself as a submodule, and then letting vundle manage the other plugins:
The Then one you've cloned this you can just do |
Vundle bundles are git checkout themselves, adding these bundles to the dotfiles repository causes problems. Best not commit them and ignore them. See: VundleVim/Vundle.vim#226
if bundle directory is inside of a git repo, bundles should be added as submodules and not cloned.
The text was updated successfully, but these errors were encountered: