Skip to content

Commit f6f0656

Browse files
authored
Merge pull request #146 from vim-volt/devel
Release v0.2.3
2 parents aea90c3 + b26375f commit f6f0656

File tree

437 files changed

+171761
-1514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+171761
-1514
lines changed
File renamed without changes.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor/** -diff

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ matrix:
1616
script:
1717
- go vet -v ./...
1818
- make test
19+
# we must update docs manually by `make update-doc`
20+
# (fail if changes are detected)
21+
- make update-doc
22+
- git diff --exit-code
1923

2024
notifications:
2125
email:

CMDREF.md

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
# volt build
2+
3+
```
4+
Usage
5+
volt build [-help] [-full]
6+
7+
Quick example
8+
$ volt build # builds directories under ~/.vim/pack/volt
9+
$ volt build -full # full build (remove ~/.vim/pack/volt, and re-create all)
10+
11+
Description
12+
Build ~/.vim/pack/volt/opt/ directory:
13+
1. Copy repositories' files into ~/.vim/pack/volt/opt/
14+
* If the repository is git repository, extract files from locked revision of tree object and copy them into above vim directories
15+
* If the repository is static repository (imported non-git directory by "volt add" command), copy files into above vim directories
16+
2. Remove directories from above vim directories, which exist in ~/.vim/pack/volt/build-info.json but not in $VOLTPATH/lock.json
17+
18+
~/.vim/pack/volt/build-info.json is a file which holds the information that what vim plugins are installed in ~/.vim/pack/volt/ and its type (git repository, static repository, or system repository), its version. A user normally doesn't need to know the contents of build-info.json .
19+
20+
If -full option was given, remove all directories in ~/.vim/pack/volt/opt/ , and copy repositories' files into above vim directories.
21+
Otherwise, it will perform smart build: copy / remove only changed repositories' files.
22+
23+
Options
24+
-full
25+
full build
26+
```
27+
28+
# volt disable
29+
30+
```
31+
Usage
32+
volt disable [-help] {repository} [{repository2} ...]
33+
34+
Quick example
35+
$ volt disable tyru/caw.vim # will disable tyru/caw.vim plugin in current profile
36+
37+
Description
38+
This is shortcut of:
39+
volt profile rm {current profile} {repository} [{repository2} ...]
40+
```
41+
42+
# volt enable
43+
44+
```
45+
Usage
46+
volt enable [-help] {repository} [{repository2} ...]
47+
48+
Quick example
49+
$ volt enable tyru/caw.vim # will enable tyru/caw.vim plugin in current profile
50+
51+
Description
52+
This is shortcut of:
53+
volt profile add {current profile} {repository} [{repository2} ...]
54+
```
55+
56+
# volt get
57+
58+
```
59+
Usage
60+
volt get [-help] [-l] [-u] [-v] [{repository} ...]
61+
62+
Quick example
63+
$ volt get tyru/caw.vim # will install tyru/caw.vim plugin
64+
$ volt get -u tyru/caw.vim # will upgrade tyru/caw.vim plugin
65+
$ volt get -l -u # will upgrade all installed plugins
66+
$ volt get -v tyru/caw.vim # will output more verbosely
67+
68+
$ mkdir -p ~/volt/repos/localhost/local/hello/plugin
69+
$ echo 'command! Hello echom "hello"' >~/volt/repos/localhost/local/hello/plugin/hello.vim
70+
$ volt get localhost/local/hello # will add the local repository as a plugin
71+
$ vim -c Hello # will output "hello"
72+
73+
Description
74+
Install or upgrade given {repository} list, or add local {repository} list as plugins.
75+
76+
And fetch skeleton plugconf from:
77+
https://github.com/vim-volt/plugconf-templates
78+
and install it to:
79+
$VOLTPATH/plugconf/{repository}.vim
80+
81+
If -v option was specified, output more verbosely.
82+
83+
Repository List
84+
{repository} list (=target to perform installing, upgrading, and so on) is determined as followings:
85+
* If -l option is specified, all installed vim plugins (regardless current profile) are used
86+
* If one or more {repository} arguments are specified, the arguments are used
87+
88+
Action
89+
The action (install, upgrade, or add only) is determined as follows:
90+
1. If -u option is specified (upgrade):
91+
* Upgrade git repositories in {repository} list (static repositories are ignored).
92+
* Add {repository} list to lock.json (if not found)
93+
2. Or (install):
94+
* Fetch {repository} list from remotes
95+
* Add {repository} list to lock.json (if not found)
96+
97+
Static repository
98+
Volt can manage a local directory as a repository. It's called "static repository".
99+
When you have unpublished plugins, or you want to manage ~/.vim/* files as one repository
100+
(this is useful when you use profile feature, see "volt help profile" for more details),
101+
static repository is useful.
102+
All you need is to create a directory in "$VOLTPATH/repos/<repos>".
103+
104+
When -u was not specified (install) and given repositories exist, volt does not make a request to clone the repositories.
105+
Therefore, "volt get" tries to fetch repositories but skip it because the directory exists.
106+
then it adds repositories to lock.json if not found.
107+
108+
$ mkdir -p ~/volt/repos/localhost/local/hello/plugin
109+
$ echo 'command! Hello echom "hello"' >~/volt/repos/localhost/local/hello/plugin/hello.vim
110+
$ volt get localhost/local/hello # will add the local repository as a plugin
111+
$ vim -c Hello # will output "hello"
112+
113+
Repository path
114+
{repository}'s format is one of the followings:
115+
116+
1. {user}/{name}
117+
This is same as "github.com/{user}/{name}"
118+
2. {site}/{user}/{name}
119+
3. https://{site}/{user}/{name}
120+
4. http://{site}/{user}/{name}
121+
122+
Options
123+
-l use all installed repositories as targets
124+
-u upgrade repositories
125+
-v output more verbosely
126+
```
127+
128+
# volt list
129+
130+
```
131+
Usage
132+
volt list [-help]
133+
134+
Quick example
135+
$ volt list # will list installed plugins
136+
137+
Description
138+
This is shortcut of:
139+
volt profile show {current profile}
140+
```
141+
142+
# volt migrate
143+
144+
```
145+
Usage
146+
volt migrate [-help]
147+
148+
Description
149+
Perform migration of $VOLTPATH/lock.json, which means volt converts old version lock.json structure into the latest version. This is always done automatically when reading lock.json content. For example, 'volt get <repos>' will install plugin, and migrate lock.json structure, and write it to lock.json after all. so the migrated content is written to lock.json automatically.
150+
But, for example, 'volt list' does not write to lock.json but does read, so every time when running 'volt list' shows warning about lock.json is old.
151+
To suppress this, running this command simply reads and writes migrated structure to lock.json.
152+
```
153+
154+
# volt profile
155+
156+
```
157+
Usage
158+
profile [-help] {command}
159+
160+
Command
161+
profile set [-n] {name}
162+
Set profile name to {name}.
163+
164+
profile show [-current | {name}]
165+
Show profile info of {name}.
166+
167+
profile list
168+
List all profiles.
169+
170+
profile new {name}
171+
Create new profile of {name}. This command does not switch to profile {name}.
172+
173+
profile destroy {name}
174+
Delete profile of {name}.
175+
NOTE: Cannot delete current profile.
176+
177+
profile rename {old} {new}
178+
Rename profile {old} to {new}.
179+
180+
profile add [-current | {name}] {repository} [{repository2} ...]
181+
Add one or more repositories to profile {name}.
182+
183+
profile rm [-current | {name}] {repository} [{repository2} ...]
184+
Remove one or more repositories from profile {name}.
185+
186+
profile use [-current | {name}] vimrc [true | false]
187+
profile use [-current | {name}] gvimrc [true | false]
188+
Set vimrc / gvimrc flag to true or false.
189+
190+
Quick example
191+
$ volt profile list # default profile is "default"
192+
* default
193+
$ volt profile new foo # will create profile "foo"
194+
$ volt profile list
195+
* default
196+
foo
197+
$ volt profile set foo # will switch profile to "foo"
198+
$ volt profile list
199+
default
200+
* foo
201+
202+
$ volt profile set default # on profile "default"
203+
204+
$ volt enable tyru/caw.vim # enable loading tyru/caw.vim on current profile
205+
$ volt profile add foo tyru/caw.vim # enable loading tyru/caw.vim on "foo" profile
206+
207+
$ volt disable tyru/caw.vim # disable loading tyru/caw.vim on current profile
208+
$ volt profile rm foo tyru/caw.vim # disable loading tyru/caw.vim on "foo" profile
209+
210+
$ volt profile destroy foo # will delete profile "foo"
211+
212+
$ volt profile use -current vimrc false # Disable installing vimrc on current profile on "volt build"
213+
$ volt profile use default gvimrc true # Enable installing gvimrc on profile default on "volt build"
214+
```
215+
216+
# volt rm
217+
218+
```
219+
Usage
220+
volt rm [-help] [-r] [-p] {repository} [{repository2} ...]
221+
222+
Quick example
223+
$ volt rm tyru/caw.vim # Remove tyru/caw.vim plugin from lock.json
224+
$ volt rm -r tyru/caw.vim # Remove tyru/caw.vim plugin from lock.json, and remove repository directory
225+
$ volt rm -p tyru/caw.vim # Remove tyru/caw.vim plugin from lock.json, and remove plugconf
226+
$ volt rm -r -p tyru/caw.vim # Remove tyru/caw.vim plugin from lock.json, and remove repository directory, plugconf
227+
228+
Description
229+
Uninstall {repository} on every profile.
230+
If {repository} is depended by other repositories, this command exits with an error.
231+
232+
If -r option was given, remove also repository directories of specified repositories.
233+
If -p option was given, remove also plugconf files of specified repositories.
234+
235+
{repository} is treated as same format as "volt get" (see "volt get -help").
236+
```
237+
238+
# volt self-upgrade
239+
240+
```
241+
Usage
242+
volt self-upgrade [-help] [-check]
243+
244+
Description
245+
Upgrade to the latest volt command, or if -check was given, it only checks the newer version is available.
246+
```
247+
248+
# volt version
249+
250+
```
251+
Usage
252+
volt version [-help]
253+
254+
Description
255+
Show current version of volt.
256+
```

0 commit comments

Comments
 (0)