Skip to content

Commit 0221be8

Browse files
authored
Merge pull request #229 from vim-volt/devel
Release v0.3.5
2 parents 29bf40c + 3a6ccad commit 0221be8

38 files changed

+455
-439
lines changed

CMDREF.md

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
```
2+
.----------------. .----------------. .----------------. .----------------.
3+
| .--------------. || .--------------. || .--------------. || .--------------. |
4+
| | ____ ____ | || | ____ | || | _____ | || | _________ | |
5+
| ||_ _| |_ _| | || | .' `. | || | |_ _| | || | | _ _ | | |
6+
| | \ \ / / | || | / .--. \ | || | | | | || | |_/ | | \_| | |
7+
| | \ \ / / | || | | | | | | || | | | _ | || | | | | |
8+
| | \ ' / | || | \ `--' / | || | _| |__/ | | || | _| |_ | |
9+
| | \_/ | || | `.____.' | || | |________| | || | |_____| | |
10+
| | | || | | || | | || | | |
11+
| '--------------' || '--------------' || '--------------' || '--------------' |
12+
'----------------' '----------------' '----------------' '----------------'
13+
14+
Usage
15+
volt COMMAND ARGS
16+
17+
Command
18+
get [-l] [-u] [{repository} ...]
19+
Install or upgrade given {repository} list, or add local {repository} list as plugins
20+
21+
rm [-r] [-p] {repository} [{repository2} ...]
22+
Remove vim plugin from ~/.vim/pack/volt/opt/ directory
23+
24+
list [-f {text/template string}]
25+
Vim plugin information extractor.
26+
Unless -f flag was given, this command shows vim plugins of **current profile** (not all installed plugins) by default.
27+
28+
enable {repository} [{repository2} ...]
29+
This is shortcut of:
30+
volt profile add -current {repository} [{repository2} ...]
31+
32+
disable {repository} [{repository2} ...]
33+
This is shortcut of:
34+
volt profile rm -current {repository} [{repository2} ...]
35+
36+
profile set {name}
37+
Set profile name
38+
39+
profile show {name}
40+
Show profile info
41+
42+
profile list
43+
List all profiles
44+
45+
profile new {name}
46+
Create new profile
47+
48+
profile destroy {name}
49+
Delete profile
50+
51+
profile rename {old} {new}
52+
Rename profile {old} to {new}
53+
54+
profile add {name} {repository} [{repository2} ...]
55+
Add one or more repositories to profile
56+
57+
profile rm {name} {repository} [{repository2} ...]
58+
Remove one or more repositories to profile
59+
60+
build [-full]
61+
Build ~/.vim/pack/volt/ directory
62+
63+
migrate {migration operation}
64+
Perform miscellaneous migration operations.
65+
See 'volt migrate -help' for all available operations
66+
67+
self-upgrade [-check]
68+
Upgrade to the latest volt command, or if -check was given, it only checks the newer version is available
69+
70+
version
71+
Show volt command version
72+
```
73+
174
# volt build
275

