Skip to content
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

Auto download/update layers specified in g:layers #6

Open
cweagans opened this issue Jun 27, 2019 · 0 comments
Open

Auto download/update layers specified in g:layers #6

cweagans opened this issue Jun 27, 2019 · 0 comments

Comments

@cweagans
Copy link
Member

We shouldn't need to download layers separately to set up vigor. Maybe something to this effect:

	" Given a layer name, download or update the local copy.
	function! DownloadUpdateLayer(name)
		if !isdirectory(g:vigor_home . "/layers/" . a:name)
			if a:name =~ "/"
				" If the name has a slash, then we'll download the Github repo specified.
				execute "silent !git clone https://github.com/" . a:name . ".git " . g:vigor_home . "/layers/" . a:name
			else
				" Otherwise, we're going to treat it like an official layer in the vim-vigor namespace.
				execute "silent !git clone https://github.com/vim-vigor/" . a:name . ".git " . g:vigor_home . "/layers/" . a:name
			endif
		else
			if !exists("no_vigor_autoupdate")
				execute "silent !git pull -C " . g:vigor_home . "/layers/" . a:name
			endif
		endif
	endfunction

And then iterate over g:layers in the bootstrap function. Not sure what implications this has for plugin installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant