1
- plug.txt plug Last change: November 27 2017
1
+ plug.txt plug Last change: January 3 2022
2
2
PLUG - TABLE OF CONTENTS *plug* *plug-toc*
3
3
==============================================================================
4
4
@@ -23,6 +23,7 @@ PLUG - TABLE OF CONTENTS *plug* *plug-to
23
23
Post-update hooks
24
24
PlugInstall! and PlugUpdate!
25
25
Articles
26
+ Collaborators
26
27
License
27
28
28
29
VIM-PLUG *vim-plug*
@@ -36,8 +37,8 @@ https://raw.githubusercontent.com/junegunn/i/master/vim-plug/installer.gif
36
37
< Pros. >_____________________________________________________________________~
37
38
*plug-pros*
38
39
39
- - Easier to setup : Single file. No boilerplate code required.
40
- - Easier to use: Concise, intuitive syntax
40
+ - Easy to set up : Single file. No boilerplate code required.
41
+ - Easy to use: Concise, intuitive syntax
41
42
- {Super-fast}{1} parallel installation/update (with any of `+ job` , `+ python ` ,
42
43
`+ python3 ` , `+ ruby ` , or {Neovim}{2} )
43
44
- Creates shallow clones to minimize disk space usage and download time
@@ -77,14 +78,8 @@ file as suggested {here}{5}.
77
78
78
79
>> Windows (PowerShell)~
79
80
>
80
- md ~\vimfiles\autoload
81
- $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
82
- (New-Object Net.WebClient).DownloadFile(
83
- $uri,
84
- $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(
85
- "~\vimfiles\autoload\plug.vim"
86
- )
87
- )
81
+ iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
82
+ ni $HOME/vimfiles/autoload/plug.vim -Force
88
83
<
89
84
90
85
Neovim~
@@ -93,20 +88,14 @@ Neovim~
93
88
94
89
>> Unix~
95
90
>
96
- curl -fLo ~ /.local/share/nvim/site/autoload/plug.vim --create-dirs \
97
- https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
91
+ sh -c ' curl -fLo "${XDG_DATA_HOME:-$HOME /.local/share}" /nvim/site/autoload/plug.vim --create-dirs \
92
+ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
98
93
<
99
94
100
95
>> Windows (PowerShell)~
101
96
>
102
- md ~\AppData\Local\nvim\autoload
103
- $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
104
- (New-Object Net.WebClient).DownloadFile(
105
- $uri,
106
- $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(
107
- "~\AppData\Local\nvim\autoload\plug.vim"
108
- )
109
- )
97
+ iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
98
+ ni "$(@($env:XDG_DATA_HOME, $env:LOCALAPPDATA)[$null -eq $env:XDG_DATA_HOME])/nvim-data/site/autoload/plug.vim" -Force
110
99
<
111
100
112
101
< Getting Help >______________________________________________________________~
@@ -127,12 +116,12 @@ Neovim~
127
116
< Usage >_____________________________________________________________________~
128
117
*plug-usage*
129
118
130
- Add a vim-plug section to your `~/.vimrc ` (or `~/. config/nvim/ init.vim ` for
131
- Neovim):
119
+ Add a vim-plug section to your `~/.vimrc ` (or `stdpath ( ' config' ) . ' / init.vim' ` for
120
+ Neovim)
132
121
133
122
*plug#begin* *plug#end*
134
123
135
- 1. Begin the section with `call plug#begin ()`
124
+ 1. Begin the section with `call plug#begin ([PLUGIN_DIR] )`
136
125
2. List the plugins with `Plug` commands
137
126
3. `call plug#end ()` to update 'runtimepath' and initialize plugin system
138
127
- Automatically executes `filetype plugin indent on ` and `syntax enable ` .
@@ -143,10 +132,14 @@ Neovim):
143
132
Example~
144
133
*plug-example*
145
134
>
146
- " Specify a directory for plugins
147
- " - For Neovim: ~/.local/share/nvim/plugged
148
- " - Avoid using standard Vim directory names like 'plugin'
149
- call plug#begin('~/.vim/plugged')
135
+ call plug#begin()
136
+ " The default plugin directory will be as follows:
137
+ " - Vim (Linux/macOS): '~/.vim/plugged'
138
+ " - Vim (Windows): '~/vimfiles/plugged'
139
+ " - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
140
+ " You can specify a custom plugin directory by passing it as the argument
141
+ " - e.g. `call plug#begin('~/.vim/plugged')`
142
+ " - Avoid using standard Vim directory names like 'plugin'
150
143
151
144
" Make sure you use single quotes
152
145
@@ -285,16 +278,16 @@ Reload .vimrc and `:PlugInstall` to install plugins.
285
278
Plug 'junegunn/goyo.vim', { 'for': 'markdown' }
286
279
autocmd! User goyo.vim echom 'Goyo is now loaded!'
287
280
<
288
- `for ` option is generally not needed as most plugins for specific file types
289
- usually don't have too much code in `plugin ` directory. You might want to
290
- examine the output of `vim -- startuptime` before applying the option.
281
+ The `for ` option is generally not needed as most plugins for specific file
282
+ types usually don't have too much code in the `plugin ` directory. You might
283
+ want to examine the output of `vim -- startuptime` before applying the option.
291
284
292
285
293
286
< Post-update hooks >_________________________________________________________~
294
287
*plug-post-update-hooks*
295
288
296
289
There are some plugins that require extra steps after installation or update.
297
- In that case, use `do ` option to describe the task to be performed.
290
+ In that case, use the `do ` option to describe the task to be performed.
298
291
>
299
292
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
300
293
Plug 'ycm-core/YouCompleteMe', { 'do': './install.py' }
@@ -325,9 +318,9 @@ and only run when the repository has changed, but you can force it to run
325
318
unconditionally with the bang-versions of the commands: `PlugInstall! ` and
326
319
`PlugUpdate! ` .
327
320
328
- Make sure to escape BARs and double-quotes when you write `do ` option inline
329
- as they are mistakenly recognized as command separator or the start of the
330
- trailing comment.
321
+ Make sure to escape BARs and double-quotes when you write the `do ` option
322
+ inline as they are mistakenly recognized as command separator or the start of
323
+ the trailing comment.
331
324
>
332
325
Plug 'junegunn/fzf', { 'do': 'yes \| ./install' }
333
326
<
@@ -351,7 +344,8 @@ The installer takes the following steps when installing/updating a plugin:
351
344
1. Update submodules
352
345
2. Execute post-update hooks
353
346
354
- The commands with `! ` suffix ensure that all steps are run unconditionally.
347
+ The commands with the `! ` suffix ensure that all steps are run
348
+ unconditionally.
355
349
356
350
357
351
< Articles >__________________________________________________________________~
@@ -367,6 +361,16 @@ The commands with `!` suffix ensure that all steps are run unconditionally.
367
361
{13} http://junegunn.kr/2013/09/thoughts-on-vim-plugin-dependency
368
362
369
363
364
+ < Collaborators >_____________________________________________________________~
365
+ *plug-collaborators*
366
+
367
+ - {Jan Edmund Lazo}{14} - Windows support
368
+ - {Jeremy Pallats}{15} - Python installer
369
+
370
+ {14} https://github.com/janlazo
371
+ {15} https://github.com/starcraftman
372
+
373
+
370
374
< License >___________________________________________________________________~
371
375
*plug-license*
372
376
0 commit comments