vim-flavor 2.2.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/README.md +9 -14
- data/features/.nav +2 -1
- data/features/backward_compatibilities/flavorfile.feature +166 -0
- data/features/backward_compatibilities/lockfile.feature +22 -0
- data/features/branches/changing_tracking_branches.feature +0 -3
- data/features/branches/detect_incompatible_declarations.feature +0 -2
- data/features/branches/install.feature +0 -2
- data/features/branches/update.feature +0 -1
- data/features/caching/deployment.feature +1 -0
- data/features/flavorfile/README.md +1 -1
- data/features/flavorfile/comments.feature +0 -1
- data/features/flavorfile/groups.feature +0 -3
- data/features/flavorfile/repository_name.feature +0 -3
- data/features/flavorfile/version_constraint.feature +3 -7
- data/features/install_vim_flavor.md +6 -12
- data/features/news.md +44 -0
- data/features/philosophy.md +4 -4
- data/features/resolve_dependencies/README.md +4 -3
- data/features/resolve_dependencies/basics.feature +0 -4
- data/features/resolve_dependencies/upgrade_outdated_dependencies.feature +0 -2
- data/features/resolve_dependencies/version_conflict.feature +0 -2
- data/features/step_definitions/cli_steps.rb +6 -1
- data/features/step_definitions/dependency_steps.rb +2 -1
- data/features/step_definitions/directory_steps.rb +1 -1
- data/features/step_definitions/file_steps.rb +2 -2
- data/features/step_definitions/flavor_steps.rb +25 -9
- data/features/step_definitions/flavorfile_steps.rb +10 -1
- data/features/step_definitions/lockfile_steps.rb +14 -5
- data/features/support/env.rb +22 -12
- data/features/testing_vim_plugins/README.md +7 -6
- data/features/testing_vim_plugins/dependencies.feature +2 -3
- data/features/testing_vim_plugins/failures.feature +2 -2
- data/features/testing_vim_plugins/specifying_test_scripts.feature +3 -3
- data/features/testing_vim_plugins/typical_usage.feature +30 -7
- data/features/typical_usage/README.md +7 -7
- data/features/typical_usage/deploy_to_arbitrary_place.feature +0 -1
- data/features/typical_usage/install_vim_plugins.feature +0 -1
- data/features/typical_usage/uninstall_vim_plugins.feature +0 -1
- data/features/typical_usage/update_vim_plugins.feature +0 -3
- data/features/uninstall_vim_flavor.md +3 -4
- data/features/version_lock.feature +0 -1
- data/features/version_tag_format.feature +0 -4
- data/lib/vim-flavor.rb +1 -1
- data/lib/vim-flavor/cli.rb +2 -2
- data/lib/vim-flavor/console.rb +22 -0
- data/lib/vim-flavor/facade.rb +17 -48
- data/lib/vim-flavor/flavorfile.rb +24 -1
- data/lib/vim-flavor/lockfile.rb +15 -0
- data/lib/vim-flavor/stringextension.rb +3 -11
- data/lib/vim-flavor/version.rb +1 -1
- data/spec/branchversion_spec.rb +4 -4
- data/spec/stringextension_spec.rb +31 -0
- data/vim-flavor.gemspec +8 -5
- metadata +48 -19
- data/features/step_definitions/bootstrap_script_steps.rb +0 -6
- data/spec/facade_spec.rb +0 -57
@@ -3,7 +3,7 @@
|
|
3
3
|
1. Write tests for your Vim plugin with
|
4
4
|
[vim-vspec](https://github.com/kana/vim-vspec).
|
5
5
|
2. Declare dependencies of your Vim plugin as a [flavorfile](flavorfile), and
|
6
|
-
save it as `
|
6
|
+
save it as `Flavorfile` in the root of your Vim plugin.
|
7
7
|
3. Run `vim-flavor test`.
|
8
8
|
|
9
9
|
|
@@ -14,15 +14,16 @@
|
|
14
14
|
It is hard to test Vim plugins, because there are a few problems:
|
15
15
|
|
16
16
|
* It is hard to write readable and maintainable test code in Vim script, even
|
17
|
-
for skilled users. Because Vim script is not expressive as script
|
18
|
-
like Ruby
|
17
|
+
for skilled users. Because Vim script is not expressive as other script
|
18
|
+
languages like Ruby.
|
19
19
|
* Each test must be run in an isolated environment to guarantee the same
|
20
20
|
results for every time and everywhere. So that all settings including vimrc
|
21
|
-
and plugins must be ignored.
|
22
|
-
|
21
|
+
and plugins of yours must be ignored. Your viminfo also must not be read
|
22
|
+
and written to avoid unexpected test failures and unexpectedly overwritten
|
23
|
+
of registers and marks you used.
|
23
24
|
* Some plugins require other plugins at runtime. Such dependencies must be
|
24
25
|
resolved, but they must be installed into a temporary place to avoid
|
25
|
-
corrupting
|
26
|
+
corrupting your environment. And `'runtimepath'` must be configured
|
26
27
|
carefully for both dependencies and plugins under development.
|
27
28
|
|
28
29
|
Therefore it is hard to do right testing for Vim plugins from scratch. As
|
@@ -53,8 +53,8 @@ Feature: Dependencies
|
|
53
53
|
kana/vim-textobj-user \(0\.\d+(\.\d+)?\)
|
54
54
|
kana/vim-vspec \(1\.\d+(\.\d+)?\)
|
55
55
|
"""
|
56
|
-
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/
|
57
|
-
And a dependency "kana/vim-textobj-user" is stored in ".vim-flavor/
|
56
|
+
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/pack/flavors/start"
|
57
|
+
And a dependency "kana/vim-textobj-user" is stored in ".vim-flavor/pack/flavors/start"
|
58
58
|
|
59
59
|
Scenario: Update dependencies for testing
|
60
60
|
Given a flavorfile with:
|
@@ -89,7 +89,6 @@ Feature: Dependencies
|
|
89
89
|
When I run `vim-flavor test --update-dependencies`
|
90
90
|
Then it should pass with regexp:
|
91
91
|
"""
|
92
|
-
.*
|
93
92
|
-------- Preparing dependencies
|
94
93
|
Checking versions...
|
95
94
|
Use kana/vim-textobj-user ... 0\.3\.13
|
@@ -45,7 +45,7 @@ Feature: Failures
|
|
45
45
|
-------------------
|
46
46
|
t/basics.vim \(Wstat: 0 Tests: 1 Failed: 1\)
|
47
47
|
Failed test: 1
|
48
|
-
Files=1, Tests=1,
|
48
|
+
Files=1, Tests=1, \d+ wallclock secs .*
|
49
49
|
Result: FAIL
|
50
50
|
"""
|
51
51
|
And the output should not contain:
|
@@ -56,4 +56,4 @@ Feature: Failures
|
|
56
56
|
"""
|
57
57
|
kana/vim-vspec \(1\.\d+(\.\d+)?\)
|
58
58
|
"""
|
59
|
-
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/
|
59
|
+
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/pack/flavors/start"
|
@@ -52,7 +52,7 @@ Feature: Specifying test scripts
|
|
52
52
|
"""
|
53
53
|
kana/vim-vspec \(1\.\d+(\.\d+)?\)
|
54
54
|
"""
|
55
|
-
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/
|
55
|
+
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/pack/flavors/start"
|
56
56
|
|
57
57
|
Scenario: Running a specific `.vim` test script
|
58
58
|
When I run `vim-flavor test spec/basics.vim`
|
@@ -74,7 +74,7 @@ Feature: Specifying test scripts
|
|
74
74
|
"""
|
75
75
|
kana/vim-vspec \(1\.\d+(\.\d+)?\)
|
76
76
|
"""
|
77
|
-
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/
|
77
|
+
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/pack/flavors/start"
|
78
78
|
|
79
79
|
Scenario: Running a specific `.t` test script
|
80
80
|
When I run `vim-flavor test spec/sh.t`
|
@@ -96,4 +96,4 @@ Feature: Specifying test scripts
|
|
96
96
|
"""
|
97
97
|
kana/vim-vspec \(1\.\d+(\.\d+)?\)
|
98
98
|
"""
|
99
|
-
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/
|
99
|
+
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/pack/flavors/start"
|
@@ -5,12 +5,6 @@ Feature: Typical usage
|
|
5
5
|
|
6
6
|
Background:
|
7
7
|
Given a repository "kana/vim-vspec" from offline cache
|
8
|
-
|
9
|
-
Scenario: Testing a Vim plugin without any dependency
|
10
|
-
Given a flavorfile with:
|
11
|
-
"""ruby
|
12
|
-
# No dependency
|
13
|
-
"""
|
14
8
|
And a file named "plugin/foo.vim" with:
|
15
9
|
"""vim
|
16
10
|
let g:foo = 3
|
@@ -33,6 +27,35 @@ Feature: Typical usage
|
|
33
27
|
echo 'ok 1'
|
34
28
|
echo '1..1'
|
35
29
|
"""
|
30
|
+
|
31
|
+
Scenario: Testing a Vim plugin with no dependencies
|
32
|
+
Given a flavorfile with:
|
33
|
+
"""ruby
|
34
|
+
# No dependencies
|
35
|
+
"""
|
36
|
+
When I run `vim-flavor test`
|
37
|
+
Then it should pass with regexp:
|
38
|
+
"""
|
39
|
+
-------- Preparing dependencies
|
40
|
+
Checking versions...
|
41
|
+
Use kana/vim-vspec ... 1\.\d+(\.\d+)?
|
42
|
+
Deploying plugins...
|
43
|
+
kana/vim-vspec 1\.\d+(\.\d+)? ... done
|
44
|
+
Completed.
|
45
|
+
-------- Testing a Vim plugin
|
46
|
+
t/basics.vim .. ok
|
47
|
+
t/sh.t ........ ok
|
48
|
+
All tests successful.
|
49
|
+
Files=2, Tests=2, \d+ wallclock secs .*
|
50
|
+
Result: PASS
|
51
|
+
"""
|
52
|
+
And a lockfile is created and matches with:
|
53
|
+
"""
|
54
|
+
kana/vim-vspec \(1\.\d+(\.\d+)?\)
|
55
|
+
"""
|
56
|
+
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/pack/flavors/start"
|
57
|
+
|
58
|
+
Scenario: Assuming no dependencies if flavorfile does not exist
|
36
59
|
When I run `vim-flavor test`
|
37
60
|
Then it should pass with regexp:
|
38
61
|
"""
|
@@ -53,4 +76,4 @@ Feature: Typical usage
|
|
53
76
|
"""
|
54
77
|
kana/vim-vspec \(1\.\d+(\.\d+)?\)
|
55
78
|
"""
|
56
|
-
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/
|
79
|
+
And a dependency "kana/vim-vspec" is stored in ".vim-flavor/pack/flavors/start"
|
@@ -26,21 +26,21 @@ and `vim-flavor` does it.
|
|
26
26
|
cd $YOUR_REPOSITORY_FOR_DOTFILES
|
27
27
|
|
28
28
|
# Add, delete or change declarations which versions of Vim plugins to use.
|
29
|
-
vim
|
29
|
+
vim Flavorfile
|
30
30
|
|
31
|
-
# Install Vim plugins according to
|
31
|
+
# Install Vim plugins according to Flavorfile.
|
32
32
|
vim-flavor install
|
33
33
|
|
34
34
|
# Record changes to the declarations and locked status.
|
35
|
-
git add
|
35
|
+
git add Flavorfile Flavorfile.lock
|
36
36
|
git commit -m '...'
|
37
37
|
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
-
## Flavorfile (`
|
41
|
+
## Flavorfile (`Flavorfile`)
|
42
42
|
|
43
|
-
`vim-flavor` reads a file `
|
43
|
+
`vim-flavor` reads a file `Flavorfile` in the current working directory.
|
44
44
|
The file is called a flavorfile. A flavorfile contains zero or more
|
45
45
|
declarations about Vim plugins and which versions of Vim plugins to use.
|
46
46
|
|
@@ -49,9 +49,9 @@ See also [more details about flavorfile](flavorfile).
|
|
49
49
|
|
50
50
|
|
51
51
|
|
52
|
-
## Lockfile (`
|
52
|
+
## Lockfile (`Flavorfile.lock`)
|
53
53
|
|
54
|
-
`vim-flavor` creates a file `
|
54
|
+
`vim-flavor` creates a file `Flavorfile.lock` in the current working directory.
|
55
55
|
The file is called a lockfile. A lockfile contains details about installed
|
56
56
|
Vim plugins to use the same configuration on every machine.
|
57
57
|
|
@@ -30,7 +30,6 @@ Feature: Update Vim plugins
|
|
30
30
|
$baz_uri (1.0.2)
|
31
31
|
$foo_uri (1.0.2)
|
32
32
|
"""
|
33
|
-
And a bootstrap script is created in "$home/.vim"
|
34
33
|
And a flavor "$foo_uri" version "1.0.2" is deployed to "$home/.vim"
|
35
34
|
And a flavor "$bar_uri" version "1.0.2" is deployed to "$home/.vim"
|
36
35
|
And a flavor "$baz_uri" version "1.0.2" is deployed to "$home/.vim"
|
@@ -56,7 +55,6 @@ Feature: Update Vim plugins
|
|
56
55
|
$baz_uri (1.0.2)
|
57
56
|
$foo_uri (1.0.2)
|
58
57
|
"""
|
59
|
-
And a bootstrap script is created in "$home/.vim"
|
60
58
|
And a flavor "$foo_uri" version "1.0.2" is deployed to "$home/.vim"
|
61
59
|
And a flavor "$bar_uri" version "1.0.0" is deployed to "$home/.vim"
|
62
60
|
And a flavor "$baz_uri" version "1.0.2" is deployed to "$home/.vim"
|
@@ -82,7 +80,6 @@ Feature: Update Vim plugins
|
|
82
80
|
$baz_uri (1.0.2)
|
83
81
|
$foo_uri (1.0.2)
|
84
82
|
"""
|
85
|
-
And a bootstrap script is created in "$home/.vim"
|
86
83
|
And a flavor "$foo_uri" version "1.0.2" is deployed to "$home/.vim"
|
87
84
|
And a flavor "$bar_uri" version "1.0.2" is deployed to "$home/.vim"
|
88
85
|
And a flavor "$baz_uri" version "1.0.2" is deployed to "$home/.vim"
|
@@ -1,11 +1,10 @@
|
|
1
1
|
## Uninstallation steps
|
2
2
|
|
3
|
-
rm -
|
4
|
-
rm -
|
3
|
+
rm -rf ~/.vim-flavor
|
4
|
+
rm -rf ~/.vim/flavors # or ~/vimfiles/flavors etc.
|
5
5
|
|
6
6
|
cd $YOUR_REPOSITORY_FOR_DOTFILES
|
7
|
-
rm
|
8
|
-
vim vimrc # Remove the "runtime flavors/bootstrap.vim" line.
|
7
|
+
rm Flavorfile Flavorfile.lock
|
9
8
|
git commit -am 'Farewell to vim-flavor'
|
10
9
|
|
11
10
|
gem uninstall vim-flavor
|
@@ -26,7 +26,6 @@ Feature: Version tag format
|
|
26
26
|
"""
|
27
27
|
$foo_uri (1.2.3)
|
28
28
|
"""
|
29
|
-
And a bootstrap script is created in "$home/.vim"
|
30
29
|
And a flavor "$foo_uri" version "1.2.3" is deployed to "$home/.vim"
|
31
30
|
When I run `vim-flavor install`
|
32
31
|
Then it should pass with template:
|
@@ -57,7 +56,6 @@ Feature: Version tag format
|
|
57
56
|
"""
|
58
57
|
$foo_uri (v1.2.3)
|
59
58
|
"""
|
60
|
-
And a bootstrap script is created in "$home/.vim"
|
61
59
|
And a flavor "$foo_uri" version "v1.2.3" is deployed to "$home/.vim"
|
62
60
|
When I run `vim-flavor install`
|
63
61
|
Then it should pass with template:
|
@@ -86,7 +84,6 @@ Feature: Version tag format
|
|
86
84
|
There is no valid version
|
87
85
|
"""
|
88
86
|
And a lockfile is not created
|
89
|
-
And a bootstrap script is not created in "$home/.vim"
|
90
87
|
And a flavor "$foo_uri" is not deployed to "$home/.vim"
|
91
88
|
|
92
89
|
Scenario: Without tags
|
@@ -106,5 +103,4 @@ Feature: Version tag format
|
|
106
103
|
There is no valid version
|
107
104
|
"""
|
108
105
|
And a lockfile is not created
|
109
|
-
And a bootstrap script is not created in "$home/.vim"
|
110
106
|
And a flavor "$foo_uri" is not deployed to "$home/.vim"
|
data/lib/vim-flavor.rb
CHANGED
data/lib/vim-flavor/cli.rb
CHANGED
@@ -9,7 +9,7 @@ module Vim
|
|
9
9
|
:banner => 'DIR'
|
10
10
|
end
|
11
11
|
|
12
|
-
desc 'install', 'Install Vim plugins according to
|
12
|
+
desc 'install', 'Install Vim plugins according to Flavofile.'
|
13
13
|
common_options_to_deploy
|
14
14
|
def install
|
15
15
|
Facade.new().install(
|
@@ -18,7 +18,7 @@ module Vim
|
|
18
18
|
end
|
19
19
|
|
20
20
|
desc 'update [REPO_NAME...]',
|
21
|
-
'Update Vim plugins according to
|
21
|
+
'Update Vim plugins according to Flavorfile.'
|
22
22
|
common_options_to_deploy
|
23
23
|
def update(*repo_names)
|
24
24
|
Facade.new().update(
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'pastel'
|
2
|
+
|
3
|
+
module Vim
|
4
|
+
module Flavor
|
5
|
+
module Console
|
6
|
+
class << self
|
7
|
+
private def pastel
|
8
|
+
@pastel ||= Pastel.new(enabled: $stdout.tty?)
|
9
|
+
end
|
10
|
+
|
11
|
+
def warn message
|
12
|
+
puts pastel.yellow("Warning: #{message}")
|
13
|
+
end
|
14
|
+
|
15
|
+
def error message
|
16
|
+
puts pastel.red("Error: #{message}")
|
17
|
+
exit(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/vim-flavor/facade.rb
CHANGED
@@ -20,28 +20,29 @@ module Vim
|
|
20
20
|
def test(files_or_dirs, options)
|
21
21
|
trace "-------- Preparing dependencies\n"
|
22
22
|
|
23
|
-
|
23
|
+
flavorfile_path = FlavorFile.path_from(Dir.getwd(), true)
|
24
|
+
flavorfile = FlavorFile.load_or_new(flavorfile_path)
|
24
25
|
flavorfile.flavor 'kana/vim-vspec', '~> 1.5', :group => :development unless
|
25
26
|
flavorfile.flavor_table.has_key?('kana/vim-vspec')
|
26
|
-
|
27
|
+
lockfile_path = LockFile.path_from(Dir.getwd(), true)
|
28
|
+
lockfile = LockFile.load_or_new(lockfile_path)
|
29
|
+
flavors_path = Dir.getwd().to_stash_path.to_flavors_path
|
27
30
|
|
28
31
|
refresh_flavors(
|
29
32
|
options[:update_dependencies] ? :update : :install,
|
30
33
|
flavorfile,
|
31
34
|
lockfile,
|
32
35
|
[:runtime, :development],
|
33
|
-
|
36
|
+
flavors_path
|
34
37
|
)
|
35
38
|
|
36
39
|
trace "-------- Testing a Vim plugin\n"
|
37
40
|
|
38
|
-
|
39
|
-
deps_path = this_path.to_stash_path.to_deps_path
|
40
|
-
runner = "#{deps_path}/#{'kana/vim-vspec'.zap}/bin/prove-vspec"
|
41
|
+
runner = "#{flavors_path}/#{'kana/vim-vspec'.zap}/bin/prove-vspec"
|
41
42
|
plugin_paths = lockfile.flavors.map {|f|
|
42
|
-
"#{
|
43
|
+
"#{flavors_path}/#{f.repo_name.zap}"
|
43
44
|
}
|
44
|
-
runtime_paths = ([
|
45
|
+
runtime_paths = ([Dir.getwd()] + plugin_paths).flat_map {|p| ['-d', p]}
|
45
46
|
command =
|
46
47
|
%Q{ '#{runner}' \
|
47
48
|
#{runtime_paths.flat_map {|p| ['-d', p]}.shelljoin} \
|
@@ -51,8 +52,10 @@ module Vim
|
|
51
52
|
end
|
52
53
|
|
53
54
|
def install_or_update(mode, vimfiles_path)
|
54
|
-
|
55
|
-
|
55
|
+
flavorfile_path = FlavorFile.path_from(Dir.getwd(), true)
|
56
|
+
flavorfile = FlavorFile.load_or_new(flavorfile_path)
|
57
|
+
lockfile_path = LockFile.path_from(Dir.getwd(), true)
|
58
|
+
lockfile = LockFile.load_or_new(lockfile_path)
|
56
59
|
refresh_flavors(
|
57
60
|
mode,
|
58
61
|
flavorfile,
|
@@ -175,7 +178,8 @@ module Vim
|
|
175
178
|
|
176
179
|
def complete_a_flavor_dependencies(nf, locked_flavor_table, mode, groups, level)
|
177
180
|
nf.checkout()
|
178
|
-
|
181
|
+
flavorfile_path = FlavorFile.path_from(nf.cached_repo_path, false)
|
182
|
+
ff = FlavorFile.load_or_new(flavorfile_path)
|
179
183
|
complete_flavors(ff.flavor_table, locked_flavor_table, mode, groups, level + 1, nf.repo_name)
|
180
184
|
end
|
181
185
|
|
@@ -183,7 +187,8 @@ module Vim
|
|
183
187
|
trace "Deploying plugins...\n"
|
184
188
|
|
185
189
|
a_flavors_path = File.absolute_path(flavors_path)
|
186
|
-
|
190
|
+
lockfile_path = LockFile.path_from(a_flavors_path, false)
|
191
|
+
deployment_memo = LockFile.load_or_new(lockfile_path)
|
187
192
|
|
188
193
|
# To uninstall flavors which were deployed by vim-flavor 1.0.2 or
|
189
194
|
# older, the whole deployed flavors have to be removed. Because
|
@@ -193,8 +198,6 @@ module Vim
|
|
193
198
|
:secure => true
|
194
199
|
) if deployment_memo.flavors.empty?
|
195
200
|
|
196
|
-
create_vim_script_for_bootstrap(a_flavors_path)
|
197
|
-
|
198
201
|
flavors.
|
199
202
|
before_each {|f| trace " #{f.repo_name} #{f.locked_version} ..."}.
|
200
203
|
on_failure {trace " failed\n"}.
|
@@ -228,40 +231,6 @@ module Vim
|
|
228
231
|
deployment_memo.save()
|
229
232
|
end
|
230
233
|
|
231
|
-
def create_vim_script_for_bootstrap(flavors_path)
|
232
|
-
bootstrap_path = flavors_path.to_bootstrap_path
|
233
|
-
FileUtils.mkdir_p(File.dirname(bootstrap_path))
|
234
|
-
File.open(bootstrap_path, 'w') do |f|
|
235
|
-
f.write(<<-'END')
|
236
|
-
function! s:bootstrap()
|
237
|
-
let current_rtp = &runtimepath
|
238
|
-
let current_rtps = split(current_rtp, ',')
|
239
|
-
set runtimepath&
|
240
|
-
let default_rtp = &runtimepath
|
241
|
-
let default_rtps = split(default_rtp, ',')
|
242
|
-
let user_dir = default_rtps[0]
|
243
|
-
let user_after_dir = default_rtps[-1]
|
244
|
-
let base_rtps =
|
245
|
-
\ filter(copy(current_rtps),
|
246
|
-
\ 'v:val !=# user_dir && v:val !=# user_after_dir')
|
247
|
-
let flavor_dirs =
|
248
|
-
\ filter(split(glob(user_dir . '/flavors/*'), '\n'),
|
249
|
-
\ 'isdirectory(v:val)')
|
250
|
-
let new_rtps =
|
251
|
-
\ []
|
252
|
-
\ + [user_dir]
|
253
|
-
\ + flavor_dirs
|
254
|
-
\ + base_rtps
|
255
|
-
\ + map(reverse(copy(flavor_dirs)), 'v:val . "/after"')
|
256
|
-
\ + [user_after_dir]
|
257
|
-
let &runtimepath = join(new_rtps, ',')
|
258
|
-
endfunction
|
259
|
-
|
260
|
-
call s:bootstrap()
|
261
|
-
END
|
262
|
-
end
|
263
|
-
end
|
264
|
-
|
265
234
|
def trace message
|
266
235
|
print message
|
267
236
|
end
|