376
```
@@ -137,7 +210,7 @@ Quick example
137210
138211
Show repositories used by current profile:
139212
140-
$ volt list -f '{{ range .Profiles }}{{ if eq $.CurrentProfileName .Name }}{{ range .ReposPath }}{{ . }}{{ end }}{{ end }}{{ end }}'
213+
$ volt list -f '{{ range .Profiles }}{{ if eq $.CurrentProfileName .Name }}{{ range .ReposPath }}{{ println . }}{{ end }}{{ end }}{{ end }}'
141214
142215
Or (see "Additional property"):
143216

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
NAME := volt
33
SRC := $(shell find . -type d -name 'vendor' -prune -o -type f -name '*.go' -print)
4-
VERSION := $(shell sed -n -E 's/var voltVersion = "([^"]+)"/\1/p' cmd/version.go)
4+
VERSION := $(shell sed -n -E 's/var voltVersion = "([^"]+)"/\1/p' subcmd/version.go)
55
RELEASE_LDFLAGS := -s -w -extldflags '-static'
66
RELEASE_OS := linux windows darwin
77
RELEASE_ARCH := amd64 386
@@ -43,7 +43,6 @@ release: $(BIN_DIR)/$(NAME)
4343
done
4444

4545
update-doc: all
46-
go run _scripts/update-readme.go README.md
47-
go run _scripts/update-cmdref.go CMDREF.md
46+
go run _scripts/update-cmdref.go >CMDREF.md
4847

4948
.PHONY: all precompile install-dep dep-ensure test release update-doc

README.md

Lines changed: 38 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
----
55

66
```
7-
$ volt
87
.----------------. .----------------. .----------------. .----------------.
98
| .--------------. || .--------------. || .--------------. || .--------------. |
109
| | ____ ____ | || | ____ | || | _____ | || | _________ | |
@@ -16,74 +15,13 @@ $ volt
1615
| | | || | | || | | || | | |
1716
| '--------------' || '--------------' || '--------------' || '--------------' |
1817
'----------------' '----------------' '----------------' '----------------'
19-
20-
Usage
21-
volt COMMAND ARGS
22-
23-
Command
24-
get [-l] [-u] [{repository} ...]
25-
Install or upgrade given {repository} list, or add local {repository} list as plugins
26-
27-
rm [-r] [-p] {repository} [{repository2} ...]
28-
Remove vim plugin from ~/.vim/pack/volt/opt/ directory
29-
30-
list [-f {text/template string}]
31-
Vim plugin information extractor.
32-
Unless -f flag was given, this command shows vim plugins of **current profile** (not all installed plugins) by default.
33-
34-
enable {repository} [{repository2} ...]
35-
This is shortcut of:
36-
volt profile add -current {repository} [{repository2} ...]
37-
38-
disable {repository} [{repository2} ...]
39-
This is shortcut of:
40-
volt profile rm -current {repository} [{repository2} ...]
41-
42-
profile set {name}
43-
Set profile name
44-
45-
profile show {name}
46-
Show profile info
47-
48-
profile list
49-
List all profiles
50-
51-
profile new {name}
52-
Create new profile
53-
54-
profile destroy {name}
55-
Delete profile
56-
57-
profile rename {old} {new}
58-
Rename profile {old} to {new}
59-
60-
profile add {name} {repository} [{repository2} ...]
61-
Add one or more repositories to profile
62-
63-
profile rm {name} {repository} [{repository2} ...]
64-
Remove one or more repositories to profile
65-
66-
build [-full]
67-
Build ~/.vim/pack/volt/ directory
68-
69-
migrate {migration operation}
70-
Perform miscellaneous migration operations.
71-
See 'volt migrate -help' for all available operations
72-
73-
self-upgrade [-check]
74-
Upgrade to the latest volt command, or if -check was given, it only checks the newer version is available
75-
76-
version
77-
Show volt command version
7818
```
7919

8020
See [the command reference](https://github.com/vim-volt/volt/blob/master/CMDREF.md) for more details.
8121

8222

8323
* [What is Volt](#what-is-volt)
8424
* [Install](#install)
85-
* [Build Environment](#build-environment)
86-
* [Config](#config)
8725
* [Self upgrade](#self-upgrade)
8826
* [Introduction](#introduction)
8927
* [VOLTPATH](#voltpath)
@@ -92,6 +30,7 @@ See [the command reference](https://github.com/vim-volt/volt/blob/master/CMDREF.
9230
* [Uninstall plugins](#uninstall-plugins)
9331
* [How it works](#how-it-works)
9432
* [Syncing ~/.vim/pack/volt directory with $VOLTPATH](#syncing-vimpackvolt-directory-with-voltpath)
33+
* [Config](#config)
9534
* [Features](#features)
9635
* [Easy setup](#easy-setup)
9736
* [Configuration per plugin ("Plugconf" feature)](#configuration-per-plugin-plugconf-feature)
@@ -104,6 +43,7 @@ See [the command reference](https://github.com/vim-volt/volt/blob/master/CMDREF.
10443
## What is Volt
10544

10645
* Multi-platform CLI tool managing Vim plugin life
46+
* Parallel vim plugin update
10747
* Based on Vim 8 [packages feature](http://vimhelp.appspot.com/repeat.txt.html#packages)
10848
* All plugins are installed under `~/.vim/pack/volt` directory
10949
* Zero overhead & optimizations
@@ -114,56 +54,29 @@ See [the command reference](https://github.com/vim-volt/volt/blob/master/CMDREF.
11454
* This separates plugin configuration from vimrc, so you can easily disable/remove plugins in a second
11555
* [Profile feature](#switch-set-of-plugins-profile-feature) saves set of plugins, vimrc, and gvimrc
11656
* You can switch those combinations with one command
57+
* For example, you can switch various Vim such as Web development mode, Essential plugins + vimrc only, or Vanilla Vim.
11758

11859
## Install
11960

120-
```
121-
$ go get github.com/vim-volt/volt
122-
```
123-
124-
Or download binaries from [GitHub releases](https://github.com/vim-volt/volt/releases).
125-
126-
## Build environment
127-
128-
* Go 1.9 or higher
129-
* If you are on WSL (Windows Subsystem Linux), note that you need **[the patch for os.RemoveAll()](https://go-review.googlesource.com/c/go/+/62970) ([#1](https://github.com/vim-volt/go-volt/issues/1))**
61+
* **RECOMMENDED**: Download binaries from [GitHub releases](https://github.com/vim-volt/volt/releases)
62+
* Or `go get github.com/vim-volt/volt`
63+
* You need Go 1.9 or higher
64+
* And if you are using Windows Subsystem Linux, you need to apply **[the patch for os.RemoveAll()](https://go-review.googlesource.com/c/go/+/62970) ! ([#1](https://github.com/vim-volt/go-volt/issues/1))**
13065
* But it's a hassle, you can just download linux-386/amd64 binaries from [GitHub releases](https://github.com/vim-volt/volt/releases) :)
13166

132-
## Config
133-
134-
Config file: `$VOLTPATH/config.toml`
135-
136-
```toml
137-
[build]
138-
# * "symlink" (default): "volt build" creates symlinks "~/.vim/pack/volt/opt/<repos>" referring to "$VOLTPATH/repos/<repos>"
139-
# * "copy": "volt build" copies "$VOLTPATH/repos/<repos>" files to "~/.vim/pack/volt/opt/<repos>"
140-
strategy = "symlink"
141-
142-
[get]
143-
# * true (default): "volt get" creates skeleton plugconf file at "$VOLTPATH/plugconf/<repos>.vim"
144-
# * false: It does not creates skeleton plugconf file
145-
create_skeleton_plugconf = true
146-
147-
# * true (default): When "volt get" or "volt get -u" fail and "git" command is
148-
# installed, it tries to execute "git clone" or "git pull" as a fallback
149-
# * false: "volt get" or "volt get -u" won't try to execute fallback commands
150-
fallback_git_cmd = true
151-
```
67+
And there is bash completion script in [\_contrib](https://github.com/vim-volt/volt/blob/master/_contrib/completion/bash) directory (thanks @AvianY).
15268

15369
## Self upgrade
15470

71+
If you already have older version's `volt` command, you can use `volt self-upgrade` command.
72+
15573
```
15674
$ volt self-upgrade
15775
```
15876

15977
will upgrade current running volt binary to the latest version if the [newer releases](https://github.com/vim-volt/volt/releases) published.
16078

161-
```
162-
$ volt self-upgrade -check
163-
```
164-
165-
just checks if the newer releases published.
166-
It also shows the release note of the latest version.
79+
Or also you can just checks if the newer releases published by running `volt self-upgrade -check`.
16780

16881
## Introduction
16982

@@ -245,6 +158,31 @@ But if you edit `$VOLTPATH/rc/<profile>/vimrc.vim` or `$VOLTPATH/rc/<profile>/gv
245158
`volt build` uses cache for the next running.
246159
Normally `volt build` synchronizes correctly, but if you met the bug, try `volt build -full` (or please [file an issue](https://github.com/vim-volt/volt/issues/new) as possible :) to ignore the previous cache.
247160

161+
## Config
162+
163+
Config file: `$VOLTPATH/config.toml`
164+
165+
```toml
166+
[alias]
167+
# You can use `volt update` in addition to `volt get -u`
168+
update = ["get", "-u"]
169+
170+
[build]
171+
# * "symlink" (default): "volt build" creates symlinks "~/.vim/pack/volt/opt/<repos>" referring to "$VOLTPATH/repos/<repos>"
172+
# * "copy": "volt build" copies "$VOLTPATH/repos/<repos>" files to "~/.vim/pack/volt/opt/<repos>"
173+
strategy = "symlink"
174+
175+
[get]
176+
# * true (default): "volt get" creates skeleton plugconf file at "$VOLTPATH/plugconf/<repos>.vim"
177+
# * false: It does not creates skeleton plugconf file
178+
create_skeleton_plugconf = true
179+
180+
# * true (default): When "volt get" or "volt get -u" fail and "git" command is
181+
# installed, it tries to execute "git clone" or "git pull" as a fallback
182+
# * false: "volt get" or "volt get -u" won't try to execute fallback commands
183+
fallback_git_cmd = true
184+
```
185+
248186
## Features
249187

250188
### Easy setup
@@ -323,7 +261,7 @@ endfunction
323261
"
324262
" This function must contain 'return "<str>"' code.
325263
" (the argument of :return must be string literal)
326-
function! s:depends()
264+
function! s:loaded_on()
327265
" this is the default value, you don't have to write this
328266
return 'start'
329267
endfunction
@@ -454,7 +392,7 @@ Because if you run `volt get localhost/{user}/{name}` accidentally you only get
454392
So it is guaranteed that you won't install a unwanted plugin :)
455393

456394
In other words, this means you can also manage your `~/.vim/*` files as a vim plugin.
457-
Off cource you can disable/enable it by `volt disable <repos>` and `volt enable <repos>`.
395+
Off cource you can disable/enable it by `volt disable <repos>` and `volt enable <repos>`.
458396

459397
```
460398
Move files/directories to vimdir

0 commit comments

Comments
 (0)