Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ffe0190
Bump version: v0.3.3 -> v0.3.4
tyru Mar 31, 2018
8ebe679
doc: refine README description
tyru Apr 5, 2018
d8af4ed
fix: fix warning message when s:config() is found (fix #217)
tyru Mar 31, 2018
f46bca7
feat: add shell completion script by @AvianY (#225)
tyru Apr 6, 2018
5bf37f6
refactor: fix style of bash completion
tyru Apr 6, 2018
8dc8179
refactor: surround argument with dquote at get_plugs
tyru Apr 6, 2018
a067101
refactor: move constants to outside function
tyru Apr 6, 2018
7abb3e1
fix: avoid using temporary file to speed up
tyru Apr 6, 2018
9cb1d9f
fix: avoid invoking commands to speed up
tyru Apr 6, 2018
1595895
refactor: use sort -u
tyru Apr 6, 2018
4a38785
Merge pull request #227 from vim-volt/bash-completion
tyru Apr 6, 2018
e6a8baf
fix: move bash completion script to _contrib/
tyru Apr 8, 2018
b03b103
doc: refine README.md
tyru Apr 8, 2018
675d002
doc: write 'volt help' output to CMDREF.md
tyru Apr 8, 2018
e8204f7
doc: leave only logo at header of README
tyru Apr 8, 2018
31210ce
doc: CMDREF: '$ volt' is not necessary
tyru Apr 8, 2018
f896724
doc: make update-doc
tyru Apr 8, 2018
2cd3fe8
Fixed edge cases for bash completion
AvianY Apr 9, 2018
11a01ed
fix: fix example of 'volt list' (fix #224)
tyru Apr 9, 2018
81f31f7
fix: add modeline to the top of plugconf (fix #233)
tyru Apr 9, 2018
3c820e8
fix: error message when volt cannot overwrite vimrc (fix #222)
tyru Apr 9, 2018
4b7770e
fix: lint warning message
tyru Apr 9, 2018
a777640
feat: add command alias feature (fix #232)
tyru Apr 9, 2018
2d17d95
Fixed the remaining edge case with expanding profiles
AvianY Apr 9, 2018
5aa78e9
Merge pull request #234 from AvianY/completion
tyru Apr 9, 2018
2a2896a
refactor: change cmd.Run() and Cmd.Run() signature
tyru Apr 14, 2018
85a0f1e
refactor: mv cmd subcmd
tyru Apr 14, 2018
8d3a06e
destructive: don't clone submodules recursively
tyru Apr 21, 2018
2fbe878
doc: fix Plugconf example in README
0xBADDCAFE Jun 14, 2018
c9da0cb
Merge pull request #242 from 0xBADDCAFE/master
tyru Jun 14, 2018
ba10b38
doc: write about subcommand alias feature (#232)
tyru Oct 26, 2018
6613700
Bump version: v0.3.4 -> v0.3.5
tyru Oct 26, 2018
3a6ccad
Merge branch 'master' into devel
tyru Oct 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 74 additions & 1 deletion CMDREF.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
```
.----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ ____ | || | ____ | || | _____ | || | _________ | |
| ||_ _| |_ _| | || | .' `. | || | |_ _| | || | | _ _ | | |
| | \ \ / / | || | / .--. \ | || | | | | || | |_/ | | \_| | |
| | \ \ / / | || | | | | | | || | | | _ | || | | | | |
| | \ ' / | || | \ `--' / | || | _| |__/ | | || | _| |_ | |
| | \_/ | || | `.____.' | || | |________| | || | |_____| | |
| | | || | | || | | || | | |
| '--------------' || '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------' '----------------'

Usage
volt COMMAND ARGS

Command
get [-l] [-u] [{repository} ...]
Install or upgrade given {repository} list, or add local {repository} list as plugins

rm [-r] [-p] {repository} [{repository2} ...]
Remove vim plugin from ~/.vim/pack/volt/opt/ directory

list [-f {text/template string}]
Vim plugin information extractor.
Unless -f flag was given, this command shows vim plugins of **current profile** (not all installed plugins) by default.

enable {repository} [{repository2} ...]
This is shortcut of:
volt profile add -current {repository} [{repository2} ...]

disable {repository} [{repository2} ...]
This is shortcut of:
volt profile rm -current {repository} [{repository2} ...]

profile set {name}
Set profile name

profile show {name}
Show profile info

profile list
List all profiles

profile new {name}
Create new profile

profile destroy {name}
Delete profile

profile rename {old} {new}
Rename profile {old} to {new}

profile add {name} {repository} [{repository2} ...]
Add one or more repositories to profile

profile rm {name} {repository} [{repository2} ...]
Remove one or more repositories to profile

build [-full]
Build ~/.vim/pack/volt/ directory

migrate {migration operation}
Perform miscellaneous migration operations.
See 'volt migrate -help' for all available operations

self-upgrade [-check]
Upgrade to the latest volt command, or if -check was given, it only checks the newer version is available

version
Show volt command version
```

# volt build

```
Expand Down Expand Up @@ -137,7 +210,7 @@ Quick example

Show repositories used by current profile:

$ volt list -f '{{ range .Profiles }}{{ if eq $.CurrentProfileName .Name }}{{ range .ReposPath }}{{ . }}{{ end }}{{ end }}{{ end }}'
$ volt list -f '{{ range .Profiles }}{{ if eq $.CurrentProfileName .Name }}{{ range .ReposPath }}{{ println . }}{{ end }}{{ end }}{{ end }}'

Or (see "Additional property"):

Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

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

update-doc: all
go run _scripts/update-readme.go README.md
go run _scripts/update-cmdref.go CMDREF.md
go run _scripts/update-cmdref.go >CMDREF.md

.PHONY: all precompile install-dep dep-ensure test release update-doc
138 changes: 38 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
----

```
$ volt
.----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ ____ | || | ____ | || | _____ | || | _________ | |
Expand All @@ -16,74 +15,13 @@ $ volt
| | | || | | || | | || | | |
| '--------------' || '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------' '----------------'

Usage
volt COMMAND ARGS

Command
get [-l] [-u] [{repository} ...]
Install or upgrade given {repository} list, or add local {repository} list as plugins

rm [-r] [-p] {repository} [{repository2} ...]
Remove vim plugin from ~/.vim/pack/volt/opt/ directory

list [-f {text/template string}]
Vim plugin information extractor.
Unless -f flag was given, this command shows vim plugins of **current profile** (not all installed plugins) by default.

enable {repository} [{repository2} ...]
This is shortcut of:
volt profile add -current {repository} [{repository2} ...]

disable {repository} [{repository2} ...]
This is shortcut of:
volt profile rm -current {repository} [{repository2} ...]

profile set {name}
Set profile name

profile show {name}
Show profile info

profile list
List all profiles

profile new {name}
Create new profile

profile destroy {name}
Delete profile

profile rename {old} {new}
Rename profile {old} to {new}

profile add {name} {repository} [{repository2} ...]
Add one or more repositories to profile

profile rm {name} {repository} [{repository2} ...]
Remove one or more repositories to profile

build [-full]
Build ~/.vim/pack/volt/ directory

migrate {migration operation}
Perform miscellaneous migration operations.
See 'volt migrate -help' for all available operations

self-upgrade [-check]
Upgrade to the latest volt command, or if -check was given, it only checks the newer version is available

version
Show volt command version
```

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


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

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

## Install

```
$ go get github.com/vim-volt/volt
```

Or download binaries from [GitHub releases](https://github.com/vim-volt/volt/releases).

## Build environment

* Go 1.9 or higher
* 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))**
* **RECOMMENDED**: Download binaries from [GitHub releases](https://github.com/vim-volt/volt/releases)
* Or `go get github.com/vim-volt/volt`
* You need Go 1.9 or higher
* 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))**
* But it's a hassle, you can just download linux-386/amd64 binaries from [GitHub releases](https://github.com/vim-volt/volt/releases) :)

## Config

Config file: `$VOLTPATH/config.toml`

```toml
[build]
# * "symlink" (default): "volt build" creates symlinks "~/.vim/pack/volt/opt/<repos>" referring to "$VOLTPATH/repos/<repos>"
# * "copy": "volt build" copies "$VOLTPATH/repos/<repos>" files to "~/.vim/pack/volt/opt/<repos>"
strategy = "symlink"

[get]
# * true (default): "volt get" creates skeleton plugconf file at "$VOLTPATH/plugconf/<repos>.vim"
# * false: It does not creates skeleton plugconf file
create_skeleton_plugconf = true

# * true (default): When "volt get" or "volt get -u" fail and "git" command is
# installed, it tries to execute "git clone" or "git pull" as a fallback
# * false: "volt get" or "volt get -u" won't try to execute fallback commands
fallback_git_cmd = true
```
And there is bash completion script in [\_contrib](https://github.com/vim-volt/volt/blob/master/_contrib/completion/bash) directory (thanks @AvianY).

## Self upgrade

If you already have older version's `volt` command, you can use `volt self-upgrade` command.

```
$ volt self-upgrade
```

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

```
$ volt self-upgrade -check
```

just checks if the newer releases published.
It also shows the release note of the latest version.
Or also you can just checks if the newer releases published by running `volt self-upgrade -check`.

## Introduction

Expand Down Expand Up @@ -245,6 +158,31 @@ But if you edit `$VOLTPATH/rc/<profile>/vimrc.vim` or `$VOLTPATH/rc/<profile>/gv
`volt build` uses cache for the next running.
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.

## Config

Config file: `$VOLTPATH/config.toml`

```toml
[alias]
# You can use `volt update` in addition to `volt get -u`
update = ["get", "-u"]

[build]
# * "symlink" (default): "volt build" creates symlinks "~/.vim/pack/volt/opt/<repos>" referring to "$VOLTPATH/repos/<repos>"
# * "copy": "volt build" copies "$VOLTPATH/repos/<repos>" files to "~/.vim/pack/volt/opt/<repos>"
strategy = "symlink"

[get]
# * true (default): "volt get" creates skeleton plugconf file at "$VOLTPATH/plugconf/<repos>.vim"
# * false: It does not creates skeleton plugconf file
create_skeleton_plugconf = true

# * true (default): When "volt get" or "volt get -u" fail and "git" command is
# installed, it tries to execute "git clone" or "git pull" as a fallback
# * false: "volt get" or "volt get -u" won't try to execute fallback commands
fallback_git_cmd = true
```

## Features

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

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

```
Move files/directories to vimdir
Expand Down
Loading