From f7e6a86807a1f0be7257620a8c425e1a32f877bb Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 1 May 2017 21:31:57 +0900 Subject: [PATCH] Deprecate implicit vim-scripts expansion vim-scripts.org is no longer maintained. Close #625 --- plug.vim | 2 +- test/regressions.vader | 14 +++++++------- test/workflow.vader | 9 +++++++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/plug.vim b/plug.vim index 852ee80..ac299a2 100644 --- a/plug.vim +++ b/plug.vim @@ -579,7 +579,7 @@ function! s:infer_properties(name, repo) let uri = repo else if repo !~ '/' - let repo = 'vim-scripts/'. repo + throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) endif let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') let uri = printf(fmt, repo) diff --git a/test/regressions.vader b/test/regressions.vader index c6541e9..dd2a6a2 100644 --- a/test/regressions.vader +++ b/test/regressions.vader @@ -230,7 +230,7 @@ Execute (#159: shell=/bin/tcsh): ********************************************************************** Execute (#154: Spaces in &rtp should not be escaped): call plug#begin('/tmp/vim-plug-test/plug it') - Plug 'seoul256 vim' + Plug 'foo/seoul256 vim' call plug#end() Log &rtp Assert stridx(&rtp, 'plug it/seoul256 vim') >= 0 @@ -238,12 +238,12 @@ Execute (#154: Spaces in &rtp should not be escaped): ********************************************************************** Execute (#184: Duplicate entries in &rtp): call plug#begin('/tmp/vim-plug-test/plugged') - Plug 'plugin1' - \| Plug 'plugin0' + Plug 'foo/plugin1' + \| Plug 'foo/plugin0' - Plug 'plugin2' - \| Plug 'plugin0' - \| Plug 'plugin1' + Plug 'foo/plugin2' + \| Plug 'foo/plugin0' + \| Plug 'foo/plugin1' call plug#end() Log &rtp @@ -311,7 +311,7 @@ Execute (#474: Load ftdetect files in filetypedetect augroup): ********************************************************************** Execute (#489/#587 On-demand loading with 'on' option should trigger BufRead autocmd w/o nomodeline): call plug#begin('$PLUG_FIXTURES') - Plug 'ftplugin-msg', { 'on': 'XXX' } + Plug 'foo/ftplugin-msg', { 'on': 'XXX' } call plug#end() tabnew a.java diff --git a/test/workflow.vader b/test/workflow.vader index fe8d8f4..b24b128 100644 --- a/test/workflow.vader +++ b/test/workflow.vader @@ -57,12 +57,17 @@ Execute (Test Plug command): AssertEqual join([g:temp_plugged, 'vim-emoji/'], '/'), g:plugs['vim-emoji'].dir " vim-scripts/ - Plug 'beauty256' + Plug 'vim-scripts/beauty256' AssertEqual 'file:///tmp/vim-plug-test/vim-scripts/beauty256', g:plugs.beauty256.uri AssertEqual 'master', g:plugs.beauty256.branch AssertEqual 4, len(g:plugs) + redir => out + Plug 'beauty256' + redir END + Assert out =~ 'Invalid argument: beauty256' + Execute (Plug command with dictionary option): Log string(g:plugs) Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co', 'rtp': '././' } @@ -1230,7 +1235,7 @@ Execute (Using g:plug_url_format): let g:plug_url_format = 'git@bitbucket.org:%s.git' Plug 'junegunn/seoul256.vim' let g:plug_url_format = 'git@bitsocket.org:%s.git' - Plug 'beauty256' + Plug 'vim-scripts/beauty256' AssertEqual 'git@bitbucket.org:junegunn/seoul256.vim.git', g:plugs['seoul256.vim'].uri AssertEqual 'git@bitsocket.org:vim-scripts/beauty256.git', g:plugs['beauty256'].uri let g:plug_url_format = prev_plug_url_format