Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e55690f19 | ||
|
|
30ef53d832 | ||
|
|
f58d090bb2 | ||
|
|
eeef77e9c8 | ||
|
|
6af2cd8946 | ||
|
|
878cdd5309 | ||
|
|
9bb2da53a0 | ||
|
|
58c06ed77e | ||
|
|
2e691c6feb | ||
|
|
a18087610a | ||
|
|
276106d987 | ||
|
|
d499fc311a | ||
|
|
c4b4aa8f07 | ||
|
|
d690f8d576 | ||
|
|
8738341ad0 | ||
|
|
5ab2024fbb | ||
|
|
300176ba9f | ||
|
|
da7d6bd58b | ||
|
|
b651558c63 | ||
|
|
2d815ad2f0 | ||
|
|
3af4079179 | ||
|
|
e6a594f1ad | ||
|
|
e741d02ad0 | ||
|
|
b2208640d4 | ||
|
|
aa49c38586 | ||
|
|
b6b10ac17e | ||
|
|
706f7e00ea | ||
|
|
6ff1031339 | ||
|
|
0936877399 | ||
|
|
d956e16f15 | ||
|
|
f98c8456fa | ||
|
|
5b2c03d3a8 | ||
|
|
0b31be49cf | ||
|
|
74fa6ab9df | ||
|
|
0d7e20c984 | ||
|
|
e2714fb56e | ||
|
|
3b83a22ea4 | ||
|
|
cd418369bc | ||
|
|
279a334c8b | ||
|
|
9132e9d50d | ||
|
|
3323163e04 | ||
|
|
e4671eaf9e | ||
|
|
9afa356fb3 | ||
|
|
e04f696682 | ||
|
|
4cb5fd04a6 | ||
|
|
c16743e8fc | ||
|
|
46a6e8441f | ||
|
|
466d1839b3 | ||
|
|
c3cf35abb5 | ||
|
|
344f80aedb | ||
|
|
dae0540a11 | ||
|
|
af89938633 | ||
|
|
35c5f2830b | ||
|
|
60b907c87f | ||
|
|
9ceb9caa09 | ||
|
|
42a42e7e71 | ||
|
|
8885b1086f | ||
|
|
90c07f269c | ||
|
|
f1c5157e35 | ||
|
|
7f1ec7b12b | ||
|
|
f90afc9081 | ||
|
|
612b9b3afd | ||
|
|
58891e05be | ||
|
|
baf7b18f73 | ||
|
|
cc37ed48be | ||
|
|
afe7dc6f8f | ||
|
|
8863a3a53c | ||
|
|
ee04a646d3 | ||
|
|
6ddee62977 | ||
|
|
8cf5fca9ca | ||
|
|
347fccb030 | ||
|
|
a026eb39c4 | ||
|
|
4d352e1849 | ||
|
|
db3f5ad5c3 | ||
|
|
1d477a1a01 | ||
|
|
288a4f72ce | ||
|
|
5168cd50db | ||
|
|
4d32762432 | ||
|
|
8dff1dae37 | ||
|
|
b5b687ad9a | ||
|
|
7e69a50890 | ||
|
|
476a613746 | ||
|
|
12b5dcb903 | ||
|
|
de81f95f69 | ||
|
|
b7cf1ca65a | ||
|
|
7fa22a6927 | ||
|
|
6f487f1579 | ||
|
|
f8fcc81783 | ||
|
|
32dc4ca93f | ||
|
|
7047eda149 | ||
|
|
5679540a2a | ||
|
|
d2f6c09c7a | ||
|
|
acbba74fe2 | ||
|
|
47a3bebb30 | ||
|
|
f00dacd7bd | ||
|
|
8986f87b83 | ||
|
|
ae6f3254d8 | ||
|
|
0c1744a819 | ||
|
|
b763cae81a | ||
|
|
358363eefc | ||
|
|
c827d2fa05 | ||
|
|
2ef9b8a492 | ||
|
|
2a3a40dd42 | ||
|
|
411bb2bef9 | ||
|
|
ff01c54720 |
12
.travis.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
language: vim
|
||||
|
||||
before_script: |
|
||||
hg clone https://code.google.com/p/vim/
|
||||
cd vim
|
||||
./configure --with-features=huge --enable-rubyinterp
|
||||
make
|
||||
sudo make install
|
||||
cd -
|
||||
|
||||
script: |
|
||||
test/run !
|
||||
156
README.md
@@ -1,11 +1,12 @@
|
||||

|
||||

