[nvim] switch to lazyvim
This commit is contained in:
parent
2605e59e3e
commit
f235ff87dc
@ -17,11 +17,6 @@ if ! [ -x "$(command -v zsh)" ]; then
|
|||||||
MISSING="${MISSING} zsh"
|
MISSING="${MISSING} zsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ -x "$(command -v nvim)" ]; then
|
|
||||||
echo "neovim manque et doit être installé"
|
|
||||||
MISSING="${MISSING} neovim python3-venv python3-neovim"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! [ -x "$(command -v exa)" ]; then
|
if ! [ -x "$(command -v exa)" ]; then
|
||||||
echo "exa manque et doit être installé"
|
echo "exa manque et doit être installé"
|
||||||
MISSING="${MISSING} exa"
|
MISSING="${MISSING} exa"
|
||||||
|
|||||||
BIN
dot_local/bin/executable_nvim
Executable file
BIN
dot_local/bin/executable_nvim
Executable file
Binary file not shown.
8
private_dot_config/nvim/.gitignore
vendored
Normal file
8
private_dot_config/nvim/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
tt.*
|
||||||
|
.tests
|
||||||
|
doc/tags
|
||||||
|
debug
|
||||||
|
.repro
|
||||||
|
foo.*
|
||||||
|
*.log
|
||||||
|
data
|
||||||
15
private_dot_config/nvim/.neoconf.json
Normal file
15
private_dot_config/nvim/.neoconf.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"sumneko_lua": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
201
private_dot_config/nvim/LICENSE
Normal file
201
private_dot_config/nvim/LICENSE
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
45
private_dot_config/nvim/README.md
Normal file
45
private_dot_config/nvim/README.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# LazyVim
|
||||||
|
|
||||||
|
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim)
|
||||||
|
|
||||||
|
## 🚀 Getting Started
|
||||||
|
|
||||||
|
This repo contains an example setup for
|
||||||
|
[LazyVim](https://github.com/LazyVim/LazyVim)
|
||||||
|
|
||||||
|
### 1. Make a backup of your current Neovim files:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mv ~/.config/nvim ~/.config/nvim.bak
|
||||||
|
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Clone the starter
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Start Neovim!
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
Refer to the comments in the files on how to customize **LazyVim**.
|
||||||
|
|
||||||
|
## 📂 File Structure
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
~/.config/nvim
|
||||||
|
├── lua
|
||||||
|
│ ├── config
|
||||||
|
│ │ ├── autocmds.lua
|
||||||
|
│ │ ├── keymaps.lua
|
||||||
|
│ │ ├── lazy.lua
|
||||||
|
│ │ └── options.lua
|
||||||
|
│ └── plugins
|
||||||
|
│ └── example.lua
|
||||||
|
├── init.lua
|
||||||
|
└── stylua.toml
|
||||||
|
</pre>
|
||||||
@ -1,38 +0,0 @@
|
|||||||
" Vim WriteRoom/DarkRoom/OmniWrite like colorscheme
|
|
||||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
|
||||||
" Last Change: 2012
|
|
||||||
|
|
||||||
set background=dark
|
|
||||||
hi clear
|
|
||||||
if exists("syntax_on")
|
|
||||||
syntax reset
|
|
||||||
endif
|
|
||||||
let g:colors_name="distractfree"
|
|
||||||
|
|
||||||
hi Statement ctermfg=DarkCyan ctermbg=Black guifg=DarkCyan guibg=Black
|
|
||||||
hi Constant ctermfg=DarkCyan ctermbg=Black guifg=DarkCyan guibg=Black
|
|
||||||
hi Identifier ctermfg=Green ctermbg=Black guifg=Green guibg=Black
|
|
||||||
hi Type ctermfg=DarkCyan ctermbg=Black guifg=DarkCyan guibg=Black
|
|
||||||
hi String ctermfg=Cyan ctermbg=Black guifg=Cyan guibg=Black
|
|
||||||
hi Boolean ctermfg=DarkCyan ctermbg=Black guifg=DarkCyan guibg=Black
|
|
||||||
hi Number ctermfg=DarkCyan ctermbg=Black guifg=DarkCyan guibg=Black
|
|
||||||
hi Special ctermfg=DarkGreen ctermbg=Black guifg=darkGreen guibg=Black
|
|
||||||
hi Scrollbar ctermfg=DarkCyan ctermbg=Black guifg=DarkCyan guibg=Black
|
|
||||||
hi Cursor ctermfg=Black ctermbg=Green guifg=Black guibg=Green
|
|
||||||
hi WarningMsg ctermfg=Yellow ctermbg=Black guifg=Yellow guibg=Black
|
|
||||||
hi Directory ctermfg=Green ctermbg=DarkBlue guifg=Green guibg=DarkBlue
|
|
||||||
hi Title ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue
|
|
||||||
hi Cursorline ctermfg=Black ctermbg=DarkGreen guibg=darkGreen guifg=black
|
|
||||||
hi Normal ctermfg=Green ctermbg=Black guifg=Green guibg=Black
|
|
||||||
hi PreProc ctermfg=DarkGreen ctermbg=Black guifg=DarkGreen guibg=Black
|
|
||||||
hi Comment ctermfg=darkGreen ctermbg=Black guifg=darkGreen guibg=Black
|
|
||||||
hi LineNr ctermfg=Green ctermbg=Black guifg=Green guibg=Black
|
|
||||||
hi ErrorMsg ctermfg=Red ctermbg=Black guifg=Red guibg=Black
|
|
||||||
hi Visual ctermfg=White ctermbg=DarkGray cterm=underline guifg=White guibg=DarkGray gui=underline
|
|
||||||
hi Folded ctermfg=DarkCyan ctermbg=Black cterm=underline guifg=DarkCyan guibg=Black gui=underline
|
|
||||||
|
|
||||||
" Reset by distract free
|
|
||||||
" hi NonText ctermfg=Black ctermbg=Black guifg=black guibg=Black
|
|
||||||
" hi VertSplit ctermfg=Black ctermbg=Black guifg=black guibg=Black
|
|
||||||
" hi StatusLine cterm=bold,underline ctermfg=White ctermbg=Black term=bold gui=bold,underline guifg=White guibg=Black
|
|
||||||
" hi StatusLineNC cterm=bold,underline ctermfg=Gray ctermbg=Black term=bold gui=bold,underline guifg=Gray guibg=Black
|
|
||||||
@ -1,359 +0,0 @@
|
|||||||
" Vim color file
|
|
||||||
" Original Author: Henry So, Jr. <henryso@panix.com>
|
|
||||||
" Maintainer: Rainux Luo <rainux@gmail.com>
|
|
||||||
" URL: https://github.com/rainux/vim-desert-warm-256
|
|
||||||
|
|
||||||
" It's a color scheme for Vim, based on the "desert" color scheme by Hans
|
|
||||||
" Fugal with a few small tweaks. The tweaks are try to make it looks a bit
|
|
||||||
" warm and be more friendly for my eyes. Using the code from "desert256" to
|
|
||||||
" make the gui highlight definitions also work with 88 and 256-color xterms.
|
|
||||||
"
|
|
||||||
" The original "desert" theme is available as part of the vim distribution or
|
|
||||||
" at http://hans.fugal.net/vim/colors/.
|
|
||||||
"
|
|
||||||
" The "desert256" theme is available at
|
|
||||||
" http://www.vim.org/scripts/script.php?script_id=1243.
|
|
||||||
"
|
|
||||||
" The real feature of this color scheme, with a wink to the "inkpot" theme, is
|
|
||||||
" the programmatic approximation of the gui colors to the palettes of 88- and
|
|
||||||
" 256- color xterms. The functions that do this (folded away, for
|
|
||||||
" readability) are calibrated to the colors used for Thomas E. Dickey's xterm
|
|
||||||
" (version 200), which is available at http://dickey.his.com/xterm/xterm.html.
|
|
||||||
"
|
|
||||||
" Support rgb color names from rgb.txt file. Use a Ruby script to pre-parse
|
|
||||||
" rgb.txt then convert color names mapping to a Vim dictionary, store it in
|
|
||||||
" colors/rgb_colors file.
|
|
||||||
"
|
|
||||||
" Consider use this color scheme as infrastructure to create new color
|
|
||||||
" schemes. The benefit is your color schemes will looks nearly the same both
|
|
||||||
" in gVim and Vim running in 256- color xterms, without any additional effort.
|
|
||||||
|
|
||||||
set background=dark
|
|
||||||
if version > 580
|
|
||||||
" no guarantees for version 5.8 and below, but this makes it stop
|
|
||||||
" complaining
|
|
||||||
hi clear
|
|
||||||
if exists('syntax_on')
|
|
||||||
syntax reset
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
let g:colors_name='desert-warm-256'
|
|
||||||
|
|
||||||
exec 'source ' . expand('<sfile>:p:h') . '/rgb_colors'
|
|
||||||
|
|
||||||
if has('gui_running') || &t_Co == 88 || &t_Co == 256
|
|
||||||
" functions {{{
|
|
||||||
" returns an approximate grey index for the given grey level
|
|
||||||
fun <SID>grey_number(x)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:x < 23
|
|
||||||
return 0
|
|
||||||
elseif a:x < 69
|
|
||||||
return 1
|
|
||||||
elseif a:x < 103
|
|
||||||
return 2
|
|
||||||
elseif a:x < 127
|
|
||||||
return 3
|
|
||||||
elseif a:x < 150
|
|
||||||
return 4
|
|
||||||
elseif a:x < 173
|
|
||||||
return 5
|
|
||||||
elseif a:x < 196
|
|
||||||
return 6
|
|
||||||
elseif a:x < 219
|
|
||||||
return 7
|
|
||||||
elseif a:x < 243
|
|
||||||
return 8
|
|
||||||
else
|
|
||||||
return 9
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:x < 14
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
let l:n = (a:x - 8) / 10
|
|
||||||
let l:m = (a:x - 8) % 10
|
|
||||||
if l:m < 5
|
|
||||||
return l:n
|
|
||||||
else
|
|
||||||
return l:n + 1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" returns the actual grey level represented by the grey index
|
|
||||||
fun <SID>grey_level(n)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:n == 0
|
|
||||||
return 0
|
|
||||||
elseif a:n == 1
|
|
||||||
return 46
|
|
||||||
elseif a:n == 2
|
|
||||||
return 92
|
|
||||||
elseif a:n == 3
|
|
||||||
return 115
|
|
||||||
elseif a:n == 4
|
|
||||||
return 139
|
|
||||||
elseif a:n == 5
|
|
||||||
return 162
|
|
||||||
elseif a:n == 6
|
|
||||||
return 185
|
|
||||||
elseif a:n == 7
|
|
||||||
return 208
|
|
||||||
elseif a:n == 8
|
|
||||||
return 231
|
|
||||||
else
|
|
||||||
return 255
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:n == 0
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 8 + (a:n * 10)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" returns the palette index for the given grey index
|
|
||||||
fun <SID>grey_color(n)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:n == 0
|
|
||||||
return 16
|
|
||||||
elseif a:n == 9
|
|
||||||
return 79
|
|
||||||
else
|
|
||||||
return 79 + a:n
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:n == 0
|
|
||||||
return 16
|
|
||||||
elseif a:n == 25
|
|
||||||
return 231
|
|
||||||
else
|
|
||||||
return 231 + a:n
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" returns an approximate color index for the given color level
|
|
||||||
fun <SID>rgb_number(x)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:x < 69
|
|
||||||
return 0
|
|
||||||
elseif a:x < 172
|
|
||||||
return 1
|
|
||||||
elseif a:x < 230
|
|
||||||
return 2
|
|
||||||
else
|
|
||||||
return 3
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:x < 75
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
let l:n = (a:x - 55) / 40
|
|
||||||
let l:m = (a:x - 55) % 40
|
|
||||||
if l:m < 20
|
|
||||||
return l:n
|
|
||||||
else
|
|
||||||
return l:n + 1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" returns the actual color level for the given color index
|
|
||||||
fun <SID>rgb_level(n)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:n == 0
|
|
||||||
return 0
|
|
||||||
elseif a:n == 1
|
|
||||||
return 139
|
|
||||||
elseif a:n == 2
|
|
||||||
return 205
|
|
||||||
else
|
|
||||||
return 255
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:n == 0
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 55 + (a:n * 40)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" returns the palette index for the given R/G/B color indices
|
|
||||||
fun <SID>rgb_color(x, y, z)
|
|
||||||
if &t_Co == 88
|
|
||||||
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
|
||||||
else
|
|
||||||
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" returns the palette index to approximate the given R/G/B color levels
|
|
||||||
fun <SID>color(r, g, b)
|
|
||||||
" get the closest grey
|
|
||||||
let l:gx = <SID>grey_number(a:r)
|
|
||||||
let l:gy = <SID>grey_number(a:g)
|
|
||||||
let l:gz = <SID>grey_number(a:b)
|
|
||||||
|
|
||||||
" get the closest color
|
|
||||||
let l:x = <SID>rgb_number(a:r)
|
|
||||||
let l:y = <SID>rgb_number(a:g)
|
|
||||||
let l:z = <SID>rgb_number(a:b)
|
|
||||||
|
|
||||||
if l:gx == l:gy && l:gy == l:gz
|
|
||||||
" there are two possibilities
|
|
||||||
let l:dgr = <SID>grey_level(l:gx) - a:r
|
|
||||||
let l:dgg = <SID>grey_level(l:gy) - a:g
|
|
||||||
let l:dgb = <SID>grey_level(l:gz) - a:b
|
|
||||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
|
||||||
let l:dr = <SID>rgb_level(l:gx) - a:r
|
|
||||||
let l:dg = <SID>rgb_level(l:gy) - a:g
|
|
||||||
let l:db = <SID>rgb_level(l:gz) - a:b
|
|
||||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
|
||||||
if l:dgrey < l:drgb
|
|
||||||
" use the grey
|
|
||||||
return <SID>grey_color(l:gx)
|
|
||||||
else
|
|
||||||
" use the color
|
|
||||||
return <SID>rgb_color(l:x, l:y, l:z)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
" only one possibility
|
|
||||||
return <SID>rgb_color(l:x, l:y, l:z)
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" returns the palette index to approximate the 'rrggbb' hex string
|
|
||||||
fun <SID>rgb(rgb)
|
|
||||||
let l:r = ('0x' . strpart(a:rgb, 0, 2)) + 0
|
|
||||||
let l:g = ('0x' . strpart(a:rgb, 2, 2)) + 0
|
|
||||||
let l:b = ('0x' . strpart(a:rgb, 4, 2)) + 0
|
|
||||||
|
|
||||||
return <SID>color(l:r, l:g, l:b)
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" sets the highlighting for the given group
|
|
||||||
" call <SID>X(group, fg, bg, attr), bg and attr are optional
|
|
||||||
fun <SID>X(group, fg, ...)
|
|
||||||
if a:fg != ''
|
|
||||||
let fg = tolower(a:fg)
|
|
||||||
let fg_hex = has_key(g:rgb_colors, fg) ? g:rgb_colors[fg] : a:fg
|
|
||||||
exec 'hi ' . a:group . ' guifg=#' . fg_hex . ' ctermfg=' . <SID>rgb(fg_hex)
|
|
||||||
endif
|
|
||||||
if a:0 > 0 && a:1 != ''
|
|
||||||
let bg = tolower(a:1)
|
|
||||||
let bg_hex = has_key(g:rgb_colors, bg) ? g:rgb_colors[bg] : bg
|
|
||||||
exec 'hi ' . a:group . ' guibg=#' . bg_hex . ' ctermbg=' . <SID>rgb(bg_hex)
|
|
||||||
endif
|
|
||||||
if a:0 > 1 && a:2 != ''
|
|
||||||
let attr = a:2
|
|
||||||
exec 'hi ' . a:group . ' gui=' . attr . ' cterm=' . attr
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
" }}}
|
|
||||||
|
|
||||||
call <SID>X('Normal', 'white', 'grey20')
|
|
||||||
|
|
||||||
" highlight groups
|
|
||||||
call <SID>X('Cursor', 'khaki', 'indianred')
|
|
||||||
"CursorIM
|
|
||||||
"Directory
|
|
||||||
"DiffAdd
|
|
||||||
"DiffChange
|
|
||||||
"DiffDelete
|
|
||||||
"DiffText
|
|
||||||
"ErrorMsg
|
|
||||||
call <SID>X('VertSplit', 'grey50', 'c2bfa5', 'none')
|
|
||||||
call <SID>X('Folded', 'orange', 'grey30')
|
|
||||||
call <SID>X('FoldColumn', 'tan', 'grey14')
|
|
||||||
call <SID>X('IncSearch', 'slategrey', 'khaki')
|
|
||||||
call <SID>X('LineNr', 'grey70', 'grey17')
|
|
||||||
call <SID>X('ModeMsg', 'goldenrod')
|
|
||||||
call <SID>X('MoreMsg', 'seagreen')
|
|
||||||
call <SID>X('NonText', 'lightblue', 'grey14', 'bold')
|
|
||||||
call <SID>X('Question', 'springgreen')
|
|
||||||
call <SID>X('Search', 'dfffdf', 'grey30')
|
|
||||||
call <SID>X('SpecialKey', 'yellowgreen')
|
|
||||||
call <SID>X('StatusLine', 'grey90', 'grey17', 'none')
|
|
||||||
call <SID>X('StatusLineNC', 'grey40', 'grey17', 'none')
|
|
||||||
call <SID>X('Title', 'indianred')
|
|
||||||
call <SID>X('Visual', 'khaki', 'olivedrab', 'none')
|
|
||||||
"VisualNOS
|
|
||||||
call <SID>X('WarningMsg', 'salmon', '', '')
|
|
||||||
"WildMenu
|
|
||||||
"Menu
|
|
||||||
call <SID>X('Pmenu', 'grey80', 'grey10')
|
|
||||||
call <SID>X('PmenuSel', 'grey80', 'grey25')
|
|
||||||
"Scrollbar
|
|
||||||
"Tooltip
|
|
||||||
call <SID>X('MatchParen', 'dfffdf', 'grey30')
|
|
||||||
|
|
||||||
" syntax highlighting groups
|
|
||||||
call <SID>X('Comment', 'skyblue')
|
|
||||||
call <SID>X('Constant', 'ffa0a0')
|
|
||||||
call <SID>X('String', 'e0a5da')
|
|
||||||
call <SID>X('Identifier', 'palegreen', '', 'none')
|
|
||||||
call <SID>X('Statement', 'ffd797', '', 'bold')
|
|
||||||
call <SID>X('PreProc', 'indianred')
|
|
||||||
call <SID>X('Type', 'e9b96e', '', 'bold')
|
|
||||||
call <SID>X('Special', 'navajowhite')
|
|
||||||
"Underlined
|
|
||||||
call <SID>X('Ignore', 'grey40')
|
|
||||||
"Error
|
|
||||||
call <SID>X('Todo', 'orangered', 'yellow2')
|
|
||||||
|
|
||||||
" delete functions {{{
|
|
||||||
delf <SID>X
|
|
||||||
delf <SID>rgb
|
|
||||||
delf <SID>color
|
|
||||||
delf <SID>rgb_color
|
|
||||||
delf <SID>rgb_level
|
|
||||||
delf <SID>rgb_number
|
|
||||||
delf <SID>grey_color
|
|
||||||
delf <SID>grey_level
|
|
||||||
delf <SID>grey_number
|
|
||||||
" }}}
|
|
||||||
else
|
|
||||||
" color terminal definitions
|
|
||||||
hi SpecialKey ctermfg=darkgreen
|
|
||||||
hi NonText cterm=bold ctermfg=darkblue
|
|
||||||
hi Directory ctermfg=darkcyan
|
|
||||||
hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1
|
|
||||||
hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green
|
|
||||||
hi Search cterm=NONE ctermfg=grey ctermbg=blue
|
|
||||||
hi MoreMsg ctermfg=darkgreen
|
|
||||||
hi ModeMsg cterm=NONE ctermfg=brown
|
|
||||||
hi LineNr ctermfg=3
|
|
||||||
hi Question ctermfg=green
|
|
||||||
hi StatusLine cterm=bold,reverse
|
|
||||||
hi StatusLineNC cterm=reverse
|
|
||||||
hi VertSplit cterm=reverse
|
|
||||||
hi Title ctermfg=5
|
|
||||||
hi Visual cterm=reverse
|
|
||||||
hi VisualNOS cterm=bold,underline
|
|
||||||
hi WarningMsg ctermfg=1
|
|
||||||
hi WildMenu ctermfg=0 ctermbg=3
|
|
||||||
hi Folded ctermfg=darkgrey ctermbg=NONE
|
|
||||||
hi FoldColumn ctermfg=darkgrey ctermbg=NONE
|
|
||||||
hi DiffAdd ctermbg=4
|
|
||||||
hi DiffChange ctermbg=5
|
|
||||||
hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
|
|
||||||
hi DiffText cterm=bold ctermbg=1
|
|
||||||
hi Comment ctermfg=darkcyan
|
|
||||||
hi Constant ctermfg=brown
|
|
||||||
hi Special ctermfg=5
|
|
||||||
hi Identifier ctermfg=6
|
|
||||||
hi Statement ctermfg=3
|
|
||||||
hi PreProc ctermfg=5
|
|
||||||
hi Type ctermfg=2
|
|
||||||
hi Underlined cterm=underline ctermfg=5
|
|
||||||
hi Ignore ctermfg=darkgrey
|
|
||||||
hi Error cterm=bold ctermfg=7 ctermbg=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
" vim: set fdl=0 fdm=marker sts=4 sw=4:
|
|
||||||
@ -1,218 +0,0 @@
|
|||||||
" Vim color file
|
|
||||||
" Name: inkpot.vim
|
|
||||||
" Maintainer: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
|
|
||||||
" Homepage: http://github.com/ciaranm/inkpot/
|
|
||||||
"
|
|
||||||
" This should work in the GUI, rxvt-unicode (88 colour mode) and xterm (256
|
|
||||||
" colour mode). It won't work in 8/16 colour terminals.
|
|
||||||
"
|
|
||||||
" To use a black background, :let g:inkpot_black_background = 1
|
|
||||||
|
|
||||||
set background=dark
|
|
||||||
hi clear
|
|
||||||
if exists("syntax_on")
|
|
||||||
syntax reset
|
|
||||||
endif
|
|
||||||
|
|
||||||
let colors_name = "inkpot"
|
|
||||||
|
|
||||||
" map a urxvt cube number to an xterm-256 cube number
|
|
||||||
fun! <SID>M(a)
|
|
||||||
return strpart("0135", a:a, 1) + 0
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" map a urxvt colour to an xterm-256 colour
|
|
||||||
fun! <SID>X(a)
|
|
||||||
if &t_Co == 88
|
|
||||||
return a:a
|
|
||||||
else
|
|
||||||
if a:a == 8
|
|
||||||
return 237
|
|
||||||
elseif a:a < 16
|
|
||||||
return a:a
|
|
||||||
elseif a:a > 79
|
|
||||||
return 232 + (3 * (a:a - 80))
|
|
||||||
else
|
|
||||||
let l:b = a:a - 16
|
|
||||||
let l:x = l:b % 4
|
|
||||||
let l:y = (l:b / 4) % 4
|
|
||||||
let l:z = (l:b / 16)
|
|
||||||
return 16 + <SID>M(l:x) + (6 * <SID>M(l:y)) + (36 * <SID>M(l:z))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
if ! exists("g:inkpot_black_background")
|
|
||||||
let g:inkpot_black_background = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
if has("gui_running")
|
|
||||||
if ! g:inkpot_black_background
|
|
||||||
hi Normal gui=NONE guifg=#cfbfad guibg=#1e1e27
|
|
||||||
else
|
|
||||||
hi Normal gui=NONE guifg=#cfbfad guibg=#000000
|
|
||||||
endif
|
|
||||||
|
|
||||||
hi CursorLine guibg=#2e2e37
|
|
||||||
|
|
||||||
hi IncSearch gui=BOLD guifg=#303030 guibg=#cd8b60
|
|
||||||
hi Search gui=NONE guifg=#303030 guibg=#ad7b57
|
|
||||||
hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#ce4e4e
|
|
||||||
hi WarningMsg gui=BOLD guifg=#ffffff guibg=#ce8e4e
|
|
||||||
hi ModeMsg gui=BOLD guifg=#7e7eae guibg=NONE
|
|
||||||
hi MoreMsg gui=BOLD guifg=#7e7eae guibg=NONE
|
|
||||||
hi Question gui=BOLD guifg=#ffcd00 guibg=NONE
|
|
||||||
|
|
||||||
hi StatusLine gui=BOLD guifg=#b9b9b9 guibg=#3e3e5e
|
|
||||||
hi User1 gui=BOLD guifg=#00ff8b guibg=#3e3e5e
|
|
||||||
hi User2 gui=BOLD guifg=#7070a0 guibg=#3e3e5e
|
|
||||||
hi StatusLineNC gui=NONE guifg=#b9b9b9 guibg=#3e3e5e
|
|
||||||
hi VertSplit gui=NONE guifg=#b9b9b9 guibg=#3e3e5e
|
|
||||||
|
|
||||||
hi WildMenu gui=BOLD guifg=#eeeeee guibg=#6e6eaf
|
|
||||||
|
|
||||||
hi MBENormal guifg=#cfbfad guibg=#2e2e3f
|
|
||||||
hi MBEChanged guifg=#eeeeee guibg=#2e2e3f
|
|
||||||
hi MBEVisibleNormal guifg=#cfcfcd guibg=#4e4e8f
|
|
||||||
hi MBEVisibleChanged guifg=#eeeeee guibg=#4e4e8f
|
|
||||||
|
|
||||||
hi DiffText gui=NONE guifg=#ffffcd guibg=#4a2a4a
|
|
||||||
hi DiffChange gui=NONE guifg=#ffffcd guibg=#306b8f
|
|
||||||
hi DiffDelete gui=NONE guifg=#ffffcd guibg=#6d3030
|
|
||||||
hi DiffAdd gui=NONE guifg=#ffffcd guibg=#306d30
|
|
||||||
|
|
||||||
hi Cursor gui=NONE guifg=#404040 guibg=#8b8bff
|
|
||||||
hi lCursor gui=NONE guifg=#404040 guibg=#8fff8b
|
|
||||||
hi CursorIM gui=NONE guifg=#404040 guibg=#8b8bff
|
|
||||||
|
|
||||||
hi Folded gui=NONE guifg=#cfcfcd guibg=#4b208f
|
|
||||||
hi FoldColumn gui=NONE guifg=#8b8bcd guibg=#2e2e2e
|
|
||||||
|
|
||||||
hi Directory gui=NONE guifg=#00ff8b guibg=NONE
|
|
||||||
hi LineNr gui=NONE guifg=#8b8bcd guibg=#2e2e2e
|
|
||||||
hi NonText gui=BOLD guifg=#8b8bcd guibg=NONE
|
|
||||||
hi SpecialKey gui=BOLD guifg=#ab60ed guibg=NONE
|
|
||||||
hi Title gui=BOLD guifg=#af4f4b guibg=NONE
|
|
||||||
hi Visual gui=NONE guifg=#eeeeee guibg=#4e4e8f
|
|
||||||
|
|
||||||
hi Comment gui=NONE guifg=#cd8b00 guibg=NONE
|
|
||||||
hi Constant gui=NONE guifg=#ffcd8b guibg=NONE
|
|
||||||
hi String gui=NONE guifg=#ffcd8b guibg=#404040
|
|
||||||
hi Error gui=NONE guifg=#ffffff guibg=#6e2e2e
|
|
||||||
hi Identifier gui=NONE guifg=#ff8bff guibg=NONE
|
|
||||||
hi Ignore gui=NONE
|
|
||||||
hi Number gui=NONE guifg=#f0ad6d guibg=NONE
|
|
||||||
hi PreProc gui=NONE guifg=#409090 guibg=NONE
|
|
||||||
hi Special gui=NONE guifg=#c080d0 guibg=NONE
|
|
||||||
hi SpecialChar gui=NONE guifg=#c080d0 guibg=#404040
|
|
||||||
hi Statement gui=NONE guifg=#808bed guibg=NONE
|
|
||||||
hi Todo gui=BOLD guifg=#303030 guibg=#d0a060
|
|
||||||
hi Type gui=NONE guifg=#ff8bff guibg=NONE
|
|
||||||
hi Underlined gui=BOLD guifg=#df9f2d guibg=NONE
|
|
||||||
hi TaglistTagName gui=BOLD guifg=#808bed guibg=NONE
|
|
||||||
|
|
||||||
hi perlSpecialMatch gui=NONE guifg=#c080d0 guibg=#404040
|
|
||||||
hi perlSpecialString gui=NONE guifg=#c080d0 guibg=#404040
|
|
||||||
|
|
||||||
hi cSpecialCharacter gui=NONE guifg=#c080d0 guibg=#404040
|
|
||||||
hi cFormat gui=NONE guifg=#c080d0 guibg=#404040
|
|
||||||
|
|
||||||
hi doxygenBrief gui=NONE guifg=#fdab60 guibg=NONE
|
|
||||||
hi doxygenParam gui=NONE guifg=#fdd090 guibg=NONE
|
|
||||||
hi doxygenPrev gui=NONE guifg=#fdd090 guibg=NONE
|
|
||||||
hi doxygenSmallSpecial gui=NONE guifg=#fdd090 guibg=NONE
|
|
||||||
hi doxygenSpecial gui=NONE guifg=#fdd090 guibg=NONE
|
|
||||||
hi doxygenComment gui=NONE guifg=#ad7b20 guibg=NONE
|
|
||||||
hi doxygenSpecial gui=NONE guifg=#fdab60 guibg=NONE
|
|
||||||
hi doxygenSpecialMultilineDesc gui=NONE guifg=#ad600b guibg=NONE
|
|
||||||
hi doxygenSpecialOnelineDesc gui=NONE guifg=#ad600b guibg=NONE
|
|
||||||
|
|
||||||
if v:version >= 700
|
|
||||||
hi Pmenu gui=NONE guifg=#eeeeee guibg=#4e4e8f
|
|
||||||
hi PmenuSel gui=BOLD guifg=#eeeeee guibg=#2e2e3f
|
|
||||||
hi PmenuSbar gui=BOLD guifg=#eeeeee guibg=#6e6eaf
|
|
||||||
hi PmenuThumb gui=BOLD guifg=#eeeeee guibg=#6e6eaf
|
|
||||||
|
|
||||||
hi SpellBad gui=undercurl guisp=#cc6666
|
|
||||||
hi SpellRare gui=undercurl guisp=#cc66cc
|
|
||||||
hi SpellLocal gui=undercurl guisp=#cccc66
|
|
||||||
hi SpellCap gui=undercurl guisp=#66cccc
|
|
||||||
|
|
||||||
hi MatchParen gui=NONE guifg=#cfbfad guibg=#4e4e8f
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if ! g:inkpot_black_background
|
|
||||||
" exec "hi Normal cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(80)
|
|
||||||
exec "hi Normal cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=black"
|
|
||||||
else
|
|
||||||
exec "hi Normal cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(16)
|
|
||||||
exec "hi Normal cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=black" . <SID>X(16)
|
|
||||||
endif
|
|
||||||
|
|
||||||
exec "hi IncSearch cterm=BOLD ctermfg=" . <SID>X(80) . " ctermbg=" . <SID>X(73)
|
|
||||||
exec "hi Search cterm=NONE ctermfg=" . <SID>X(80) . " ctermbg=" . <SID>X(52)
|
|
||||||
exec "hi ErrorMsg cterm=BOLD ctermfg=" . <SID>X(16) . " ctermbg=" . <SID>X(48)
|
|
||||||
exec "hi WarningMsg cterm=BOLD ctermfg=" . <SID>X(16) . " ctermbg=" . <SID>X(68)
|
|
||||||
exec "hi ModeMsg cterm=BOLD ctermfg=" . <SID>X(38) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi MoreMsg cterm=BOLD ctermfg=" . <SID>X(38) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi Question cterm=BOLD ctermfg=" . <SID>X(52) . " ctermbg=" . "NONE"
|
|
||||||
|
|
||||||
exec "hi StatusLine cterm=BOLD ctermfg=" . <SID>X(85) . " ctermbg=" . <SID>X(81)
|
|
||||||
exec "hi User1 cterm=BOLD ctermfg=" . <SID>X(28) . " ctermbg=" . <SID>X(81)
|
|
||||||
exec "hi User2 cterm=BOLD ctermfg=" . <SID>X(39) . " ctermbg=" . <SID>X(81)
|
|
||||||
exec "hi StatusLineNC cterm=NONE ctermfg=" . <SID>X(84) . " ctermbg=" . <SID>X(81)
|
|
||||||
exec "hi VertSplit cterm=NONE ctermfg=" . <SID>X(84) . " ctermbg=" . <SID>X(81)
|
|
||||||
|
|
||||||
exec "hi WildMenu cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(38)
|
|
||||||
|
|
||||||
exec "hi MBENormal ctermfg=" . <SID>X(85) . " ctermbg=" . <SID>X(81)
|
|
||||||
exec "hi MBEChanged ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(81)
|
|
||||||
exec "hi MBEVisibleNormal ctermfg=" . <SID>X(85) . " ctermbg=" . <SID>X(82)
|
|
||||||
exec "hi MBEVisibleChanged ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(82)
|
|
||||||
|
|
||||||
exec "hi DiffText cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(34)
|
|
||||||
exec "hi DiffChange cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(17)
|
|
||||||
exec "hi DiffDelete cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(32)
|
|
||||||
exec "hi DiffAdd cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(20)
|
|
||||||
|
|
||||||
exec "hi Folded cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(35)
|
|
||||||
exec "hi FoldColumn cterm=NONE ctermfg=" . <SID>X(39) . " ctermbg=" . <SID>X(80)
|
|
||||||
|
|
||||||
exec "hi Directory cterm=NONE ctermfg=" . <SID>X(28) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi LineNr cterm=NONE ctermfg=" . <SID>X(39) . " ctermbg=" . <SID>X(80)
|
|
||||||
exec "hi NonText cterm=BOLD ctermfg=" . <SID>X(39) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi SpecialKey cterm=BOLD ctermfg=" . <SID>X(55) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi Title cterm=BOLD ctermfg=" . <SID>X(48) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi Visual cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(38)
|
|
||||||
|
|
||||||
exec "hi Comment cterm=NONE ctermfg=" . <SID>X(52) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi Constant cterm=NONE ctermfg=" . <SID>X(73) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi String cterm=NONE ctermfg=" . <SID>X(73) . " ctermbg=" . <SID>X(81)
|
|
||||||
exec "hi Error cterm=NONE ctermfg=" . <SID>X(79) . " ctermbg=" . <SID>X(32)
|
|
||||||
exec "hi Identifier cterm=NONE ctermfg=" . <SID>X(53) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi Ignore cterm=NONE"
|
|
||||||
exec "hi Number cterm=NONE ctermfg=" . <SID>X(69) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi PreProc cterm=NONE ctermfg=" . <SID>X(25) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi Special cterm=NONE ctermfg=" . <SID>X(55) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi SpecialChar cterm=NONE ctermfg=" . <SID>X(55) . " ctermbg=" . <SID>X(81)
|
|
||||||
exec "hi Statement cterm=NONE ctermfg=" . <SID>X(27) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi Todo cterm=BOLD ctermfg=" . <SID>X(16) . " ctermbg=" . <SID>X(57)
|
|
||||||
exec "hi Type cterm=NONE ctermfg=" . <SID>X(71) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi Underlined cterm=BOLD ctermfg=" . <SID>X(77) . " ctermbg=" . "NONE"
|
|
||||||
exec "hi TaglistTagName cterm=BOLD ctermfg=" . <SID>X(39) . " ctermbg=" . "NONE"
|
|
||||||
|
|
||||||
if v:version >= 700
|
|
||||||
exec "hi Pmenu cterm=NONE ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(82)
|
|
||||||
exec "hi PmenuSel cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(38)
|
|
||||||
exec "hi PmenuSbar cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(39)
|
|
||||||
exec "hi PmenuThumb cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(39)
|
|
||||||
|
|
||||||
exec "hi SpellBad cterm=NONE ctermbg=" . <SID>X(32)
|
|
||||||
exec "hi SpellRare cterm=NONE ctermbg=" . <SID>X(33)
|
|
||||||
exec "hi SpellLocal cterm=NONE ctermbg=" . <SID>X(36)
|
|
||||||
exec "hi SpellCap cterm=NONE ctermbg=" . <SID>X(21)
|
|
||||||
exec "hi MatchParen cterm=NONE ctermbg=" . <SID>X(14) . "ctermfg=" . <SID>X(25)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" vim: set et :
|
|
||||||
@ -1,666 +0,0 @@
|
|||||||
" Generated from `rgb.txt` by `bin/generate_rgb_colors` script, don't manually
|
|
||||||
" modify this file.
|
|
||||||
"
|
|
||||||
" This file is intentioned to not have `.vim` extension so it can't be used as
|
|
||||||
" a regular color scheme.
|
|
||||||
|
|
||||||
let g:rgb_colors = {}
|
|
||||||
let g:rgb_colors.aliceblue = 'f0f8ff'
|
|
||||||
let g:rgb_colors.antiquewhite = 'faebd7'
|
|
||||||
let g:rgb_colors.antiquewhite1 = 'ffefdb'
|
|
||||||
let g:rgb_colors.antiquewhite2 = 'eedfcc'
|
|
||||||
let g:rgb_colors.antiquewhite3 = 'cdc0b0'
|
|
||||||
let g:rgb_colors.antiquewhite4 = '8b8378'
|
|
||||||
let g:rgb_colors.aquamarine = '7fffd4'
|
|
||||||
let g:rgb_colors.aquamarine1 = '7fffd4'
|
|
||||||
let g:rgb_colors.aquamarine2 = '76eec6'
|
|
||||||
let g:rgb_colors.aquamarine3 = '66cdaa'
|
|
||||||
let g:rgb_colors.aquamarine4 = '458b74'
|
|
||||||
let g:rgb_colors.azure = 'f0ffff'
|
|
||||||
let g:rgb_colors.azure1 = 'f0ffff'
|
|
||||||
let g:rgb_colors.azure2 = 'e0eeee'
|
|
||||||
let g:rgb_colors.azure3 = 'c1cdcd'
|
|
||||||
let g:rgb_colors.azure4 = '838b8b'
|
|
||||||
let g:rgb_colors.beige = 'f5f5dc'
|
|
||||||
let g:rgb_colors.bisque = 'ffe4c4'
|
|
||||||
let g:rgb_colors.bisque1 = 'ffe4c4'
|
|
||||||
let g:rgb_colors.bisque2 = 'eed5b7'
|
|
||||||
let g:rgb_colors.bisque3 = 'cdb79e'
|
|
||||||
let g:rgb_colors.bisque4 = '8b7d6b'
|
|
||||||
let g:rgb_colors.black = '000000'
|
|
||||||
let g:rgb_colors.blanchedalmond = 'ffebcd'
|
|
||||||
let g:rgb_colors.blue = '0000ff'
|
|
||||||
let g:rgb_colors.blue1 = '0000ff'
|
|
||||||
let g:rgb_colors.blue2 = '0000ee'
|
|
||||||
let g:rgb_colors.blue3 = '0000cd'
|
|
||||||
let g:rgb_colors.blue4 = '00008b'
|
|
||||||
let g:rgb_colors.blueviolet = '8a2be2'
|
|
||||||
let g:rgb_colors.brown = 'a52a2a'
|
|
||||||
let g:rgb_colors.brown1 = 'ff4040'
|
|
||||||
let g:rgb_colors.brown2 = 'ee3b3b'
|
|
||||||
let g:rgb_colors.brown3 = 'cd3333'
|
|
||||||
let g:rgb_colors.brown4 = '8b2323'
|
|
||||||
let g:rgb_colors.burlywood = 'deb887'
|
|
||||||
let g:rgb_colors.burlywood1 = 'ffd39b'
|
|
||||||
let g:rgb_colors.burlywood2 = 'eec591'
|
|
||||||
let g:rgb_colors.burlywood3 = 'cdaa7d'
|
|
||||||
let g:rgb_colors.burlywood4 = '8b7355'
|
|
||||||
let g:rgb_colors.cadetblue = '5f9ea0'
|
|
||||||
let g:rgb_colors.cadetblue1 = '98f5ff'
|
|
||||||
let g:rgb_colors.cadetblue2 = '8ee5ee'
|
|
||||||
let g:rgb_colors.cadetblue3 = '7ac5cd'
|
|
||||||
let g:rgb_colors.cadetblue4 = '53868b'
|
|
||||||
let g:rgb_colors.chartreuse = '7fff00'
|
|
||||||
let g:rgb_colors.chartreuse1 = '7fff00'
|
|
||||||
let g:rgb_colors.chartreuse2 = '76ee00'
|
|
||||||
let g:rgb_colors.chartreuse3 = '66cd00'
|
|
||||||
let g:rgb_colors.chartreuse4 = '458b00'
|
|
||||||
let g:rgb_colors.chocolate = 'd2691e'
|
|
||||||
let g:rgb_colors.chocolate1 = 'ff7f24'
|
|
||||||
let g:rgb_colors.chocolate2 = 'ee7621'
|
|
||||||
let g:rgb_colors.chocolate3 = 'cd661d'
|
|
||||||
let g:rgb_colors.chocolate4 = '8b4513'
|
|
||||||
let g:rgb_colors.coral = 'ff7f50'
|
|
||||||
let g:rgb_colors.coral1 = 'ff7256'
|
|
||||||
let g:rgb_colors.coral2 = 'ee6a50'
|
|
||||||
let g:rgb_colors.coral3 = 'cd5b45'
|
|
||||||
let g:rgb_colors.coral4 = '8b3e2f'
|
|
||||||
let g:rgb_colors.cornflowerblue = '6495ed'
|
|
||||||
let g:rgb_colors.cornsilk = 'fff8dc'
|
|
||||||
let g:rgb_colors.cornsilk1 = 'fff8dc'
|
|
||||||
let g:rgb_colors.cornsilk2 = 'eee8cd'
|
|
||||||
let g:rgb_colors.cornsilk3 = 'cdc8b1'
|
|
||||||
let g:rgb_colors.cornsilk4 = '8b8878'
|
|
||||||
let g:rgb_colors.cyan = '00ffff'
|
|
||||||
let g:rgb_colors.cyan1 = '00ffff'
|
|
||||||
let g:rgb_colors.cyan2 = '00eeee'
|
|
||||||
let g:rgb_colors.cyan3 = '00cdcd'
|
|
||||||
let g:rgb_colors.cyan4 = '008b8b'
|
|
||||||
let g:rgb_colors.darkblue = '00008b'
|
|
||||||
let g:rgb_colors.darkcyan = '008b8b'
|
|
||||||
let g:rgb_colors.darkgoldenrod = 'b8860b'
|
|
||||||
let g:rgb_colors.darkgoldenrod1 = 'ffb90f'
|
|
||||||
let g:rgb_colors.darkgoldenrod2 = 'eead0e'
|
|
||||||
let g:rgb_colors.darkgoldenrod3 = 'cd950c'
|
|
||||||
let g:rgb_colors.darkgoldenrod4 = '8b6508'
|
|
||||||
let g:rgb_colors.darkgray = 'a9a9a9'
|
|
||||||
let g:rgb_colors.darkgreen = '006400'
|
|
||||||
let g:rgb_colors.darkgrey = 'a9a9a9'
|
|
||||||
let g:rgb_colors.darkkhaki = 'bdb76b'
|
|
||||||
let g:rgb_colors.darkmagenta = '8b008b'
|
|
||||||
let g:rgb_colors.darkolivegreen = '556b2f'
|
|
||||||
let g:rgb_colors.darkolivegreen1 = 'caff70'
|
|
||||||
let g:rgb_colors.darkolivegreen2 = 'bcee68'
|
|
||||||
let g:rgb_colors.darkolivegreen3 = 'a2cd5a'
|
|
||||||
let g:rgb_colors.darkolivegreen4 = '6e8b3d'
|
|
||||||
let g:rgb_colors.darkorange = 'ff8c00'
|
|
||||||
let g:rgb_colors.darkorange1 = 'ff7f00'
|
|
||||||
let g:rgb_colors.darkorange2 = 'ee7600'
|
|
||||||
let g:rgb_colors.darkorange3 = 'cd6600'
|
|
||||||
let g:rgb_colors.darkorange4 = '8b4500'
|
|
||||||
let g:rgb_colors.darkorchid = '9932cc'
|
|
||||||
let g:rgb_colors.darkorchid1 = 'bf3eff'
|
|
||||||
let g:rgb_colors.darkorchid2 = 'b23aee'
|
|
||||||
let g:rgb_colors.darkorchid3 = '9a32cd'
|
|
||||||
let g:rgb_colors.darkorchid4 = '68228b'
|
|
||||||
let g:rgb_colors.darkred = '8b0000'
|
|
||||||
let g:rgb_colors.darksalmon = 'e9967a'
|
|
||||||
let g:rgb_colors.darkseagreen = '8fbc8f'
|
|
||||||
let g:rgb_colors.darkseagreen1 = 'c1ffc1'
|
|
||||||
let g:rgb_colors.darkseagreen2 = 'b4eeb4'
|
|
||||||
let g:rgb_colors.darkseagreen3 = '9bcd9b'
|
|
||||||
let g:rgb_colors.darkseagreen4 = '698b69'
|
|
||||||
let g:rgb_colors.darkslateblue = '483d8b'
|
|
||||||
let g:rgb_colors.darkslategray = '2f4f4f'
|
|
||||||
let g:rgb_colors.darkslategray1 = '97ffff'
|
|
||||||
let g:rgb_colors.darkslategray2 = '8deeee'
|
|
||||||
let g:rgb_colors.darkslategray3 = '79cdcd'
|
|
||||||
let g:rgb_colors.darkslategray4 = '528b8b'
|
|
||||||
let g:rgb_colors.darkslategrey = '2f4f4f'
|
|
||||||
let g:rgb_colors.darkturquoise = '00ced1'
|
|
||||||
let g:rgb_colors.darkviolet = '9400d3'
|
|
||||||
let g:rgb_colors.deeppink = 'ff1493'
|
|
||||||
let g:rgb_colors.deeppink1 = 'ff1493'
|
|
||||||
let g:rgb_colors.deeppink2 = 'ee1289'
|
|
||||||
let g:rgb_colors.deeppink3 = 'cd1076'
|
|
||||||
let g:rgb_colors.deeppink4 = '8b0a50'
|
|
||||||
let g:rgb_colors.deepskyblue = '00bfff'
|
|
||||||
let g:rgb_colors.deepskyblue1 = '00bfff'
|
|
||||||
let g:rgb_colors.deepskyblue2 = '00b2ee'
|
|
||||||
let g:rgb_colors.deepskyblue3 = '009acd'
|
|
||||||
let g:rgb_colors.deepskyblue4 = '00688b'
|
|
||||||
let g:rgb_colors.dimgray = '696969'
|
|
||||||
let g:rgb_colors.dimgrey = '696969'
|
|
||||||
let g:rgb_colors.dodgerblue = '1e90ff'
|
|
||||||
let g:rgb_colors.dodgerblue1 = '1e90ff'
|
|
||||||
let g:rgb_colors.dodgerblue2 = '1c86ee'
|
|
||||||
let g:rgb_colors.dodgerblue3 = '1874cd'
|
|
||||||
let g:rgb_colors.dodgerblue4 = '104e8b'
|
|
||||||
let g:rgb_colors.firebrick = 'b22222'
|
|
||||||
let g:rgb_colors.firebrick1 = 'ff3030'
|
|
||||||
let g:rgb_colors.firebrick2 = 'ee2c2c'
|
|
||||||
let g:rgb_colors.firebrick3 = 'cd2626'
|
|
||||||
let g:rgb_colors.firebrick4 = '8b1a1a'
|
|
||||||
let g:rgb_colors.floralwhite = 'fffaf0'
|
|
||||||
let g:rgb_colors.forestgreen = '228b22'
|
|
||||||
let g:rgb_colors.gainsboro = 'dcdcdc'
|
|
||||||
let g:rgb_colors.ghostwhite = 'f8f8ff'
|
|
||||||
let g:rgb_colors.gold = 'ffd700'
|
|
||||||
let g:rgb_colors.gold1 = 'ffd700'
|
|
||||||
let g:rgb_colors.gold2 = 'eec900'
|
|
||||||
let g:rgb_colors.gold3 = 'cdad00'
|
|
||||||
let g:rgb_colors.gold4 = '8b7500'
|
|
||||||
let g:rgb_colors.goldenrod = 'daa520'
|
|
||||||
let g:rgb_colors.goldenrod1 = 'ffc125'
|
|
||||||
let g:rgb_colors.goldenrod2 = 'eeb422'
|
|
||||||
let g:rgb_colors.goldenrod3 = 'cd9b1d'
|
|
||||||
let g:rgb_colors.goldenrod4 = '8b6914'
|
|
||||||
let g:rgb_colors.gray = 'bebebe'
|
|
||||||
let g:rgb_colors.gray0 = '000000'
|
|
||||||
let g:rgb_colors.gray1 = '030303'
|
|
||||||
let g:rgb_colors.gray10 = '1a1a1a'
|
|
||||||
let g:rgb_colors.gray100 = 'ffffff'
|
|
||||||
let g:rgb_colors.gray11 = '1c1c1c'
|
|
||||||
let g:rgb_colors.gray12 = '1f1f1f'
|
|
||||||
let g:rgb_colors.gray13 = '212121'
|
|
||||||
let g:rgb_colors.gray14 = '242424'
|
|
||||||
let g:rgb_colors.gray15 = '262626'
|
|
||||||
let g:rgb_colors.gray16 = '292929'
|
|
||||||
let g:rgb_colors.gray17 = '2b2b2b'
|
|
||||||
let g:rgb_colors.gray18 = '2e2e2e'
|
|
||||||
let g:rgb_colors.gray19 = '303030'
|
|
||||||
let g:rgb_colors.gray2 = '050505'
|
|
||||||
let g:rgb_colors.gray20 = '333333'
|
|
||||||
let g:rgb_colors.gray21 = '363636'
|
|
||||||
let g:rgb_colors.gray22 = '383838'
|
|
||||||
let g:rgb_colors.gray23 = '3b3b3b'
|
|
||||||
let g:rgb_colors.gray24 = '3d3d3d'
|
|
||||||
let g:rgb_colors.gray25 = '404040'
|
|
||||||
let g:rgb_colors.gray26 = '424242'
|
|
||||||
let g:rgb_colors.gray27 = '454545'
|
|
||||||
let g:rgb_colors.gray28 = '474747'
|
|
||||||
let g:rgb_colors.gray29 = '4a4a4a'
|
|
||||||
let g:rgb_colors.gray3 = '080808'
|
|
||||||
let g:rgb_colors.gray30 = '4d4d4d'
|
|
||||||
let g:rgb_colors.gray31 = '4f4f4f'
|
|
||||||
let g:rgb_colors.gray32 = '525252'
|
|
||||||
let g:rgb_colors.gray33 = '545454'
|
|
||||||
let g:rgb_colors.gray34 = '575757'
|
|
||||||
let g:rgb_colors.gray35 = '595959'
|
|
||||||
let g:rgb_colors.gray36 = '5c5c5c'
|
|
||||||
let g:rgb_colors.gray37 = '5e5e5e'
|
|
||||||
let g:rgb_colors.gray38 = '616161'
|
|
||||||
let g:rgb_colors.gray39 = '636363'
|
|
||||||
let g:rgb_colors.gray4 = '0a0a0a'
|
|
||||||
let g:rgb_colors.gray40 = '666666'
|
|
||||||
let g:rgb_colors.gray41 = '696969'
|
|
||||||
let g:rgb_colors.gray42 = '6b6b6b'
|
|
||||||
let g:rgb_colors.gray43 = '6e6e6e'
|
|
||||||
let g:rgb_colors.gray44 = '707070'
|
|
||||||
let g:rgb_colors.gray45 = '737373'
|
|
||||||
let g:rgb_colors.gray46 = '757575'
|
|
||||||
let g:rgb_colors.gray47 = '787878'
|
|
||||||
let g:rgb_colors.gray48 = '7a7a7a'
|
|
||||||
let g:rgb_colors.gray49 = '7d7d7d'
|
|
||||||
let g:rgb_colors.gray5 = '0d0d0d'
|
|
||||||
let g:rgb_colors.gray50 = '7f7f7f'
|
|
||||||
let g:rgb_colors.gray51 = '828282'
|
|
||||||
let g:rgb_colors.gray52 = '858585'
|
|
||||||
let g:rgb_colors.gray53 = '878787'
|
|
||||||
let g:rgb_colors.gray54 = '8a8a8a'
|
|
||||||
let g:rgb_colors.gray55 = '8c8c8c'
|
|
||||||
let g:rgb_colors.gray56 = '8f8f8f'
|
|
||||||
let g:rgb_colors.gray57 = '919191'
|
|
||||||
let g:rgb_colors.gray58 = '949494'
|
|
||||||
let g:rgb_colors.gray59 = '969696'
|
|
||||||
let g:rgb_colors.gray6 = '0f0f0f'
|
|
||||||
let g:rgb_colors.gray60 = '999999'
|
|
||||||
let g:rgb_colors.gray61 = '9c9c9c'
|
|
||||||
let g:rgb_colors.gray62 = '9e9e9e'
|
|
||||||
let g:rgb_colors.gray63 = 'a1a1a1'
|
|
||||||
let g:rgb_colors.gray64 = 'a3a3a3'
|
|
||||||
let g:rgb_colors.gray65 = 'a6a6a6'
|
|
||||||
let g:rgb_colors.gray66 = 'a8a8a8'
|
|
||||||
let g:rgb_colors.gray67 = 'ababab'
|
|
||||||
let g:rgb_colors.gray68 = 'adadad'
|
|
||||||
let g:rgb_colors.gray69 = 'b0b0b0'
|
|
||||||
let g:rgb_colors.gray7 = '121212'
|
|
||||||
let g:rgb_colors.gray70 = 'b3b3b3'
|
|
||||||
let g:rgb_colors.gray71 = 'b5b5b5'
|
|
||||||
let g:rgb_colors.gray72 = 'b8b8b8'
|
|
||||||
let g:rgb_colors.gray73 = 'bababa'
|
|
||||||
let g:rgb_colors.gray74 = 'bdbdbd'
|
|
||||||
let g:rgb_colors.gray75 = 'bfbfbf'
|
|
||||||
let g:rgb_colors.gray76 = 'c2c2c2'
|
|
||||||
let g:rgb_colors.gray77 = 'c4c4c4'
|
|
||||||
let g:rgb_colors.gray78 = 'c7c7c7'
|
|
||||||
let g:rgb_colors.gray79 = 'c9c9c9'
|
|
||||||
let g:rgb_colors.gray8 = '141414'
|
|
||||||
let g:rgb_colors.gray80 = 'cccccc'
|
|
||||||
let g:rgb_colors.gray81 = 'cfcfcf'
|
|
||||||
let g:rgb_colors.gray82 = 'd1d1d1'
|
|
||||||
let g:rgb_colors.gray83 = 'd4d4d4'
|
|
||||||
let g:rgb_colors.gray84 = 'd6d6d6'
|
|
||||||
let g:rgb_colors.gray85 = 'd9d9d9'
|
|
||||||
let g:rgb_colors.gray86 = 'dbdbdb'
|
|
||||||
let g:rgb_colors.gray87 = 'dedede'
|
|
||||||
let g:rgb_colors.gray88 = 'e0e0e0'
|
|
||||||
let g:rgb_colors.gray89 = 'e3e3e3'
|
|
||||||
let g:rgb_colors.gray9 = '171717'
|
|
||||||
let g:rgb_colors.gray90 = 'e5e5e5'
|
|
||||||
let g:rgb_colors.gray91 = 'e8e8e8'
|
|
||||||
let g:rgb_colors.gray92 = 'ebebeb'
|
|
||||||
let g:rgb_colors.gray93 = 'ededed'
|
|
||||||
let g:rgb_colors.gray94 = 'f0f0f0'
|
|
||||||
let g:rgb_colors.gray95 = 'f2f2f2'
|
|
||||||
let g:rgb_colors.gray96 = 'f5f5f5'
|
|
||||||
let g:rgb_colors.gray97 = 'f7f7f7'
|
|
||||||
let g:rgb_colors.gray98 = 'fafafa'
|
|
||||||
let g:rgb_colors.gray99 = 'fcfcfc'
|
|
||||||
let g:rgb_colors.green = '00ff00'
|
|
||||||
let g:rgb_colors.green1 = '00ff00'
|
|
||||||
let g:rgb_colors.green2 = '00ee00'
|
|
||||||
let g:rgb_colors.green3 = '00cd00'
|
|
||||||
let g:rgb_colors.green4 = '008b00'
|
|
||||||
let g:rgb_colors.greenyellow = 'adff2f'
|
|
||||||
let g:rgb_colors.grey = 'bebebe'
|
|
||||||
let g:rgb_colors.grey0 = '000000'
|
|
||||||
let g:rgb_colors.grey1 = '030303'
|
|
||||||
let g:rgb_colors.grey10 = '1a1a1a'
|
|
||||||
let g:rgb_colors.grey100 = 'ffffff'
|
|
||||||
let g:rgb_colors.grey11 = '1c1c1c'
|
|
||||||
let g:rgb_colors.grey12 = '1f1f1f'
|
|
||||||
let g:rgb_colors.grey13 = '212121'
|
|
||||||
let g:rgb_colors.grey14 = '242424'
|
|
||||||
let g:rgb_colors.grey15 = '262626'
|
|
||||||
let g:rgb_colors.grey16 = '292929'
|
|
||||||
let g:rgb_colors.grey17 = '2b2b2b'
|
|
||||||
let g:rgb_colors.grey18 = '2e2e2e'
|
|
||||||
let g:rgb_colors.grey19 = '303030'
|
|
||||||
let g:rgb_colors.grey2 = '050505'
|
|
||||||
let g:rgb_colors.grey20 = '333333'
|
|
||||||
let g:rgb_colors.grey21 = '363636'
|
|
||||||
let g:rgb_colors.grey22 = '383838'
|
|
||||||
let g:rgb_colors.grey23 = '3b3b3b'
|
|
||||||
let g:rgb_colors.grey24 = '3d3d3d'
|
|
||||||
let g:rgb_colors.grey25 = '404040'
|
|
||||||
let g:rgb_colors.grey26 = '424242'
|
|
||||||
let g:rgb_colors.grey27 = '454545'
|
|
||||||
let g:rgb_colors.grey28 = '474747'
|
|
||||||
let g:rgb_colors.grey29 = '4a4a4a'
|
|
||||||
let g:rgb_colors.grey3 = '080808'
|
|
||||||
let g:rgb_colors.grey30 = '4d4d4d'
|
|
||||||
let g:rgb_colors.grey31 = '4f4f4f'
|
|
||||||
let g:rgb_colors.grey32 = '525252'
|
|
||||||
let g:rgb_colors.grey33 = '545454'
|
|
||||||
let g:rgb_colors.grey34 = '575757'
|
|
||||||
let g:rgb_colors.grey35 = '595959'
|
|
||||||
let g:rgb_colors.grey36 = '5c5c5c'
|
|
||||||
let g:rgb_colors.grey37 = '5e5e5e'
|
|
||||||
let g:rgb_colors.grey38 = '616161'
|
|
||||||
let g:rgb_colors.grey39 = '636363'
|
|
||||||
let g:rgb_colors.grey4 = '0a0a0a'
|
|
||||||
let g:rgb_colors.grey40 = '666666'
|
|
||||||
let g:rgb_colors.grey41 = '696969'
|
|
||||||
let g:rgb_colors.grey42 = '6b6b6b'
|
|
||||||
let g:rgb_colors.grey43 = '6e6e6e'
|
|
||||||
let g:rgb_colors.grey44 = '707070'
|
|
||||||
let g:rgb_colors.grey45 = '737373'
|
|
||||||
let g:rgb_colors.grey46 = '757575'
|
|
||||||
let g:rgb_colors.grey47 = '787878'
|
|
||||||
let g:rgb_colors.grey48 = '7a7a7a'
|
|
||||||
let g:rgb_colors.grey49 = '7d7d7d'
|
|
||||||
let g:rgb_colors.grey5 = '0d0d0d'
|
|
||||||
let g:rgb_colors.grey50 = '7f7f7f'
|
|
||||||
let g:rgb_colors.grey51 = '828282'
|
|
||||||
let g:rgb_colors.grey52 = '858585'
|
|
||||||
let g:rgb_colors.grey53 = '878787'
|
|
||||||
let g:rgb_colors.grey54 = '8a8a8a'
|
|
||||||
let g:rgb_colors.grey55 = '8c8c8c'
|
|
||||||
let g:rgb_colors.grey56 = '8f8f8f'
|
|
||||||
let g:rgb_colors.grey57 = '919191'
|
|
||||||
let g:rgb_colors.grey58 = '949494'
|
|
||||||
let g:rgb_colors.grey59 = '969696'
|
|
||||||
let g:rgb_colors.grey6 = '0f0f0f'
|
|
||||||
let g:rgb_colors.grey60 = '999999'
|
|
||||||
let g:rgb_colors.grey61 = '9c9c9c'
|
|
||||||
let g:rgb_colors.grey62 = '9e9e9e'
|
|
||||||
let g:rgb_colors.grey63 = 'a1a1a1'
|
|
||||||
let g:rgb_colors.grey64 = 'a3a3a3'
|
|
||||||
let g:rgb_colors.grey65 = 'a6a6a6'
|
|
||||||
let g:rgb_colors.grey66 = 'a8a8a8'
|
|
||||||
let g:rgb_colors.grey67 = 'ababab'
|
|
||||||
let g:rgb_colors.grey68 = 'adadad'
|
|
||||||
let g:rgb_colors.grey69 = 'b0b0b0'
|
|
||||||
let g:rgb_colors.grey7 = '121212'
|
|
||||||
let g:rgb_colors.grey70 = 'b3b3b3'
|
|
||||||
let g:rgb_colors.grey71 = 'b5b5b5'
|
|
||||||
let g:rgb_colors.grey72 = 'b8b8b8'
|
|
||||||
let g:rgb_colors.grey73 = 'bababa'
|
|
||||||
let g:rgb_colors.grey74 = 'bdbdbd'
|
|
||||||
let g:rgb_colors.grey75 = 'bfbfbf'
|
|
||||||
let g:rgb_colors.grey76 = 'c2c2c2'
|
|
||||||
let g:rgb_colors.grey77 = 'c4c4c4'
|
|
||||||
let g:rgb_colors.grey78 = 'c7c7c7'
|
|
||||||
let g:rgb_colors.grey79 = 'c9c9c9'
|
|
||||||
let g:rgb_colors.grey8 = '141414'
|
|
||||||
let g:rgb_colors.grey80 = 'cccccc'
|
|
||||||
let g:rgb_colors.grey81 = 'cfcfcf'
|
|
||||||
let g:rgb_colors.grey82 = 'd1d1d1'
|
|
||||||
let g:rgb_colors.grey83 = 'd4d4d4'
|
|
||||||
let g:rgb_colors.grey84 = 'd6d6d6'
|
|
||||||
let g:rgb_colors.grey85 = 'd9d9d9'
|
|
||||||
let g:rgb_colors.grey86 = 'dbdbdb'
|
|
||||||
let g:rgb_colors.grey87 = 'dedede'
|
|
||||||
let g:rgb_colors.grey88 = 'e0e0e0'
|
|
||||||
let g:rgb_colors.grey89 = 'e3e3e3'
|
|
||||||
let g:rgb_colors.grey9 = '171717'
|
|
||||||
let g:rgb_colors.grey90 = 'e5e5e5'
|
|
||||||
let g:rgb_colors.grey91 = 'e8e8e8'
|
|
||||||
let g:rgb_colors.grey92 = 'ebebeb'
|
|
||||||
let g:rgb_colors.grey93 = 'ededed'
|
|
||||||
let g:rgb_colors.grey94 = 'f0f0f0'
|
|
||||||
let g:rgb_colors.grey95 = 'f2f2f2'
|
|
||||||
let g:rgb_colors.grey96 = 'f5f5f5'
|
|
||||||
let g:rgb_colors.grey97 = 'f7f7f7'
|
|
||||||
let g:rgb_colors.grey98 = 'fafafa'
|
|
||||||
let g:rgb_colors.grey99 = 'fcfcfc'
|
|
||||||
let g:rgb_colors.honeydew = 'f0fff0'
|
|
||||||
let g:rgb_colors.honeydew1 = 'f0fff0'
|
|
||||||
let g:rgb_colors.honeydew2 = 'e0eee0'
|
|
||||||
let g:rgb_colors.honeydew3 = 'c1cdc1'
|
|
||||||
let g:rgb_colors.honeydew4 = '838b83'
|
|
||||||
let g:rgb_colors.hotpink = 'ff69b4'
|
|
||||||
let g:rgb_colors.hotpink1 = 'ff6eb4'
|
|
||||||
let g:rgb_colors.hotpink2 = 'ee6aa7'
|
|
||||||
let g:rgb_colors.hotpink3 = 'cd6090'
|
|
||||||
let g:rgb_colors.hotpink4 = '8b3a62'
|
|
||||||
let g:rgb_colors.indianred = 'cd5c5c'
|
|
||||||
let g:rgb_colors.indianred1 = 'ff6a6a'
|
|
||||||
let g:rgb_colors.indianred2 = 'ee6363'
|
|
||||||
let g:rgb_colors.indianred3 = 'cd5555'
|
|
||||||
let g:rgb_colors.indianred4 = '8b3a3a'
|
|
||||||
let g:rgb_colors.ivory = 'fffff0'
|
|
||||||
let g:rgb_colors.ivory1 = 'fffff0'
|
|
||||||
let g:rgb_colors.ivory2 = 'eeeee0'
|
|
||||||
let g:rgb_colors.ivory3 = 'cdcdc1'
|
|
||||||
let g:rgb_colors.ivory4 = '8b8b83'
|
|
||||||
let g:rgb_colors.khaki = 'f0e68c'
|
|
||||||
let g:rgb_colors.khaki1 = 'fff68f'
|
|
||||||
let g:rgb_colors.khaki2 = 'eee685'
|
|
||||||
let g:rgb_colors.khaki3 = 'cdc673'
|
|
||||||
let g:rgb_colors.khaki4 = '8b864e'
|
|
||||||
let g:rgb_colors.lavender = 'e6e6fa'
|
|
||||||
let g:rgb_colors.lavenderblush = 'fff0f5'
|
|
||||||
let g:rgb_colors.lavenderblush1 = 'fff0f5'
|
|
||||||
let g:rgb_colors.lavenderblush2 = 'eee0e5'
|
|
||||||
let g:rgb_colors.lavenderblush3 = 'cdc1c5'
|
|
||||||
let g:rgb_colors.lavenderblush4 = '8b8386'
|
|
||||||
let g:rgb_colors.lawngreen = '7cfc00'
|
|
||||||
let g:rgb_colors.lemonchiffon = 'fffacd'
|
|
||||||
let g:rgb_colors.lemonchiffon1 = 'fffacd'
|
|
||||||
let g:rgb_colors.lemonchiffon2 = 'eee9bf'
|
|
||||||
let g:rgb_colors.lemonchiffon3 = 'cdc9a5'
|
|
||||||
let g:rgb_colors.lemonchiffon4 = '8b8970'
|
|
||||||
let g:rgb_colors.lightblue = 'add8e6'
|
|
||||||
let g:rgb_colors.lightblue1 = 'bfefff'
|
|
||||||
let g:rgb_colors.lightblue2 = 'b2dfee'
|
|
||||||
let g:rgb_colors.lightblue3 = '9ac0cd'
|
|
||||||
let g:rgb_colors.lightblue4 = '68838b'
|
|
||||||
let g:rgb_colors.lightcoral = 'f08080'
|
|
||||||
let g:rgb_colors.lightcyan = 'e0ffff'
|
|
||||||
let g:rgb_colors.lightcyan1 = 'e0ffff'
|
|
||||||
let g:rgb_colors.lightcyan2 = 'd1eeee'
|
|
||||||
let g:rgb_colors.lightcyan3 = 'b4cdcd'
|
|
||||||
let g:rgb_colors.lightcyan4 = '7a8b8b'
|
|
||||||
let g:rgb_colors.lightgoldenrod = 'eedd82'
|
|
||||||
let g:rgb_colors.lightgoldenrod1 = 'ffec8b'
|
|
||||||
let g:rgb_colors.lightgoldenrod2 = 'eedc82'
|
|
||||||
let g:rgb_colors.lightgoldenrod3 = 'cdbe70'
|
|
||||||
let g:rgb_colors.lightgoldenrod4 = '8b814c'
|
|
||||||
let g:rgb_colors.lightgoldenrodyellow = 'fafad2'
|
|
||||||
let g:rgb_colors.lightgray = 'd3d3d3'
|
|
||||||
let g:rgb_colors.lightgreen = '90ee90'
|
|
||||||
let g:rgb_colors.lightgrey = 'd3d3d3'
|
|
||||||
let g:rgb_colors.lightpink = 'ffb6c1'
|
|
||||||
let g:rgb_colors.lightpink1 = 'ffaeb9'
|
|
||||||
let g:rgb_colors.lightpink2 = 'eea2ad'
|
|
||||||
let g:rgb_colors.lightpink3 = 'cd8c95'
|
|
||||||
let g:rgb_colors.lightpink4 = '8b5f65'
|
|
||||||
let g:rgb_colors.lightsalmon = 'ffa07a'
|
|
||||||
let g:rgb_colors.lightsalmon1 = 'ffa07a'
|
|
||||||
let g:rgb_colors.lightsalmon2 = 'ee9572'
|
|
||||||
let g:rgb_colors.lightsalmon3 = 'cd8162'
|
|
||||||
let g:rgb_colors.lightsalmon4 = '8b5742'
|
|
||||||
let g:rgb_colors.lightseagreen = '20b2aa'
|
|
||||||
let g:rgb_colors.lightskyblue = '87cefa'
|
|
||||||
let g:rgb_colors.lightskyblue1 = 'b0e2ff'
|
|
||||||
let g:rgb_colors.lightskyblue2 = 'a4d3ee'
|
|
||||||
let g:rgb_colors.lightskyblue3 = '8db6cd'
|
|
||||||
let g:rgb_colors.lightskyblue4 = '607b8b'
|
|
||||||
let g:rgb_colors.lightslateblue = '8470ff'
|
|
||||||
let g:rgb_colors.lightslategray = '778899'
|
|
||||||
let g:rgb_colors.lightslategrey = '778899'
|
|
||||||
let g:rgb_colors.lightsteelblue = 'b0c4de'
|
|
||||||
let g:rgb_colors.lightsteelblue1 = 'cae1ff'
|
|
||||||
let g:rgb_colors.lightsteelblue2 = 'bcd2ee'
|
|
||||||
let g:rgb_colors.lightsteelblue3 = 'a2b5cd'
|
|
||||||
let g:rgb_colors.lightsteelblue4 = '6e7b8b'
|
|
||||||
let g:rgb_colors.lightyellow = 'ffffe0'
|
|
||||||
let g:rgb_colors.lightyellow1 = 'ffffe0'
|
|
||||||
let g:rgb_colors.lightyellow2 = 'eeeed1'
|
|
||||||
let g:rgb_colors.lightyellow3 = 'cdcdb4'
|
|
||||||
let g:rgb_colors.lightyellow4 = '8b8b7a'
|
|
||||||
let g:rgb_colors.limegreen = '32cd32'
|
|
||||||
let g:rgb_colors.linen = 'faf0e6'
|
|
||||||
let g:rgb_colors.magenta = 'ff00ff'
|
|
||||||
let g:rgb_colors.magenta1 = 'ff00ff'
|
|
||||||
let g:rgb_colors.magenta2 = 'ee00ee'
|
|
||||||
let g:rgb_colors.magenta3 = 'cd00cd'
|
|
||||||
let g:rgb_colors.magenta4 = '8b008b'
|
|
||||||
let g:rgb_colors.maroon = 'b03060'
|
|
||||||
let g:rgb_colors.maroon1 = 'ff34b3'
|
|
||||||
let g:rgb_colors.maroon2 = 'ee30a7'
|
|
||||||
let g:rgb_colors.maroon3 = 'cd2990'
|
|
||||||
let g:rgb_colors.maroon4 = '8b1c62'
|
|
||||||
let g:rgb_colors.mediumaquamarine = '66cdaa'
|
|
||||||
let g:rgb_colors.mediumblue = '0000cd'
|
|
||||||
let g:rgb_colors.mediumorchid = 'ba55d3'
|
|
||||||
let g:rgb_colors.mediumorchid1 = 'e066ff'
|
|
||||||
let g:rgb_colors.mediumorchid2 = 'd15fee'
|
|
||||||
let g:rgb_colors.mediumorchid3 = 'b452cd'
|
|
||||||
let g:rgb_colors.mediumorchid4 = '7a378b'
|
|
||||||
let g:rgb_colors.mediumpurple = '9370db'
|
|
||||||
let g:rgb_colors.mediumpurple1 = 'ab82ff'
|
|
||||||
let g:rgb_colors.mediumpurple2 = '9f79ee'
|
|
||||||
let g:rgb_colors.mediumpurple3 = '8968cd'
|
|
||||||
let g:rgb_colors.mediumpurple4 = '5d478b'
|
|
||||||
let g:rgb_colors.mediumseagreen = '3cb371'
|
|
||||||
let g:rgb_colors.mediumslateblue = '7b68ee'
|
|
||||||
let g:rgb_colors.mediumspringgreen = '00fa9a'
|
|
||||||
let g:rgb_colors.mediumturquoise = '48d1cc'
|
|
||||||
let g:rgb_colors.mediumvioletred = 'c71585'
|
|
||||||
let g:rgb_colors.midnightblue = '191970'
|
|
||||||
let g:rgb_colors.mintcream = 'f5fffa'
|
|
||||||
let g:rgb_colors.mistyrose = 'ffe4e1'
|
|
||||||
let g:rgb_colors.mistyrose1 = 'ffe4e1'
|
|
||||||
let g:rgb_colors.mistyrose2 = 'eed5d2'
|
|
||||||
let g:rgb_colors.mistyrose3 = 'cdb7b5'
|
|
||||||
let g:rgb_colors.mistyrose4 = '8b7d7b'
|
|
||||||
let g:rgb_colors.moccasin = 'ffe4b5'
|
|
||||||
let g:rgb_colors.navajowhite = 'ffdead'
|
|
||||||
let g:rgb_colors.navajowhite1 = 'ffdead'
|
|
||||||
let g:rgb_colors.navajowhite2 = 'eecfa1'
|
|
||||||
let g:rgb_colors.navajowhite3 = 'cdb38b'
|
|
||||||
let g:rgb_colors.navajowhite4 = '8b795e'
|
|
||||||
let g:rgb_colors.navy = '000080'
|
|
||||||
let g:rgb_colors.navyblue = '000080'
|
|
||||||
let g:rgb_colors.oldlace = 'fdf5e6'
|
|
||||||
let g:rgb_colors.olivedrab = '6b8e23'
|
|
||||||
let g:rgb_colors.olivedrab1 = 'c0ff3e'
|
|
||||||
let g:rgb_colors.olivedrab2 = 'b3ee3a'
|
|
||||||
let g:rgb_colors.olivedrab3 = '9acd32'
|
|
||||||
let g:rgb_colors.olivedrab4 = '698b22'
|
|
||||||
let g:rgb_colors.orange = 'ffa500'
|
|
||||||
let g:rgb_colors.orange1 = 'ffa500'
|
|
||||||
let g:rgb_colors.orange2 = 'ee9a00'
|
|
||||||
let g:rgb_colors.orange3 = 'cd8500'
|
|
||||||
let g:rgb_colors.orange4 = '8b5a00'
|
|
||||||
let g:rgb_colors.orangered = 'ff4500'
|
|
||||||
let g:rgb_colors.orangered1 = 'ff4500'
|
|
||||||
let g:rgb_colors.orangered2 = 'ee4000'
|
|
||||||
let g:rgb_colors.orangered3 = 'cd3700'
|
|
||||||
let g:rgb_colors.orangered4 = '8b2500'
|
|
||||||
let g:rgb_colors.orchid = 'da70d6'
|
|
||||||
let g:rgb_colors.orchid1 = 'ff83fa'
|
|
||||||
let g:rgb_colors.orchid2 = 'ee7ae9'
|
|
||||||
let g:rgb_colors.orchid3 = 'cd69c9'
|
|
||||||
let g:rgb_colors.orchid4 = '8b4789'
|
|
||||||
let g:rgb_colors.palegoldenrod = 'eee8aa'
|
|
||||||
let g:rgb_colors.palegreen = '98fb98'
|
|
||||||
let g:rgb_colors.palegreen1 = '9aff9a'
|
|
||||||
let g:rgb_colors.palegreen2 = '90ee90'
|
|
||||||
let g:rgb_colors.palegreen3 = '7ccd7c'
|
|
||||||
let g:rgb_colors.palegreen4 = '548b54'
|
|
||||||
let g:rgb_colors.paleturquoise = 'afeeee'
|
|
||||||
let g:rgb_colors.paleturquoise1 = 'bbffff'
|
|
||||||
let g:rgb_colors.paleturquoise2 = 'aeeeee'
|
|
||||||
let g:rgb_colors.paleturquoise3 = '96cdcd'
|
|
||||||
let g:rgb_colors.paleturquoise4 = '668b8b'
|
|
||||||
let g:rgb_colors.palevioletred = 'db7093'
|
|
||||||
let g:rgb_colors.palevioletred1 = 'ff82ab'
|
|
||||||
let g:rgb_colors.palevioletred2 = 'ee799f'
|
|
||||||
let g:rgb_colors.palevioletred3 = 'cd6889'
|
|
||||||
let g:rgb_colors.palevioletred4 = '8b475d'
|
|
||||||
let g:rgb_colors.papayawhip = 'ffefd5'
|
|
||||||
let g:rgb_colors.peachpuff = 'ffdab9'
|
|
||||||
let g:rgb_colors.peachpuff1 = 'ffdab9'
|
|
||||||
let g:rgb_colors.peachpuff2 = 'eecbad'
|
|
||||||
let g:rgb_colors.peachpuff3 = 'cdaf95'
|
|
||||||
let g:rgb_colors.peachpuff4 = '8b7765'
|
|
||||||
let g:rgb_colors.peru = 'cd853f'
|
|
||||||
let g:rgb_colors.pink = 'ffc0cb'
|
|
||||||
let g:rgb_colors.pink1 = 'ffb5c5'
|
|
||||||
let g:rgb_colors.pink2 = 'eea9b8'
|
|
||||||
let g:rgb_colors.pink3 = 'cd919e'
|
|
||||||
let g:rgb_colors.pink4 = '8b636c'
|
|
||||||
let g:rgb_colors.plum = 'dda0dd'
|
|
||||||
let g:rgb_colors.plum1 = 'ffbbff'
|
|
||||||
let g:rgb_colors.plum2 = 'eeaeee'
|
|
||||||
let g:rgb_colors.plum3 = 'cd96cd'
|
|
||||||
let g:rgb_colors.plum4 = '8b668b'
|
|
||||||
let g:rgb_colors.powderblue = 'b0e0e6'
|
|
||||||
let g:rgb_colors.purple = 'a020f0'
|
|
||||||
let g:rgb_colors.purple1 = '9b30ff'
|
|
||||||
let g:rgb_colors.purple2 = '912cee'
|
|
||||||
let g:rgb_colors.purple3 = '7d26cd'
|
|
||||||
let g:rgb_colors.purple4 = '551a8b'
|
|
||||||
let g:rgb_colors.red = 'ff0000'
|
|
||||||
let g:rgb_colors.red1 = 'ff0000'
|
|
||||||
let g:rgb_colors.red2 = 'ee0000'
|
|
||||||
let g:rgb_colors.red3 = 'cd0000'
|
|
||||||
let g:rgb_colors.red4 = '8b0000'
|
|
||||||
let g:rgb_colors.rosybrown = 'bc8f8f'
|
|
||||||
let g:rgb_colors.rosybrown1 = 'ffc1c1'
|
|
||||||
let g:rgb_colors.rosybrown2 = 'eeb4b4'
|
|
||||||
let g:rgb_colors.rosybrown3 = 'cd9b9b'
|
|
||||||
let g:rgb_colors.rosybrown4 = '8b6969'
|
|
||||||
let g:rgb_colors.royalblue = '4169e1'
|
|
||||||
let g:rgb_colors.royalblue1 = '4876ff'
|
|
||||||
let g:rgb_colors.royalblue2 = '436eee'
|
|
||||||
let g:rgb_colors.royalblue3 = '3a5fcd'
|
|
||||||
let g:rgb_colors.royalblue4 = '27408b'
|
|
||||||
let g:rgb_colors.saddlebrown = '8b4513'
|
|
||||||
let g:rgb_colors.salmon = 'fa8072'
|
|
||||||
let g:rgb_colors.salmon1 = 'ff8c69'
|
|
||||||
let g:rgb_colors.salmon2 = 'ee8262'
|
|
||||||
let g:rgb_colors.salmon3 = 'cd7054'
|
|
||||||
let g:rgb_colors.salmon4 = '8b4c39'
|
|
||||||
let g:rgb_colors.sandybrown = 'f4a460'
|
|
||||||
let g:rgb_colors.seagreen = '2e8b57'
|
|
||||||
let g:rgb_colors.seagreen1 = '54ff9f'
|
|
||||||
let g:rgb_colors.seagreen2 = '4eee94'
|
|
||||||
let g:rgb_colors.seagreen3 = '43cd80'
|
|
||||||
let g:rgb_colors.seagreen4 = '2e8b57'
|
|
||||||
let g:rgb_colors.seashell = 'fff5ee'
|
|
||||||
let g:rgb_colors.seashell1 = 'fff5ee'
|
|
||||||
let g:rgb_colors.seashell2 = 'eee5de'
|
|
||||||
let g:rgb_colors.seashell3 = 'cdc5bf'
|
|
||||||
let g:rgb_colors.seashell4 = '8b8682'
|
|
||||||
let g:rgb_colors.sienna = 'a0522d'
|
|
||||||
let g:rgb_colors.sienna1 = 'ff8247'
|
|
||||||
let g:rgb_colors.sienna2 = 'ee7942'
|
|
||||||
let g:rgb_colors.sienna3 = 'cd6839'
|
|
||||||
let g:rgb_colors.sienna4 = '8b4726'
|
|
||||||
let g:rgb_colors.skyblue = '87ceeb'
|
|
||||||
let g:rgb_colors.skyblue1 = '87ceff'
|
|
||||||
let g:rgb_colors.skyblue2 = '7ec0ee'
|
|
||||||
let g:rgb_colors.skyblue3 = '6ca6cd'
|
|
||||||
let g:rgb_colors.skyblue4 = '4a708b'
|
|
||||||
let g:rgb_colors.slateblue = '6a5acd'
|
|
||||||
let g:rgb_colors.slateblue1 = '836fff'
|
|
||||||
let g:rgb_colors.slateblue2 = '7a67ee'
|
|
||||||
let g:rgb_colors.slateblue3 = '6959cd'
|
|
||||||
let g:rgb_colors.slateblue4 = '473c8b'
|
|
||||||
let g:rgb_colors.slategray = '708090'
|
|
||||||
let g:rgb_colors.slategray1 = 'c6e2ff'
|
|
||||||
let g:rgb_colors.slategray2 = 'b9d3ee'
|
|
||||||
let g:rgb_colors.slategray3 = '9fb6cd'
|
|
||||||
let g:rgb_colors.slategray4 = '6c7b8b'
|
|
||||||
let g:rgb_colors.slategrey = '708090'
|
|
||||||
let g:rgb_colors.snow = 'fffafa'
|
|
||||||
let g:rgb_colors.snow1 = 'fffafa'
|
|
||||||
let g:rgb_colors.snow2 = 'eee9e9'
|
|
||||||
let g:rgb_colors.snow3 = 'cdc9c9'
|
|
||||||
let g:rgb_colors.snow4 = '8b8989'
|
|
||||||
let g:rgb_colors.springgreen = '00ff7f'
|
|
||||||
let g:rgb_colors.springgreen1 = '00ff7f'
|
|
||||||
let g:rgb_colors.springgreen2 = '00ee76'
|
|
||||||
let g:rgb_colors.springgreen3 = '00cd66'
|
|
||||||
let g:rgb_colors.springgreen4 = '008b45'
|
|
||||||
let g:rgb_colors.steelblue = '4682b4'
|
|
||||||
let g:rgb_colors.steelblue1 = '63b8ff'
|
|
||||||
let g:rgb_colors.steelblue2 = '5cacee'
|
|
||||||
let g:rgb_colors.steelblue3 = '4f94cd'
|
|
||||||
let g:rgb_colors.steelblue4 = '36648b'
|
|
||||||
let g:rgb_colors.tan = 'd2b48c'
|
|
||||||
let g:rgb_colors.tan1 = 'ffa54f'
|
|
||||||
let g:rgb_colors.tan2 = 'ee9a49'
|
|
||||||
let g:rgb_colors.tan3 = 'cd853f'
|
|
||||||
let g:rgb_colors.tan4 = '8b5a2b'
|
|
||||||
let g:rgb_colors.thistle = 'd8bfd8'
|
|
||||||
let g:rgb_colors.thistle1 = 'ffe1ff'
|
|
||||||
let g:rgb_colors.thistle2 = 'eed2ee'
|
|
||||||
let g:rgb_colors.thistle3 = 'cdb5cd'
|
|
||||||
let g:rgb_colors.thistle4 = '8b7b8b'
|
|
||||||
let g:rgb_colors.tomato = 'ff6347'
|
|
||||||
let g:rgb_colors.tomato1 = 'ff6347'
|
|
||||||
let g:rgb_colors.tomato2 = 'ee5c42'
|
|
||||||
let g:rgb_colors.tomato3 = 'cd4f39'
|
|
||||||
let g:rgb_colors.tomato4 = '8b3626'
|
|
||||||
let g:rgb_colors.turquoise = '40e0d0'
|
|
||||||
let g:rgb_colors.turquoise1 = '00f5ff'
|
|
||||||
let g:rgb_colors.turquoise2 = '00e5ee'
|
|
||||||
let g:rgb_colors.turquoise3 = '00c5cd'
|
|
||||||
let g:rgb_colors.turquoise4 = '00868b'
|
|
||||||
let g:rgb_colors.violet = 'ee82ee'
|
|
||||||
let g:rgb_colors.violetred = 'd02090'
|
|
||||||
let g:rgb_colors.violetred1 = 'ff3e96'
|
|
||||||
let g:rgb_colors.violetred2 = 'ee3a8c'
|
|
||||||
let g:rgb_colors.violetred3 = 'cd3278'
|
|
||||||
let g:rgb_colors.violetred4 = '8b2252'
|
|
||||||
let g:rgb_colors.wheat = 'f5deb3'
|
|
||||||
let g:rgb_colors.wheat1 = 'ffe7ba'
|
|
||||||
let g:rgb_colors.wheat2 = 'eed8ae'
|
|
||||||
let g:rgb_colors.wheat3 = 'cdba96'
|
|
||||||
let g:rgb_colors.wheat4 = '8b7e66'
|
|
||||||
let g:rgb_colors.white = 'ffffff'
|
|
||||||
let g:rgb_colors.whitesmoke = 'f5f5f5'
|
|
||||||
let g:rgb_colors.yellow = 'ffff00'
|
|
||||||
let g:rgb_colors.yellow1 = 'ffff00'
|
|
||||||
let g:rgb_colors.yellow2 = 'eeee00'
|
|
||||||
let g:rgb_colors.yellow3 = 'cdcd00'
|
|
||||||
let g:rgb_colors.yellow4 = '8b8b00'
|
|
||||||
let g:rgb_colors.yellowgreen = '9acd32'
|
|
||||||
|
|
||||||
" vim: set ft=vim:
|
|
||||||
2
private_dot_config/nvim/init.lua
Normal file
2
private_dot_config/nvim/init.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
|
require("config.lazy")
|
||||||
@ -1,219 +0,0 @@
|
|||||||
packadd minpac
|
|
||||||
call minpac#init()
|
|
||||||
" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
|
|
||||||
call minpac#add('k-takata/minpac', {'type': 'opt'})
|
|
||||||
call minpac#add('honza/vim-snippets', {'type': 'start'})
|
|
||||||
call minpac#add('SirVer/ultisnips')
|
|
||||||
call minpac#add('junegunn/limelight.vim')
|
|
||||||
call minpac#add('junegunn/goyo.vim')
|
|
||||||
call minpac#add('junegunn/fzf')
|
|
||||||
call minpac#add('junegunn/fzf.vim')
|
|
||||||
call minpac#add('ambv/black')
|
|
||||||
call minpac#add('davidhalter/jedi-vim')
|
|
||||||
call minpac#add('vim-airline/vim-airline')
|
|
||||||
call minpac#add('ap/vim-css-color')
|
|
||||||
call minpac#add('fatih/vim-go')
|
|
||||||
call minpac#add('dpelle/vim-Grammalecte')
|
|
||||||
call minpac#add('ledger/vim-ledger')
|
|
||||||
call minpac#add('tpope/vim-markdown')
|
|
||||||
call minpac#add('nfnty/vim-nftables')
|
|
||||||
call minpac#add('cespare/vim-toml')
|
|
||||||
call minpac#add('pbrisbin/vim-mkdir')
|
|
||||||
call minpac#add('tpope/vim-eunuch')
|
|
||||||
call minpac#add('lambdalisue/suda.vim')
|
|
||||||
call minpac#add('airblade/vim-gitgutter')
|
|
||||||
call minpac#add('thaerkh/vim-indentguides')
|
|
||||||
call minpac#add('Shougo/deoplete.nvim')
|
|
||||||
call minpac#add('dense-analysis/ale')
|
|
||||||
|
|
||||||
command! PU call minpac#update()
|
|
||||||
command! PC call minpac#clean()
|
|
||||||
command! PS call minpac#status()
|
|
||||||
|
|
||||||
cmap w!! w suda://%
|
|
||||||
|
|
||||||
colorscheme desert-warm-256
|
|
||||||
|
|
||||||
let g:deoplete#enable_at_startup = 1
|
|
||||||
let g:UltiSnipsSnippetDirectories=["UltiSnips", "mysnippets"]
|
|
||||||
let g:indentguides_ignorelist = ['txt','md','help']
|
|
||||||
let g:rustfmt_autosave = 1
|
|
||||||
let g:netrw_dirhistmax = 0
|
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
let g:limelight_conceal_ctermfg = 'gray'
|
|
||||||
let g:snips_author = 'Julien Rabier'
|
|
||||||
let g:name = 'Julien Rabier'
|
|
||||||
let g:nickname = 'taziden'
|
|
||||||
let mapleader=","
|
|
||||||
set completeopt=menuone,noselect,noinsert
|
|
||||||
set backup
|
|
||||||
set backupdir=~/.vim/backup
|
|
||||||
set hidden
|
|
||||||
set ignorecase
|
|
||||||
set lcs:tab:>-,trail:.
|
|
||||||
set list
|
|
||||||
set modeline
|
|
||||||
set number
|
|
||||||
set showmatch
|
|
||||||
set spelllang=fr
|
|
||||||
set statusline+=%#warningmsg#
|
|
||||||
set statusline+=%*
|
|
||||||
set undofile
|
|
||||||
set undodir=~/.vim/undo
|
|
||||||
"set virtualedit=all
|
|
||||||
"set clipboard=unnamed
|
|
||||||
set expandtab
|
|
||||||
set tabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
set softtabstop=4
|
|
||||||
set pastetoggle=<F2>
|
|
||||||
"set formatoptions=tcrqn2w
|
|
||||||
"set formatlistpat=^\\s*[\\d\\*-]\\+[\\]:.)}\\t\ ]\\s*
|
|
||||||
"set dictionary=/usr/share/dict/words
|
|
||||||
|
|
||||||
highlight clear SpellBad
|
|
||||||
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
|
|
||||||
highlight clear SpellCap
|
|
||||||
highlight SpellCap term=standout ctermfg=3 term=underline cterm=underline
|
|
||||||
highlight clear SpellRare
|
|
||||||
highlight SpellRare term=underline cterm=underline
|
|
||||||
highlight clear SpellLocal
|
|
||||||
highlight SpellLocal term=underline cterm=underline
|
|
||||||
highlight RedundantSpaces ctermbg=red guibg=red
|
|
||||||
match RedundantSpaces /\s\+$\| \+\ze\t\|\t/
|
|
||||||
|
|
||||||
" Jump to the last position when reopening a file
|
|
||||||
if has("autocmd")
|
|
||||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
au Filetype yaml silent setlocal foldmethod=marker tw=80 ts=2 sw=2 sts=2 foldlevel=0
|
|
||||||
|
|
||||||
"inoremap <silent> <expr> <plug>MyCR
|
|
||||||
" \ mucomplete#ultisnips#expand_snippet("\<cr>")
|
|
||||||
"imap <cr> <plug>MyCR
|
|
||||||
|
|
||||||
nnoremap <C-j> <C-w><C-j>
|
|
||||||
nnoremap <C-k> <C-w><C-k>
|
|
||||||
nnoremap <C-h> <C-w><C-h>
|
|
||||||
nnoremap <C-l> <C-w><C-l>
|
|
||||||
nmap <F8> :TagbarToggle<CR>
|
|
||||||
map <F9> <esc>:!hugo server -Dw<CR>
|
|
||||||
map ,ga :!git add -p<cr>
|
|
||||||
map ,gA :!git add %<cr>
|
|
||||||
map ,gf :!git add
|
|
||||||
map ,gs :!git status<cr>
|
|
||||||
map ,gc :!git commit -m ""<left>
|
|
||||||
map ,gC :!git add %<cr>:!git commit -m ""<left>
|
|
||||||
map ,gd :!git diff<cr>
|
|
||||||
map ,gD :!git diff --cached<cr>
|
|
||||||
map ,gp :!git push<cr>
|
|
||||||
map ,gP :!git pull<cr>
|
|
||||||
map ,gb :!git branch<cr>
|
|
||||||
map ,gB :!git branch
|
|
||||||
map ,gh :!git checkout
|
|
||||||
map ,gi :!git init<cr>
|
|
||||||
map ,gt :!tig<cr>
|
|
||||||
map <A-Left> :bp<cr> " Alt + Left arrow goes to the previous buffer
|
|
||||||
map <A-Right> :bn<cr> " Alt + Right arrow goes to the next buffer
|
|
||||||
nnoremap <silent> <c-s> :NV<CR>
|
|
||||||
|
|
||||||
function! s:goyo_enter()
|
|
||||||
let b:quitting = 0
|
|
||||||
let b:quitting_bang = 0
|
|
||||||
autocmd QuitPre <buffer> let b:quitting = 1
|
|
||||||
cabbrev <buffer> q! let b:quitting_bang = 1 <bar> q!
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:goyo_leave()
|
|
||||||
" Quit Vim if this is the only remaining buffer
|
|
||||||
if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1
|
|
||||||
if b:quitting_bang
|
|
||||||
qa!
|
|
||||||
else
|
|
||||||
qa
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
autocmd! User GoyoEnter call <SID>goyo_enter()
|
|
||||||
autocmd! User GoyoLeave call <SID>goyo_leave()
|
|
||||||
|
|
||||||
command! -bang -nargs=? -complete=dir Files
|
|
||||||
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
|
|
||||||
nnoremap <c-p> :Files<cr>
|
|
||||||
nnoremap ,ff :RG<cr>
|
|
||||||
|
|
||||||
function! RipgrepFzf(query, fullscreen)
|
|
||||||
let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case %s || true'
|
|
||||||
let initial_command = printf(command_fmt, shellescape(a:query))
|
|
||||||
let reload_command = printf(command_fmt, '{q}')
|
|
||||||
let spec = {'options': ['--phony', '--query', a:query, '--bind', 'change:reload:'.reload_command]}
|
|
||||||
call fzf#vim#grep(initial_command, 1, fzf#vim#with_preview(spec), a:fullscreen)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
command! -nargs=* -bang RG call RipgrepFzf(<q-args>, <bang>0)
|
|
||||||
|
|
||||||
let g:fzf_action = {
|
|
||||||
\ 'ctrl-s': 'split',
|
|
||||||
\ 'ctrl-v': 'vsplit',
|
|
||||||
\ 'ctrl-t': 'edit',
|
|
||||||
\ 'enter': 'tabedit',
|
|
||||||
\ }
|
|
||||||
|
|
||||||
nnoremap ,f :FZF<cr>
|
|
||||||
|
|
||||||
{{- if eq .chezmoi.osRelease.prettyName "Debian GNU/Linux 10 (buster)" }}
|
|
||||||
let g:go_version_warning = 0
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if eq .chezmoi.hostname "taupo" }}
|
|
||||||
call minpac#add('alok/notational-fzf-vim')
|
|
||||||
call minpac#add('rust-lang/rust.vim')
|
|
||||||
call minpac#add('racer-rust/vim-racer')
|
|
||||||
call minpac#add('mhinz/vim-crates')
|
|
||||||
call minpac#add('tpope/vim-dispatch')
|
|
||||||
call minpac#add('paretje/deoplete-notmuch')
|
|
||||||
call minpac#add('deoplete-plugins/deoplete-dictionary')
|
|
||||||
call minpac#add('dpelle/vim-Grammalecte')
|
|
||||||
call minpac#add('itspriddle/vim-shellcheck')
|
|
||||||
|
|
||||||
let g:grammalecte_cli_py='/home/taziden/prog/grammalecte/grammalecte-cli.py'
|
|
||||||
let g:racer_experimental_completer = 1
|
|
||||||
let g:nv_search_paths = ['./notes', '~/notes', '~/projets/sysnove/notes']
|
|
||||||
let g:nv_default_extension = '.md'
|
|
||||||
let g:nv_create_note_window = 'edit'
|
|
||||||
map <F5> <esc>:!pdflatex %<CR>
|
|
||||||
map <F6> <esc>:!pinpoint %<CR>
|
|
||||||
map <F9> <esc>:!hugo server -Dw<CR>
|
|
||||||
map ,b :!bash gen.sh<cr><cr>
|
|
||||||
map ,c <esc>2GddOTo: contact@sysnove.fr<esc>jddOCc: <esc>
|
|
||||||
autocmd BufNewFile,BufRead *.hledger,*.ledger,*.journal setfiletype ledger
|
|
||||||
autocmd BufNewFile,BufRead *.vim.tmpl setfiletype vim
|
|
||||||
autocmd BufWritePost devis*.md :Start! bash gen.sh
|
|
||||||
autocmd Filetype ledger set nospell
|
|
||||||
autocmd CompleteDone * silent! pclose!
|
|
||||||
|
|
||||||
"autocmd VimEnter * call deoplete#custom#source('dictionary', 'filetypes', ['markdown','mail','txt'])
|
|
||||||
|
|
||||||
" Racer
|
|
||||||
augroup Racer
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType rust nmap <buffer> <leader>gd <Plug>(rust-def)
|
|
||||||
autocmd FileType rust nmap <buffer> <leader>gs <Plug>(rust-def-split)
|
|
||||||
autocmd FileType rust nmap <buffer> <leader>gx <Plug>(rust-def-vertical)
|
|
||||||
autocmd FileType rust nmap <buffer> <leader>gt <Plug>(rust-def-tab)
|
|
||||||
autocmd FileType rust nmap <buffer> gd <Plug>(rust-doc-tab)
|
|
||||||
autocmd FileType rust nmap <buffer> gD <Plug>(rust-doc)
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
let g:ale_linters = {'rust': ['analyzer', 'cargo', 'rls', 'rustc']}
|
|
||||||
let g:ale_fixers = {
|
|
||||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
|
||||||
\ 'rust': ['rustfmt'],
|
|
||||||
\}
|
|
||||||
let g:ale_fix_onsave = 1
|
|
||||||
|
|
||||||
autocmd BufRead Cargo.toml call crates#toggle()
|
|
||||||
{{- end }}
|
|
||||||
3
private_dot_config/nvim/lua/config/autocmds.lua
Normal file
3
private_dot_config/nvim/lua/config/autocmds.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
|
-- Add any additional autocmds here
|
||||||
3
private_dot_config/nvim/lua/config/keymaps.lua
Normal file
3
private_dot_config/nvim/lua/config/keymaps.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
|
-- Add any additional keymaps here
|
||||||
40
private_dot_config/nvim/lua/config/lazy.lua
Normal file
40
private_dot_config/nvim/lua/config/lazy.lua
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
-- bootstrap lazy.nvim
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- import LazyVim plugins
|
||||||
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
-- import any extras modules here
|
||||||
|
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
lazy = true, -- every plugin is lazy-loaded by default
|
||||||
|
version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||||
|
checker = { enabled = true }, -- automatically check for plugin updates
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
"matchit",
|
||||||
|
"matchparen",
|
||||||
|
"netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
3
private_dot_config/nvim/lua/config/options.lua
Normal file
3
private_dot_config/nvim/lua/config/options.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
|
-- Add any additional options here
|
||||||
189
private_dot_config/nvim/lua/plugins/example.lua
Normal file
189
private_dot_config/nvim/lua/plugins/example.lua
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||||
|
-- stylua: ignore
|
||||||
|
if true then return {} end
|
||||||
|
|
||||||
|
-- every spec file under config.plugins will be loaded automatically by lazy.nvim
|
||||||
|
--
|
||||||
|
-- In your plugin files, you can:
|
||||||
|
-- * add extra plugins
|
||||||
|
-- * disable/enabled LazyVim plugins
|
||||||
|
-- * override the configuration of LazyVim plugins
|
||||||
|
return {
|
||||||
|
-- change trouble config
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
-- opts will be merged with the parent spec
|
||||||
|
opts = { use_diagnostic_signs = true },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- disable trouble
|
||||||
|
{ "folke/trouble.nvim", enabled = false },
|
||||||
|
|
||||||
|
-- add symbols-outline
|
||||||
|
{
|
||||||
|
"simrat39/symbols-outline.nvim",
|
||||||
|
cmd = "SymbolsOutline",
|
||||||
|
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- override nvim-cmp and add cmp-emoji
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = { "hrsh7th/cmp-emoji" },
|
||||||
|
---@param opts cmp.ConfigSchema
|
||||||
|
opts = function(_, opts)
|
||||||
|
local cmp = require("cmp")
|
||||||
|
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- change some telescope options and add telescope-fzf-native
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = { { "nvim-telescope/telescope-fzf-native.nvim", build = "make" } },
|
||||||
|
keys = {
|
||||||
|
-- add a keymap to browse plugin files
|
||||||
|
-- stylua: ignore
|
||||||
|
{
|
||||||
|
"<leader>fp",
|
||||||
|
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||||
|
desc = "Find Plugin File",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- change some options
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
layout_strategy = "horizontal",
|
||||||
|
layout_config = { prompt_position = "top" },
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
winblend = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- apply the config and additionally load fzf-native
|
||||||
|
config = function(_, opts)
|
||||||
|
local telescope = require("telescope")
|
||||||
|
telescope.setup(opts)
|
||||||
|
telescope.load_extension("fzf")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add pyright and setup tsserver with typescript.nvim
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"jose-elias-alvarez/typescript.nvim",
|
||||||
|
init = function()
|
||||||
|
require("lazyvim.util").on_attach(function(_, buffer)
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||||
|
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
---@class PluginLspOpts
|
||||||
|
opts = {
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||||
|
pyright = {},
|
||||||
|
tsserver = {},
|
||||||
|
},
|
||||||
|
-- you can do any additional lsp server setup here
|
||||||
|
-- return true if you don't want this server to be setup with lspconfig
|
||||||
|
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||||
|
setup = {
|
||||||
|
-- example to setup with typescript.nvim
|
||||||
|
tsserver = function(_, opts)
|
||||||
|
require("typescript").setup({ server = opts })
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
-- Specify * to use this function as a fallback for any server
|
||||||
|
-- ["*"] = function(server, opts) end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||||
|
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
|
||||||
|
-- add more treesitter parsers
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"help",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"python",
|
||||||
|
"query",
|
||||||
|
"regex",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vim",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||||
|
-- would overwrite `ensure_installed` with the ne value.
|
||||||
|
-- If you'd rather extend the default config, use the code below instead:
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
vim.list_extend(opts.ensure_installed, {
|
||||||
|
-- add tsx and treesitter
|
||||||
|
ensure_installed = {
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- the opts function can also be used to change the default opts:
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sections.lualine_x, "😄")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- or you can return new options to override all the defaults
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
return {
|
||||||
|
--[[add your custom lualine config here]]
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- use mini.starter instead of alpha
|
||||||
|
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||||
|
|
||||||
|
-- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
|
||||||
|
-- add any tools you want to have installed below
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"stylua",
|
||||||
|
"shellcheck",
|
||||||
|
"shfmt",
|
||||||
|
"flake8",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@ -1,259 +0,0 @@
|
|||||||
# Global snippets
|
|
||||||
|
|
||||||
snippet BUG
|
|
||||||
:BUG:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
snippet DEBUG
|
|
||||||
:DEBUG:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
snippet WARNING
|
|
||||||
:WARNING:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
snippet TODO
|
|
||||||
:TODO:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
snippet KLUDGE
|
|
||||||
:KLUDGE:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
snippet COMMENT
|
|
||||||
:COMMENT:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
snippet TRICKY
|
|
||||||
:TRICKY:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
snippet DOC
|
|
||||||
:DOC:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
snippet EXPIRE
|
|
||||||
:EXPIRE:`g:nickname`:`strftime("%Y%m%d")`: ${1}
|
|
||||||
|
|
||||||
snippet c)
|
|
||||||
Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.
|
|
||||||
snippet date
|
|
||||||
`strftime("%Y-%m-%d")`
|
|
||||||
snippet ddate
|
|
||||||
`strftime("%B %d, %Y")`
|
|
||||||
snippet time
|
|
||||||
`strftime("%H:%M")`
|
|
||||||
snippet datetime
|
|
||||||
`strftime("%Y-%m-%d %H:%M")`
|
|
||||||
snippet lorem
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
||||||
snippet GPL2
|
|
||||||
${1:One line to give the program's name and a brief description.}
|
|
||||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet LGPL2
|
|
||||||
${1:One line to give the program's name and a brief description.}
|
|
||||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet GPL3
|
|
||||||
${1:one line to give the program's name and a brief description.}
|
|
||||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet LGPL3
|
|
||||||
${1:One line to give the program's name and a brief description.}
|
|
||||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published
|
|
||||||
by the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet BSD2
|
|
||||||
${1:one line to give the program's name and a brief description}
|
|
||||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
|
|
||||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
|
|
||||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
|
||||||
The views and conclusions contained in the software and documentation
|
|
||||||
are those of the authors and should not be interpreted as representing
|
|
||||||
official policies, either expressedor implied, of $2.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet BSD3
|
|
||||||
${1:one line to give the program's name and a brief description}
|
|
||||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
3. Neither the name of the ${3:organization} nor the
|
|
||||||
names of its contributors may be used to endorse or promote products
|
|
||||||
derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
|
|
||||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
|
|
||||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet BSD4
|
|
||||||
${1:one line to give the program's name and a brief description}
|
|
||||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
3. All advertising materials mentioning features or use of this software
|
|
||||||
must display the following acknowledgement:
|
|
||||||
This product includes software developed by the ${3:organization}.
|
|
||||||
4. Neither the name of the $3 nor the
|
|
||||||
names of its contributors may be used to endorse or promote products
|
|
||||||
derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
|
|
||||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
|
|
||||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet MIT
|
|
||||||
${1:one line to give the program's name and a brief description}
|
|
||||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
||||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
|
||||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet APACHE
|
|
||||||
${1:one line to give the program's name and a brief description}
|
|
||||||
Copyright `strftime("%Y")` ${2:copyright holder}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
||||||
${0}
|
|
||||||
snippet BEERWARE
|
|
||||||
${2:one line to give the program's name and a brief description}
|
|
||||||
Copyright `strftime("%Y")` ${3:copyright holder}
|
|
||||||
|
|
||||||
Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
|
|
||||||
${1:`g:snips_author`} wrote this file. As long as you retain this notice you
|
|
||||||
can do whatever you want with this stuff. If we meet some day, and you think
|
|
||||||
this stuff is worth it, you can buy me a beer or coffee in return
|
|
||||||
|
|
||||||
${0}
|
|
||||||
|
|
||||||
snippet WTFPL
|
|
||||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
|
||||||
Version 2, December 2004
|
|
||||||
|
|
||||||
Copyright `strftime("%Y")` ${0:copyright holder}
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim or modified
|
|
||||||
copies of this license document, and changing it is allowed as long
|
|
||||||
as the name is changed.
|
|
||||||
|
|
||||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
snippet cd
|
|
||||||
Cordialement,
|
|
||||||
endsnippet
|
|
||||||
snippet bo
|
|
||||||
Bonjour,
|
|
||||||
endsnippet
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
*~
|
|
||||||
*.sw?
|
|
||||||
*.orig
|
|
||||||
*.rej
|
|
||||||
tags
|
|
||||||
@ -1,75 +0,0 @@
|
|||||||
language: generic
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/opt
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- OPT=$HOME/opt
|
|
||||||
- CACHE=$OPT/cache
|
|
||||||
- BREWCACHE=$HOME/Library/Caches/Homebrew
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: linux
|
|
||||||
dist: focal
|
|
||||||
env: VIM=vim VIMPROG=$OPT/bin/$VIM
|
|
||||||
- os: linux
|
|
||||||
dist: focal
|
|
||||||
env: VIM=nvim VIMPROG=$VIM
|
|
||||||
- os: osx
|
|
||||||
osx_image: xcode12
|
|
||||||
env: VIM=vim PACKAGE=vim VIMPROG=$VIM
|
|
||||||
- os: osx
|
|
||||||
osx_image: xcode12
|
|
||||||
env: VIM=nvim PACKAGE=neovim VIMPROG=$VIM
|
|
||||||
|
|
||||||
|
|
||||||
install: |
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
|
||||||
if [ "$VIM" = "vim" ]; then
|
|
||||||
git clone --depth 1 https://github.com/vim/vim
|
|
||||||
cd vim
|
|
||||||
echo -n 'Vim version: '
|
|
||||||
git describe --tags | tee vim-ver.txt
|
|
||||||
if [ -e $OPT/vim-ver.txt ]; then
|
|
||||||
if diff $OPT/vim-ver.txt vim-ver.txt; then
|
|
||||||
cd -
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
./configure --prefix=$OPT --with-features=huge --disable-gui
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
cp vim-ver.txt $OPT
|
|
||||||
cd -
|
|
||||||
elif [ "$VIM" = "nvim" ]; then
|
|
||||||
# https://github.com/neovim/bot-ci#setting-up-integration-builds
|
|
||||||
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64"
|
|
||||||
fi
|
|
||||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
||||||
if [ -d $CACHE ]; then
|
|
||||||
if [ "$(echo $CACHE/*)" != "$CACHE/*" ]; then
|
|
||||||
cp $CACHE/* $BREWCACHE
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
mkdir $CACHE -p
|
|
||||||
fi
|
|
||||||
(cd $BREWCACHE; ls > $HOME/list1.txt)
|
|
||||||
brew update
|
|
||||||
#brew upgrade
|
|
||||||
brew install $PACKAGE
|
|
||||||
brew cleanup -s
|
|
||||||
(cd $BREWCACHE; ls > $HOME/list2.txt)
|
|
||||||
comm -1 -3 $HOME/list1.txt $HOME/list2.txt | (cd $BREWCACHE; xargs -I{} cp {} $CACHE)
|
|
||||||
comm -2 -3 $HOME/list1.txt $HOME/list2.txt | (cd $CACHE; xargs rm -rf)
|
|
||||||
$VIM --version
|
|
||||||
fi
|
|
||||||
|
|
||||||
script:
|
|
||||||
- cd test
|
|
||||||
- make VIMPROG=$VIMPROG
|
|
||||||
|
|
||||||
# vim: sw=2 sts=2 et
|
|
||||||
@ -1,518 +0,0 @@
|
|||||||
[](https://github.com/k-takata/minpac/actions)
|
|
||||||
[](https://ci.appveyor.com/project/k-takata/minpac/branch/master)
|
|
||||||
|
|
||||||
minpac: A minimal package manager for Vim 8 (and Neovim)
|
|
||||||
========================================================
|
|
||||||
|
|
||||||
Overview
|
|
||||||
--------
|
|
||||||
|
|
||||||
Minpac is a minimal package manager for Vim 8 (and Neovim). This uses the
|
|
||||||
[packages](http://vim-jp.org/vimdoc-en/repeat.html#packages) feature and
|
|
||||||
the [jobs](http://vim-jp.org/vimdoc-en/channel.html#job-channel-overview)
|
|
||||||
feature which have been newly added on Vim 8.
|
|
||||||
|
|
||||||
Concept
|
|
||||||
-------
|
|
||||||
|
|
||||||
* Utilize Vim 8's packages feature.
|
|
||||||
* Parallel install/update using Vim 8's jobs feature.
|
|
||||||
* Simple.
|
|
||||||
* Fast.
|
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
|
||||||
------------
|
|
||||||
|
|
||||||
* Vim 8.0.0050+ (or Neovim 0.2+)
|
|
||||||
* Git 1.9+
|
|
||||||
* OS: Windows, Linux or macOS
|
|
||||||
|
|
||||||
|
|
||||||
Installation
|
|
||||||
------------
|
|
||||||
|
|
||||||
Minpac should be installed under `pack/minpac/opt/` in the first directory
|
|
||||||
in the `'packpath'` option.
|
|
||||||
Plugins installed under `pack/*/start/` are automatically added to the `'runtimepath'` after `.vimrc` is sourced. However, minpac needs to be loaded before that. Therefore, minpac should be installed under "opt" directory, and should be loaded using `packadd minpac`.
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
|
|
||||||
Vim:
|
|
||||||
|
|
||||||
```cmd
|
|
||||||
git clone https://github.com/k-takata/minpac.git %USERPROFILE%\vimfiles\pack\minpac\opt\minpac
|
|
||||||
```
|
|
||||||
|
|
||||||
Neovim:
|
|
||||||
|
|
||||||
```cmd
|
|
||||||
git clone https://github.com/k-takata/minpac.git %LOCALAPPDATA%\nvim\pack\minpac\opt\minpac
|
|
||||||
```
|
|
||||||
|
|
||||||
### Linux, macOS
|
|
||||||
|
|
||||||
Vim:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/k-takata/minpac.git ~/.vim/pack/minpac/opt/minpac
|
|
||||||
```
|
|
||||||
|
|
||||||
Neovim (use `$XDG_CONFIG_HOME` in place of `~/.config` if set on your system):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/k-takata/minpac.git ~/.config/nvim/pack/minpac/opt/minpac
|
|
||||||
```
|
|
||||||
|
|
||||||
### Sample .vimrc
|
|
||||||
|
|
||||||
#### Basic sample
|
|
||||||
|
|
||||||
```vim
|
|
||||||
" Normally this if-block is not needed, because `:set nocp` is done
|
|
||||||
" automatically when .vimrc is found. However, this might be useful
|
|
||||||
" when you execute `vim -u .vimrc` from the command line.
|
|
||||||
if &compatible
|
|
||||||
" `:set nocp` has many side effects. Therefore this should be done
|
|
||||||
" only when 'compatible' is set.
|
|
||||||
set nocompatible
|
|
||||||
endif
|
|
||||||
|
|
||||||
packadd minpac
|
|
||||||
|
|
||||||
call minpac#init()
|
|
||||||
|
|
||||||
" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
|
|
||||||
call minpac#add('k-takata/minpac', {'type': 'opt'})
|
|
||||||
|
|
||||||
" Add other plugins here.
|
|
||||||
call minpac#add('vim-jp/syntax-vim-ex')
|
|
||||||
...
|
|
||||||
|
|
||||||
" Load the plugins right now. (optional)
|
|
||||||
"packloadall
|
|
||||||
```
|
|
||||||
|
|
||||||
Minpac itself requires 'compatible' to be unset. However, the `if &compatible`-block is optional.
|
|
||||||
|
|
||||||
#### Customizing 'packpath'
|
|
||||||
|
|
||||||
If you want to use `.vim` directory instead of `vimfiles` even on Windows,
|
|
||||||
you should add `~/.vim` on top of `'packpath'`:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
set packpath^=~/.vim
|
|
||||||
packadd minpac
|
|
||||||
|
|
||||||
call minpac#init()
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Advanced sample
|
|
||||||
|
|
||||||
You can write a .vimrc which can be also used even if minpac is not installed.
|
|
||||||
|
|
||||||
```vim
|
|
||||||
" Try to load minpac.
|
|
||||||
packadd minpac
|
|
||||||
|
|
||||||
if !exists('g:loaded_minpac')
|
|
||||||
" minpac is not available.
|
|
||||||
|
|
||||||
" Settings for plugin-less environment.
|
|
||||||
...
|
|
||||||
else
|
|
||||||
" minpac is available.
|
|
||||||
call minpac#init()
|
|
||||||
call minpac#add('k-takata/minpac', {'type': 'opt'})
|
|
||||||
|
|
||||||
" Additional plugins here.
|
|
||||||
...
|
|
||||||
|
|
||||||
" Plugin settings here.
|
|
||||||
...
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Common settings here.
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Load minpac on demand
|
|
||||||
|
|
||||||
Very interestingly, minpac doesn't need to be loaded every time when you execute Vim. Unlike other plugin managers, it is needed only when updating, installing or cleaning the plugins. This is because minpac itself doesn't handle the runtime path.
|
|
||||||
|
|
||||||
You can define user commands to load minpac, register the information of plugins, then call `minpac#update()`, `minpac#clean()` or `minpac#status()`.
|
|
||||||
|
|
||||||
```vim
|
|
||||||
function! PackInit() abort
|
|
||||||
packadd minpac
|
|
||||||
|
|
||||||
call minpac#init()
|
|
||||||
call minpac#add('k-takata/minpac', {'type': 'opt'})
|
|
||||||
|
|
||||||
" Additional plugins here.
|
|
||||||
call minpac#add('vim-jp/syntax-vim-ex')
|
|
||||||
call minpac#add('tyru/open-browser.vim')
|
|
||||||
...
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Plugin settings here.
|
|
||||||
...
|
|
||||||
|
|
||||||
" Define user commands for updating/cleaning the plugins.
|
|
||||||
" Each of them calls PackInit() to load minpac and register
|
|
||||||
" the information of plugins, then performs the task.
|
|
||||||
command! PackUpdate call PackInit() | call minpac#update()
|
|
||||||
command! PackClean call PackInit() | call minpac#clean()
|
|
||||||
command! PackStatus packadd minpac | call minpac#status()
|
|
||||||
```
|
|
||||||
|
|
||||||
If you make your .vimrc reloadable, you can reflect the setting of the .vimrc immediately after you edit it by executing `:so $MYVIMRC | PackUpdate`. Or you can define the commands like this:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
command! PackUpdate source $MYVIMRC | call PackInit() | call minpac#update()
|
|
||||||
command! PackClean source $MYVIMRC | call PackInit() | call minpac#clean()
|
|
||||||
command! PackStatus packadd minpac | call minpac#status()
|
|
||||||
```
|
|
||||||
|
|
||||||
To make your .vimrc reloadable:
|
|
||||||
|
|
||||||
* `:set nocompatible` should not be executed twice to avoid side effects.
|
|
||||||
* `:function!` should be used to define a user function.
|
|
||||||
* `:command!` should be used to define a user command.
|
|
||||||
* `:augroup!` should be used properly to avoid the same autogroups are defined twice.
|
|
||||||
|
|
||||||
|
|
||||||
Sometimes, you may want to open a shell at the directory where a plugin is installed. The following example defines a command to open a terminal window at the directory of a specified plugin. (Requires Vim 8.0.902 or later.)
|
|
||||||
|
|
||||||
```vim
|
|
||||||
function! PackList(...)
|
|
||||||
call PackInit()
|
|
||||||
return join(sort(keys(minpac#getpluglist())), "\n")
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
command! -nargs=1 -complete=custom,PackList
|
|
||||||
\ PackOpenDir call PackInit() | call term_start(&shell,
|
|
||||||
\ {'cwd': minpac#getpluginfo(<q-args>).dir,
|
|
||||||
\ 'term_finish': 'close'})
|
|
||||||
```
|
|
||||||
|
|
||||||
If you execute `:PackOpenDir minpac`, it will open a terminal window at `~/.vim/pack/minpac/opt/minpac` (or the directory where minpac is installed).
|
|
||||||
|
|
||||||
To define a command to open the repository of a plugin in a web browser:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
command! -nargs=1 -complete=custom,PackList
|
|
||||||
\ PackOpenUrl call PackInit() | call openbrowser#open(
|
|
||||||
\ minpac#getpluginfo(<q-args>).url)
|
|
||||||
```
|
|
||||||
|
|
||||||
This uses [open-browser.vim](https://github.com/tyru/open-browser.vim).
|
|
||||||
|
|
||||||
|
|
||||||
Usage
|
|
||||||
-----
|
|
||||||
|
|
||||||
### Commands
|
|
||||||
|
|
||||||
Minpac doesn't provide any commands. Use the `:call` command to call minpac
|
|
||||||
functions. E.g.:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
" To install or update plugins:
|
|
||||||
call minpac#update()
|
|
||||||
|
|
||||||
" To uninstall unused plugins:
|
|
||||||
call minpac#clean()
|
|
||||||
|
|
||||||
" To see plugins status:
|
|
||||||
call minpac#status()
|
|
||||||
```
|
|
||||||
|
|
||||||
Or define commands by yourself as described in the previous section.
|
|
||||||
|
|
||||||
|
|
||||||
### Functions
|
|
||||||
|
|
||||||
#### minpac#init([{config}])
|
|
||||||
|
|
||||||
Initialize minpac.
|
|
||||||
|
|
||||||
`{config}` is a Dictionary of options for configuring minpac.
|
|
||||||
|
|
||||||
| option | description |
|
|
||||||
|-----------|-------------|
|
|
||||||
| `'dir'` | Base directory. Default: the first directory of the `'packpath'` option. |
|
|
||||||
| `'package_name'` | Package name. Default: `'minpac'` |
|
|
||||||
| `'git'` | Git command. Default: `'git'` |
|
|
||||||
| `'depth'` | Default clone depth. Default: 1 |
|
|
||||||
| `'jobs'` | Maximum job numbers. If <= 0, unlimited. Default: 8 |
|
|
||||||
| `'verbose'` | Verbosity level (0 to 4).<br/>0: Show only important messages.<br/>1: Show the result of each plugin.<br/>2: Show error messages from external commands.<br/>3: Show start/end messages for each plugin.<br/>4: Show debug messages.<br/>Default: 2 |
|
|
||||||
| `'confirm'` | Show interactive confirmation prompts, such as in `minpac#clean()`.<br/>Default: TRUE |
|
|
||||||
| `'progress_open'` | Specify how to show the progress of `minpac#update()`.<br/>`'none'`: Do not open the progress window. (Compatible with minpac v2.0.x or earlier.)<br/>`'horizontal'`: Open the progress window by splitting horizontally.<br/>`'vertical'`: Open the progress window by splitting vertically.<br/>`'tab'`: Open the progress window in a new tab.<br/>Default: `'horizontal'` |
|
|
||||||
| `'status_open'` | Default setting for the open option of `minpac#status()`. Default: `'horizontal'` |
|
|
||||||
| `'status_auto'` | Specify whether the status window will open automatically after `minpac#update()` is finished.<br/>TRUE: Open the status window automatically, when one or more plugins are updated or installed.<br/>FALSE: Do not open the status window automatically.<br/>Default: FALSE |
|
|
||||||
|
|
||||||
All plugins will be installed under the following directories:
|
|
||||||
|
|
||||||
"start" plugins: <dir>/pack/<package_name>/start/<plugin_name>
|
|
||||||
"opt" plugins: <dir>/pack/<package_name>/opt/<plugin_name>
|
|
||||||
|
|
||||||
|
|
||||||
"start" plugins will be automatically loaded after processing your `.vimrc`, or you can load them explicitly using `:packloadall` command.
|
|
||||||
"opt" plugins can be loaded with `:packadd` command.
|
|
||||||
See `:help packages` for detail.
|
|
||||||
|
|
||||||
#### minpac#add({url}[, {config}])
|
|
||||||
|
|
||||||
Register a plugin.
|
|
||||||
|
|
||||||
`{url}` is a URL of a plugin. It can be a short form (`'<github-account>/<repository>'`) or a valid git URL. If you use the short form, `<repository>` should not include the ".git" suffix.
|
|
||||||
Note: Unlike Vundle, a short form without `<github-account>/` is not supported. (Because vim-scripts.org is not maintained now.)
|
|
||||||
|
|
||||||
`{config}` is a Dictionary of options for configuring the plugin.
|
|
||||||
|
|
||||||
| option | description |
|
|
||||||
|------------|-------------|
|
|
||||||
| `'name'` | Unique name of the plugin (`plugin_name`). Also used as a local directory name. Default: derived from the repository name. |
|
|
||||||
| `'type'` | Type of the plugin. `'start'` or `'opt'`. Default: `'start'` |
|
|
||||||
| `'frozen'` | If TRUE, the plugin will not be updated automatically. Default: FALSE |
|
|
||||||
| `'depth'` | If >= 1, it is used as a depth to be cloned. Only effective when install the plugin newly. Default: 1 or specified value by `minpac#init()`. |
|
|
||||||
| `'branch'` | Used as a branch name to be cloned. Only effective when install the plugin newly. Default: empty |
|
|
||||||
| `'rev'` | Commit ID, branch name or tag name to be checked out. If this is specified, `'depth'` will be ignored. Default: empty |
|
|
||||||
| `'do'` | Post-update hook. See [Post-update hooks](#post-update-hooks). Default: empty |
|
|
||||||
| `'subdir'` | Subdirectory that contains Vim plugin. Default: empty |
|
|
||||||
| `'pullmethod'` | Specify how to update the plugin.<br/>Empty: Update with `--ff-only` option.<br/>`'autostash'`: Update with `--rebase --autostash` options.<br/>Default: empty |
|
|
||||||
|
|
||||||
The `'branch'` and `'rev'` options are slightly different.
|
|
||||||
The `'branch'` option is used only when the plugin is newly installed. It clones the plugin by `git clone <URL> --depth=<DEPTH> -b <BRANCH>`. This is faster at the installation, but it can be slow if you want to change the branch (by the `'rev'` option) later. This cannot specify a commit ID.
|
|
||||||
The `'rev'` option is used both for installing and updating the plugin. It installs the plugin by `git clone <URL> && git checkout <REV>` and updates the plugin by `git fetch && git checkout <REV>`. This is slower because it clones the whole repository, but you can change the rev (commit ID, branch or tag) later.
|
|
||||||
So, if you want to change the branch frequently or want to specify a commit ID, you should use the `'rev'` option. Otherwise you can use the `'branch'` option.
|
|
||||||
|
|
||||||
If you include `*` in `'rev'`, minpac tries to checkout the latest tag name which matches the `'rev'`.
|
|
||||||
|
|
||||||
When `'subdir'` is specified, the plugin will be installed as usual (e.g. in `pack/minpac/start/pluginname`), however, another directory is created and a symlink (or a junction on Windows) will be created in it. E.g.:
|
|
||||||
|
|
||||||
```
|
|
||||||
ln -s pack/minpac/start/pluginname/subdir pack/minpac-sub/start/pluginname
|
|
||||||
```
|
|
||||||
|
|
||||||
This way, Vim can load the plugin from its subdirectory.
|
|
||||||
|
|
||||||
|
|
||||||
#### minpac#update([{name}[, {config}]])
|
|
||||||
|
|
||||||
Install or update all plugins or the specified plugin.
|
|
||||||
|
|
||||||
`{name}` is a unique name of a plugin (`plugin_name`).
|
|
||||||
|
|
||||||
If `{name}` is omitted or an empty String, all plugins will be installed or updated. Frozen plugins will be installed, but it will not be updated.
|
|
||||||
|
|
||||||
If `{name}` is specified, only specified plugin will be installed or updated. Frozen plugin will be also updated.
|
|
||||||
`{name}` can also be a list of plugin names.
|
|
||||||
|
|
||||||
`{config}` is a Dictionary of options for configuring the function.
|
|
||||||
|
|
||||||
| option | description |
|
|
||||||
|--------|-------------|
|
|
||||||
| `'do'` | Finish-update hook. See [Finish-update hooks](#finish-update-hooks). Default: empty |
|
|
||||||
|
|
||||||
You can check the results with `:message` command.
|
|
||||||
|
|
||||||
Note: This resets the 'more' option temporarily to avoid jobs being interrupted.
|
|
||||||
|
|
||||||
#### minpac#clean([{name}])
|
|
||||||
|
|
||||||
Remove all plugins which are not registered, or remove the specified plugin.
|
|
||||||
|
|
||||||
`{name}` is a name of a plugin. It can be a unique plugin name (`plugin_name`) or a plugin name with wildcards (`*` and `?` are supported). It can also be a list of plugin names.
|
|
||||||
|
|
||||||
If `{name}` is omitted, all plugins under the `minpac` directory will be checked. If unregistered plugins are found, they are listed and a prompt is shown. If you type `y`, they will be removed.
|
|
||||||
|
|
||||||
When called, matched plugins are listed (even they are registered with `minpac#add()`) and a prompt is shown. If you type `y`, they will be removed.
|
|
||||||
`{name}` can also be a list of plugin names. If the `'confirm'` option is not |TRUE|, the prompt will not be shown.
|
|
||||||
|
|
||||||
#### minpac#getpluginfo({name})
|
|
||||||
|
|
||||||
Get information of specified plugin.
|
|
||||||
|
|
||||||
`{name}` is a unique name of a plugin (`plugin_name`).
|
|
||||||
A dictionary with following items will be returned:
|
|
||||||
|
|
||||||
| item | description |
|
|
||||||
|------------|-------------|
|
|
||||||
| `'name'` | Name of the plugin. |
|
|
||||||
| `'url'` | URL of the plugin repository. |
|
|
||||||
| `'dir'` | Local directory of the plugin. |
|
|
||||||
| `'subdir'` | Subdirectory that contains Vim plugin. |
|
|
||||||
| `'frozen'` | If TRUE, the plugin is frozen. |
|
|
||||||
| `'type'` | Type of the plugin. |
|
|
||||||
| `'depth'` | Depth to be cloned. |
|
|
||||||
| `'branch'` | Branch name to be cloned. |
|
|
||||||
| `'rev'` | Revision to be checked out. |
|
|
||||||
| `'do'` | Post-update hook. |
|
|
||||||
| `'stat'` | Status of last update. |
|
|
||||||
|
|
||||||
#### minpac#getpluglist()
|
|
||||||
|
|
||||||
Get a list of plugin information. Mainly for debugging.
|
|
||||||
|
|
||||||
#### minpac#getpackages([{packname}[, {packtype}[, {plugname}[, {nameonly}]]]])
|
|
||||||
|
|
||||||
Get a list of plugins under the package directories.
|
|
||||||
|
|
||||||
`{packname}` specifies a package name. Wildcards can be used. If omitted or an empty string is specified, `"*"` is used.
|
|
||||||
|
|
||||||
`{packtype}` is a type of the package. `"*"`, `"start"`, `"opt"` or `"NONE"` can be used.
|
|
||||||
If `"*"` is specified, both start and opt packages are listed.
|
|
||||||
If omitted or an empty string is specified, `"*"` is used.
|
|
||||||
If `"NONE"` is specified, package directories are listed instead of plugin directories.
|
|
||||||
|
|
||||||
`{plugname}` specifies a plugin name. Wildcards can be used. If omitted or an empty string is specified, `"*"` is used.
|
|
||||||
|
|
||||||
If `{nameonly}` is TRUE, plugin (or package) names are listed instead of the directories. Default is FALSE.
|
|
||||||
|
|
||||||
E.g.:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
" List the all plugin directories under the package directories.
|
|
||||||
" Includes plugins under "dist" package.
|
|
||||||
echo minpac#getpackages()
|
|
||||||
|
|
||||||
" List directories of "start" plugins under "minpac" package.
|
|
||||||
echo minpac#getpackages("minpac", "start")
|
|
||||||
|
|
||||||
" List plugin names under "minpac" package.
|
|
||||||
echo minpac#getpackages("minpac", "", "", 1)
|
|
||||||
|
|
||||||
" List package names.
|
|
||||||
echo minpac#getpackages("", "NAME", "", 1)
|
|
||||||
```
|
|
||||||
|
|
||||||
#### minpac#status([{config}])
|
|
||||||
|
|
||||||
Print status of plugins.
|
|
||||||
|
|
||||||
When ran after `minpac#update()`, shows only installed and updated plugins.
|
|
||||||
|
|
||||||
Otherwise, shows the status of the plugin and commits of last update (if any).
|
|
||||||
|
|
||||||
`{config}` is a Dictionary of options for configuring the function.
|
|
||||||
|
|
||||||
| option | description |
|
|
||||||
|----------|-------------|
|
|
||||||
| `'open'` | Specify how to open the status window.<br/>`'vertical'`: Open in vertical split.<br/>`'horizontal'`: Open in horizontal split.<br/>`'tab'`: Open in a new tab.<br/>Default: `'horizontal'` or specified value by `minpac#init()`. |
|
|
||||||
|
|
||||||
### Hooks
|
|
||||||
|
|
||||||
Currently, minpac supports two types of hook: Post-update hooks and Finish-update hooks.
|
|
||||||
|
|
||||||
|
|
||||||
#### Post-update hooks
|
|
||||||
|
|
||||||
If a plugin requires extra works (e.g. building a native module), you can use the post-update hooks.
|
|
||||||
|
|
||||||
You can specify the hook with the `'do'` item in the option of the `minpac#add()` function. It can be a String or a Funcref.
|
|
||||||
If a String is specified, it is executed as an Ex command.
|
|
||||||
If a Funcref is specified, it is called with two arguments; `hooktype` and `name`.
|
|
||||||
|
|
||||||
| argument | description |
|
|
||||||
|------------|-------------|
|
|
||||||
| `hooktype` | Type of the hook. `'post-update'` for post-update hooks. |
|
|
||||||
| `name` | Unique name of the plugin. (`plugin_name`) |
|
|
||||||
|
|
||||||
The current directory is set to the directory of the plugin, when the hook is invoked.
|
|
||||||
|
|
||||||
E.g.:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
" Execute an Ex command as a hook.
|
|
||||||
call minpac#add('Shougo/vimproc.vim', {'do': 'silent! !make'})
|
|
||||||
|
|
||||||
" Execute a lambda function as a hook.
|
|
||||||
" Parameters for a lambda can be omitted, if you don't need them.
|
|
||||||
call minpac#add('Shougo/vimproc.vim', {'do': {-> system('make')}})
|
|
||||||
|
|
||||||
" Of course, you can also use a normal user function as a hook.
|
|
||||||
function! s:hook(hooktype, name)
|
|
||||||
echom a:hooktype
|
|
||||||
" You can use `minpac#getpluginfo()` to get the information about
|
|
||||||
" the plugin.
|
|
||||||
echom 'Directory:' minpac#getpluginfo(a:name).dir
|
|
||||||
call system('make')
|
|
||||||
endfunction
|
|
||||||
call minpac#add('Shougo/vimproc.vim', {'do': function('s:hook')})
|
|
||||||
```
|
|
||||||
|
|
||||||
The above examples execute the "make" command synchronously. If you want to execute an external command asynchronously, you should use the `job_start()` function on Vim 8 or the `jobstart()` function on Neovim.
|
|
||||||
You may also want to use the `minpac#job#start()` function, but this is mainly for internal use and the specification is subject to change without notice.
|
|
||||||
|
|
||||||
#### Finish-update hooks
|
|
||||||
|
|
||||||
If you want to execute extra works after all plugins are updated, you can use the finish-update hooks.
|
|
||||||
|
|
||||||
You can specify the hook with the `'do'` item in the option of the `minpac#update()` function. It can be a String or a Funcref.
|
|
||||||
If a String is specified, it is executed as an Ex command.
|
|
||||||
If a Funcref is specified, it is called with three arguments; `hooktype`, `updated` and `installed`.
|
|
||||||
|
|
||||||
| argument | description |
|
|
||||||
|------------|-------------|
|
|
||||||
| `hooktype` | Type of the hook. `'finish-update'` for finish-update hooks. |
|
|
||||||
| `updated` | Number of the updated plugin. |
|
|
||||||
| `installed`| Number of the newly installed plugin. |
|
|
||||||
|
|
||||||
E.g.:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
" Quit Vim immediately after all updates are finished.
|
|
||||||
call minpac#update('', {'do': 'quit'})
|
|
||||||
```
|
|
||||||
|
|
||||||
### Mappings
|
|
||||||
|
|
||||||
List of mappings available only in progress window.
|
|
||||||
|
|
||||||
| mapping | description |
|
|
||||||
|---------|-------------|
|
|
||||||
|`s` | Open the status window. |
|
|
||||||
|`q` | Exit the progress window. |
|
|
||||||
|
|
||||||
List of mappings available only in status window.
|
|
||||||
|
|
||||||
| mapping | description |
|
|
||||||
|---------|-------------|
|
|
||||||
|`<CR>` | Preview the commit under the cursor. |
|
|
||||||
|`<C-j>` | Jump to next package in list. |
|
|
||||||
|`<C-k>` | Jump to previous package in list. |
|
|
||||||
|`q` | Exit the status window.<br/>(Also works for commit preview window) |
|
|
||||||
|
|
||||||
|
|
||||||
Similar projects
|
|
||||||
----------------
|
|
||||||
|
|
||||||
There are some other plugin managers built on top of the Vim 8's packages feature.
|
|
||||||
|
|
||||||
* [vim-packager](https://github.com/kristijanhusak/vim-packager): written in Vim script
|
|
||||||
* [pack](https://github.com/maralla/pack): written in Rust
|
|
||||||
* [infect](https://github.com/csexton/infect): written in Ruby
|
|
||||||
* [vim-pck](https://github.com/nicodebo/vim-pck): written in Python
|
|
||||||
* [vim8-pack](https://github.com/mkarpoff/vim8-pack): written in Bash
|
|
||||||
* [volt](https://github.com/vim-volt/volt): written in Go
|
|
||||||
* [autopac](https://github.com/meldavis/autopac): modified version of minpac
|
|
||||||
* [plugpac.vim](https://github.com/bennyyip/plugpac.vim): thin wrapper of minpac, provides vim-plug like experience
|
|
||||||
* [minPlug](https://github.com/Jorengarenar/minPlug): written in Vim script
|
|
||||||
|
|
||||||
|
|
||||||
Credit
|
|
||||||
------
|
|
||||||
|
|
||||||
Prabir Shrestha (as the author of [async.vim](https://github.com/prabirshrestha/async.vim))
|
|
||||||
Kristijan Husak (status window)
|
|
||||||
|
|
||||||
|
|
||||||
License
|
|
||||||
-------
|
|
||||||
|
|
||||||
VIM License
|
|
||||||
|
|
||||||
(`autoload/minpac/job.vim` is the MIT License.)
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
version: '1.0.{build}'
|
|
||||||
|
|
||||||
shallow_clone: true
|
|
||||||
|
|
||||||
environment:
|
|
||||||
VIMPROG: '%APPVEYOR_BUILD_FOLDER%\vim-kt-win64\gvim.exe'
|
|
||||||
AUTH_TOKEN: # for GitHub
|
|
||||||
secure: ++foun75IPnkSVRkVIbVDMDil/6J+00ysIDrspZrOWwjevlpVpuIumv/A0LsiF1H
|
|
||||||
API_TOKEN: # for AppVeyor
|
|
||||||
secure: iUTvK78Ch5hfdoqFtPOMeQj96cGeeyenSfCRJxLb650=
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64'
|
|
||||||
- tools\appveyor-dl.bat
|
|
||||||
- '%VIMPROG% -u NONE -c "redir @a | ver | 0put a | wq" ver.txt'
|
|
||||||
- type ver.txt
|
|
||||||
|
|
||||||
test_script:
|
|
||||||
- cd test
|
|
||||||
- nmake -f Make_win.mak VIMPROG=%VIMPROG%
|
|
||||||
|
|
||||||
cache:
|
|
||||||
- downloads -> appveyor.yml
|
|
||||||
|
|
||||||
# vim: sw=2 sts=2 et
|
|
||||||
@ -1,147 +0,0 @@
|
|||||||
" ---------------------------------------------------------------------
|
|
||||||
" minpac: A minimal package manager for Vim 8 (and Neovim)
|
|
||||||
"
|
|
||||||
" Maintainer: Ken Takata
|
|
||||||
" Last Change: 2020-08-22
|
|
||||||
" License: VIM License
|
|
||||||
" URL: https://github.com/k-takata/minpac
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Get a list of package/plugin directories.
|
|
||||||
function! minpac#getpackages(...)
|
|
||||||
return call("minpac#impl#getpackages", a:000)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
function! s:ensure_initialization() abort
|
|
||||||
if !exists('g:minpac#opt')
|
|
||||||
echohl WarningMsg
|
|
||||||
echom 'Minpac has not been initialized. Use the default values.'
|
|
||||||
echohl None
|
|
||||||
call minpac#init()
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Initialize minpac.
|
|
||||||
function! minpac#init(...) abort
|
|
||||||
let l:opt = extend(copy(get(a:000, 0, {})),
|
|
||||||
\ {'dir': '', 'package_name': 'minpac', 'git': 'git', 'depth': 1,
|
|
||||||
\ 'jobs': 8, 'verbose': 2, 'confirm': v:true,
|
|
||||||
\ 'progress_open': 'horizontal', 'status_open': 'horizontal',
|
|
||||||
\ 'status_auto': v:false}, 'keep')
|
|
||||||
|
|
||||||
let g:minpac#opt = l:opt
|
|
||||||
let g:minpac#pluglist = {}
|
|
||||||
|
|
||||||
let l:packdir = l:opt.dir
|
|
||||||
if l:packdir ==# ''
|
|
||||||
" If 'dir' is not specified, the first directory of 'packpath' is used.
|
|
||||||
let l:packdir = split(&packpath, ',')[0]
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:opt.minpac_dir = l:packdir . '/pack/' . l:opt.package_name
|
|
||||||
let l:opt.minpac_start_dir = l:opt.minpac_dir . '/start'
|
|
||||||
let l:opt.minpac_opt_dir = l:opt.minpac_dir . '/opt'
|
|
||||||
|
|
||||||
" directories for 'subdir'
|
|
||||||
let l:opt.minpac_dir_sub = l:packdir . '/pack/' . l:opt.package_name . '-sub'
|
|
||||||
let l:opt.minpac_start_dir_sub = l:opt.minpac_dir_sub . '/start'
|
|
||||||
let l:opt.minpac_opt_dir_sub = l:opt.minpac_dir_sub . '/opt'
|
|
||||||
|
|
||||||
if !isdirectory(l:packdir)
|
|
||||||
echoerr 'Pack directory not available: ' . l:packdir
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
if !isdirectory(l:opt.minpac_start_dir)
|
|
||||||
call mkdir(l:opt.minpac_start_dir, 'p')
|
|
||||||
endif
|
|
||||||
if !isdirectory(l:opt.minpac_opt_dir)
|
|
||||||
call mkdir(l:opt.minpac_opt_dir, 'p')
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Register the specified plugin.
|
|
||||||
function! minpac#add(plugname, ...) abort
|
|
||||||
call s:ensure_initialization()
|
|
||||||
let l:opt = extend(copy(get(a:000, 0, {})),
|
|
||||||
\ {'name': '', 'type': 'start', 'depth': g:minpac#opt.depth,
|
|
||||||
\ 'frozen': v:false, 'branch': '', 'rev': '', 'do': '', 'subdir': '',
|
|
||||||
\ 'pullmethod': ''
|
|
||||||
\ }, 'keep')
|
|
||||||
|
|
||||||
" URL
|
|
||||||
if a:plugname =~? '^[-._0-9a-z]\+\/[-._0-9a-z]\+$'
|
|
||||||
let l:opt.url = 'https://github.com/' . a:plugname . '.git'
|
|
||||||
else
|
|
||||||
let l:opt.url = a:plugname
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Name of the plugin
|
|
||||||
if l:opt.name ==# ''
|
|
||||||
let l:opt.name = matchstr(l:opt.url, '[/\\]\zs[^/\\]\+$')
|
|
||||||
let l:opt.name = substitute(l:opt.name, '\C\.git$', '', '')
|
|
||||||
endif
|
|
||||||
if l:opt.name ==# ''
|
|
||||||
echoerr 'Cannot extract the plugin name. (' . a:plugname . ')'
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Loading type / Local directory
|
|
||||||
if l:opt.type ==# 'start'
|
|
||||||
let l:opt.dir = g:minpac#opt.minpac_start_dir . '/' . l:opt.name
|
|
||||||
elseif l:opt.type ==# 'opt'
|
|
||||||
let l:opt.dir = g:minpac#opt.minpac_opt_dir . '/' . l:opt.name
|
|
||||||
else
|
|
||||||
echoerr a:plugname . ": Wrong type (must be 'start' or 'opt'): " . l:opt.type
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Check pullmethod
|
|
||||||
if l:opt.pullmethod !=# '' && l:opt.pullmethod !=# 'autostash'
|
|
||||||
echoerr a:plugname . ": Wrong pullmethod (must be empty or 'autostash'): " . l:opt.pullmethod
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Initialize the status
|
|
||||||
let l:opt.stat = {'errcode': 0, 'lines': [], 'prev_rev': '', 'installed': -1}
|
|
||||||
|
|
||||||
" Add to pluglist
|
|
||||||
let g:minpac#pluglist[l:opt.name] = l:opt
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Update all or specified plugin(s).
|
|
||||||
function! minpac#update(...)
|
|
||||||
call s:ensure_initialization()
|
|
||||||
return call("minpac#impl#update", a:000)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Remove plugins that are not registered.
|
|
||||||
function! minpac#clean(...)
|
|
||||||
call s:ensure_initialization()
|
|
||||||
return call("minpac#impl#clean", a:000)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! minpac#status(...)
|
|
||||||
call s:ensure_initialization()
|
|
||||||
let l:opt = extend(copy(get(a:000, 0, {})),
|
|
||||||
\ {'open': g:minpac#opt.status_open}, 'keep')
|
|
||||||
return minpac#status#get(l:opt)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Get information of specified plugin. Mainly for debugging.
|
|
||||||
function! minpac#getpluginfo(name)
|
|
||||||
call s:ensure_initialization()
|
|
||||||
return g:minpac#pluglist[a:name]
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Get a list of plugin information. Mainly for debugging.
|
|
||||||
function! minpac#getpluglist()
|
|
||||||
return g:minpac#pluglist
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" vim: set ts=8 sw=2 et:
|
|
||||||
@ -1,75 +0,0 @@
|
|||||||
" ---------------------------------------------------------------------
|
|
||||||
" minpac: A minimal package manager for Vim 8 (and Neovim)
|
|
||||||
"
|
|
||||||
" Maintainer: Ken Takata
|
|
||||||
" Last Change: 2020-02-01
|
|
||||||
" License: VIM License
|
|
||||||
" URL: https://github.com/k-takata/minpac
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
function! s:isabsolute(dir) abort
|
|
||||||
return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:get_gitdir(dir) abort
|
|
||||||
let l:gitdir = a:dir . '/.git'
|
|
||||||
if isdirectory(l:gitdir)
|
|
||||||
return l:gitdir
|
|
||||||
endif
|
|
||||||
try
|
|
||||||
let l:line = readfile(l:gitdir)[0]
|
|
||||||
if l:line =~# '^gitdir: '
|
|
||||||
let l:gitdir = l:line[8:]
|
|
||||||
if !s:isabsolute(l:gitdir)
|
|
||||||
let l:gitdir = a:dir . '/' . l:gitdir
|
|
||||||
endif
|
|
||||||
if isdirectory(l:gitdir)
|
|
||||||
return l:gitdir
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
catch
|
|
||||||
endtry
|
|
||||||
return ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! minpac#git#get_revision(dir) abort
|
|
||||||
let l:gitdir = s:get_gitdir(a:dir)
|
|
||||||
if l:gitdir ==# ''
|
|
||||||
return v:null
|
|
||||||
endif
|
|
||||||
try
|
|
||||||
let l:line = readfile(l:gitdir . '/HEAD')[0]
|
|
||||||
if l:line =~# '^ref: '
|
|
||||||
let l:ref = l:line[5:]
|
|
||||||
if filereadable(l:gitdir . '/' . l:ref)
|
|
||||||
return readfile(l:gitdir . '/' . l:ref)[0]
|
|
||||||
endif
|
|
||||||
for l:line in readfile(l:gitdir . '/packed-refs')
|
|
||||||
if l:line =~# ' ' . l:ref
|
|
||||||
return substitute(l:line, '^\([0-9a-f]*\) ', '\1', '')
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endif
|
|
||||||
return l:line
|
|
||||||
catch
|
|
||||||
endtry
|
|
||||||
return v:null
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! minpac#git#get_branch(dir) abort
|
|
||||||
let l:gitdir = s:get_gitdir(a:dir)
|
|
||||||
if l:gitdir ==# ''
|
|
||||||
return v:null
|
|
||||||
endif
|
|
||||||
try
|
|
||||||
let l:line = readfile(l:gitdir . '/HEAD')[0]
|
|
||||||
if l:line =~# '^ref: refs/heads/'
|
|
||||||
return l:line[16:]
|
|
||||||
endif
|
|
||||||
return ''
|
|
||||||
catch
|
|
||||||
return v:null
|
|
||||||
endtry
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" vim: set ts=8 sw=2 et:
|
|
||||||
@ -1,707 +0,0 @@
|
|||||||
" ---------------------------------------------------------------------
|
|
||||||
" minpac: A minimal package manager for Vim 8 (and Neovim)
|
|
||||||
"
|
|
||||||
" Maintainer: Ken Takata
|
|
||||||
" Last Change: 2020-08-22
|
|
||||||
" License: VIM License
|
|
||||||
" URL: https://github.com/k-takata/minpac
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
let s:joblist = []
|
|
||||||
let s:remain_jobs = 0
|
|
||||||
|
|
||||||
" Get a list of package/plugin directories.
|
|
||||||
function! minpac#impl#getpackages(...) abort
|
|
||||||
let l:packname = get(a:000, 0, '')
|
|
||||||
let l:packtype = get(a:000, 1, '')
|
|
||||||
let l:plugname = get(a:000, 2, '')
|
|
||||||
let l:nameonly = get(a:000, 3, v:false)
|
|
||||||
|
|
||||||
if l:packname ==# '' | let l:packname = '*' | endif
|
|
||||||
if l:packtype ==# '' | let l:packtype = '*' | endif
|
|
||||||
if l:plugname ==# '' | let l:plugname = '*' | endif
|
|
||||||
|
|
||||||
if l:packtype ==# 'NONE'
|
|
||||||
let l:pat = 'pack/' . l:packname
|
|
||||||
else
|
|
||||||
let l:pat = 'pack/' . l:packname . '/' . l:packtype . '/' . l:plugname
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:ret = filter(globpath(&packpath, l:pat, 0, 1), {-> isdirectory(v:val)})
|
|
||||||
if l:nameonly
|
|
||||||
call map(l:ret, {-> substitute(v:val, '^.*[/\\]', '', '')})
|
|
||||||
endif
|
|
||||||
return l:ret
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
function! s:echox_verbose(level, echocmd, type, msg) abort
|
|
||||||
if g:minpac#opt.verbose >= a:level
|
|
||||||
if g:minpac#opt.progress_open ==# 'none'
|
|
||||||
if a:type ==# 'warning'
|
|
||||||
echohl WarningMsg
|
|
||||||
elseif a:type ==# 'error'
|
|
||||||
echohl ErrorMsg
|
|
||||||
endif
|
|
||||||
exec a:echocmd . " '" . substitute(a:msg, "'", "''", "g") . "'"
|
|
||||||
echohl None
|
|
||||||
else
|
|
||||||
call minpac#progress#add_msg(a:type, a:msg)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:echo_verbose(level, type, msg) abort
|
|
||||||
call s:echox_verbose(a:level, 'echo', a:type, a:msg)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:echom_verbose(level, type, msg) abort
|
|
||||||
call s:echox_verbose(a:level, 'echom', a:type, a:msg)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:echoerr_verbose(level, msg) abort
|
|
||||||
call s:echox_verbose(a:level, 'echoerr', 'error', a:msg)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
if has('win32')
|
|
||||||
function! s:quote_cmds(cmds) abort
|
|
||||||
" If space (or brace) is found, surround the argument with "".
|
|
||||||
" Assuming double quotations are not used elsewhere.
|
|
||||||
" (Brace needs to be quoted for msys2/git.)
|
|
||||||
return join(map(a:cmds,
|
|
||||||
\ {-> (v:val =~# '[ {]') ? '"' . v:val . '"' : v:val}), ' ')
|
|
||||||
endfunction
|
|
||||||
else
|
|
||||||
function! s:quote_cmds(cmds) abort
|
|
||||||
return a:cmds
|
|
||||||
endfunction
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Replacement for system().
|
|
||||||
" This doesn't open an extra window on MS-Windows.
|
|
||||||
function! minpac#impl#system(cmds) abort
|
|
||||||
let l:out = []
|
|
||||||
let l:ret = -1
|
|
||||||
let l:quote_cmds = s:quote_cmds(a:cmds)
|
|
||||||
call s:echom_verbose(4, '', 'system: cmds=' . string(l:quote_cmds))
|
|
||||||
let l:job = minpac#job#start(l:quote_cmds,
|
|
||||||
\ {'on_stdout': {id, mes, ev -> extend(l:out, mes)}})
|
|
||||||
if l:job > 0
|
|
||||||
" It worked!
|
|
||||||
let l:ret = minpac#job#wait([l:job])[0]
|
|
||||||
sleep 5m " Wait for out_cb. (not sure this is enough.)
|
|
||||||
endif
|
|
||||||
return [l:ret, l:out]
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Execute git command on the specified plugin directory.
|
|
||||||
function! s:exec_plugin_cmd(name, cmd, mes) abort
|
|
||||||
let l:pluginfo = g:minpac#pluglist[a:name]
|
|
||||||
let l:dir = l:pluginfo.dir
|
|
||||||
let l:res = minpac#impl#system([g:minpac#opt.git, '-C', l:dir] + a:cmd)
|
|
||||||
if l:res[0] == 0 && len(l:res[1]) > 0
|
|
||||||
call s:echom_verbose(4, '', a:mes . ': ' . l:res[1][0])
|
|
||||||
return l:res[1][0]
|
|
||||||
else
|
|
||||||
" Error
|
|
||||||
return ''
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Get the revision of the specified plugin.
|
|
||||||
function! minpac#impl#get_plugin_revision(name) abort
|
|
||||||
let l:rev = minpac#git#get_revision(g:minpac#pluglist[a:name].dir)
|
|
||||||
if l:rev != v:null
|
|
||||||
call s:echom_verbose(4, '', 'revision: ' . l:rev)
|
|
||||||
return l:rev
|
|
||||||
endif
|
|
||||||
return s:exec_plugin_cmd(a:name, ['rev-parse', 'HEAD'], 'revision')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Get the exact tag name of the specified plugin.
|
|
||||||
function! s:get_plugin_tag(name) abort
|
|
||||||
return s:exec_plugin_cmd(a:name, ['describe', '--tags', '--exact-match'], 'tag')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Get the latest tag name of the specified plugin. Sorted by version number.
|
|
||||||
function! s:get_plugin_latest_tag(name, tag) abort
|
|
||||||
return s:exec_plugin_cmd(a:name, ['tag', '--list', '--sort=-version:refname', a:tag], 'latest tag')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Get the branch name of the specified plugin.
|
|
||||||
function! s:get_plugin_branch(name) abort
|
|
||||||
let l:branch = minpac#git#get_branch(g:minpac#pluglist[a:name].dir)
|
|
||||||
if l:branch != v:null
|
|
||||||
call s:echom_verbose(4, '', 'branch: ' . l:branch)
|
|
||||||
return l:branch
|
|
||||||
endif
|
|
||||||
return s:exec_plugin_cmd(a:name, ['symbolic-ref', '--short', 'HEAD'], 'branch')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
function! s:decrement_job_count() abort
|
|
||||||
let s:remain_jobs -= 1
|
|
||||||
if s:remain_jobs == 0
|
|
||||||
" `minpac#update()` is finished.
|
|
||||||
call s:invoke_hook('finish-update', [s:updated_plugins, s:installed_plugins], s:finish_update_hook)
|
|
||||||
|
|
||||||
if has('nvim') && exists(':UpdateRemotePlugins') == 2
|
|
||||||
\ && (s:updated_plugins > 0 || s:installed_plugins > 0)
|
|
||||||
UpdateRemotePlugins
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Show the status.
|
|
||||||
if s:error_plugins + s:updated_plugins + s:installed_plugins > 0
|
|
||||||
if g:minpac#opt.progress_open !=# 'none'
|
|
||||||
call s:echom_verbose(1, '', '') " empty line
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
if s:error_plugins > 0
|
|
||||||
call s:echom_verbose(1, 'warning', 'Error plugins: ' . s:error_plugins)
|
|
||||||
else
|
|
||||||
let l:mes = 'All plugins are up to date.'
|
|
||||||
if s:updated_plugins + s:installed_plugins > 0
|
|
||||||
let l:mes .= ' (Updated: ' . s:updated_plugins . ', Newly installed: ' . s:installed_plugins . ')'
|
|
||||||
endif
|
|
||||||
call s:echom_verbose(1, '', l:mes)
|
|
||||||
endif
|
|
||||||
if g:minpac#opt.progress_open !=# 'none'
|
|
||||||
call s:echom_verbose(1, '', '(Type "q" to close this window. Type "s" to open the status window.)')
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Open the status window.
|
|
||||||
if s:updated_plugins + s:installed_plugins > 0
|
|
||||||
if g:minpac#opt.status_auto
|
|
||||||
call minpac#status()
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Restore the pager.
|
|
||||||
if exists('s:save_more')
|
|
||||||
let &more = s:save_more
|
|
||||||
unlet s:save_more
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
if exists('*chdir')
|
|
||||||
let s:chdir = function('chdir')
|
|
||||||
else
|
|
||||||
function! s:chdir(dir) abort
|
|
||||||
if has('nvim')
|
|
||||||
let l:cdcmd = haslocaldir() ? 'lcd' : (haslocaldir(-1, 0) ? 'tcd' : 'cd')
|
|
||||||
else
|
|
||||||
let l:cdcmd = haslocaldir() ? ((haslocaldir() == 1) ? 'lcd' : 'tcd') : 'cd'
|
|
||||||
endif
|
|
||||||
let l:pwd = getcwd()
|
|
||||||
execute l:cdcmd fnameescape(a:dir)
|
|
||||||
return l:pwd
|
|
||||||
endfunction
|
|
||||||
endif
|
|
||||||
|
|
||||||
function! s:invoke_hook(hooktype, args, hook) abort
|
|
||||||
if a:hook ==# ''
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
if a:hooktype ==# 'post-update'
|
|
||||||
let l:name = a:args[0]
|
|
||||||
let l:pluginfo = g:minpac#pluglist[l:name]
|
|
||||||
noautocmd let l:pwd = s:chdir(l:pluginfo.dir)
|
|
||||||
endif
|
|
||||||
try
|
|
||||||
if type(a:hook) == v:t_func
|
|
||||||
call call(a:hook, [a:hooktype] + a:args)
|
|
||||||
elseif type(a:hook) == v:t_string
|
|
||||||
execute a:hook
|
|
||||||
endif
|
|
||||||
catch
|
|
||||||
call s:echom_verbose(1, 'error', v:throwpoint)
|
|
||||||
call s:echom_verbose(1, 'error', v:exception)
|
|
||||||
finally
|
|
||||||
if a:hooktype ==# 'post-update'
|
|
||||||
noautocmd call s:chdir(l:pwd)
|
|
||||||
endif
|
|
||||||
endtry
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:is_helptags_old(dir) abort
|
|
||||||
let l:txts = glob(a:dir . '/*.txt', 1, 1) + glob(a:dir . '/*.[a-z][a-z]x', 1, 1)
|
|
||||||
let l:tags = glob(a:dir . '/tags', 1, 1) + glob(a:dir . '/tags-[a-z][a-z]', 1, 1)
|
|
||||||
let l:txt_newest = max(map(l:txts, {-> getftime(v:val)}))
|
|
||||||
let l:tag_oldest = min(map(l:tags, {-> getftime(v:val)}))
|
|
||||||
return l:txt_newest > l:tag_oldest
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:generate_helptags(dir) abort
|
|
||||||
let l:docdir = a:dir . '/doc'
|
|
||||||
if s:is_helptags_old(l:docdir)
|
|
||||||
silent! execute 'helptags' fnameescape(l:docdir)
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:add_rtp(dir) abort
|
|
||||||
if empty(&rtp)
|
|
||||||
let &rtp = a:dir
|
|
||||||
else
|
|
||||||
let &rtp .= ',' . a:dir
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
if has('win32')
|
|
||||||
function! s:create_link(target, link) abort
|
|
||||||
if isdirectory(a:target)
|
|
||||||
call delete(a:target)
|
|
||||||
endif
|
|
||||||
call minpac#impl#system(['cmd.exe', '/c', 'mklink', '/J',
|
|
||||||
\ substitute(a:link, '/', '\', 'g'),
|
|
||||||
\ substitute(a:target, '/', '\', 'g')])
|
|
||||||
endfunction
|
|
||||||
else
|
|
||||||
function! s:create_link(target, link) abort
|
|
||||||
call minpac#impl#system(['ln', '-sf', a:target, a:link])
|
|
||||||
endfunction
|
|
||||||
endif
|
|
||||||
|
|
||||||
function! s:handle_subdir(pluginfo) abort
|
|
||||||
if a:pluginfo.type ==# 'start'
|
|
||||||
let l:workdir = g:minpac#opt.minpac_start_dir_sub
|
|
||||||
else
|
|
||||||
let l:workdir = g:minpac#opt.minpac_opt_dir_sub
|
|
||||||
endif
|
|
||||||
if !isdirectory(l:workdir)
|
|
||||||
call mkdir(l:workdir, 'p')
|
|
||||||
endif
|
|
||||||
noautocmd let l:pwd = s:chdir(l:workdir)
|
|
||||||
try
|
|
||||||
if !isdirectory(a:pluginfo.name)
|
|
||||||
call s:create_link(a:pluginfo.dir . '/' . a:pluginfo.subdir,
|
|
||||||
\ a:pluginfo.name)
|
|
||||||
endif
|
|
||||||
finally
|
|
||||||
noautocmd call s:chdir(l:pwd)
|
|
||||||
endtry
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:job_exit_cb(id, errcode, event) dict abort
|
|
||||||
call filter(s:joblist, {-> v:val != a:id})
|
|
||||||
|
|
||||||
let l:err = 1
|
|
||||||
let l:pluginfo = g:minpac#pluglist[self.name]
|
|
||||||
let l:pluginfo.stat.errcode = a:errcode
|
|
||||||
if a:errcode == 0
|
|
||||||
let l:dir = l:pluginfo.dir
|
|
||||||
" Check if the plugin directory is available.
|
|
||||||
if isdirectory(l:dir)
|
|
||||||
" Check if it is actually updated (or installed).
|
|
||||||
let l:updated = 1
|
|
||||||
if l:pluginfo.stat.prev_rev !=# '' && l:pluginfo.stat.upd_method != 2
|
|
||||||
if l:pluginfo.stat.prev_rev ==# minpac#impl#get_plugin_revision(self.name)
|
|
||||||
let l:updated = 0
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
if l:updated
|
|
||||||
if l:pluginfo.stat.upd_method == 2
|
|
||||||
let l:rev = l:pluginfo.rev
|
|
||||||
if l:rev ==# ''
|
|
||||||
" If no branch or tag is specified, consider as the master branch.
|
|
||||||
let l:rev = 'master'
|
|
||||||
endif
|
|
||||||
if self.seq == 0
|
|
||||||
" Check out the specified revison (or branch).
|
|
||||||
if l:rev =~# '\*'
|
|
||||||
" If it includes '*', consider as the latest matching tag.
|
|
||||||
let l:rev = s:get_plugin_latest_tag(self.name, l:rev)
|
|
||||||
if l:rev ==# ''
|
|
||||||
let s:error_plugins += 1
|
|
||||||
call s:echom_verbose(1, 'error', 'Error while updating "' . self.name . '". No tags found.')
|
|
||||||
call s:decrement_job_count()
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
let l:cmd = [g:minpac#opt.git, '-C', l:dir, 'checkout',
|
|
||||||
\ l:rev, '--']
|
|
||||||
call s:echom_verbose(3, '', 'Checking out the revison: ' . self.name
|
|
||||||
\ . ': ' . l:rev)
|
|
||||||
call s:start_job(l:cmd, self.name, self.seq + 1)
|
|
||||||
return
|
|
||||||
elseif self.seq == 1
|
|
||||||
\ && s:get_plugin_branch(self.name) == l:rev
|
|
||||||
" Checked out the branch. Update to the upstream.
|
|
||||||
let l:cmd = [g:minpac#opt.git, '-C', l:dir, 'merge', '--quiet',
|
|
||||||
\ '--ff-only', '@{u}']
|
|
||||||
call s:echom_verbose(3, '', 'Update to the upstream: ' . self.name)
|
|
||||||
call s:start_job(l:cmd, self.name, self.seq + 1)
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
if l:pluginfo.stat.submod == 0
|
|
||||||
let l:pluginfo.stat.submod = 1
|
|
||||||
if filereadable(l:dir . '/.gitmodules')
|
|
||||||
" Update git submodule.
|
|
||||||
let l:cmd = [g:minpac#opt.git, '-C', l:dir, 'submodule', '--quiet',
|
|
||||||
\ 'update', '--init', '--recursive']
|
|
||||||
call s:echom_verbose(3, '', 'Updating submodules: ' . self.name)
|
|
||||||
call s:start_job(l:cmd, self.name, self.seq + 1)
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
call s:generate_helptags(l:dir)
|
|
||||||
|
|
||||||
if l:pluginfo.subdir !=# ''
|
|
||||||
call s:handle_subdir(l:pluginfo)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if has('nvim') && isdirectory(l:dir . '/rplugin')
|
|
||||||
" Required for :UpdateRemotePlugins.
|
|
||||||
call s:add_rtp(l:dir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
call s:invoke_hook('post-update', [self.name], l:pluginfo.do)
|
|
||||||
else
|
|
||||||
" Even the plugin is not updated, generate helptags if it is not found.
|
|
||||||
call s:generate_helptags(l:dir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if l:pluginfo.stat.installed
|
|
||||||
if l:updated
|
|
||||||
let s:updated_plugins += 1
|
|
||||||
call s:echom_verbose(1, '', 'Updated: ' . self.name)
|
|
||||||
else
|
|
||||||
call s:echom_verbose(3, '', 'Already up-to-date: ' . self.name)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let s:installed_plugins += 1
|
|
||||||
call s:echom_verbose(1, '', 'Installed: ' . self.name)
|
|
||||||
endif
|
|
||||||
let l:err = 0
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
if l:err
|
|
||||||
let s:error_plugins += 1
|
|
||||||
call s:echom_verbose(1, 'error', 'Error while updating "' . self.name . '". Error code: ' . a:errcode)
|
|
||||||
endif
|
|
||||||
|
|
||||||
call s:decrement_job_count()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:job_err_cb(id, message, event) dict abort
|
|
||||||
let l:mes = copy(a:message)
|
|
||||||
if len(l:mes) > 0 && l:mes[-1] ==# ''
|
|
||||||
" Remove the last empty line. It is redundant.
|
|
||||||
call remove(l:mes, -1)
|
|
||||||
endif
|
|
||||||
for l:line in l:mes
|
|
||||||
let l:line = substitute(l:line, "\t", ' ', 'g')
|
|
||||||
call add(g:minpac#pluglist[self.name].stat.lines, l:line)
|
|
||||||
call s:echom_verbose(2, 'warning', self.name . ': ' . l:line)
|
|
||||||
endfor
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:start_job(cmds, name, seq) abort
|
|
||||||
if len(s:joblist) > 1
|
|
||||||
sleep 20m
|
|
||||||
endif
|
|
||||||
if g:minpac#opt.jobs > 0
|
|
||||||
while len(s:joblist) >= g:minpac#opt.jobs
|
|
||||||
sleep 500m
|
|
||||||
endwhile
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:quote_cmds = s:quote_cmds(a:cmds)
|
|
||||||
call s:echom_verbose(4, '', 'start_job: cmds=' . string(l:quote_cmds))
|
|
||||||
let l:job = minpac#job#start(l:quote_cmds, {
|
|
||||||
\ 'on_stderr': function('s:job_err_cb'),
|
|
||||||
\ 'on_exit': function('s:job_exit_cb'),
|
|
||||||
\ 'name': a:name, 'seq': a:seq
|
|
||||||
\ })
|
|
||||||
if l:job > 0
|
|
||||||
" It worked!
|
|
||||||
else
|
|
||||||
call s:echom_verbose(1, 'error', 'Fail to execute: ' . a:cmds[0])
|
|
||||||
call s:decrement_job_count()
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
let s:joblist += [l:job]
|
|
||||||
return 0
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:is_same_commit(a, b) abort
|
|
||||||
let l:min = min([len(a:a), len(a:b)]) - 1
|
|
||||||
return a:a[0 : l:min] ==# a:b[0 : l:min]
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Check the status of the plugin.
|
|
||||||
" return: 0: No need to update.
|
|
||||||
" 1: Need to update by pull.
|
|
||||||
" 2: Need to update by fetch & checkout.
|
|
||||||
function! s:check_plugin_status(name) abort
|
|
||||||
let l:pluginfo = g:minpac#pluglist[a:name]
|
|
||||||
let l:pluginfo.stat.prev_rev = minpac#impl#get_plugin_revision(a:name)
|
|
||||||
let l:branch = s:get_plugin_branch(a:name)
|
|
||||||
|
|
||||||
if l:pluginfo.rev ==# ''
|
|
||||||
" No branch or tag is specified.
|
|
||||||
if l:branch ==# ''
|
|
||||||
" Maybe a detached head. Need to update by fetch & checkout.
|
|
||||||
return 2
|
|
||||||
else
|
|
||||||
" Need to update by pull.
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
if l:branch == l:pluginfo.rev
|
|
||||||
" Same branch. Need to update by pull.
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
if s:get_plugin_tag(a:name) == l:pluginfo.rev
|
|
||||||
" Same tag. No need to update.
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
if s:is_same_commit(l:pluginfo.stat.prev_rev, l:pluginfo.rev)
|
|
||||||
" Same commit ID. No need to update.
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Need to update by fetch & checkout.
|
|
||||||
return 2
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Check whether the type was changed. If it was changed, rename the directory.
|
|
||||||
function! s:prepare_plugin_dir(pluginfo) abort
|
|
||||||
let l:dir = a:pluginfo.dir
|
|
||||||
if !isdirectory(l:dir)
|
|
||||||
if a:pluginfo.type ==# 'start'
|
|
||||||
let l:dirtmp = substitute(l:dir, '/start/\ze[^/]\+$', '/opt/', '')
|
|
||||||
else
|
|
||||||
let l:dirtmp = substitute(l:dir, '/opt/\ze[^/]\+$', '/start/', '')
|
|
||||||
endif
|
|
||||||
if isdirectory(l:dirtmp)
|
|
||||||
" The type was changed (start <-> opt).
|
|
||||||
call rename(l:dirtmp, l:dir)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Check subdir.
|
|
||||||
if a:pluginfo.subdir !=# ''
|
|
||||||
let l:name = a:pluginfo.name
|
|
||||||
if a:pluginfo.type ==# 'start'
|
|
||||||
let l:subdir = g:minpac#opt.minpac_start_dir_sub . '/' . l:name
|
|
||||||
let l:otherdir = g:minpac#opt.minpac_opt_dir_sub . '/' . l:name
|
|
||||||
else
|
|
||||||
let l:subdir = g:minpac#opt.minpac_opt_dir_sub . '/' . l:name
|
|
||||||
let l:otherdir = g:minpac#opt.minpac_start_dir_sub . '/' . l:name
|
|
||||||
endif
|
|
||||||
if isdirectory(l:otherdir) && !isdirectory(l:subdir)
|
|
||||||
" The type was changed (start <-> opt).
|
|
||||||
call delete(l:otherdir)
|
|
||||||
call s:handle_subdir(a:pluginfo)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Update a single plugin.
|
|
||||||
function! s:update_single_plugin(name, force) abort
|
|
||||||
if !has_key(g:minpac#pluglist, a:name)
|
|
||||||
call s:echoerr_verbose(1, 'Plugin not registered: ' . a:name)
|
|
||||||
call s:decrement_job_count()
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:pluginfo = g:minpac#pluglist[a:name]
|
|
||||||
let l:dir = l:pluginfo.dir
|
|
||||||
let l:url = l:pluginfo.url
|
|
||||||
let l:pluginfo.stat.errcode = 0
|
|
||||||
let l:pluginfo.stat.lines = []
|
|
||||||
let l:pluginfo.stat.prev_rev = ''
|
|
||||||
let l:pluginfo.stat.submod = 0
|
|
||||||
|
|
||||||
call s:prepare_plugin_dir(l:pluginfo)
|
|
||||||
if isdirectory(l:dir)
|
|
||||||
let l:pluginfo.stat.installed = 1
|
|
||||||
if l:pluginfo.frozen && !a:force
|
|
||||||
call s:echom_verbose(3, '', 'Skipped: ' . a:name)
|
|
||||||
call s:decrement_job_count()
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:ret = s:check_plugin_status(a:name)
|
|
||||||
let l:pluginfo.stat.upd_method = l:ret
|
|
||||||
if l:ret == 0
|
|
||||||
" No need to update.
|
|
||||||
call s:echom_verbose(3, '', 'Already up-to-date: ' . a:name)
|
|
||||||
call s:decrement_job_count()
|
|
||||||
return 0
|
|
||||||
elseif l:ret == 1
|
|
||||||
" Same branch. Update by pull.
|
|
||||||
call s:echo_verbose(3, '', 'Updating (pull): ' . a:name)
|
|
||||||
let l:cmd = [g:minpac#opt.git, '-C', l:dir, 'pull', '--quiet']
|
|
||||||
if l:pluginfo.pullmethod ==# 'autostash'
|
|
||||||
let l:cmd += ['--rebase', '--autostash']
|
|
||||||
else
|
|
||||||
let l:cmd += ['--ff-only', '--rebase=false']
|
|
||||||
endif
|
|
||||||
elseif l:ret == 2
|
|
||||||
" Different branch. Update by fetch & checkout.
|
|
||||||
call s:echo_verbose(3, '', 'Updating (fetch): ' . a:name)
|
|
||||||
let l:cmd = [g:minpac#opt.git, '-C', l:dir, 'fetch', '--depth', '999999']
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let l:pluginfo.stat.installed = 0
|
|
||||||
if l:pluginfo.rev ==# ''
|
|
||||||
let l:pluginfo.stat.upd_method = 1
|
|
||||||
else
|
|
||||||
let l:pluginfo.stat.upd_method = 2
|
|
||||||
endif
|
|
||||||
call s:echo_verbose(3, '', 'Cloning ' . a:name)
|
|
||||||
|
|
||||||
let l:cmd = [g:minpac#opt.git, 'clone', '--quiet', l:url, l:dir, '--no-single-branch']
|
|
||||||
if l:pluginfo.depth > 0 && l:pluginfo.rev ==# ''
|
|
||||||
let l:cmd += ['--depth=' . l:pluginfo.depth]
|
|
||||||
endif
|
|
||||||
if l:pluginfo.branch !=# ''
|
|
||||||
let l:cmd += ['--branch=' . l:pluginfo.branch]
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
return s:start_job(l:cmd, a:name, 0)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:start_update(names, force, id) abort
|
|
||||||
for l:name in a:names
|
|
||||||
call s:update_single_plugin(l:name, a:force)
|
|
||||||
endfor
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Update all or specified plugin(s).
|
|
||||||
function! minpac#impl#update(...) abort
|
|
||||||
if g:minpac#opt.progress_open !=# 'none'
|
|
||||||
call minpac#progress#open(['## minpac update progress ##', ''])
|
|
||||||
endif
|
|
||||||
let l:opt = extend(copy(get(a:000, 1, {})),
|
|
||||||
\ {'do': ''}, 'keep')
|
|
||||||
|
|
||||||
let l:force = 0
|
|
||||||
if a:0 == 0 || (type(a:1) == v:t_string && a:1 ==# '')
|
|
||||||
let l:names = keys(g:minpac#pluglist)
|
|
||||||
elseif type(a:1) == v:t_string
|
|
||||||
let l:names = [a:1]
|
|
||||||
let l:force = 1
|
|
||||||
elseif type(a:1) == v:t_list
|
|
||||||
let l:names = a:1
|
|
||||||
let l:force = 1
|
|
||||||
else
|
|
||||||
call s:echoerr_verbose(1, 'Wrong parameter type. Must be a String or a List of Strings.')
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
if s:remain_jobs > 0
|
|
||||||
call s:echom_verbose(1, '', 'Previous update has not been finished.')
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
let s:remain_jobs = len(l:names)
|
|
||||||
let s:error_plugins = 0
|
|
||||||
let s:updated_plugins = 0
|
|
||||||
let s:installed_plugins = 0
|
|
||||||
let s:finish_update_hook = l:opt.do
|
|
||||||
|
|
||||||
if g:minpac#opt.progress_open ==# 'none'
|
|
||||||
" Disable the pager temporarily to avoid jobs being interrupted.
|
|
||||||
if !exists('s:save_more')
|
|
||||||
let s:save_more = &more
|
|
||||||
endif
|
|
||||||
set nomore
|
|
||||||
endif
|
|
||||||
|
|
||||||
call timer_start(1, function('s:start_update', [l:names, l:force]))
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Check if the dir matches specified package name and plugin names.
|
|
||||||
function! s:match_plugin(dir, packname, plugnames) abort
|
|
||||||
let l:plugname = '\%(' . join(a:plugnames, '\|') . '\)'
|
|
||||||
let l:plugname = substitute(l:plugname, '\.', '\\.', 'g')
|
|
||||||
let l:plugname = substitute(l:plugname, '\*', '.*', 'g')
|
|
||||||
let l:plugname = substitute(l:plugname, '?', '.', 'g')
|
|
||||||
if l:plugname =~# '/'
|
|
||||||
let l:pat = '/pack/' . a:packname . '\%(-sub\)\?' . '/' . l:plugname . '$'
|
|
||||||
else
|
|
||||||
let l:pat = '/pack/' . a:packname . '\%(-sub\)\?' . '/\%(start\|opt\)/' . l:plugname . '$'
|
|
||||||
endif
|
|
||||||
if has('win32')
|
|
||||||
let l:pat = substitute(l:pat, '/', '[/\\\\]', 'g')
|
|
||||||
" case insensitive matching
|
|
||||||
return a:dir =~? l:pat
|
|
||||||
else
|
|
||||||
" case sensitive matching
|
|
||||||
return a:dir =~# l:pat
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Remove plugins that are not registered.
|
|
||||||
function! minpac#impl#clean(...) abort
|
|
||||||
let l:plugin_dirs = minpac#getpackages(g:minpac#opt.package_name)
|
|
||||||
\ + minpac#getpackages(g:minpac#opt.package_name . '-sub')
|
|
||||||
|
|
||||||
if a:0 > 0
|
|
||||||
" Going to remove only specified plugins.
|
|
||||||
if type(a:1) == v:t_string
|
|
||||||
let l:names = [a:1]
|
|
||||||
elseif type(a:1) == v:t_list
|
|
||||||
let l:names = a:1
|
|
||||||
else
|
|
||||||
echoerr 'Wrong parameter type. Must be a String or a List of Strings.'
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
let l:to_remove = filter(l:plugin_dirs,
|
|
||||||
\ {-> s:match_plugin(v:val, g:minpac#opt.package_name, l:names)})
|
|
||||||
else
|
|
||||||
" Remove all plugins that are not registered.
|
|
||||||
let l:safelist = map(keys(g:minpac#pluglist),
|
|
||||||
\ {-> g:minpac#pluglist[v:val].type . '/' . v:val})
|
|
||||||
\ + ['opt/minpac'] " Don't remove itself.
|
|
||||||
let l:to_remove = filter(l:plugin_dirs,
|
|
||||||
\ {-> !s:match_plugin(v:val, g:minpac#opt.package_name, l:safelist)})
|
|
||||||
endif
|
|
||||||
|
|
||||||
if len(l:to_remove) == 0
|
|
||||||
echo 'Already clean.'
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Show the list of plugins to be removed.
|
|
||||||
for l:item in l:to_remove
|
|
||||||
echo l:item
|
|
||||||
endfor
|
|
||||||
|
|
||||||
let l:dir = (len(l:to_remove) > 1) ? 'directories' : 'directory'
|
|
||||||
|
|
||||||
if !g:minpac#opt.confirm || input('Removing the above ' . l:dir . '. [y/N]? ') =~? '^y'
|
|
||||||
echo "\n"
|
|
||||||
let err = 0
|
|
||||||
for l:item in l:to_remove
|
|
||||||
if delete(l:item, 'rf') != 0
|
|
||||||
echohl ErrorMsg
|
|
||||||
echom 'Clean failed: ' . l:item
|
|
||||||
echohl None
|
|
||||||
let err = 1
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
if has('nvim') && exists(':UpdateRemotePlugins') == 2
|
|
||||||
UpdateRemotePlugins
|
|
||||||
endif
|
|
||||||
if err == 0
|
|
||||||
echo 'Successfully cleaned.'
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
echo "\n" . 'Not cleaned.'
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! minpac#impl#is_update_ran() abort
|
|
||||||
return exists('s:installed_plugins')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" vim: set ts=8 sw=2 et:
|
|
||||||
@ -1,268 +0,0 @@
|
|||||||
" Author: Prabir Shrestha <mail at prabir dot me>
|
|
||||||
" Website: https://github.com/prabirshrestha/async.vim
|
|
||||||
" License: The MIT License {{{
|
|
||||||
" The MIT License (MIT)
|
|
||||||
"
|
|
||||||
" Copyright (c) 2016 Prabir Shrestha
|
|
||||||
"
|
|
||||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
" of this software and associated documentation files (the "Software"), to deal
|
|
||||||
" in the Software without restriction, including without limitation the rights
|
|
||||||
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
" copies of the Software, and to permit persons to whom the Software is
|
|
||||||
" furnished to do so, subject to the following conditions:
|
|
||||||
"
|
|
||||||
" The above copyright notice and this permission notice shall be included in all
|
|
||||||
" copies or substantial portions of the Software.
|
|
||||||
"
|
|
||||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
" SOFTWARE.
|
|
||||||
" }}}
|
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
|
||||||
set cpo&vim
|
|
||||||
|
|
||||||
let s:jobidseq = 0
|
|
||||||
let s:jobs = {} " { job, opts, type: 'vimjob|nvimjob'}
|
|
||||||
let s:job_type_nvimjob = 'nvimjob'
|
|
||||||
let s:job_type_vimjob = 'vimjob'
|
|
||||||
let s:job_error_unsupported_job_type = -2 " unsupported job type
|
|
||||||
|
|
||||||
function! s:job_supported_types() abort
|
|
||||||
let l:supported_types = []
|
|
||||||
if has('nvim')
|
|
||||||
let l:supported_types += [s:job_type_nvimjob]
|
|
||||||
endif
|
|
||||||
if !has('nvim') && has('job') && has('channel') && has('lambda')
|
|
||||||
let l:supported_types += [s:job_type_vimjob]
|
|
||||||
endif
|
|
||||||
return l:supported_types
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:job_supports_type(type) abort
|
|
||||||
return index(s:job_supported_types(), a:type) >= 0
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:out_cb(jobid, opts, job, data) abort
|
|
||||||
if has_key(a:opts, 'on_stdout')
|
|
||||||
call a:opts.on_stdout(a:jobid, split(a:data, "\n", 1), 'stdout')
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:err_cb(jobid, opts, job, data) abort
|
|
||||||
if has_key(a:opts, 'on_stderr')
|
|
||||||
call a:opts.on_stderr(a:jobid, split(a:data, "\n", 1), 'stderr')
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:exit_cb(jobid, opts, job, status) abort
|
|
||||||
if has_key(a:opts, 'on_exit')
|
|
||||||
call a:opts.on_exit(a:jobid, a:status, 'exit')
|
|
||||||
endif
|
|
||||||
if has_key(s:jobs, a:jobid)
|
|
||||||
call remove(s:jobs, a:jobid)
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:on_stdout(jobid, data, event) abort
|
|
||||||
if has_key(s:jobs, a:jobid)
|
|
||||||
let l:jobinfo = s:jobs[a:jobid]
|
|
||||||
if has_key(l:jobinfo.opts, 'on_stdout')
|
|
||||||
call l:jobinfo.opts.on_stdout(a:jobid, a:data, a:event)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:on_stderr(jobid, data, event) abort
|
|
||||||
if has_key(s:jobs, a:jobid)
|
|
||||||
let l:jobinfo = s:jobs[a:jobid]
|
|
||||||
if has_key(l:jobinfo.opts, 'on_stderr')
|
|
||||||
call l:jobinfo.opts.on_stderr(a:jobid, a:data, a:event)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:on_exit(jobid, status, event) abort
|
|
||||||
if has_key(s:jobs, a:jobid)
|
|
||||||
let l:jobinfo = s:jobs[a:jobid]
|
|
||||||
if has_key(l:jobinfo.opts, 'on_exit')
|
|
||||||
call l:jobinfo.opts.on_exit(a:jobid, a:status, a:event)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:job_start(cmd, opts) abort
|
|
||||||
let l:jobtypes = s:job_supported_types()
|
|
||||||
let l:jobtype = ''
|
|
||||||
|
|
||||||
if has_key(a:opts, 'type')
|
|
||||||
if type(a:opts.type) == type('')
|
|
||||||
if !s:job_supports_type(a:opts.type)
|
|
||||||
return s:job_error_unsupported_job_type
|
|
||||||
endif
|
|
||||||
let l:jobtype = a:opts.type
|
|
||||||
else
|
|
||||||
let l:jobtypes = a:opts.type
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
if empty(l:jobtype)
|
|
||||||
" find the best jobtype
|
|
||||||
for l:jobtype2 in l:jobtypes
|
|
||||||
if s:job_supports_type(l:jobtype2)
|
|
||||||
let l:jobtype = l:jobtype2
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endif
|
|
||||||
|
|
||||||
if l:jobtype ==? ''
|
|
||||||
return s:job_error_unsupported_job_type
|
|
||||||
endif
|
|
||||||
|
|
||||||
if l:jobtype == s:job_type_nvimjob
|
|
||||||
let l:job = jobstart(a:cmd, {
|
|
||||||
\ 'on_stdout': function('s:on_stdout'),
|
|
||||||
\ 'on_stderr': function('s:on_stderr'),
|
|
||||||
\ 'on_exit': function('s:on_exit'),
|
|
||||||
\})
|
|
||||||
if l:job <= 0
|
|
||||||
return l:job
|
|
||||||
endif
|
|
||||||
let l:jobid = l:job " nvimjobid and internal jobid is same
|
|
||||||
let s:jobs[l:jobid] = {
|
|
||||||
\ 'type': s:job_type_nvimjob,
|
|
||||||
\ 'opts': a:opts,
|
|
||||||
\ }
|
|
||||||
let s:jobs[l:jobid].job = l:job
|
|
||||||
elseif l:jobtype == s:job_type_vimjob
|
|
||||||
let s:jobidseq = s:jobidseq + 1
|
|
||||||
let l:jobid = s:jobidseq
|
|
||||||
let l:job = job_start(a:cmd, {
|
|
||||||
\ 'out_cb': function('s:out_cb', [l:jobid, a:opts]),
|
|
||||||
\ 'err_cb': function('s:err_cb', [l:jobid, a:opts]),
|
|
||||||
\ 'exit_cb': function('s:exit_cb', [l:jobid, a:opts]),
|
|
||||||
\ 'mode': 'raw',
|
|
||||||
\})
|
|
||||||
if job_status(l:job) !=? 'run'
|
|
||||||
return -1
|
|
||||||
endif
|
|
||||||
let s:jobs[l:jobid] = {
|
|
||||||
\ 'type': s:job_type_vimjob,
|
|
||||||
\ 'opts': a:opts,
|
|
||||||
\ 'job': l:job,
|
|
||||||
\ 'channel': job_getchannel(l:job),
|
|
||||||
\ 'buffer': ''
|
|
||||||
\ }
|
|
||||||
else
|
|
||||||
return s:job_error_unsupported_job_type
|
|
||||||
endif
|
|
||||||
|
|
||||||
return l:jobid
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:job_stop(jobid) abort
|
|
||||||
if has_key(s:jobs, a:jobid)
|
|
||||||
let l:jobinfo = s:jobs[a:jobid]
|
|
||||||
if l:jobinfo.type == s:job_type_nvimjob
|
|
||||||
call jobstop(a:jobid)
|
|
||||||
elseif l:jobinfo.type == s:job_type_vimjob
|
|
||||||
call job_stop(s:jobs[a:jobid].job)
|
|
||||||
endif
|
|
||||||
if has_key(s:jobs, a:jobid)
|
|
||||||
call remove(s:jobs, a:jobid)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:job_send(jobid, data) abort
|
|
||||||
let l:jobinfo = s:jobs[a:jobid]
|
|
||||||
if l:jobinfo.type == s:job_type_nvimjob
|
|
||||||
call jobsend(a:jobid, a:data)
|
|
||||||
elseif l:jobinfo.type == s:job_type_vimjob
|
|
||||||
let l:jobinfo.buffer .= a:data
|
|
||||||
call s:flush_vim_sendraw(a:jobid, v:null)
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:flush_vim_sendraw(jobid, timer) abort
|
|
||||||
" https://github.com/vim/vim/issues/2548
|
|
||||||
" https://github.com/natebosch/vim-lsc/issues/67#issuecomment-357469091
|
|
||||||
let l:jobinfo = s:jobs[a:jobid]
|
|
||||||
if len(l:jobinfo.buffer) <= 1024
|
|
||||||
call ch_sendraw(l:jobinfo.channel, l:jobinfo.buffer)
|
|
||||||
let l:jobinfo.buffer = ''
|
|
||||||
else
|
|
||||||
let l:to_send = l:jobinfo.buffer[:1023]
|
|
||||||
let l:jobinfo.buffer = l:jobinfo.buffer[1024:]
|
|
||||||
call ch_sendraw(l:jobinfo.channel, l:to_send)
|
|
||||||
call timer_start(1, function('s:flush_vim_sendraw', [a:jobid]))
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:job_wait_single(jobid, timeout, start) abort
|
|
||||||
if !has_key(s:jobs, a:jobid)
|
|
||||||
return -3
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:jobinfo = s:jobs[a:jobid]
|
|
||||||
if l:jobinfo.type == s:job_type_nvimjob
|
|
||||||
let l:timeout = a:timeout - reltimefloat(reltime(a:start)) * 1000
|
|
||||||
return jobwait([a:jobid], float2nr(l:timeout))[0]
|
|
||||||
elseif l:jobinfo.type == s:job_type_vimjob
|
|
||||||
let l:timeout = a:timeout / 1000.0
|
|
||||||
try
|
|
||||||
while l:timeout < 0 || reltimefloat(reltime(a:start)) < l:timeout
|
|
||||||
let l:info = job_info(l:jobinfo.job)
|
|
||||||
if l:info.status ==# 'dead'
|
|
||||||
return l:info.exitval
|
|
||||||
elseif l:info.status ==# 'fail'
|
|
||||||
return -3
|
|
||||||
endif
|
|
||||||
sleep 1m
|
|
||||||
endwhile
|
|
||||||
catch /^Vim:Interrupt$/
|
|
||||||
return -2
|
|
||||||
endtry
|
|
||||||
endif
|
|
||||||
return -1
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:job_wait(jobids, timeout) abort
|
|
||||||
let l:start = reltime()
|
|
||||||
let l:exitcode = 0
|
|
||||||
let l:ret = []
|
|
||||||
for l:jobid in a:jobids
|
|
||||||
if l:exitcode != -2 " Not interrupted.
|
|
||||||
let l:exitcode = s:job_wait_single(l:jobid, a:timeout, l:start)
|
|
||||||
endif
|
|
||||||
let l:ret += [l:exitcode]
|
|
||||||
endfor
|
|
||||||
return l:ret
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" public apis {{{
|
|
||||||
function! minpac#job#start(cmd, opts) abort
|
|
||||||
return s:job_start(a:cmd, a:opts)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! minpac#job#stop(jobid) abort
|
|
||||||
call s:job_stop(a:jobid)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! minpac#job#send(jobid, data) abort
|
|
||||||
call s:job_send(a:jobid, a:data)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! minpac#job#wait(jobids, ...) abort
|
|
||||||
let l:timeout = get(a:000, 0, -1)
|
|
||||||
return s:job_wait(a:jobids, l:timeout)
|
|
||||||
endfunction
|
|
||||||
" }}}
|
|
||||||
|
|
||||||
let &cpo = s:save_cpo
|
|
||||||
unlet s:save_cpo
|
|
||||||
@ -1,74 +0,0 @@
|
|||||||
" ---------------------------------------------------------------------
|
|
||||||
" minpac: A minimal package manager for Vim 8 (and Neovim)
|
|
||||||
"
|
|
||||||
" Maintainer: Ken Takata
|
|
||||||
" Last Change: 2020-01-28
|
|
||||||
" License: VIM License
|
|
||||||
" URL: https://github.com/k-takata/minpac
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
let s:winid = 0
|
|
||||||
let s:bufnr = 0
|
|
||||||
|
|
||||||
" Add a message to the minpac progress window
|
|
||||||
function! minpac#progress#add_msg(type, msg) abort
|
|
||||||
" Goes to the minpac progress window.
|
|
||||||
if !win_gotoid(s:winid)
|
|
||||||
echom 'warning: minpac progress window not found.'
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
setlocal modifiable
|
|
||||||
let l:markers = {'': ' ', 'warning': 'W:', 'error': 'E:'}
|
|
||||||
call append(line('$') - 1, l:markers[a:type] . ' ' . a:msg)
|
|
||||||
setlocal nomodifiable
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Open the minpac progress window
|
|
||||||
function! minpac#progress#open(msg) abort
|
|
||||||
let l:bufname = '[minpac progress]'
|
|
||||||
if s:bufnr != 0
|
|
||||||
exec "silent! bwipe" s:bufnr
|
|
||||||
endif
|
|
||||||
if g:minpac#opt.progress_open ==# 'vertical'
|
|
||||||
vertical topleft new
|
|
||||||
elseif g:minpac#opt.progress_open ==# 'horizontal'
|
|
||||||
topleft new
|
|
||||||
elseif g:minpac#opt.progress_open ==# 'tab'
|
|
||||||
tabnew
|
|
||||||
endif
|
|
||||||
let s:winid = win_getid()
|
|
||||||
call append(0, a:msg)
|
|
||||||
|
|
||||||
setf minpacprgs
|
|
||||||
call s:syntax()
|
|
||||||
call s:mappings()
|
|
||||||
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nomodifiable nospell
|
|
||||||
silent file `=l:bufname`
|
|
||||||
let s:bufnr = bufnr('')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:syntax() abort
|
|
||||||
syntax clear
|
|
||||||
syn match minpacPrgsTitle /^## .* ##/
|
|
||||||
syn match minpacPrgsError /^E: .*/
|
|
||||||
syn match minpacPrgsWarning /^W: .*/
|
|
||||||
syn match minpacPrgsInstalled /^ Installed:/
|
|
||||||
syn match minpacPrgsUpdated /^ Updated:/
|
|
||||||
syn match minpacPrgsUptodate /^ Already up-to-date:/
|
|
||||||
syn region minpacPrgsString start='"' end='"'
|
|
||||||
|
|
||||||
hi def link minpacPrgsTitle Title
|
|
||||||
hi def link minpacPrgsError ErrorMsg
|
|
||||||
hi def link minpacPrgsWarning WarningMsg
|
|
||||||
hi def link minpacPrgsInstalled Constant
|
|
||||||
hi def link minpacPrgsUpdated Special
|
|
||||||
hi def link minpacPrgsUptodate Comment
|
|
||||||
hi def link minpacPrgsString String
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:mappings() abort
|
|
||||||
nnoremap <silent><buffer> q :q<CR>
|
|
||||||
nnoremap <silent><buffer> s :call minpac#status()<CR>
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" vim: set ts=8 sw=2 et:
|
|
||||||
@ -1,193 +0,0 @@
|
|||||||
" ---------------------------------------------------------------------
|
|
||||||
" minpac: A minimal package manager for Vim 8 (and Neovim)
|
|
||||||
"
|
|
||||||
" Maintainer: Ken Takata
|
|
||||||
" Created By: Kristijan Husak
|
|
||||||
" Last Change: 2020-01-28
|
|
||||||
" License: VIM License
|
|
||||||
" URL: https://github.com/k-takata/minpac
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
let s:results = []
|
|
||||||
let s:bufnr = 0
|
|
||||||
let s:git_sign = -1 " Support --no-show-signature option.
|
|
||||||
|
|
||||||
function! minpac#status#get(opt) abort
|
|
||||||
let l:bufname = '[minpac status]'
|
|
||||||
if s:bufnr != 0
|
|
||||||
exec "silent! bwipe" s:bufnr
|
|
||||||
endif
|
|
||||||
let l:is_update_ran = minpac#impl#is_update_ran()
|
|
||||||
let l:update_count = 0
|
|
||||||
let l:install_count = 0
|
|
||||||
let l:error_count = 0
|
|
||||||
let l:result = []
|
|
||||||
for l:name in keys(g:minpac#pluglist)
|
|
||||||
let l:pluginfo = g:minpac#pluglist[l:name]
|
|
||||||
let l:dir = l:pluginfo.dir
|
|
||||||
let l:plugin = {'name': l:name, 'lines': [], 'status': ''}
|
|
||||||
|
|
||||||
if !isdirectory(l:dir)
|
|
||||||
let l:plugin.status = 'Not installed'
|
|
||||||
else
|
|
||||||
let l:cmd = [g:minpac#opt.git, '-C', l:dir, 'log',
|
|
||||||
\ '--color=never', '--pretty=format:%h <<<<%D>>>> %s (%cr)', 'HEAD...HEAD@{1}'
|
|
||||||
\ ]
|
|
||||||
let l:commits = minpac#impl#system(l:cmd + (s:git_sign ? ['--no-show-signature'] : []))
|
|
||||||
if s:git_sign == -1
|
|
||||||
if l:commits[0] == 128
|
|
||||||
let s:git_sign = v:false
|
|
||||||
let l:commits = minpac#impl#system(l:cmd)
|
|
||||||
else
|
|
||||||
let s:git_sign = v:true
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:plugin.lines = filter(l:commits[1], {-> v:val !=# ''})
|
|
||||||
call map(l:plugin.lines,
|
|
||||||
\ {-> substitute(v:val, '^[0-9a-f]\{4,} \zs<<<<\(.*\)>>>> ',
|
|
||||||
\ {m -> m[1] =~# '^tag: ' ? '(' . m[1] . ') ' : ''}, '')})
|
|
||||||
|
|
||||||
if !l:is_update_ran
|
|
||||||
let l:plugin.status = 'OK'
|
|
||||||
elseif l:pluginfo.stat.prev_rev !=# '' && l:pluginfo.stat.prev_rev !=# minpac#impl#get_plugin_revision(l:name)
|
|
||||||
let l:update_count += 1
|
|
||||||
let l:plugin.status = 'Updated'
|
|
||||||
elseif l:pluginfo.stat.installed == 0
|
|
||||||
let l:install_count += 1
|
|
||||||
let l:plugin.status = 'Installed'
|
|
||||||
elseif l:pluginfo.stat.errcode != 0
|
|
||||||
let l:error_count += 1
|
|
||||||
let l:plugin.status = 'Error (' . l:pluginfo.stat.errcode . ')'
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
call add(l:result, l:plugin)
|
|
||||||
endfor
|
|
||||||
|
|
||||||
" Show items with most lines (commits) first.
|
|
||||||
call sort(l:result, {first, second -> len(second.lines) - len(first.lines)})
|
|
||||||
let s:results = l:result
|
|
||||||
|
|
||||||
let l:content = []
|
|
||||||
|
|
||||||
if l:is_update_ran
|
|
||||||
call add(l:content, l:update_count . ' updated. ' . l:install_count . ' installed. ' . l:error_count . ' failed.')
|
|
||||||
call add(l:content, '')
|
|
||||||
endif
|
|
||||||
|
|
||||||
for l:item in l:result
|
|
||||||
if l:item.status ==# ''
|
|
||||||
continue
|
|
||||||
endif
|
|
||||||
|
|
||||||
call add(l:content, '- ' . l:item.name . ' - ' . l:item.status)
|
|
||||||
if l:item.status =~# '^Error'
|
|
||||||
for l:line in g:minpac#pluglist[l:item.name].stat.lines
|
|
||||||
call add(l:content, ' msg: ' . l:line)
|
|
||||||
endfor
|
|
||||||
else
|
|
||||||
for l:line in l:item.lines
|
|
||||||
call add(l:content, ' * ' . l:line)
|
|
||||||
endfor
|
|
||||||
endif
|
|
||||||
call add(l:content, '')
|
|
||||||
endfor
|
|
||||||
if len(l:content) > 0 && l:content[-1] ==# ''
|
|
||||||
call remove(l:content, -1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if a:opt.open ==# 'vertical'
|
|
||||||
vertical topleft new
|
|
||||||
elseif a:opt.open ==# 'horizontal'
|
|
||||||
topleft new
|
|
||||||
elseif a:opt.open ==# 'tab'
|
|
||||||
tabnew
|
|
||||||
endif
|
|
||||||
setf minpac
|
|
||||||
call append(1, l:content)
|
|
||||||
1delete _
|
|
||||||
call s:syntax()
|
|
||||||
call s:mappings()
|
|
||||||
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nomodifiable nospell
|
|
||||||
silent file `=l:bufname`
|
|
||||||
let s:bufnr = bufnr('')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
function! s:syntax() abort
|
|
||||||
syntax clear
|
|
||||||
syn match minpacDash /^-/
|
|
||||||
syn match minpacName /\(^- \)\@<=.*/ contains=minpacStatus
|
|
||||||
syn match minpacStatus /\(-.*\)\@<=-\s.*$/ contained
|
|
||||||
syn match minpacStar /^\s\*/ contained
|
|
||||||
syn match minpacCommit /^\s\*\s[0-9a-f]\{7,9} .*/ contains=minpacRelDate,minpacSha,minpacStar
|
|
||||||
syn match minpacSha /\(\s\*\s\)\@<=[0-9a-f]\{4,}/ contained nextgroup=minpacTag
|
|
||||||
syn match minpacTag / (tag: [^)]*)/ contained
|
|
||||||
syn match minpacRelDate /([^)]*)$/ contained
|
|
||||||
syn match minpacWarning /^ msg: .*/
|
|
||||||
|
|
||||||
hi def link minpacDash Special
|
|
||||||
hi def link minpacStar Boolean
|
|
||||||
hi def link minpacName Function
|
|
||||||
hi def link minpacSha Identifier
|
|
||||||
hi def link minpacTag PreProc
|
|
||||||
hi def link minpacRelDate Comment
|
|
||||||
hi def link minpacStatus Constant
|
|
||||||
hi def link minpacWarning WarningMsg
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:mappings() abort
|
|
||||||
nnoremap <silent><buffer> <CR> :call <SID>openSha()<CR>
|
|
||||||
nnoremap <silent><buffer> q :q<CR>
|
|
||||||
nnoremap <silent><buffer> <C-j> :call <SID>nextPackage()<CR>
|
|
||||||
nnoremap <silent><buffer> <C-k> :call <SID>prevPackage()<CR>
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:nextPackage() abort
|
|
||||||
return search('^-\s.*$')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:prevPackage() abort
|
|
||||||
return search('^-\s.*$', 'b')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:openSha() abort
|
|
||||||
let l:sha = matchstr(getline('.'), '^\s\*\s\zs[0-9a-f]\{7,9}')
|
|
||||||
if empty(l:sha)
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:name = s:find_name_by_sha(l:sha)
|
|
||||||
|
|
||||||
if empty(l:name)
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
let l:pluginfo = g:minpac#pluglist[l:name]
|
|
||||||
silent exe 'pedit' l:sha
|
|
||||||
wincmd p
|
|
||||||
setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable
|
|
||||||
let l:sha_content = minpac#impl#system([g:minpac#opt.git, '-C', l:pluginfo.dir, 'show',
|
|
||||||
\ '--no-color', '--pretty=medium', l:sha
|
|
||||||
\ ])
|
|
||||||
|
|
||||||
call append(1, l:sha_content[1])
|
|
||||||
1delete _
|
|
||||||
setlocal nomodifiable
|
|
||||||
nnoremap <silent><buffer> q :q<CR>
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:find_name_by_sha(sha) abort
|
|
||||||
for l:result in s:results
|
|
||||||
for l:commit in l:result.lines
|
|
||||||
if l:commit =~? '^' . a:sha
|
|
||||||
return l:result.name
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endfor
|
|
||||||
|
|
||||||
return ''
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" vim: set ts=8 sw=2 et:
|
|
||||||
@ -1,603 +0,0 @@
|
|||||||
*minpac.txt* A minimal package manager for Vim 8 (and Neovim)
|
|
||||||
|
|
||||||
Version: 3.0.0
|
|
||||||
Author: Ken Takata
|
|
||||||
License: The Vim License
|
|
||||||
URL: https://github.com/k-takata/minpac
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
CONTENTS *minpac-contents*
|
|
||||||
|
|
||||||
OVERVIEW |minpac-overview|
|
|
||||||
CONCEPT |minpac-concept|
|
|
||||||
REQUIREMENTS |minpac-requirements|
|
|
||||||
INSTALLATION |minpac-installation|
|
|
||||||
USAGE |minpac-usage|
|
|
||||||
COMMANDS |minpac-commands|
|
|
||||||
FUNCTIONS |minpac-functions|
|
|
||||||
HOOKS |minpac-hooks|
|
|
||||||
MAPPINGS |minpac-mappings|
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
OVERVIEW *minpac-overview*
|
|
||||||
|
|
||||||
Minpac is a minimal package manager for Vim 8 (and Neovim). This uses the
|
|
||||||
|packages| feature and the jobs feature (|job-channel-overview|) which have
|
|
||||||
been newly added on Vim 8.
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
CONCEPT *minpac-concept*
|
|
||||||
|
|
||||||
* Utilize Vim 8's packages feature.
|
|
||||||
* Parallel install/update using Vim 8's jobs feature.
|
|
||||||
* Simple.
|
|
||||||
* Fast.
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
REQUIREMENTS *minpac-requirements*
|
|
||||||
|
|
||||||
* Vim 8.0.0050+ (or Neovim 0.2+)
|
|
||||||
* Git 1.9+
|
|
||||||
* OS: Windows, Linux or macOS
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
INSTALLATION *minpac-installation*
|
|
||||||
|
|
||||||
Minpac should be installed under "pack/minpac/opt/" in the first directory in
|
|
||||||
the 'packpath' option.
|
|
||||||
Plugins installed under "pack/*/start/" are automatically added to the
|
|
||||||
'runtimepath' after .vimrc is sourced. However, minpac needs to be loaded
|
|
||||||
before that. Therefore, minpac should be installed under "opt" directory, and
|
|
||||||
should be loaded using `packadd minpac`.
|
|
||||||
|
|
||||||
Windows ~
|
|
||||||
|
|
||||||
Vim:
|
|
||||||
>
|
|
||||||
git clone https://github.com/k-takata/minpac.git ^
|
|
||||||
%USERPROFILE%\vimfiles\pack\minpac\opt\minpac
|
|
||||||
<
|
|
||||||
Neovim:
|
|
||||||
>
|
|
||||||
git clone https://github.com/k-takata/minpac.git ^
|
|
||||||
%LOCALAPPDATA%\nvim\pack\minpac\opt\minpac
|
|
||||||
<
|
|
||||||
|
|
||||||
Linux, macOS ~
|
|
||||||
|
|
||||||
Vim:
|
|
||||||
>
|
|
||||||
git clone https://github.com/k-takata/minpac.git \
|
|
||||||
~/.vim/pack/minpac/opt/minpac
|
|
||||||
<
|
|
||||||
Neovim (use `$XDG_CONFIG_HOME` in place of `~/.config` if set on your system):
|
|
||||||
>
|
|
||||||
git clone https://github.com/k-takata/minpac.git \
|
|
||||||
~/.config/nvim/pack/minpac/opt/minpac
|
|
||||||
<
|
|
||||||
|
|
||||||
Sample .vimrc ~
|
|
||||||
|
|
||||||
Basic sample
|
|
||||||
>
|
|
||||||
" Normally this if-block is not needed, because `:set nocp` is done
|
|
||||||
" automatically when .vimrc is found. However, this might be useful
|
|
||||||
" when you execute `vim -u .vimrc` from the command line.
|
|
||||||
if &compatible
|
|
||||||
" `:set nocp` has many side effects. Therefore this should be done
|
|
||||||
" only when 'compatible' is set.
|
|
||||||
set nocompatible
|
|
||||||
endif
|
|
||||||
|
|
||||||
packadd minpac
|
|
||||||
|
|
||||||
call minpac#init()
|
|
||||||
|
|
||||||
" minpac must have {'type': 'opt'} so that it can be loaded with
|
|
||||||
" `packadd`.
|
|
||||||
call minpac#add('k-takata/minpac', {'type': 'opt'})
|
|
||||||
|
|
||||||
" Add other plugins here.
|
|
||||||
call minpac#add('vim-jp/syntax-vim-ex')
|
|
||||||
...
|
|
||||||
|
|
||||||
" Load the plugins right now. (optional)
|
|
||||||
"packloadall
|
|
||||||
<
|
|
||||||
Minpac itself requires 'compatible' to be unset. However, the
|
|
||||||
`if &compatible`-block is optional.
|
|
||||||
|
|
||||||
Customizing 'packpath'
|
|
||||||
|
|
||||||
If you want to use ".vim" directory instead of "vimfiles" even on Windows,
|
|
||||||
you should add "~/.vim" on top of 'packpath': >
|
|
||||||
|
|
||||||
set packpath^=~/.vim
|
|
||||||
packadd minpac
|
|
||||||
|
|
||||||
call minpac#init()
|
|
||||||
...
|
|
||||||
<
|
|
||||||
Advanced sample
|
|
||||||
|
|
||||||
You can write a .vimrc which can be also used even if minpac is not
|
|
||||||
installed.
|
|
||||||
>
|
|
||||||
" Try to load minpac.
|
|
||||||
packadd minpac
|
|
||||||
|
|
||||||
if !exists('g:loaded_minpac')
|
|
||||||
" minpac is not available.
|
|
||||||
|
|
||||||
" Settings for plugin-less environment.
|
|
||||||
...
|
|
||||||
else
|
|
||||||
" minpac is available.
|
|
||||||
call minpac#init()
|
|
||||||
call minpac#add('k-takata/minpac', {'type': 'opt'})
|
|
||||||
|
|
||||||
" Additional plugins here.
|
|
||||||
...
|
|
||||||
|
|
||||||
" Plugin settings here.
|
|
||||||
...
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Common settings here.
|
|
||||||
...
|
|
||||||
<
|
|
||||||
Load minpac on demand
|
|
||||||
|
|
||||||
Very interestingly, minpac doesn't need to be loaded every time when you
|
|
||||||
execute Vim. Unlike other plugin managers, it is needed only when updating,
|
|
||||||
installing or cleaning the plugins. This is because minpac itself doesn't
|
|
||||||
handle the runtime path.
|
|
||||||
|
|
||||||
You can define user commands to load minpac, register the information of
|
|
||||||
plugins, then call |minpac#update()|, |minpac#clean()| or |minpac#status()|.
|
|
||||||
>
|
|
||||||
function! PackInit() abort
|
|
||||||
packadd minpac
|
|
||||||
|
|
||||||
call minpac#init()
|
|
||||||
call minpac#add('k-takata/minpac', {'type': 'opt'})
|
|
||||||
|
|
||||||
" Additional plugins here.
|
|
||||||
call minpac#add('vim-jp/syntax-vim-ex')
|
|
||||||
call minpac#add('tyru/open-browser.vim')
|
|
||||||
...
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Plugin settings here.
|
|
||||||
...
|
|
||||||
|
|
||||||
" Define user commands for updating/cleaning the plugins.
|
|
||||||
" Each of them calls PackInit() to load minpac and register
|
|
||||||
" the information of plugins, then performs the task.
|
|
||||||
command! PackUpdate call PackInit() | call minpac#update()
|
|
||||||
command! PackClean call PackInit() | call minpac#clean()
|
|
||||||
command! PackStatus packadd minpac | call minpac#status()
|
|
||||||
<
|
|
||||||
If you make your .vimrc reloadable, you can reflect the setting of the
|
|
||||||
.vimrc immediately after you edit it by executing
|
|
||||||
`:so $MYVIMRC | PackUpdate`. Or you can define the commands like this: >
|
|
||||||
|
|
||||||
command! PackUpdate source $MYVIMRC | call PackInit() | call minpac#update()
|
|
||||||
command! PackClean source $MYVIMRC | call PackInit() | call minpac#clean()
|
|
||||||
command! PackStatus packadd minpac | call minpac#status()
|
|
||||||
<
|
|
||||||
To make your .vimrc reloadable:
|
|
||||||
|
|
||||||
* `:set nocompatible` should not be executed twice to avoid side effects.
|
|
||||||
* `:function!` should be used to define a user function.
|
|
||||||
* `:command!` should be used to define a user command.
|
|
||||||
* `:augroup!` should be used properly to avoid the same autogroups are
|
|
||||||
defined twice.
|
|
||||||
|
|
||||||
|
|
||||||
Sometimes, you may want to open a shell at the directory where a plugin is
|
|
||||||
installed. The following example defines a command to open a terminal
|
|
||||||
window at the directory of a specified plugin. (Requires Vim 8.0.902 or
|
|
||||||
later.) >
|
|
||||||
|
|
||||||
function! PackList(...)
|
|
||||||
call PackInit()
|
|
||||||
return join(sort(keys(minpac#getpluglist())), "\n")
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
command! -nargs=1 -complete=custom,PackList
|
|
||||||
\ PackOpenDir call PackInit() | call term_start(&shell,
|
|
||||||
\ {'cwd': minpac#getpluginfo(<q-args>).dir,
|
|
||||||
\ 'term_finish': 'close'})
|
|
||||||
<
|
|
||||||
If you execute `:PackOpenDir minpac`, it will open a terminal window at
|
|
||||||
`~/.vim/pack/minpac/opt/minpac` (or the directory where minpac is installed).
|
|
||||||
|
|
||||||
To define a command to open the repository of a plugin in a web browser:
|
|
||||||
>
|
|
||||||
command! -nargs=1 -complete=custom,PackList
|
|
||||||
\ PackOpenUrl call PackInit() | call openbrowser#open(
|
|
||||||
\ minpac#getpluginfo(<q-args>).url)
|
|
||||||
<
|
|
||||||
This uses open-browser.vim (https://github.com/tyru/open-browser.vim).
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
USAGE *minpac-usage*
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
COMMANDS *minpac-commands*
|
|
||||||
|
|
||||||
Minpac doesn't provide any commands. Use the `:call` command to call minpac
|
|
||||||
functions. E.g.: >
|
|
||||||
" To install or update plugins:
|
|
||||||
call minpac#update()
|
|
||||||
|
|
||||||
" To uninstall unused plugins:
|
|
||||||
call minpac#clean()
|
|
||||||
|
|
||||||
" To see plugins status:
|
|
||||||
call minpac#status()
|
|
||||||
<
|
|
||||||
Or define commands by yourself as described in the previous section.
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
FUNCTIONS *minpac-functions*
|
|
||||||
|
|
||||||
minpac#init([{config}]) *minpac#init()*
|
|
||||||
Initialize minpac.
|
|
||||||
|
|
||||||
`{config}` is a Dictionary of options for configuring minpac.
|
|
||||||
|
|
||||||
Option Description ~
|
|
||||||
dir Package directory. Default: the first
|
|
||||||
directory of the 'packpath' option.
|
|
||||||
package_name Package name. Default: "minpac"
|
|
||||||
git Git command. Default: "git"
|
|
||||||
depth Default clone depth. Default: 1
|
|
||||||
jobs Maximum job numbers. If <= 0, unlimited.
|
|
||||||
Default: 8
|
|
||||||
verbose Verbosity level (0 to 4).
|
|
||||||
0: Show only important messages.
|
|
||||||
1: Show the result of each plugin.
|
|
||||||
2: Show error messages from external commands.
|
|
||||||
3: Show start/end messages for each plugin.
|
|
||||||
4: Show debug messages.
|
|
||||||
Default: 2
|
|
||||||
confirm Show interactive confirmation prompts, such as
|
|
||||||
in |minpac#clean()|.
|
|
||||||
Default: |TRUE|
|
|
||||||
progress_open Specify how to show the progress of
|
|
||||||
|minpac#update()|.
|
|
||||||
"none": Do not open the progress window.
|
|
||||||
(Compatible with minpac v2.0.x or earlier.)
|
|
||||||
"horizontal": Open the progress window by
|
|
||||||
splitting horizontally.
|
|
||||||
"vertical": Open the progress window by
|
|
||||||
splitting vertically.
|
|
||||||
"tab": Open the progress window in a new tab.
|
|
||||||
Default: "horizontal"
|
|
||||||
status_open Default setting for the open option of
|
|
||||||
|minpac#status()|.
|
|
||||||
Default: "horizontal"
|
|
||||||
status_auto Specify whether the status window will open
|
|
||||||
automatically after |minpac#update()| is
|
|
||||||
finished.
|
|
||||||
|TRUE|: Open the status window automatically,
|
|
||||||
when one or more plugins are updated or
|
|
||||||
installed.
|
|
||||||
|FALSE|: Do not open the status window
|
|
||||||
automatically.
|
|
||||||
Default: |FALSE|
|
|
||||||
|
|
||||||
All plugins will be installed under the following directories:
|
|
||||||
|
|
||||||
"start" plugins: <dir>/pack/<package_name>/start/<plugin_name>
|
|
||||||
"opt" plugins: <dir>/pack/<package_name>/opt/<plugin_name>
|
|
||||||
|
|
||||||
|
|
||||||
"start" plugins will be automatically loaded after processing your
|
|
||||||
|.vimrc|, or you can load them explicitly using `:packloadall` command.
|
|
||||||
"opt" plugins can be loaded with `:packadd` command.
|
|
||||||
See |packages| for detail.
|
|
||||||
|
|
||||||
|
|
||||||
minpac#add({url}[, {config}]) *minpac#add()*
|
|
||||||
Register a plugin.
|
|
||||||
|
|
||||||
{url} is a URL of a plugin. It can be a short form
|
|
||||||
("<github-account>/<repository>") or a valid git URL. If you use the
|
|
||||||
short form, <repository> should not include the ".git" suffix.
|
|
||||||
Note: Unlike Vundle, a short form without <github-account>/ is not
|
|
||||||
supported. (Because vim-scripts.org is not maintained now.)
|
|
||||||
|
|
||||||
{config} is a Dictionary of options for configuring the plugin.
|
|
||||||
|
|
||||||
Option Description ~
|
|
||||||
name Unique name of the plugin. *minpac-plugin_name*
|
|
||||||
Also used as a local directory name.
|
|
||||||
Default: derived from the repository name.
|
|
||||||
type Type of the plugin. "start" or "opt".
|
|
||||||
Default: "start"
|
|
||||||
frozen If |TRUE|, the plugin will not be updated
|
|
||||||
automatically. Default: |FALSE|
|
|
||||||
depth If >= 1, it is used as a depth to be cloned.
|
|
||||||
Only effective when install the plugin newly.
|
|
||||||
Default: 1 or specified value by
|
|
||||||
|minpac#init()|.
|
|
||||||
branch Used as a branch name to be cloned.
|
|
||||||
Only effective when install the plugin newly.
|
|
||||||
Default: empty
|
|
||||||
rev Commit ID, branch name or tag name to be
|
|
||||||
checked out. If this is specified, "depth"
|
|
||||||
will be ignored.
|
|
||||||
Default: empty
|
|
||||||
do Post-update hook.
|
|
||||||
See |minpac-post-update-hooks|.
|
|
||||||
Default: empty
|
|
||||||
subdir Subdirectory that contains Vim plugin.
|
|
||||||
Default: empty
|
|
||||||
pullmethod Specify how to update the plugin.
|
|
||||||
Empty: Update with `--ff-only` option.
|
|
||||||
"autostash": Update with `--rebase --autostash`
|
|
||||||
options.
|
|
||||||
Default: empty
|
|
||||||
|
|
||||||
The "branch" and "rev" options are slightly different.
|
|
||||||
The "branch" option is used only when the plugin is newly installed.
|
|
||||||
It clones the plugin by `git clone <URL> --depth=<DEPTH> -b <BRANCH>` .
|
|
||||||
This is faster at the installation, but it can be slow if you want to
|
|
||||||
change the branch (by the "rev" option) later. This cannot specify a
|
|
||||||
commit ID.
|
|
||||||
The "rev" option is used both for installing and updating the plugin.
|
|
||||||
It installs the plugin by `git clone <URL> && git checkout <REV>` and
|
|
||||||
updates the plugin by `git fetch && git checkout <REV>` . This is
|
|
||||||
slower because it clones the whole repository, but you can change the
|
|
||||||
rev (commit ID, branch or tag) later.
|
|
||||||
So, if you want to change the branch frequently or want to specify a
|
|
||||||
commit ID, you should use the "rev" option. Otherwise you can use the
|
|
||||||
"branch" option.
|
|
||||||
|
|
||||||
If you include "*" in "rev", minpac tries to checkout the latest tag
|
|
||||||
name which matches the "rev".
|
|
||||||
|
|
||||||
When "subdir"" is specified, the plugin will be installed as usual
|
|
||||||
(e.g. in `pack/minpac/start/pluginname`), however, another directory
|
|
||||||
is created and a symlink (or a junction on Windows) will be created in
|
|
||||||
it. E.g.: >
|
|
||||||
|
|
||||||
ln -s pack/minpac/start/pluginname/subdir \
|
|
||||||
pack/minpac-sub/start/pluginname
|
|
||||||
|
|
||||||
< This way, Vim can load the plugin from its subdirectory.
|
|
||||||
|
|
||||||
|
|
||||||
minpac#update([{name}[, {config}]]) *minpac#update()*
|
|
||||||
Install or update all plugins or the specified plugin.
|
|
||||||
|
|
||||||
{name} is a unique name of a plugin (|minpac-plugin_name|).
|
|
||||||
|
|
||||||
If {name} is omitted or an empty String, all plugins will be installed
|
|
||||||
or updated. Frozen plugins will be installed, but it will not be
|
|
||||||
updated.
|
|
||||||
|
|
||||||
If {name} is specified, only specified plugin will be installed or
|
|
||||||
updated. Frozen plugin will be also updated. {name} can also be a
|
|
||||||
list of plugin names.
|
|
||||||
|
|
||||||
{config} is a Dictionary of options for configuring the function.
|
|
||||||
|
|
||||||
Option Description ~
|
|
||||||
do Finish-update hook.
|
|
||||||
See |minpac-finish-update-hooks|.
|
|
||||||
Default: empty
|
|
||||||
|
|
||||||
You can check the results with `:message` command.
|
|
||||||
|
|
||||||
Note: This resets the 'more' option temporarily to avoid jobs being
|
|
||||||
interrupted.
|
|
||||||
|
|
||||||
|
|
||||||
minpac#clean([{name}]) *minpac#clean()*
|
|
||||||
Remove all plugins which are not registered, or remove the specified
|
|
||||||
plugin.
|
|
||||||
|
|
||||||
{name} is a name of a plugin. It can be a unique plugin name
|
|
||||||
(|minpac-plugin_name|) or a plugin name with wildcards ("*" and "?"
|
|
||||||
are supported). It can also be a list of plugin names.
|
|
||||||
|
|
||||||
If {name} is omitted, all plugins under the minpac directory will be
|
|
||||||
checked. If unregistered plugins are found, they are listed and a
|
|
||||||
prompt is shown. If you type "y", they will be removed.
|
|
||||||
|
|
||||||
When called, matched plugins are listed (even they are registered with
|
|
||||||
|minpac#add()|) and a prompt is shown. If you type "y", they will be
|
|
||||||
removed. If the "confirm" option is not |TRUE|, the prompt will not
|
|
||||||
be shown.
|
|
||||||
|
|
||||||
|
|
||||||
minpac#getpluginfo({name}) *minpac#getpluginfo()*
|
|
||||||
Get information of specified plugin.
|
|
||||||
|
|
||||||
{name} is a unique name of a plugin (|minpac-plugin_name|).
|
|
||||||
A dictionary with following items will be returned:
|
|
||||||
|
|
||||||
Item Description ~
|
|
||||||
name Name of the plugin.
|
|
||||||
url URL of the plugin repository.
|
|
||||||
dir Local directory of the plugin.
|
|
||||||
subdir Subdirectory that contains Vim plugin.
|
|
||||||
frozen If |TRUE|, the plugin is frozen.
|
|
||||||
type Type of the plugin.
|
|
||||||
depth Depth to be cloned.
|
|
||||||
branch Branch name to be cloned.
|
|
||||||
rev Revision to be checked out.
|
|
||||||
do Post-update hook.
|
|
||||||
stat Status of last update.
|
|
||||||
|
|
||||||
|
|
||||||
minpac#getpluglist() *minpac#getpluglist()*
|
|
||||||
Get a list of plugin information. Mainly for debugging.
|
|
||||||
|
|
||||||
|
|
||||||
*minpac#getpackages()*
|
|
||||||
minpac#getpackages([{packname}[, {packtype}[, {plugname}[, {nameonly}]]]])
|
|
||||||
Get a list of plugins under the package directories.
|
|
||||||
|
|
||||||
{packname} specifies a package name. Wildcards can be used. If omitted
|
|
||||||
or an empty string is specified, "*" is used.
|
|
||||||
|
|
||||||
{packtype} is a type of the package. "*", "start", "opt" or "NONE" can
|
|
||||||
be used.
|
|
||||||
If "*" is specified, both start and opt packages are listed.
|
|
||||||
If omitted or an empty string is specified, "*" is used.
|
|
||||||
If "NONE" is specified, package directories are listed instead of
|
|
||||||
plugin directories.
|
|
||||||
|
|
||||||
{plugname} specifies a plugin name. Wildcards can be used. If omitted
|
|
||||||
or an empty string is specified, "*" is used.
|
|
||||||
|
|
||||||
If {nameonly} is |TRUE|, plugin (or package) names are listed instead
|
|
||||||
of the directories. Default is |FALSE|.
|
|
||||||
|
|
||||||
E.g.: >
|
|
||||||
|
|
||||||
" List the all plugin directories under the package directories.
|
|
||||||
" Includes plugins under "dist" package.
|
|
||||||
echo minpac#getpackages()
|
|
||||||
|
|
||||||
" List directories of "start" plugins under "minpac" package.
|
|
||||||
echo minpac#getpackages("minpac", "start")
|
|
||||||
|
|
||||||
" List plugin names under "minpac" package.
|
|
||||||
echo minpac#getpackages("minpac", "", "", 1)
|
|
||||||
|
|
||||||
" List package names.
|
|
||||||
echo minpac#getpackages("", "NAME", "", 1)
|
|
||||||
<
|
|
||||||
minpac#status([{config}]) *minpac#status()*
|
|
||||||
Print status of plugins.
|
|
||||||
When ran after |minpac#update()|, shows only installed and updated
|
|
||||||
plugins. Otherwise, shows the status of the plugin and commits of last
|
|
||||||
update (if any).
|
|
||||||
|
|
||||||
{config} is a Dictionary of options for configuring the function.
|
|
||||||
|
|
||||||
Option Description ~
|
|
||||||
open Specify how to open the status window.
|
|
||||||
"vertical": Open in vertical split.
|
|
||||||
"horizontal": Open in horizontal split.
|
|
||||||
"tab": Open in a new tab.
|
|
||||||
Default: "horizontal" or specified value by
|
|
||||||
|minpac#init()|.
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
HOOKS *minpac-hooks*
|
|
||||||
|
|
||||||
Currently, minpac supports two types of hook: Post-update hooks and Finish-
|
|
||||||
update hooks.
|
|
||||||
|
|
||||||
|
|
||||||
POST-UPDATE HOOKS *minpac-post-update-hooks*
|
|
||||||
|
|
||||||
If a plugin requires extra works (e.g. building a native module), you can use
|
|
||||||
the post-update hooks.
|
|
||||||
|
|
||||||
You can specify the hook with the `'do'` item in the option of the
|
|
||||||
|minpac#add()| function. It can be a String or a Funcref.
|
|
||||||
If a String is specified, it is executed as an Ex command.
|
|
||||||
If a Funcref is specified, it is called with two arguments; {hooktype} and
|
|
||||||
{name}.
|
|
||||||
|
|
||||||
Argument Description ~
|
|
||||||
{hooktype} Type of the hook. 'post-update' for post-
|
|
||||||
update hooks.
|
|
||||||
{name} Name of the plugin. |minpac-plugin_name|
|
|
||||||
|
|
||||||
The current directory is set to the directory of the plugin, when the hook is
|
|
||||||
invoked.
|
|
||||||
|
|
||||||
E.g.: >
|
|
||||||
|
|
||||||
" Execute an Ex command as a hook.
|
|
||||||
call minpac#add('Shougo/vimproc.vim', {'do': 'silent! !make'})
|
|
||||||
|
|
||||||
" Execute a lambda function as a hook.
|
|
||||||
" Parameters for a lambda can be omitted, if you don't need them.
|
|
||||||
call minpac#add('Shougo/vimproc.vim', {'do': {-> system('make')}})
|
|
||||||
|
|
||||||
" Of course, you can also use a normal user function as a hook.
|
|
||||||
function! s:hook(hooktype, name)
|
|
||||||
echom a:hooktype
|
|
||||||
" You can use `minpac#getpluginfo()` to get the information about
|
|
||||||
" the plugin.
|
|
||||||
echom 'Directory:' minpac#getpluginfo(a:name).dir
|
|
||||||
call system('make')
|
|
||||||
endfunction
|
|
||||||
call minpac#add('Shougo/vimproc.vim', {'do': function('s:hook')})
|
|
||||||
<
|
|
||||||
|
|
||||||
The above examples execute the "make" command synchronously. If you want to
|
|
||||||
execute an external command asynchronously, you should use the |job_start()|
|
|
||||||
function on Vim 8 or the |jobstart()| function on Neovim.
|
|
||||||
You may also want to use the `minpac#job#start()` function, but this is mainly
|
|
||||||
for internal use and the specification is subject to change without notice.
|
|
||||||
|
|
||||||
|
|
||||||
FINISH-UPDATE HOOKS *minpac-finish-update-hooks*
|
|
||||||
|
|
||||||
If you want to execute extra works after all plugins are updated, you can use
|
|
||||||
the finish-update hooks.
|
|
||||||
|
|
||||||
You can specify the hook with the `'do'` item in the option of the
|
|
||||||
|minpac#update()| function. It can be a String or a Funcref.
|
|
||||||
If a String is specified, it is executed as an Ex command.
|
|
||||||
If a Funcref is specified, it is called with three arguments; {hooktype},
|
|
||||||
{updated} and {installed}.
|
|
||||||
|
|
||||||
Argument Description ~
|
|
||||||
{hooktype} Type of the hook. 'finish-update' for finish-
|
|
||||||
update hooks.
|
|
||||||
{updated} Number of the updated plugin.
|
|
||||||
{installed} Number of the newly installed plugin.
|
|
||||||
|
|
||||||
E.g.: >
|
|
||||||
|
|
||||||
" Quit Vim immediately after all updates are finished.
|
|
||||||
call minpac#update('', {'do': 'quit'})
|
|
||||||
<
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
MAPPINGS *minpac-mappings*
|
|
||||||
|
|
||||||
List of mappings available only in progress window.
|
|
||||||
|
|
||||||
*minpac-progress-s*
|
|
||||||
s Open the status window.
|
|
||||||
|
|
||||||
*minpac-progress-q*
|
|
||||||
q Exit the progress window.
|
|
||||||
|
|
||||||
|
|
||||||
List of mappings available only in status window.
|
|
||||||
|
|
||||||
*minpac-status-<CR>*
|
|
||||||
<CR> Preview the commit under the cursor.
|
|
||||||
|
|
||||||
*minpac-status-CTRL-j*
|
|
||||||
<C-j> Jump to next package in list.
|
|
||||||
|
|
||||||
*minpac-status-CTRL-k*
|
|
||||||
<C-k> Jump to previous package in list.
|
|
||||||
|
|
||||||
*minpac-status-q*
|
|
||||||
q Exit the status window.
|
|
||||||
(Also works for commit preview window)
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
vim:tw=78:ts=8:ft=help:norl:
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
6cf985065aaeba4c9943c80e9aee61a1b86c1fad branch 'master' of https://github.com/k-takata/minpac
|
|
||||||
86722338fbd0f948b7f41588b02e81be59ab4114 not-for-merge branch 'appveyor-cache-temp' of https://github.com/k-takata/minpac
|
|
||||||
e04fbf9d1b96e789c43ac48223d8c11cea0fd347 not-for-merge branch 'appveyor-test' of https://github.com/k-takata/minpac
|
|
||||||
0fd746b44544f19c2e4ab6dc31f4eb07000b1a0b not-for-merge branch 'ci-enable-neovim-on-ubuntu' of https://github.com/k-takata/minpac
|
|
||||||
6cf985065aaeba4c9943c80e9aee61a1b86c1fad not-for-merge branch 'devel' of https://github.com/k-takata/minpac
|
|
||||||
a01f565cd3e24c3e9f4ad9b1c665b782bbc51e91 not-for-merge branch 'improve-ci-temp' of https://github.com/k-takata/minpac
|
|
||||||
e096a297bbc91b16416b90598b3810df543382db not-for-merge branch 'runtest-upstream' of https://github.com/k-takata/minpac
|
|
||||||
5351955003b07a747e700c119ff9483c84b248f4 not-for-merge branch 'update-async-vim' of https://github.com/k-takata/minpac
|
|
||||||
@ -1 +0,0 @@
|
|||||||
ref: refs/heads/master
|
|
||||||
@ -1 +0,0 @@
|
|||||||
7819b0710d223cacf93887ec5cbc9848eed7625c
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
[core]
|
|
||||||
repositoryformatversion = 0
|
|
||||||
filemode = true
|
|
||||||
bare = false
|
|
||||||
logallrefupdates = true
|
|
||||||
[remote "origin"]
|
|
||||||
url = https://github.com/k-takata/minpac.git
|
|
||||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
|
||||||
[branch "master"]
|
|
||||||
remote = origin
|
|
||||||
merge = refs/heads/master
|
|
||||||
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 7819b0710d223cacf93887ec5cbc9848eed7625c Julien Rabier <taziden@flexiden.org> 1606045328 +0100 clone: from https://github.com/k-takata/minpac.git
|
|
||||||
7819b0710d223cacf93887ec5cbc9848eed7625c 6cf985065aaeba4c9943c80e9aee61a1b86c1fad Julien Rabier <taziden@flexiden.org> 1630678738 +0200 pull: Fast-forward
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 7819b0710d223cacf93887ec5cbc9848eed7625c Julien Rabier <taziden@flexiden.org> 1606045328 +0100 clone: from https://github.com/k-takata/minpac.git
|
|
||||||
7819b0710d223cacf93887ec5cbc9848eed7625c 6cf985065aaeba4c9943c80e9aee61a1b86c1fad Julien Rabier <taziden@flexiden.org> 1630678738 +0200 pull: Fast-forward
|
|
||||||
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 7819b0710d223cacf93887ec5cbc9848eed7625c Julien Rabier <taziden@flexiden.org> 1606045328 +0100 clone: from https://github.com/k-takata/minpac.git
|
|
||||||
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 0fd746b44544f19c2e4ab6dc31f4eb07000b1a0b Julien Rabier <taziden@flexiden.org> 1625498078 +0200 pull --quiet --ff-only --rebase=false: storing head
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
7819b0710d223cacf93887ec5cbc9848eed7625c 093f00891aeb04e98ceb5a541885d025c9fae169 Julien Rabier <taziden@flexiden.org> 1608047789 +0100 pull --quiet --ff-only --rebase=false: fast-forward
|
|
||||||
093f00891aeb04e98ceb5a541885d025c9fae169 6cf985065aaeba4c9943c80e9aee61a1b86c1fad Julien Rabier <taziden@flexiden.org> 1625498078 +0200 pull --quiet --ff-only --rebase=false: fast-forward
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
7819b0710d223cacf93887ec5cbc9848eed7625c 093f00891aeb04e98ceb5a541885d025c9fae169 Julien Rabier <taziden@flexiden.org> 1608047789 +0100 pull --quiet --ff-only --rebase=false: fast-forward
|
|
||||||
093f00891aeb04e98ceb5a541885d025c9fae169 6cf985065aaeba4c9943c80e9aee61a1b86c1fad Julien Rabier <taziden@flexiden.org> 1625498078 +0200 pull --quiet --ff-only --rebase=false: fast-forward
|
|
||||||
@ -1 +0,0 @@
|
|||||||
0069f3e4f5d2d42bb9b790a9cef3729bdfe4eaae e096a297bbc91b16416b90598b3810df543382db Julien Rabier <taziden@flexiden.org> 1625498078 +0200 pull --quiet --ff-only --rebase=false: fast-forward
|
|
||||||
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 5351955003b07a747e700c119ff9483c84b248f4 Julien Rabier <taziden@flexiden.org> 1625498078 +0200 pull --quiet --ff-only --rebase=false: storing head
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +0,0 @@
|
|||||||
xm’Ks¢@…gͯèªYÌÂJäÑMwW%STÄ' ãšnA‘GPý8™š]îòÖwêÔ½ç°sYf-ÀDþÑÖœ¬+1¡0æH(XÆŠœ#$‘(œ-Ñ5Œt¦a©Šj~jA,<14>PU`b®hHG8Æ*á
|
|
||||||
£˜ÆL£*‘åÿ<çª%KˆÊeÁ ¡„jP㉪#bMŠºöp®Áüy£6/LJݱ}c
{Ϋß@Ñ*+B
|
|
||||||
2}°¯KZ^;k§]^NçšWÅí-ÍÚC??€odi•6Y
|
|
||||||
žþŽ9¶<EFBFBD>pml{elüµ—€úÆd¦a˜–ax¦7KÓ®,ßœãCןZíô†Qrâ3cûy;°1›,?.÷5ü…ž´ù¹5+ƒøáH³üÙíR„æ*»<>&–—G×÷]·v»d8œ;]Ô-ã´”'×ýåF„Ø%`Yžºéj´V;9¿/ˆ3
“+%Qœâ¢''_î³2t<32>þ:w¶1ƒúŽ1[Ç3?/8¿z{ ˆ)ÄÕ{ÝeoëZw²"Ä<>÷åÄ÷iI‚&ñ-[-ÏŒ1îuWý>¸ŒNÅtc'‡ ‰ûF
Waߨ¬n.8ô½Â•³ÕÉ·ŽœíC</gô,×®½CvÍPÔ»U%ç.
|
|
||||||
ˆÛµ<EFBFBD>çÐXvSn¾œõÉѤ×I^„7sÿà9¥Þ]œè’[³m`B¯ ôV){/¦i¸Øu¼JàÕØn×Ò¿ÌÆ«Ñ÷‰IK^§T]Q€š_:Þ´à§¢é@ÔçŸÚ¯^
Ev}R4E’üð(øÅªó¯?)§ðÌ
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
x…ÎÍJÄ0†a׹гs!”¤Ió#à èf\霜9ajÛdhR{ûƒ{×ßKeYƽÓme†ØÓ`eÂd1cƒ''9CÆhC1*¥§ÅWÎ
<'i¤;ëà1yV<79>¤!çmp6â0x7 %¦(pk—²Â{÷‰6„ÃtãS{¡JÝ÷õʪ U¯eO2H)è^ÖøãŒý3âõôocÅ83|pù(¾â–ÛéöŸË.Ä©Á¹pÍ<70>
ö²N°ó<ß×Z†•±–\;ñ±»Vy
|
|
||||||
@ -1 +0,0 @@
|
|||||||
x+)JMU0´0a040031QHÏ,Ñ+ËÌeð<öÉUôV—¸}ÒÔ¸ía=×®9Y&B•dæä€Õ¸²yØÎɯÔ9|=ó£»gÆ’~ÁMP5YùI`%r¼»•˜6Ôª¹Üü&uªâþ–“ŒV¶P%EùéE©ÅÅ`um8íœ{îõ|Þ6%ëoñÖyw×pCÕ—$–”BTõ.Ö2üíru»…™rNNžÐÎʯ—CËIX
|
|
||||||
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
x}ŹÁJĹ0E]ç+f/”IҤSqďNŢL“ /Ö$ĄŤü{‹¨K×÷8'´Rr3Íw}<17>¤É'<>vVGÖÉş%˛c!v‹<>YĽ·¬6ŢĄvĐÂłŁÉ&‹fÔýbÉk<1F>iš8h1`TüŃŻm‡—áÂ+w†ÇőÄ×ţŽ0ĽmO ˝&ÂyśîqFTá۬˿ŚAăĽuć‡Q||Ö0Üry€W)í&p´rVĺw9 íŔßC©ËUŽßí¬<C3AD>Ú:T‘(r…’ëĆaP_é=Xű
|
|
||||||
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
x•ΞAΒ …aΧ<61>bφ&ΝH©1Ζ½[=ΐ0Qk-Ajβν%ήΐΕ[~/?ΟΣt« µ[Υ"=m
"λϊΰ<CF8A>ƒatΑ'r1¤¨umμT¦"Ο£
Ζ®<1D>#ΛΔΕ<0F>μ<EFBFBD>ο<EFBFBD>ΑD)hΛ<68>–z<E28093><0B>Ί3<CE8A>T φcγc=ς‹»{>ΐΖiΤ[γMkl^ρ―¬Κ?FQΞoωΜe—©
|
|
||||||
Ό„—"π¦Η"κΨΤG”
|
|
||||||
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
xmQÁN!õÌWÌ¡WvÓX<C393>Ùă‡&í¡Ö¨éµ<C3A9>e\HX@fhìßËšmb<6D>\`Þðæ½ÚG
«û‡¯ÂPÔ€œÜè;ÈøY\F#Œ#î€s!>á±ò¾P—üJ13¶»ãaýú¶Ý??ŽŠóÜ׊,0·3QV‰†ì5ýåé}ó¸Øìwë¶¶[íB·˜0!4~ÄŒGê³K|Cïc@<40>Ò`bËzÒY…ÞÂiÙÜ5«Z“ƒÇl™um[¹¶è¦<C3A8>cËÖ…^MŠ’-ŽŽ å1ýª…¸ÖM.Á£Î/„yÚÒ<C39A>•Áééj¶À<C2B6>[ï4`(ãí
|
|
||||||
øœª‘9o:³<>¡²N˜ÉÅ0ÕûVg©ÂÑGeæ{üMUSüX—2ãôÕ“‰âØ®š.
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
xe<>AKÄ0…½š_1P
|
|
||||||
¶ aOR¤ ©¸]¼%ÝNÛÁvR’i÷ï›t
|
|
||||||
æ<EFBFBD>Ì„ï½yÓŒ¶<EFBFBD>û‡»‹D%ðl§É2¼™oìhÄ[hÃËèA„‘¼€í@ÐKø±àÎT¢‚®œ…,{謃ÙYÁ£÷›êL›ÞùÂ-zr¦ˆ<05> d˜x""¼<>Wr–'dQº¬ß_/…ÞÃÒ”í<.=ñVJjÒ`0E¨ÐEµ!Ð¥ÎáêúWyÜÒJíbÆsüLéü³®òý&ûR—NŒZOij9FMZãzŒë&¤÷—Ž\¶ÒôǤþÈãüÿF™CÍþâw<C3A2>àOñŠ¥úñaz
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
x…ŹMKĹ0E]çWĚ^i>q+"nÄLŇÉ{±M[ŇĽ…˙Ţ<·î†Ă=—;q+%7P<37>şi•d0ŇŁU0ÁŤäÉjéEný&ťä$5۱ŇÚ@ë“"ťLÇZ†ŕ<E280A0>ó}¤¤śôaJ¤ ‘^Úy«đĚßpƆp?w}nŹń<C5B9>üs€Á^ŘŃ(·ÂÁâϲF˙;îĎaŤŽ–×Ó<•}«
Ú™`Á+…”: ŐŔ{.0rɥ󞱜闅ś!P¶)§L\/ťqöÚ{ęoC˙â¶_xô<gßâ˝dy
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
x…ÎÁJÄ0ÆqÏyйa’4i#".¼îL¦³vm»YÒQðí-‹woøøÁÇu]Ï
|
|
||||||
>…;m"{”(¢—L9$TxÉÅžsâ"<,;s¥&…’¥ÄÞ#‡!„9¥³s.²ëJ?ôÁ‡SÊ}éT¼Û#ͤ<04>óÎg}æ<>íçõ \r<19>Çàà3¢áÛ3•ÿMߥ?cÆÊð2ÑåC@'<27>Bã^§VW86ú>o ^߯–Â(‹¨€ÕÛfÖÅš_Þ¸Q–
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user