Skip to content

Commit 73767a8

Browse files
authored
doc: update README.md
1 parent b9ec437 commit 73767a8

File tree

1 file changed

+22
-26
lines changed

1 file changed

+22
-26
lines changed

README.md

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,7 @@ See [plugconf directory](https://github.com/tyru/dotfiles/tree/75a37b4a640a5cffe
306306
You can think this is similar feature of **branch** of `git`.
307307
The default profile name is "default".
308308

309-
You can see profile list by `volt profile list`.
310-
311-
```
312-
$ volt profile list
313-
* default
314-
```
315-
316-
You can create a new profile by `volt profile new`.
309+
You can create an *empty* profile by `volt profile new`.
317310

318311
```
319312
$ volt profile new foo # will create profile "foo"
@@ -322,7 +315,8 @@ $ volt profile list
322315
foo
323316
```
324317

325-
You can switch current profile by `volt profile set`.
318+
Then you can switch current profile by `volt profile set`.
319+
This removes all plugins from `~/.vim/pack/volt/opt/*`, because the new created profile is empty; no plugins are included.
326320

327321
```
328322
$ volt profile set foo # will switch profile to "foo"
@@ -331,38 +325,40 @@ $ volt profile list
331325
* foo
332326
```
333327

334-
You can delete profile by `volt profile destroy` (but you cannot delete current profile which you are switching on).
328+
You can install new plugins or enable installed plugins **only in the current profile.**
329+
`volt enable` is a shortcut of `volt profile add -current`.
335330

336331
```
337-
$ volt profile destroy foo # will delete profile "foo"
332+
$ volt enable foo/bar bar/baz # enable installed plugins (foo/bar, bar/baz) also in new profile
333+
$ volt profile add -current foo/bar bar/baz # same as above
334+
$ volt get foo/bar bar/baz # or you can just use 'volt get', this installs missing plugins (it just includes plugins if already installed)
338335
```
339336

340-
You can enable/disable plugin by `volt enable` (`volt profile add`), `volt disable` (`volt profile rm`).
337+
You can disable plugins by `volt disable`.
338+
This is a shortcut of `volt profile rm -current`.
341339

342340
```
343-
$ volt enable tyru/caw.vim # enable loading tyru/caw.vim on current profile
344-
$ volt profile add foo tyru/caw.vim # enable loading tyru/caw.vim on "foo" profile
341+
$ volt disable foo/bar # disable loading foo/bar on current profile
342+
$ volt profile rm -current foo/bar # same as above
343+
$ volt profile rm foo foo/bar # or disable plugins outside current profile (of course 'volt profile add' can do it too)
345344
```
346345

346+
You can delete profile by `volt profile destroy` (but you cannot delete current profile which you are switching on).
347+
347348
```
348-
$ volt disable tyru/caw.vim # disable loading tyru/caw.vim on current profile
349-
$ volt profile rm foo tyru/caw.vim # disable loading tyru/caw.vim on "foo" profile
349+
$ volt profile destroy foo # will delete profile "foo"
350350
```
351351

352-
You can create a vimrc & gvimrc file for each profile:
352+
---
353+
354+
And you can create local vimrc & gvimrc files for each profile:
353355
* vimrc: `$VOLTPATH/rc/<profile name>/vimrc.vim`
354356
* gvimrc: `$VOLTPATH/rc/<profile name>/gvimrc.vim`
355357

356-
NOTE: If the path(s) exists, `$MYVIMRC` and `$MYGVIMRC` are set. So `:edit $MYVIMRC` does not open generated vimrc (`~/.vim/vimrc`), but above vimrc/gvimrc.
358+
NOTE: If the path(s) exists, `$MYVIMRC` and `$MYGVIMRC` are set. So `:edit $MYVIMRC` opens above vimrc/gvimrc, not generated vimrc (`~/.vim/vimrc`).
357359

358-
This file is copied to `~/.vim/vimrc` and `~/.vim/gvimrc` with magic comment (shows error if existing vimrc/gvimrc files exist with no magic comment).
359-
360-
And you can enable/disable vimrc by `volt profile use` (or you can simply remove `$VOLTPATH/rc/<profile name>/vimrc.vim` file if you don't want vimrc for the profile).
361-
362-
```
363-
$ volt profile use -current vimrc false # Disable installing vimrc on current profile
364-
$ volt profile use default gvimrc true # Enable installing gvimrc on profile default
365-
```
360+
The files are copied to `~/.vim/vimrc` and `~/.vim/gvimrc` with magic comment.
361+
Because volt shows an error if existing vimrc/gvimrc files exist with no magic comment which is not created by volt.
366362

367363
See `volt help profile` for more detailed information.
368364

0 commit comments

Comments
 (0)