|
||||
|
||||
A single-file Vim plugin manager.
|
||||
|
||||
Somewhere between [Pathogen](https://github.com/tpope/vim-pathogen) and
|
||||
[Vundle](https://github.com/gmarik/vundle), but with faster parallel installer.
|
||||
|
||||

|
||||

|
||||
|
||||
### Pros.
|
||||
|
||||
@@ -15,7 +16,6 @@ Somewhere between [Pathogen](https://github.com/tpope/vim-pathogen) and
|
||||
- Smallest possible feature set
|
||||
- Branch/tag support
|
||||
- On-demand loading
|
||||
- Dependency resolution using `Plugfile` (experimental)
|
||||
|
||||
### Cons.
|
||||
|
||||
@@ -36,43 +36,68 @@ Edit your .vimrc
|
||||
```vim
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
" Make sure you use single quotes
|
||||
Plug 'junegunn/seoul256.vim'
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||
" Plug 'user/repo1', 'branch_or_tag'
|
||||
" Plug 'user/repo2', { 'rtp': 'vim/plugin/dir', 'branch': 'devel' }
|
||||
" Plug 'git@github.com:junegunn/vim-github-dashboard.git'
|
||||
" ...
|
||||
|
||||
" On-demand loading
|
||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
|
||||
|
||||
" Using git URL
|
||||
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
|
||||
|
||||
" Plugin options
|
||||
Plug 'nsf/gocode', { 'tag': 'go.weekly.2012-03-13', 'rtp': 'vim' }
|
||||
|
||||
" Plugin outside ~/.vim/plugged with post-update hook
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' }
|
||||
|
||||
" Unmanaged plugin (manually installed and updated)
|
||||
Plug '~/my-prototype-plugin'
|
||||
|
||||
call plug#end()
|
||||
```
|
||||
|
||||
Reload .vimrc and `:PlugInstall` to install plugins.
|
||||
|
||||
### Plugin directory
|
||||
|
||||
If you omit the path argument to `plug#begin()`, plugins are installed in
|
||||
`plugged` directory under the first path in `runtimepath` at the point when
|
||||
`plug#begin()` is called. This is usually `~/.vim/plugged` (or
|
||||
`$HOME/vimfiles/plugged` on Windows) given that you didn't touch runtimepath
|
||||
before the call.
|
||||
|
||||
### Commands
|
||||
|
||||
| Command | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------ |
|
||||
| PlugInstall [#threads] | Install plugins |
|
||||
| PlugUpdate [#threads] | Install or update plugins |
|
||||
| PlugClean[!] | Remove unused directories (bang version will clean without prompt) |
|
||||
| PlugUpgrade | Upgrade vim-plug itself |
|
||||
| PlugStatus | Check the status of plugins |
|
||||
| Command | Description |
|
||||
| --------------------------------- | ------------------------------------------------------------------ |
|
||||
| PlugInstall [name ...] [#threads] | Install plugins |
|
||||
| PlugUpdate [name ...] [#threads] | Install or update plugins |
|
||||
| PlugClean[!] | Remove unused directories (bang version will clean without prompt) |
|
||||
| PlugUpgrade | Upgrade vim-plug itself |
|
||||
| PlugStatus | Check the status of plugins |
|
||||
| PlugDiff | See the updated changes from the previous PlugUpdate |
|
||||
|
||||
### `Plug` options
|
||||
|
||||
| Option | Description |
|
||||
| -------------- | -------------------------------------------------------------------- |
|
||||
| `branch`/`tag` | Branch or tag of the repository to use |
|
||||
| `rtp` | Subdirectory that contains Vim plugin |
|
||||
| `dir` | Custom directory for the plugin |
|
||||
| `do` | Post-update hook (string or funcref) |
|
||||
| `on` | On-demand loading: Commands or `<Plug>`-mappings |
|
||||
| `for` | On-demand loading: File types |
|
||||
| `frozen` | Do not install/update plugin unless explicitly given as the argument |
|
||||
|
||||
### Options for parallel installer
|
||||
|
||||
| Flag | Default | Description |
|
||||
| ---------------- | ------- | --------------------------------- |
|
||||
| `g:plug_threads` | 16 | Default number of threads to use |
|
||||
| `g:plug_timeout` | 60 | Time limit of each task in seconds |
|
||||
| Flag | Default | Description |
|
||||
| ---------------- | ------- | ------------------------------------ |
|
||||
| `g:plug_threads` | 16 | Default number of threads to use |
|
||||
| `g:plug_timeout` | 60 | Time limit of each task in seconds |
|
||||
| `g:plug_retries` | 2 | Number of retries in case of timeout |
|
||||
|
||||
### Keybindings
|
||||
|
||||
- `D` - `PlugDiff`
|
||||
- `S` - `PlugStatus`
|
||||
- `R` - Retry failed update or installation tasks
|
||||
- `q` - Close the window
|
||||
|
||||
### Example: A small [sensible](https://github.com/tpope/vim-sensible) Vim configuration
|
||||
|
||||
@@ -90,17 +115,62 @@ Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||
|
||||
" Multiple commands
|
||||
Plug 'junegunn/vim-github-dashboard', { 'on': ['GHDashboard', 'GHActivity'] }
|
||||
|
||||
" Loaded when clojure file is opened
|
||||
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
|
||||
|
||||
" On-demand loading on both conditions
|
||||
Plug 'junegunn/vader.vim', { 'on': 'Vader', 'for': 'vader' }
|
||||
```
|
||||
|
||||
### Dependency resolution
|
||||
### Post-installation/update hooks
|
||||
|
||||
See [Dependency
|
||||
Resolution](https://github.com/junegunn/vim-plug/wiki/Dependency-Resolution).
|
||||
There are some plugins that require extra steps after installation or update.
|
||||
In that case, use `do` option to describe the task to be performed.
|
||||
|
||||
```vim
|
||||
Plug 'Valloric/YouCompleteMe', { 'do': './install.sh' }
|
||||
```
|
||||
|
||||
If you need more control, you can pass a reference to a Vim function that
|
||||
takes a single argument.
|
||||
|
||||
```vim
|
||||
function! BuildYCM(info)
|
||||
" info is a dictionary with two fields
|
||||
" - name: name of the plugin
|
||||
" - status: 'installed' or 'updated'
|
||||
if a:info.status == 'installed'
|
||||
!./install.sh
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') }
|
||||
```
|
||||
|
||||
Both forms of post-update hook are executed inside the directory of the plugin.
|
||||
|
||||
Make sure to escape BARs when you write `do` option inline as they are
|
||||
mistakenly recognized as command separator for Plug command.
|
||||
|
||||
```vim
|
||||
Plug 'junegunn/fzf', { 'do': 'yes \| ./install' }
|
||||
```
|
||||
|
||||
But you can avoid the escaping if you extract the inline specification using a
|
||||
variable (or any Vimscript expression) as follows:
|
||||
|
||||
```vim
|
||||
let g:fzf_install = 'yes | ./install'
|
||||
Plug 'junegunn/fzf', { 'do': g:fzf_install }
|
||||
```
|
||||
|
||||
### Articles
|
||||
|
||||
- [Writing my own Vim plugin manager](http://junegunn.kr/2013/09/writing-my-own-vim-plugin-manager)
|
||||
- [Thoughts on Vim plugin dependency](http://junegunn.kr/2013/09/thoughts-on-vim-plugin-dependency)
|
||||
- *Support for Plugfile has been removed since 0.5.0*
|
||||
- [Vim plugins and startup time](http://junegunn.kr/2014/07/vim-plugins-and-startup-time)
|
||||
|
||||
### FAQ/Troubleshooting
|
||||
|
||||
@@ -132,6 +202,15 @@ removed that version of Ruby.
|
||||
resolve the problem. In the meantime, you can set `g:plug_threads` to 1, so that
|
||||
Ruby installer is not used at all.
|
||||
|
||||
#### Errors on fish shell
|
||||
|
||||
If vim-plug doesn't work correctly on fish shell, you might need to add `set
|
||||
shell=/bin/sh` to your .vimrc.
|
||||
|
||||
Refer to the following links for the details:
|
||||
- http://badsimplicity.com/vim-fish-e484-cant-open-file-tmpvrdnvqe0-error/
|
||||
- https://github.com/junegunn/vim-plug/issues/12
|
||||
|
||||
#### Freezing plugin version with commit hash
|
||||
|
||||
vim-plug does not allow you to freeze the version of a plugin with its commit
|
||||
@@ -149,17 +228,14 @@ it as "unstable" or "in development", and always use its latest revision.
|
||||
If you really must choose a certain untagged revision, consider forking the
|
||||
repository.
|
||||
|
||||
### Regarding feature request
|
||||
#### Migrating from other plugin managers
|
||||
|
||||
You may submit a request for a new feature by [creating an
|
||||
issue](https://github.com/junegunn/vim-plug/issues). However, please be minded
|
||||
that this is an opinionated software and I want to keep the feature set as small
|
||||
as possible. So I may not agree with you on the necessity of the suggested
|
||||
feature. If that happens, I suggest the following options.
|
||||
vim-plug does not require any extra statement other than `plug#begin()` and
|
||||
`plug#end()`. You can remove `filetype off`, `filetype plugin indent on` and
|
||||
`syntax on` from your .vimrc as they are automatically handled by
|
||||
`plug#end()`.
|
||||
|
||||
1. Check out [Vundle](https://github.com/gmarik/vundle) or
|
||||
[NeoBundle](https://github.com/Shougo/neobundle.vim).
|
||||
They offer broader feature sets.
|
||||
2. Create a fork of this project and let it be your own plugin manager.
|
||||
There's no need for us to have a single canonical branch.
|
||||
### License
|
||||
|
||||
MIT
|
||||
|
||||
|
||||
BIN
gif/Plugfile.gif
|
Before Width: | Height: | Size: 528 KiB |
BIN
gif/parallel.gif
|
Before Width: | Height: | Size: 306 KiB |
BIN
gif/pi.gif
|
Before Width: | Height: | Size: 922 KiB |
BIN
gif/pu.gif
|
Before Width: | Height: | Size: 247 KiB |
BIN
gif/serial.gif
|
Before Width: | Height: | Size: 650 KiB |
BIN
gif/si.gif
|
Before Width: | Height: | Size: 1.1 MiB |
BIN
gif/su.gif
|
Before Width: | Height: | Size: 521 KiB |
BIN
gif/vim-plug.gif
|
Before Width: | Height: | Size: 2.3 MiB |
@@ -7,8 +7,10 @@ Test cases for vim-plug
|
||||
|
||||
### Run
|
||||
|
||||
```vim
|
||||
:e workflow.vader | Vader
|
||||
```
|
||||
./run
|
||||
|
||||
./run !
|
||||
```
|
||||
|
||||
### TODO
|
||||
@@ -18,7 +20,6 @@ Test cases for the following features are currently missing:
|
||||
- Output formatting
|
||||
- Timeout or interrupt cleaning up git processes
|
||||
- User prompt in PlugClean command
|
||||
- Automatic dependency resolution using Plugfile
|
||||
- Single-threaded installer
|
||||
- Windows support
|
||||
|
||||
|
||||
27
test/run
@@ -5,15 +5,24 @@ cd ..
|
||||
PLUG_SRC=$(pwd)/plug.vim
|
||||
cd - > /dev/null
|
||||
|
||||
export VADER_RTP=$TMPDIR/vader-rtp
|
||||
vim -e +Vader -c ':call writefile([fnamemodify(globpath(&rtp, "autoload/vader.vim"), ":h:h")], $VADER_RTP)' +q
|
||||
if [ ! -d vader.vim ]; then
|
||||
git clone https://github.com/junegunn/vader.vim.git
|
||||
fi
|
||||
|
||||
MINI_VIMRC=$TMPDIR/mini-vimrc
|
||||
cat > $MINI_VIMRC << EOF
|
||||
let \$MYVIMRC = '$MINI_VIMRC'
|
||||
set nocompatible
|
||||
set rtp=$(cat $VADER_RTP)
|
||||
rm -rf fzf
|
||||
if [ ! -d fzf-staged ]; then
|
||||
git clone https://github.com/junegunn/fzf.git fzf-staged
|
||||
fi
|
||||
|
||||
cat > /tmp/mini-vimrc << VIMRC
|
||||
set rtp+=vader.vim
|
||||
source $PLUG_SRC
|
||||
EOF
|
||||
VIMRC
|
||||
|
||||
if [ "$1" = '!' ]; then
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader! workflow.vader' > /dev/null &&
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'let g:plug_threads = 1 | Vader! workflow.vader' > /dev/null
|
||||
else
|
||||
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader workflow.vader'
|
||||
fi
|
||||
|
||||
vim -u $MINI_VIMRC +Vader*
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
Execute (Initialize test environment):
|
||||
Save &rtp, g:plug_home, $MYVIMRC
|
||||
Save &rtp, g:plugs, g:plug_home, $MYVIMRC
|
||||
|
||||
let first_rtp = split(&rtp, ',')[0]
|
||||
let last_rtp = split(&rtp, ',')[-1]
|
||||
|
||||
let vader = fnamemodify(globpath(&rtp, 'autoload/vader.vim'), ':h:h')
|
||||
let plug = fnamemodify(globpath(&rtp, 'autoload/plug.vim'), ':h:h')
|
||||
@@ -13,6 +16,22 @@ Execute (Initialize test environment):
|
||||
|
||||
set t_Co=256
|
||||
colo default
|
||||
pclose
|
||||
|
||||
function! PlugStatusSorted()
|
||||
PlugStatus
|
||||
%y
|
||||
q
|
||||
normal! P
|
||||
%sort
|
||||
g/^$/d
|
||||
endfunction
|
||||
|
||||
function! AssertExpect(bang, pat, cnt)
|
||||
let op = a:bang ? '==' : '=~'
|
||||
AssertEqual a:cnt, len(filter(getline(1, '$'), "v:val ".op." '".a:pat."'"))
|
||||
endfunction
|
||||
command! -nargs=+ -bang AssertExpect call AssertExpect('<bang>' == '!', <args>)
|
||||
|
||||
let g:vimrc_reloaded = 0
|
||||
let vimrc = tempname()
|
||||
@@ -20,12 +39,10 @@ Execute (Initialize test environment):
|
||||
let $MYVIMRC = vimrc
|
||||
|
||||
Execute (plug#end() before plug#begin() should fail):
|
||||
try
|
||||
call plug#end()
|
||||
Assert 0, 'should not reach here'
|
||||
catch
|
||||
Assert stridx(v:exception, 'Call plug#begin() first') >= 0
|
||||
endtry
|
||||
redir => out
|
||||
AssertEqual 0, plug#end()
|
||||
redir END
|
||||
Assert stridx(out, 'Call plug#begin() first') >= 0
|
||||
|
||||
Execute (plug#begin() without path argument):
|
||||
call plug#begin()
|
||||
@@ -35,12 +52,10 @@ Execute (plug#begin() without path argument):
|
||||
Execute (plug#begin() without path argument with empty &rtp):
|
||||
let save_rtp = &rtp
|
||||
set rtp=
|
||||
try
|
||||
call plug#begin()
|
||||
Assert 0, 'should not reach here'
|
||||
catch
|
||||
Assert stridx(v:exception, 'Unable to determine plug home') >= 0, 'Got: '.v:exception
|
||||
endtry
|
||||
redir => out
|
||||
AssertEqual 0, plug#begin()
|
||||
redir END
|
||||
Assert stridx(out, 'Unable to determine plug home') >= 0
|
||||
let &rtp = save_rtp
|
||||
|
||||
Execute (plug#begin(path)):
|
||||
@@ -58,14 +73,26 @@ Execute (Subsequent plug#begin() calls will reuse g:plug_home):
|
||||
|
||||
Execute (Test Plug command):
|
||||
" Git repo with branch
|
||||
Plug 'junegunn/seoul256.vim', 'no-t_co'
|
||||
Plug 'junegunn/seoul256.vim', 'yes-t_co'
|
||||
AssertEqual 'https://git:@github.com/junegunn/seoul256.vim.git', g:plugs['seoul256.vim'].uri
|
||||
AssertEqual join([temp_plugged, 'seoul256.vim/'], '/'), g:plugs['seoul256.vim'].dir
|
||||
AssertEqual 'yes-t_co', g:plugs['seoul256.vim'].branch
|
||||
|
||||
Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co' } " Using branch option
|
||||
AssertEqual 'no-t_co', g:plugs['seoul256.vim'].branch
|
||||
|
||||
" Git repo with tag
|
||||
Plug 'junegunn/goyo.vim', '1.5.2'
|
||||
AssertEqual 'https://git:@github.com/junegunn/goyo.vim.git', g:plugs['goyo.vim'].uri
|
||||
AssertEqual join([temp_plugged, 'goyo.vim/'], '/'), g:plugs['goyo.vim'].dir
|
||||
AssertEqual '1.5.2', g:plugs['goyo.vim'].branch
|
||||
|
||||
Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } " Using tag option
|
||||
AssertEqual '1.5.3', g:plugs['goyo.vim'].branch
|
||||
|
||||
" Git URI
|
||||
Plug 'git@github.com:junegunn/vim-emoji.git'
|
||||
AssertEqual 'git@github.com:junegunn/vim-emoji.git', g:plugs['vim-emoji'].uri
|
||||
Plug 'https://bitbucket.org/junegunn/vim-emoji.git'
|
||||
AssertEqual 'https://bitbucket.org/junegunn/vim-emoji.git', g:plugs['vim-emoji'].uri
|
||||
AssertEqual 'master', g:plugs['vim-emoji'].branch
|
||||
AssertEqual join([temp_plugged, 'vim-emoji/'], '/'), g:plugs['vim-emoji'].dir
|
||||
|
||||
@@ -74,28 +101,32 @@ Execute (Test Plug command):
|
||||
AssertEqual 'https://git:@github.com/vim-scripts/beauty256.git', g:plugs.beauty256.uri
|
||||
AssertEqual 'master', g:plugs.beauty256.branch
|
||||
|
||||
AssertEqual 3, len(g:plugs)
|
||||
AssertEqual 4, len(g:plugs)
|
||||
|
||||
Execute (Plug command with dictionary option):
|
||||
Log string(g:plugs)
|
||||
Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co', 'rtp': '././' }
|
||||
AssertEqual join([temp_plugged, 'seoul256.vim/'], '/'), g:plugs['seoul256.vim'].dir
|
||||
AssertEqual '././', g:plugs['seoul256.vim'].rtp
|
||||
|
||||
AssertEqual 3, len(g:plugs)
|
||||
Log string(g:plugs)
|
||||
AssertEqual 4, len(g:plugs)
|
||||
|
||||
Execute (PlugStatus before installation):
|
||||
PlugStatus
|
||||
AssertEqual 3, len(filter(getline(1, line('$')), 'v:val =~ "Not found"'))
|
||||
AssertExpect 'Not found', 4
|
||||
q
|
||||
|
||||
Execute (PlugClean before installation):
|
||||
PlugClean
|
||||
AssertEqual 1, len(filter(getline(1, line('$')), 'v:val =~ "Already clean"'))
|
||||
AssertExpect 'Already clean', 1
|
||||
q
|
||||
|
||||
Execute (plug#end() updates &rtp):
|
||||
call plug#end()
|
||||
Assert len(&rtp) > len(basertp)
|
||||
AssertEqual first_rtp, split(&rtp, ',')[0]
|
||||
AssertEqual last_rtp, split(&rtp, ',')[-1]
|
||||
|
||||
Execute (Yet, plugins are not available):
|
||||
Assert empty(globpath(&rtp, 'autoload/emoji.vim'))
|
||||
@@ -110,47 +141,63 @@ Execute (Plugin available after installation):
|
||||
|
||||
Execute (PlugClean after installation):
|
||||
PlugClean
|
||||
AssertEqual 1, len(filter(getline(1, line('$')), 'v:val =~ "Already clean"'))
|
||||
AssertExpect 'Already clean', 1
|
||||
q
|
||||
|
||||
Execute (PlugStatus after installation):
|
||||
PlugStatus
|
||||
AssertEqual 3, len(filter(getline(1, line('$')), 'v:val =~ "OK"'))
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'OK', 4
|
||||
q
|
||||
|
||||
Execute (Change tag of goyo.vim):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/goyo.vim'
|
||||
call plug#end()
|
||||
|
||||
Execute (PlugStatus):
|
||||
call PlugStatusSorted()
|
||||
|
||||
Expect:
|
||||
Invalid branch/tag: 1.5.3 (expected: master). Try PlugUpdate.
|
||||
Finished. 1 error(s).
|
||||
[=]
|
||||
x goyo.vim:
|
||||
|
||||
Execute (PlugUpdate to set the right branch):
|
||||
PlugUpdate
|
||||
call PlugStatusSorted()
|
||||
AssertEqual 2, g:vimrc_reloaded
|
||||
|
||||
Expect:
|
||||
- goyo.vim: OK
|
||||
Finished. 0 error(s).
|
||||
[=]
|
||||
|
||||
Execute (Change branch of seoul256.vim):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/seoul256.vim'
|
||||
Plug 'git@github.com:junegunn/vim-emoji.git'
|
||||
Plug 'https://bitbucket.org/junegunn/vim-emoji.git'
|
||||
call plug#end()
|
||||
|
||||
Execute (PlugStatus):
|
||||
PlugStatus
|
||||
%y
|
||||
q
|
||||
normal! P
|
||||
%sort
|
||||
g/^$/d
|
||||
call PlugStatusSorted()
|
||||
|
||||
Expect:
|
||||
Invalid branch: no-t_co. Try PlugUpdate.
|
||||
Invalid branch/tag: no-t_co (expected: master). Try PlugUpdate.
|
||||
- vim-emoji: OK
|
||||
Finished. 1 error(s).
|
||||
[==]
|
||||
x seoul256.vim:
|
||||
|
||||
Execute (Change URI of seoul256.vim):
|
||||
call plug#begin()
|
||||
Plug 'junegunn.choi/seoul256.vim'
|
||||
Plug 'git@github.com:junegunn/vim-emoji.git'
|
||||
Plug 'https://bitbucket.org/junegunn/vim-emoji.git'
|
||||
call plug#end()
|
||||
|
||||
Execute (PlugStatus):
|
||||
PlugStatus
|
||||
%y
|
||||
q
|
||||
normal! P
|
||||
%sort
|
||||
g/^$/d
|
||||
call PlugStatusSorted()
|
||||
|
||||
Expect:
|
||||
Expected: https://git:@github.com/junegunn.choi/seoul256.vim.git
|
||||
@@ -158,6 +205,7 @@ Expect:
|
||||
PlugClean required.
|
||||
- vim-emoji: OK
|
||||
Finished. 1 error(s).
|
||||
[==]
|
||||
x seoul256.vim:
|
||||
|
||||
# TODO: does not work due to inputsave()
|
||||
@@ -169,7 +217,9 @@ Expect:
|
||||
|
||||
Execute (PlugClean! to remove seoul256.vim):
|
||||
PlugClean!
|
||||
AssertEqual 1, len(filter(getline(1, line('$')), 'v:val =~ "Removed"'))
|
||||
" Three removed, emoji left
|
||||
AssertExpect '^- ', 3
|
||||
AssertExpect 'Removed', 1
|
||||
Assert empty(globpath(&rtp, 'colors/seoul256.vim'))
|
||||
Assert !empty(globpath(&rtp, 'autoload/emoji.vim'))
|
||||
q
|
||||
@@ -181,50 +231,471 @@ Execute (Change GIT URI of vim-emoji):
|
||||
call plug#end()
|
||||
|
||||
Execute (PlugStatus):
|
||||
PlugStatus
|
||||
%y
|
||||
q
|
||||
normal! P
|
||||
%sort
|
||||
g/^$/d
|
||||
call PlugStatusSorted()
|
||||
|
||||
Expect:
|
||||
Expected: https://git:@github.com/junegunn/vim-emoji.git
|
||||
Invalid URI: git@github.com:junegunn/vim-emoji.git
|
||||
Invalid URI: https://bitbucket.org/junegunn/vim-emoji.git
|
||||
Not found. Try PlugInstall.
|
||||
PlugClean required.
|
||||
Finished. 2 error(s).
|
||||
[==]
|
||||
x seoul256.vim:
|
||||
x vim-emoji:
|
||||
|
||||
Execute (PlugClean! to remove vim-emoji):
|
||||
PlugClean!
|
||||
AssertEqual 1, len(filter(getline(1, line('$')), 'v:val =~ "Removed"'))
|
||||
AssertExpect '^- ', 1
|
||||
AssertExpect 'Removed', 1
|
||||
Assert empty(globpath(&rtp, 'colors/seoul256.vim'))
|
||||
Assert empty(globpath(&rtp, 'autoload/emoji.vim'))
|
||||
q
|
||||
|
||||
Execute (PlugUpdate to install both again):
|
||||
PlugUpdate
|
||||
AssertEqual 2, len(filter(getline(1, line('$')), 'v:val =~ "Cloning into"'))
|
||||
AssertEqual 2, g:vimrc_reloaded
|
||||
AssertExpect '^- [^:]*:', 2
|
||||
AssertEqual 3, g:vimrc_reloaded
|
||||
Assert !empty(globpath(&rtp, 'colors/seoul256.vim')), 'seoul256.vim should be found'
|
||||
Assert !empty(globpath(&rtp, 'autoload/emoji.vim')), 'vim-emoji should be found'
|
||||
q
|
||||
|
||||
Execute (PlugUpdate only to find out plugins are up-to-date):
|
||||
Execute (PlugUpdate only to find out plugins are up-to-date, D key to check):
|
||||
PlugUpdate
|
||||
AssertEqual 2, len(filter(getline(1, line('$')), 'v:val =~ "Already up-to-date"'))
|
||||
AssertEqual 3, g:vimrc_reloaded
|
||||
AssertExpect 'Already up-to-date', 2
|
||||
AssertEqual 4, g:vimrc_reloaded
|
||||
normal D
|
||||
AssertEqual 'No updates.', getline(1)
|
||||
q
|
||||
|
||||
Execute (PlugDiff - 'No updates.'):
|
||||
PlugDiff
|
||||
AssertEqual 'No updates.', getline(1)
|
||||
q
|
||||
|
||||
Execute (Rollback recent updates, PlugUpdate, then PlugDiff):
|
||||
for repo in ['seoul256.vim', 'vim-emoji']
|
||||
call system(printf('cd %s/%s && git reset HEAD^^ --hard', g:plug_home, repo))
|
||||
endfor
|
||||
PlugUpdate
|
||||
|
||||
" Now we have updates
|
||||
normal D
|
||||
AssertEqual 'Last update:', getline(1)
|
||||
|
||||
" Preview commit
|
||||
silent! wincmd P
|
||||
AssertEqual 0, &previewwindow
|
||||
|
||||
" ]] motion
|
||||
execute 'normal ]]'
|
||||
let lnum = line('.')
|
||||
AssertEqual 3, col('.')
|
||||
|
||||
" Open commit preview
|
||||
execute "normal j\<cr>"
|
||||
wincmd P
|
||||
AssertEqual 1, &previewwindow
|
||||
AssertEqual 'git', &filetype
|
||||
|
||||
" Back to plug window
|
||||
wincmd p
|
||||
|
||||
" ]] motion
|
||||
execute 'normal $]]'
|
||||
AssertEqual lnum + 4, line('.')
|
||||
AssertEqual 3, col('.')
|
||||
|
||||
" [[ motion
|
||||
execute 'normal 0[['
|
||||
AssertEqual lnum, line('.')
|
||||
AssertEqual 3, col('.')
|
||||
|
||||
" q will close preview window as well
|
||||
normal q
|
||||
|
||||
" We no longer have preview window
|
||||
silent! wincmd P
|
||||
AssertEqual 0, &previewwindow
|
||||
|
||||
" q should not close preview window if it's already open
|
||||
pedit
|
||||
PlugDiff
|
||||
execute "normal ]]j\<cr>"
|
||||
normal q
|
||||
|
||||
silent! wincmd P
|
||||
AssertEqual 1, &previewwindow
|
||||
pclose
|
||||
|
||||
Execute (Plug window in a new tab):
|
||||
PlugDiff
|
||||
tab new new-tab
|
||||
set buftype=nofile
|
||||
PlugUpdate
|
||||
normal D
|
||||
AssertEqual 'No updates.', getline(1)
|
||||
q
|
||||
AssertEqual 'new-tab', expand('%')
|
||||
q
|
||||
q
|
||||
|
||||
**********************************************************************
|
||||
~ On-demand loading / Partial installation/update ~
|
||||
**********************************************************************
|
||||
|
||||
Execute (Trying to execute on-demand commands when plugin is not installed):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align', { 'on': ['EasyAlign', 'LiveEasyAlign'] }
|
||||
call plug#end()
|
||||
|
||||
Assert exists(':EasyAlign')
|
||||
Assert exists(':LiveEasyAlign')
|
||||
AssertThrows EasyAlign
|
||||
AssertThrows LiveEasyAlign
|
||||
Assert !exists(':EasyAlign')
|
||||
Assert !exists(':LiveEasyAlign')
|
||||
|
||||
Execute (New set of plugins):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-fnr'
|
||||
Plug 'junegunn/vim-pseudocl'
|
||||
Plug 'junegunn/vim-easy-align', { 'on': 'EasyAlign' }
|
||||
Plug 'junegunn/vim-redis', { 'for': 'redis' }
|
||||
call plug#end()
|
||||
|
||||
Execute (Check commands):
|
||||
Assert !exists(':FNR'), 'FNR command should not be found'
|
||||
Assert !exists(':RedisExecute'), 'RedisExecute command should not be found'
|
||||
|
||||
Execute (Partial PlugInstall):
|
||||
PlugInstall vim-fnr vim-easy-align
|
||||
AssertExpect 'vim-fnr', 1
|
||||
q
|
||||
|
||||
PlugInstall vim-fnr vim-easy-align 1
|
||||
AssertExpect 'vim-fnr', 1
|
||||
AssertExpect 'vim-easy-align', 1
|
||||
AssertEqual first_rtp, split(&rtp, ',')[0]
|
||||
AssertEqual last_rtp, split(&rtp, ',')[-1]
|
||||
q
|
||||
|
||||
Given (Unaligned code):
|
||||
a=1
|
||||
aa=2
|
||||
|
||||
Execute (Check installed plugins):
|
||||
Assert exists(':FNR'), 'FNR command should be found'
|
||||
Assert exists(':EasyAlign'), 'EasyAlign command should be found'
|
||||
Assert !exists(':RedisExecute'), 'RedisExecute command still should not be found'
|
||||
%EasyAlign=
|
||||
|
||||
Expect (Aligned code):
|
||||
a = 1
|
||||
aa = 2
|
||||
|
||||
Given:
|
||||
Execute (Partial PlugUpdate):
|
||||
PlugUpdate vim-redis
|
||||
q
|
||||
|
||||
Execute (On-demand loading based on filetypes):
|
||||
Assert !exists(':RedisExecute'), 'RedisExecute command still should not be found'
|
||||
set ft=redis
|
||||
Assert exists(':RedisExecute'), 'RedisExecute command is now found'
|
||||
|
||||
**********************************************************************
|
||||
~ Local (unmanaged) plugins
|
||||
**********************************************************************
|
||||
|
||||
Execute (Add unmanaged plugin):
|
||||
let fzf = fnamemodify(g:vader_file, ':h') . '/fzf'
|
||||
Log fzf
|
||||
|
||||
call plug#begin()
|
||||
Plug fzf, { 'on': 'SomeCommand' }
|
||||
call plug#end()
|
||||
|
||||
" Check uri field
|
||||
Assert !has_key(g:plugs.fzf, 'uri'), 'Should not have uri field'
|
||||
|
||||
" Check dir field
|
||||
AssertEqual fzf.'/', g:plugs.fzf.dir
|
||||
|
||||
" Trailing slashes and backslashes should be stripped
|
||||
for suffix in ['///', '/\/\/']
|
||||
call plug#begin()
|
||||
Plug fzf.suffix, { 'on': 'SomeCommand' }
|
||||
call plug#end()
|
||||
|
||||
" Check dir field
|
||||
AssertEqual fzf.'/', g:plugs.fzf.dir
|
||||
endfor
|
||||
|
||||
Execute (Plug block for following tests):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
Plug fzf, { 'on': 'SomeCommand' }
|
||||
call plug#end()
|
||||
" Remove plugins from previous tests
|
||||
PlugClean!
|
||||
|
||||
Execute (PlugInstall will only install vim-easy-align):
|
||||
PlugInstall
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'fzf', 0
|
||||
q
|
||||
|
||||
Execute (PlugUpdate will only update vim-easy-align):
|
||||
PlugUpdate
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'fzf', 0
|
||||
q
|
||||
|
||||
Execute (PlugClean should not care about unmanaged plugins):
|
||||
PlugClean
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'fzf', 0
|
||||
q
|
||||
|
||||
Execute (PlugStatus should point out that the plugin is missing):
|
||||
PlugStatus
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'x fzf', 1
|
||||
AssertExpect 'Not found', 1
|
||||
q
|
||||
|
||||
Execute (Deploy unmanaged plugin):
|
||||
Assert !exists(':FZF'), ':FZF command should not exist'
|
||||
call rename('fzf-staged', 'fzf')
|
||||
|
||||
Execute (PlugUpdate still should not care):
|
||||
PlugUpdate
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'fzf', 0
|
||||
q
|
||||
|
||||
Execute (PlugStatus with no error):
|
||||
PlugStatus
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'x fzf', 0
|
||||
AssertExpect 'Not found', 0
|
||||
q
|
||||
|
||||
Execute (Check &rtp after SomeCommand):
|
||||
Log &rtp
|
||||
Assert &rtp !~ 'fzf'
|
||||
silent! SomeCommand
|
||||
Assert &rtp =~ 'fzf'
|
||||
AssertEqual first_rtp, split(&rtp, ',')[0]
|
||||
AssertEqual last_rtp, split(&rtp, ',')[-1]
|
||||
|
||||
Execute (Common parent):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-pseudocl'
|
||||
Plug 'junegunn/vim-fnr'
|
||||
Plug 'junegunn/vim-oblique'
|
||||
call plug#end()
|
||||
|
||||
PlugInstall
|
||||
Log getline(1, '$')
|
||||
AssertExpect! '[===]', 1
|
||||
q
|
||||
|
||||
**********************************************************************
|
||||
~ Frozen plugins
|
||||
**********************************************************************
|
||||
|
||||
Execute (Frozen plugin are not installed nor updated):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align', { 'frozen': 1 }
|
||||
call plug#end()
|
||||
|
||||
redir => output
|
||||
silent PlugInstall
|
||||
redir END
|
||||
Assert output =~ 'No plugin to install'
|
||||
|
||||
redir => output
|
||||
silent PlugUpdate
|
||||
redir END
|
||||
Assert output =~ 'No plugin to update'
|
||||
|
||||
Execute (But you can still install it if the name is given as the argument):
|
||||
PlugInstall vim-easy-align
|
||||
Log getline(1, '$')
|
||||
AssertEqual 1, len(filter(getline(1, '$'), 'v:val =~ "vim-easy-align"'))
|
||||
q
|
||||
|
||||
PlugUpdate vim-easy-align
|
||||
Log getline(1, '$')
|
||||
AssertEqual 1, len(filter(getline(1, '$'), 'v:val =~ "vim-easy-align"'))
|
||||
q
|
||||
|
||||
**********************************************************************
|
||||
~ Retry
|
||||
**********************************************************************
|
||||
|
||||
Execute (Retry failed tasks):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
Plug 'junegunn/aaaaaaaaaaaaaa'
|
||||
call plug#end()
|
||||
|
||||
PlugInstall
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'x aaa', 1
|
||||
AssertExpect '- vim-easy-align', 1
|
||||
normal R
|
||||
Log getline(1, '$')
|
||||
AssertExpect 'x aaa', 1
|
||||
AssertExpect '- vim-easy-align', 0
|
||||
AssertExpect! '[x]', 1
|
||||
q
|
||||
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
Plug 'junegunn/aaaaaaaaaaaaaa'
|
||||
Plug 'junegunn/bbbbbbbbbbbbbb'
|
||||
Plug 'junegunn/cccccccccccccc'
|
||||
call plug#end()
|
||||
|
||||
" Ruby installer
|
||||
PlugUpdate
|
||||
normal R
|
||||
AssertExpect '- vim-easy-align', 0
|
||||
AssertExpect! '[xxx]', 1
|
||||
q
|
||||
|
||||
" Vim installer
|
||||
PlugUpdate 1
|
||||
normal R
|
||||
AssertExpect '- vim-easy-align', 0
|
||||
AssertExpect! '[xxx]', 1
|
||||
q
|
||||
|
||||
**********************************************************************
|
||||
~ Post-update hook (`do` option)
|
||||
**********************************************************************
|
||||
|
||||
Execute (Cleanup):
|
||||
call plug#begin()
|
||||
call plug#end()
|
||||
PlugClean!
|
||||
|
||||
Execute (On install):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align', { 'do': 'touch installed' }
|
||||
Plug 'junegunn/vim-pseudocl'
|
||||
call plug#end()
|
||||
|
||||
PlugInstall
|
||||
q
|
||||
|
||||
Assert filereadable(g:plugs['vim-easy-align'].dir.'/installed'),
|
||||
\ 'vim-easy-align/installed should exist'
|
||||
Assert !filereadable(g:plugs['vim-pseudocl'].dir.'/installed'),
|
||||
\ 'vim-pseudocl/installed should not exist'
|
||||
|
||||
Execute (On update):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align', { 'do': 'touch updated' }
|
||||
Plug 'junegunn/vim-pseudocl', { 'do': 'touch updated' }
|
||||
call plug#end()
|
||||
|
||||
" Reset for updates
|
||||
call system('cd '.g:plugs['vim-pseudocl'].dir.' && git reset --hard HEAD^')
|
||||
|
||||
PlugUpdate
|
||||
Log getline(1, '$')
|
||||
q
|
||||
|
||||
Assert !filereadable(g:plugs['vim-easy-align'].dir.'/updated'),
|
||||
\ 'vim-easy-align/updated should not exist'
|
||||
Assert filereadable(g:plugs['vim-pseudocl'].dir.'/updated'),
|
||||
\ 'vim-pseudocl/updated should exist'
|
||||
|
||||
Execute (When already installed):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align', { 'do': 'touch installed2' }
|
||||
Plug 'junegunn/vim-pseudocl', { 'do': 'touch installed2' }
|
||||
call plug#end()
|
||||
|
||||
PlugInstall
|
||||
q
|
||||
Assert !filereadable(g:plugs['vim-easy-align'].dir.'/installed2'),
|
||||
\ 'vim-easy-align/installed2 should not exist'
|
||||
Assert !filereadable(g:plugs['vim-pseudocl'].dir.'/installed2'),
|
||||
\ 'vim-pseudocl/installed2 should exist'
|
||||
|
||||
Execute (When already updated):
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align', { 'do': 'touch updated2' }
|
||||
Plug 'junegunn/vim-pseudocl', { 'do': 'touch updated2' }
|
||||
call plug#end()
|
||||
|
||||
PlugUpdate
|
||||
q
|
||||
Assert !filereadable(g:plugs['vim-easy-align'].dir.'/updated2'),
|
||||
\ 'vim-easy-align/updated2 should not exist'
|
||||
Assert !filereadable(g:plugs['vim-pseudocl'].dir.'/updated2'),
|
||||
\ 'vim-pseudocl/updated2 should exist'
|
||||
|
||||
Execute (Using Funcref):
|
||||
function! PlugUpdated(info)
|
||||
call system('touch '. a:info.name . a:info.status . len(a:info))
|
||||
endfunction
|
||||
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align', { 'do': function('PlugUpdated') }
|
||||
Plug 'junegunn/vim-pseudocl', { 'do': function('PlugUpdated') }
|
||||
call plug#end()
|
||||
|
||||
call system('cd '.g:plugs['vim-easy-align'].dir.' && git reset --hard HEAD^')
|
||||
call system('rm -rf '.g:plugs['vim-pseudocl'].dir)
|
||||
|
||||
PlugUpdate
|
||||
Log getline(1, '$')
|
||||
q
|
||||
Assert filereadable(g:plugs['vim-easy-align'].dir.'/vim-easy-alignupdated2'),
|
||||
\ 'vim-easy-align/vim-easy-alignupdated2 should exist'
|
||||
Assert filereadable(g:plugs['vim-pseudocl'].dir.'/vim-pseudoclinstalled2'),
|
||||
\ 'vim-pseudocl/vim-pseudoclinstalled2 should exist'
|
||||
|
||||
|
||||
**********************************************************************
|
||||
~ Overriding `dir`
|
||||
**********************************************************************
|
||||
|
||||
Execute (Using custom dir):
|
||||
Assert isdirectory(g:plugs['vim-easy-align'].dir)
|
||||
|
||||
call system('rm -rf '.$TMPDIR.'easy-align')
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-easy-align', { 'dir': $TMPDIR.'easy-align' }
|
||||
call plug#end()
|
||||
AssertEqual $TMPDIR.'easy-align/', g:plugs['vim-easy-align'].dir
|
||||
|
||||
PlugClean!
|
||||
Assert !isdirectory(g:plugs['vim-easy-align'].dir)
|
||||
q
|
||||
|
||||
PlugInstall
|
||||
q
|
||||
Assert isdirectory(g:plugs['vim-easy-align'].dir)
|
||||
|
||||
Execute (Cleanup):
|
||||
call system('rm -rf '.temp_plugged)
|
||||
call rename('fzf', 'fzf-staged')
|
||||
|
||||
unlet g:plugs
|
||||
unlet g:plug_home
|
||||
unlet g:vimrc_reloaded
|
||||
unlet temp_plugged vader plug basertp save_rtp
|
||||
unlet temp_plugged vader plug basertp save_rtp repo lnum fzf out
|
||||
delf PlugStatusSorted
|
||||
delf AssertExpect
|
||||
delf PlugUpdated
|
||||
delc AssertExpect
|
||||
unmap /
|
||||
unmap ?
|
||||
|
||||
Restore
|
||||
source $MYVIMRC
|
||||
|
||||