diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-11 07:54:59 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-11 07:54:59 -0400 |
commit | 3adcf542289a0883924ae9b9be8b898c36702c95 (patch) | |
tree | f02166ef4c95161ffa994eb1a3e5729c93c2c66b /.vim/pack | |
parent | dfcc303e7cc284a45f55bae81ed888dc256432b8 (diff) |
Add some Vim plugins
Diffstat (limited to '.vim/pack')
109 files changed, 13989 insertions, 0 deletions
diff --git a/.vim/pack/css-color/start/css-color/.gitattributes b/.vim/pack/css-color/start/css-color/.gitattributes new file mode 100644 index 0000000..5632fd9 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/.gitattributes | |||
@@ -0,0 +1,5 @@ | |||
1 | /autoload/css_color.vim export-subst | ||
2 | /.gitattributes export-ignore | ||
3 | /README.md export-ignore | ||
4 | /LICENSE export-ignore | ||
5 | /tests export-ignore | ||
diff --git a/.vim/pack/css-color/start/css-color/README.md b/.vim/pack/css-color/start/css-color/README.md new file mode 100644 index 0000000..77b2540 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/README.md | |||
@@ -0,0 +1,16 @@ | |||
1 | <h1 align="center">CSS Color</h1> | ||
2 | |||
3 | <div align="center"> | ||
4 | A very fast, multi-syntax context-sensitive color name highlighter<br> | ||
5 | <img src="https://raw.githubusercontent.com/ap/vim-css-color/5377c65022ee6d660b898bad954aeea73fa613b8/screenshot.png" width="763"> | ||
6 | |||
7 | <sub> | ||
8 | <pre><code># <b>Install</b>: If you use a plugin manager then follow its instructions. Otherwise: | ||
9 | git clone https://github.com/ap/vim-css-color.git ~/.vim/pack/css-color/start/css-color</code></pre> | ||
10 | </sub><br> | ||
11 | |||
12 | </div> | ||
13 | |||
14 | <sub>Inspired | ||
15 | by [Niklas Hofer](http://www.vim.org/scripts/script.php?script_id=2150) | ||
16 | and [Max Vasiliev](https://github.com/skammer/vim-css-color).</sub> | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/c.vim b/.vim/pack/css-color/start/css-color/after/syntax/c.vim new file mode 100644 index 0000000..d87f75d --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/c.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'cComment,cCommentL,cString,cCppString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/cfg.vim b/.vim/pack/css-color/start/css-color/after/syntax/cfg.vim new file mode 100644 index 0000000..9261fc0 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/cfg.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'CfgComment,CfgString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/clojure.vim b/.vim/pack/css-color/start/css-color/after/syntax/clojure.vim new file mode 100644 index 0000000..c708985 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/clojure.vim | |||
@@ -0,0 +1,2 @@ | |||
1 | let [type, keywords] = expand('%:e') ==? 'cljs' ? ['css', 'extended'] : ['hex', 'none'] | ||
2 | call css_color#init(type, keywords, 'clojureComment,clojureString') | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/csh.vim b/.vim/pack/css-color/start/css-color/after/syntax/csh.vim new file mode 100644 index 0000000..2ce84d0 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/csh.vim | |||
@@ -0,0 +1,4 @@ | |||
1 | syn match cshCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=cshComment | ||
2 | call css_color#init( 'hex', 'none' | ||
3 | \, 'cshDblQuote,cshSnglQuote,cshHereDoc,' | ||
4 | \. 'cshCommentColor' ) | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/css.vim b/.vim/pack/css-color/start/css-color/after/syntax/css.vim new file mode 100644 index 0000000..1b45f23 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/css.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('css', 'extended', 'cssMediaBlock,cssFunction,cssDefinition,cssAttrRegion,cssComment') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/dosini.vim b/.vim/pack/css-color/start/css-color/after/syntax/dosini.vim new file mode 100644 index 0000000..102bc91 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/dosini.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'dosiniValue') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/elm.vim b/.vim/pack/css-color/start/css-color/after/syntax/elm.vim new file mode 100644 index 0000000..9e60d62 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/elm.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'elmLineComment,elmString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/fish.vim b/.vim/pack/css-color/start/css-color/after/syntax/fish.vim new file mode 100644 index 0000000..f0e7db9 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/fish.vim | |||
@@ -0,0 +1,3 @@ | |||
1 | " https://github.com/dag/vim-fish (and presumably its various forks) | ||
2 | syn match fishCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=fishComment | ||
3 | call css_color#init( 'hex', 'none', 'fishString,fishCommentColor' ) | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/go.vim b/.vim/pack/css-color/start/css-color/after/syntax/go.vim new file mode 100644 index 0000000..24a8c45 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/go.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'goComment,goString,goRawString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/html.vim b/.vim/pack/css-color/start/css-color/after/syntax/html.vim new file mode 100644 index 0000000..5452276 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/html.vim | |||
@@ -0,0 +1,2 @@ | |||
1 | " default html syntax should already be including the css syntax | ||
2 | call css_color#init('none', 'none', 'htmlString,htmlCommentPart') | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/i3.vim b/.vim/pack/css-color/start/css-color/after/syntax/i3.vim new file mode 100644 index 0000000..e56050f --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/i3.vim | |||
@@ -0,0 +1,4 @@ | |||
1 | " see also: i3config.vim for the stock Vim 8.2+ syntax | ||
2 | " Colour => https://github.com/moon-musick/vim-i3-config-syntax | ||
3 | " i3* => https://github.com/PotatoesMaster/i3-vim-syntax | ||
4 | call css_color#init('hex', 'none', 'Colour,i3SimpleString,i3Color1st,i3Color2nd,i3ColorLast') | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/i3config.vim b/.vim/pack/css-color/start/css-color/after/syntax/i3config.vim new file mode 100644 index 0000000..5043952 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/i3config.vim | |||
@@ -0,0 +1,3 @@ | |||
1 | " i3ConfigColor => stock Vim syntax and recent https://github.com/mboughaba/i3config.vim | ||
2 | " Color => https://github.com/mboughaba/i3config.vim prior to dff3b177ebaf6aae35591cd4c9c734fff9ed7145 | ||
3 | call css_color#init('hex', 'none', 'i3ConfigColor,Color') | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/javascript.vim b/.vim/pack/css-color/start/css-color/after/syntax/javascript.vim new file mode 100644 index 0000000..84558ac --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/javascript.vim | |||
@@ -0,0 +1,14 @@ | |||
1 | " ft=coffee includes javascript, but mostly sets up own syntax groups | ||
2 | " so until it has specific support there's no point in loading anyway | ||
3 | " and for some reason the W3C syntax color keywords break its highlighting | ||
4 | " (this refers to the https://github.com/kchmck/vim-coffee-script plugin) | ||
5 | if &syntax =~# '\(^\|\.\)coffee\($\|\.\)' | finish | endif | ||
6 | |||
7 | " javaScriptX = default Vim syntax | ||
8 | " jsX = https://github.com/pangloss/vim-javascript | ||
9 | " javascriptX = https://github.com/othree/yajs.vim | ||
10 | call css_color#init('hex', 'extended' | ||
11 | \, 'javaScriptComment,javaScriptLineComment,javaScriptStringS,javaScriptStringD,javaScriptStringT' | ||
12 | \. ',jsComment,jsString,jsTemplateString,jsObjectKeyString,jsObjectStringKey,jsClassStringKey' | ||
13 | \. ',javascriptComment,javascriptLineComment,javascriptLineComment,javascriptString,javascriptTemplate' | ||
14 | \) | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/json.vim b/.vim/pack/css-color/start/css-color/after/syntax/json.vim new file mode 100644 index 0000000..f7b5fad --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/json.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('css', 'none', 'jsonString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/jsx.vim b/.vim/pack/css-color/start/css-color/after/syntax/jsx.vim new file mode 100644 index 0000000..322bc49 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/jsx.vim | |||
@@ -0,0 +1,3 @@ | |||
1 | " jsx syntax should already be including the javascript and xml syntaxes | ||
2 | " but those only use `hex` parsing; JSX needs `css` for inline CSS styles | ||
3 | call css_color#init('css', 'none', '') | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/kitty.vim b/.vim/pack/css-color/start/css-color/after/syntax/kitty.vim new file mode 100644 index 0000000..94dd425 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/kitty.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'kittyColor,kittyComment') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/less.vim b/.vim/pack/css-color/start/css-color/after/syntax/less.vim new file mode 100644 index 0000000..0f39b91 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/less.vim | |||
@@ -0,0 +1,8 @@ | |||
1 | " variable | property | multiline | end-of-line | plugin | ||
2 | " -----------------------+----------------+----------------+-------------+--------- | ||
3 | " lessCssAttribute | lessCssComment | lessComment | https://github.com/genoma/vim-less | ||
4 | " lessAttribute | lessCssComment | lessComment | https://github.com/KohPoll/vim-less | ||
5 | " lessVariableValue | lessDefinition | cssComment | lessComment | https://github.com/groenewege/vim-less | ||
6 | " lessVariableDefinition | cssDefinition | cssComment | lessComment | https://github.com/lunaru/vim-less | ||
7 | |||
8 | call css_color#init('css', 'extended', 'lessVariableValue,lessVariableDefinition,lessDefinition,lessCssAttribute,lessAttribute,cssDefinition,cssComment,lessCssComment,lessComment') | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/moon.vim b/.vim/pack/css-color/start/css-color/after/syntax/moon.vim new file mode 100644 index 0000000..cb32815 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/moon.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'extended', 'moonComment,moonString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/nix.vim b/.vim/pack/css-color/start/css-color/after/syntax/nix.vim new file mode 100644 index 0000000..d2ffdbb --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/nix.vim | |||
@@ -0,0 +1,2 @@ | |||
1 | " https://github.com/LnL7/vim-nix | ||
2 | call css_color#init('hex', 'none', 'nixComment,nixString,nixSimpleString') | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/perl.vim b/.vim/pack/css-color/start/css-color/after/syntax/perl.vim new file mode 100644 index 0000000..09f57e8 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/perl.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'perlComment,perlDATA,perlString,perlStringUnexpanded,perlQQ,perlHereDoc') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/php.vim b/.vim/pack/css-color/start/css-color/after/syntax/php.vim new file mode 100644 index 0000000..7c86eb3 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/php.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('css', 'basic', 'phpComment,phpStringSingle,phpStringDouble') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/python.vim b/.vim/pack/css-color/start/css-color/after/syntax/python.vim new file mode 100644 index 0000000..08104d7 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/python.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'pythonComment,pythonString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/qml.vim b/.vim/pack/css-color/start/css-color/after/syntax/qml.vim new file mode 100644 index 0000000..5503f20 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/qml.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('css', 'extended', 'qmlStringD') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/r.vim b/.vim/pack/css-color/start/css-color/after/syntax/r.vim new file mode 100644 index 0000000..32ae58b --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/r.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'extended', 'rComment,rString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/rasi.vim b/.vim/pack/css-color/start/css-color/after/syntax/rasi.vim new file mode 100644 index 0000000..103a9ea --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/rasi.vim | |||
@@ -0,0 +1,4 @@ | |||
1 | " https://github.com/Fymyte/rasi.vim | ||
2 | call css_color#init('css', 'extended' | ||
3 | \, 'rasiHexColor,rasiRGBColor,rasiRGBAColor,rasiHSLColor,rasiHSLAColor,rasiNamedColor' | ||
4 | \. ',rasiPropertyVal,rasiComment,rasiCommentL,rasiEnvVar,rasiVarReference') | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/ruby.vim b/.vim/pack/css-color/start/css-color/after/syntax/ruby.vim new file mode 100644 index 0000000..5a930a6 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/ruby.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'rubyComment,rubyData,rubyString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/sass.vim b/.vim/pack/css-color/start/css-color/after/syntax/sass.vim new file mode 100644 index 0000000..79f8bc0 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/sass.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('css', 'extended', 'sassCssAttribute,sassComment,sassCssComment') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/scss.vim b/.vim/pack/css-color/start/css-color/after/syntax/scss.vim new file mode 100644 index 0000000..57569b1 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/scss.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('css', 'extended', 'scssAttribute,scssComment,scssVariableValue,scssMap,scssMapValue,sassCssAttribute,cssComment') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/sh.vim b/.vim/pack/css-color/start/css-color/after/syntax/sh.vim new file mode 100644 index 0000000..8d7d618 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/sh.vim | |||
@@ -0,0 +1,6 @@ | |||
1 | syn match shCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=shQuickComment,shBQComment,shComment | ||
2 | call css_color#init( 'hex', 'none' | ||
3 | \, 'shSingleQuote,shDoubleQuote,shHereDoc,' | ||
4 | \. 'shTestSingleQuote,shTestDoubleQuote,' | ||
5 | \. 'shEchoQuote,shEmbeddedEcho,shEcho,' | ||
6 | \. 'shCommentColor' ) | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/stylus.vim b/.vim/pack/css-color/start/css-color/after/syntax/stylus.vim new file mode 100644 index 0000000..0aca85e --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/stylus.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('css', 'extended', 'stylusCssAttribute,stylusComment,cssComment') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/tcsh.vim b/.vim/pack/css-color/start/css-color/after/syntax/tcsh.vim new file mode 100644 index 0000000..ce7db7d --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/tcsh.vim | |||
@@ -0,0 +1,4 @@ | |||
1 | syn match tcshCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=tcshComment | ||
2 | call css_color#init( 'hex', 'none' | ||
3 | \, 'tcshSQuote,tcshDQuote,tcshHereDoc,' | ||
4 | \. 'tcshCommentColor' ) | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/tmux.vim b/.vim/pack/css-color/start/css-color/after/syntax/tmux.vim new file mode 100644 index 0000000..666f16c --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/tmux.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('css', 'none', 'tmuxString,tmuxComment') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/typescript.vim b/.vim/pack/css-color/start/css-color/after/syntax/typescript.vim new file mode 100644 index 0000000..301425d --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/typescript.vim | |||
@@ -0,0 +1,6 @@ | |||
1 | " https://github.com/HerringtonDarkholme/yats.vim (stock Vim syntax) | ||
2 | " https://github.com/leafgarland/typescript-vim | ||
3 | call css_color#init('css', 'extended' | ||
4 | \, 'typescriptString,typescriptStringProperty,typescriptStringS,typescriptStringD,typescriptStringB,' | ||
5 | \. 'typescriptComment,typescriptLineComment,typescriptCommentSkip,typescriptDocComment' | ||
6 | \) | ||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/typescriptreact.vim b/.vim/pack/css-color/start/css-color/after/syntax/typescriptreact.vim new file mode 100644 index 0000000..da45708 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/typescriptreact.vim | |||
@@ -0,0 +1 @@ | |||
runtime after/syntax/typescript.vim | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/vala.vim b/.vim/pack/css-color/start/css-color/after/syntax/vala.vim new file mode 100644 index 0000000..8b7b104 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/vala.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'extended', 'valaString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/vim.vim b/.vim/pack/css-color/start/css-color/after/syntax/vim.vim new file mode 100644 index 0000000..bcb1986 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/vim.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'vimHiGuiRgb,vimString,vimComment,vimLineComment') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/xdefaults.vim b/.vim/pack/css-color/start/css-color/after/syntax/xdefaults.vim new file mode 100644 index 0000000..e15ceb5 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/xdefaults.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'extended', 'xdefaultsValue') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/xml.vim b/.vim/pack/css-color/start/css-color/after/syntax/xml.vim new file mode 100644 index 0000000..a6e11fa --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/xml.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'none', 'xmlComment,xmlCommentPart,xmlString') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/yaml.vim b/.vim/pack/css-color/start/css-color/after/syntax/yaml.vim new file mode 100644 index 0000000..2193fa2 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/yaml.vim | |||
@@ -0,0 +1 @@ | |||
call css_color#init('hex', 'extended', 'yamlComment,yamlFlowString,yamlPlainScalar') | |||
diff --git a/.vim/pack/css-color/start/css-color/after/syntax/zsh.vim b/.vim/pack/css-color/start/css-color/after/syntax/zsh.vim new file mode 100644 index 0000000..8f89ebb --- /dev/null +++ b/.vim/pack/css-color/start/css-color/after/syntax/zsh.vim | |||
@@ -0,0 +1,4 @@ | |||
1 | syn match zshCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=zshComment | ||
2 | call css_color#init( 'hex', 'none' | ||
3 | \, 'zshString,zshPOSIXString,zshHereDoc,' | ||
4 | \. 'zshCommentColor' ) | ||
diff --git a/.vim/pack/css-color/start/css-color/autoload/css_color.vim b/.vim/pack/css-color/start/css-color/autoload/css_color.vim new file mode 100644 index 0000000..b5a0dc4 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/autoload/css_color.vim | |||
@@ -0,0 +1,336 @@ | |||
1 | " Language: Colorful CSS Color Preview | ||
2 | " Author: Aristotle Pagaltzis <pagaltzis@gmx.de> | ||
3 | " Commit: $Format:%H$ | ||
4 | " Licence: The MIT License (MIT) | ||
5 | |||
6 | if ! ( v:version >= 700 && has('syntax') && ( has('gui_running') || has('nvim') || &t_Co == 256 ) ) | ||
7 | function! css_color#init(type, keywords, groups) | ||
8 | endfunction | ||
9 | function! css_color#extend(groups) | ||
10 | endfunction | ||
11 | finish | ||
12 | endif | ||
13 | |||
14 | function! s:rgb2color(r,g,b) | ||
15 | " Convert 80% -> 204, 100% -> 255, etc. | ||
16 | let rgb = map( [a:r,a:g,a:b], 'v:val =~ "%$" ? ( 255 * v:val ) / 100 : v:val' ) | ||
17 | return printf( '%02x%02x%02x', rgb[0], rgb[1], rgb[2] ) | ||
18 | endfunction | ||
19 | |||
20 | function! s:hsl2color(h,s,l) | ||
21 | " Convert 80% -> 0.8, 100% -> 1.0, etc. | ||
22 | let [s,l] = map( [a:s, a:l], 'v:val =~ "%$" ? v:val / 100.0 : v:val + 0.0' ) | ||
23 | " algorithm transcoded to vim from http://www.w3.org/TR/css3-color/#hsl-color | ||
24 | let hh = ( a:h % 360 ) / 360.0 | ||
25 | let m2 = l <= 0.5 ? l * ( s + 1 ) : l + s - l * s | ||
26 | let m1 = l * 2 - m2 | ||
27 | let rgb = [] | ||
28 | for h in [ hh + (1/3.0), hh, hh - (1/3.0) ] | ||
29 | let h = h < 0 ? h + 1 : h > 1 ? h - 1 : h | ||
30 | let v = | ||
31 | \ h * 6 < 1 ? m1 + ( m2 - m1 ) * h * 6 : | ||
32 | \ h * 2 < 1 ? m2 : | ||
33 | \ h * 3 < 2 ? m1 + ( m2 - m1 ) * ( 2/3.0 - h ) * 6 : | ||
34 | \ m1 | ||
35 | if v > 1.0 | return '' | endif | ||
36 | let rgb += [ float2nr( 255 * v ) ] | ||
37 | endfor | ||
38 | return printf( '%02x%02x%02x', rgb[0], rgb[1], rgb[2] ) | ||
39 | endfunction | ||
40 | |||
41 | let s:_1_3 = 1.0/3 | ||
42 | let s:_16_116 = 16.0/116.0 | ||
43 | let s:cos16 = cos(16*(180/atan2(0,-1))) | ||
44 | let s:sin16 = sin(16*(180/atan2(0,-1))) | ||
45 | |||
46 | function s:rgb2din99(rgb) | ||
47 | let [r,g,b] = map( copy(a:rgb), 'v:val > 0.04045 ? pow((v:val + 0.055) / 1.055, 2.4) : v:val / 12.92' ) | ||
48 | |||
49 | let x = r * 0.4124 + g * 0.3576 + b * 0.1805 | ||
50 | let y = r * 0.2126 + g * 0.7152 + b * 0.0722 | ||
51 | let z = r * 0.0193 + g * 0.1192 + b * 0.9505 | ||
52 | |||
53 | " Observer 2°, Illuminant D65 | ||
54 | let x = ( x * 100 ) / 95.0489 | ||
55 | let z = ( z * 100 ) / 108.8840 | ||
56 | |||
57 | let [x,y,z] = map( [x,y,z], 'v:val > 0.008856 ? pow(v:val, s:_1_3) : 7.787 * v:val + s:_16_116' ) | ||
58 | |||
59 | let [L,a,b] = [ (116 * y) - 16, 500 * (x - y), 200 * (y - z) ] | ||
60 | |||
61 | let L99 = 105.51 * log(1 + 0.0158 * L) | ||
62 | |||
63 | let e = a * s:cos16 + b * s:sin16 | ||
64 | let f = 0.7 * (b * s:cos16 - a * s:sin16) | ||
65 | |||
66 | let g = 0.045 * sqrt(e*e + f*f) | ||
67 | if g == 0 | ||
68 | let [a99, b99] = [0.0, 0.0] | ||
69 | else | ||
70 | let k = log(1 + g) / g | ||
71 | let a99 = k * e | ||
72 | let b99 = k * f | ||
73 | endif | ||
74 | |||
75 | return [L99, a99, b99] | ||
76 | endfunction | ||
77 | |||
78 | let s:hex={} | ||
79 | for i in range(0, 255) | ||
80 | let s:hex[ printf( '%02x', i ) ] = i | ||
81 | endfor | ||
82 | |||
83 | let s:exe=[] | ||
84 | function! s:flush_exe() | ||
85 | if len(s:exe) | exe join( remove( s:exe, 0, -1 ), ' | ' ) | endif | ||
86 | endfunction | ||
87 | |||
88 | if has('gui_running') | ||
89 | function! s:create_highlight(color, is_bright) | ||
90 | call add( s:exe, 'hi BG'.a:color.' guibg=#'.a:color.' guifg=#'.( a:is_bright ? '000000' : 'ffffff' ) ) | ||
91 | endfunction | ||
92 | else | ||
93 | " preset 16 vt100 colors | ||
94 | let s:xtermcolor = [ | ||
95 | \ [ 0x00, 0x00, 0x00 ], | ||
96 | \ [ 0xCD, 0x00, 0x00 ], | ||
97 | \ [ 0x00, 0xCD, 0x00 ], | ||
98 | \ [ 0xCD, 0xCD, 0x00 ], | ||
99 | \ [ 0x00, 0x00, 0xEE ], | ||
100 | \ [ 0xCD, 0x00, 0xCD ], | ||
101 | \ [ 0x00, 0xCD, 0xCD ], | ||
102 | \ [ 0xE5, 0xE5, 0xE5 ], | ||
103 | \ [ 0x7F, 0x7F, 0x7F ], | ||
104 | \ [ 0xFF, 0x00, 0x00 ], | ||
105 | \ [ 0x00, 0xFF, 0x00 ], | ||
106 | \ [ 0xFF, 0xFF, 0x00 ], | ||
107 | \ [ 0x5C, 0x5C, 0xFF ], | ||
108 | \ [ 0xFF, 0x00, 0xFF ], | ||
109 | \ [ 0x00, 0xFF, 0xFF ], | ||
110 | \ [ 0xFF, 0xFF, 0xFF ]] | ||
111 | |||
112 | " the 6 values used in the xterm color cube | ||
113 | " 0 95 135 175 215 255 | ||
114 | let s:cubergb = [ 0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF ] | ||
115 | for s:rrr in s:cubergb | ||
116 | for s:ggg in s:cubergb | ||
117 | for s:bbb in s:cubergb | ||
118 | call add( s:xtermcolor, [ s:rrr, s:ggg, s:bbb ] ) | ||
119 | endfor | ||
120 | endfor | ||
121 | endfor | ||
122 | |||
123 | " grayscale ramp | ||
124 | let s:xtermcolor += map( range(24), 'repeat( [10 * v:val + 8], 3 )' ) | ||
125 | |||
126 | for idx in range(len(s:xtermcolor)) | ||
127 | let s:xtermcolor[idx] = s:rgb2din99( map(s:xtermcolor[idx], 'v:val / 255.0') ) | ||
128 | endfor | ||
129 | |||
130 | " selects the nearest xterm color for a rgb value like #FF0000 | ||
131 | function! s:rgb2xterm(color) | ||
132 | let best_match=0 | ||
133 | let smallest_distance = 10000000000 | ||
134 | let color = tolower(a:color) | ||
135 | let r = s:hex[color[0:1]] | ||
136 | let g = s:hex[color[2:3]] | ||
137 | let b = s:hex[color[4:5]] | ||
138 | |||
139 | let [L1,a1,b1] = s:rgb2din99([ r/255.0, g/255.0, b/255.0 ]) | ||
140 | |||
141 | for idx in range(len(s:xtermcolor)) | ||
142 | let [L2,a2,b2] = s:xtermcolor[idx] | ||
143 | let dL = L1 - L2 | ||
144 | let da = a1 - a2 | ||
145 | let db = b1 - b2 | ||
146 | let distance = dL*dL + da*da + db*db | ||
147 | if distance == 0 | return idx | endif | ||
148 | if distance > smallest_distance | continue | endif | ||
149 | let smallest_distance = distance | ||
150 | let best_match = idx | ||
151 | endfor | ||
152 | return best_match | ||
153 | endfunction | ||
154 | |||
155 | let s:color_idx = {} | ||
156 | function! s:create_highlight(color, is_bright) | ||
157 | let color_idx = get( s:color_idx, a:color, -1 ) | ||
158 | if color_idx == -1 | ||
159 | let color_idx = s:rgb2xterm(a:color) | ||
160 | let s:color_idx[a:color] = color_idx | ||
161 | endif | ||
162 | call add( s:exe, | ||
163 | \ 'hi BG'.a:color | ||
164 | \ . ' guibg=#' .a:color .' guifg=#' .( a:is_bright ? '000000' : 'ffffff' ) | ||
165 | \ . ' ctermbg='.color_idx.' ctermfg='.( a:is_bright ? 0 : 15 ) | ||
166 | \ ) | ||
167 | endfunction | ||
168 | endif | ||
169 | |||
170 | function! s:recreate_highlights() | ||
171 | call filter( copy( b:css_color_hi ), 's:create_highlight( v:key, v:val )' ) | ||
172 | endfunction | ||
173 | |||
174 | let s:pattern_color = {} | ||
175 | let s:color_bright = {} | ||
176 | function! s:create_syn_match() | ||
177 | |||
178 | let pattern = submatch(0) | ||
179 | |||
180 | if has_key( b:css_color_syn, pattern ) | return | endif | ||
181 | let b:css_color_syn[pattern] = 1 | ||
182 | |||
183 | let rgb_color = get( s:pattern_color, pattern, '' ) | ||
184 | |||
185 | if ! strlen( rgb_color ) | ||
186 | let hex = submatch(1) | ||
187 | let funcname = submatch(2) | ||
188 | |||
189 | let rgb_color | ||
190 | \ = funcname == 'rgb' ? s:rgb2color(submatch(3),submatch(4),submatch(5)) | ||
191 | \ : funcname == 'hsl' ? s:hsl2color(submatch(3),submatch(4),submatch(5)) | ||
192 | \ : strlen(hex) >= 6 ? tolower(hex[0:5]) | ||
193 | \ : strlen(hex) >= 3 ? tolower(hex[0].hex[0].hex[1].hex[1].hex[2].hex[2]) | ||
194 | \ : '' | ||
195 | |||
196 | if rgb_color == '' | throw 'css_color: create_syn_match invoked on bad match data' | endif | ||
197 | let s:pattern_color[pattern] = rgb_color | ||
198 | endif | ||
199 | |||
200 | if ! has_key( b:css_color_hi, rgb_color ) | ||
201 | let is_bright = get( s:color_bright, rgb_color, -1 ) | ||
202 | if is_bright == -1 | ||
203 | let r = s:hex[rgb_color[0:1]] | ||
204 | let g = s:hex[rgb_color[2:3]] | ||
205 | let b = s:hex[rgb_color[4:5]] | ||
206 | let is_bright = r*30 + g*59 + b*11 > 12000 | ||
207 | let s:color_bright[rgb_color] = is_bright | ||
208 | endif | ||
209 | |||
210 | call s:create_highlight( rgb_color, is_bright ) | ||
211 | let b:css_color_hi[rgb_color] = is_bright | ||
212 | endif | ||
213 | |||
214 | " iff pattern ends on word character, require word break to match | ||
215 | if pattern =~ '\>$' | let pattern .= '\>' | endif | ||
216 | call add( s:exe, 'syn match BG'.rgb_color.' /'.escape(pattern, '/').'/ contained containedin=@colorableGroup' ) | ||
217 | |||
218 | return '' | ||
219 | endfunction | ||
220 | |||
221 | function! s:clear_matches() | ||
222 | call map(get(w:, 'css_color_match_id', []), 'matchdelete(v:val)') | ||
223 | let w:css_color_match_id = [] | ||
224 | endfunction | ||
225 | |||
226 | function! s:create_matches() | ||
227 | call s:clear_matches() | ||
228 | if ! &l:cursorline | return | endif | ||
229 | " adds matches based that duplicate the highlighted colors on the current line | ||
230 | let lnr = line('.') | ||
231 | let group = '' | ||
232 | let groupstart = 0 | ||
233 | let endcol = &l:synmaxcol ? &l:synmaxcol : col('$') | ||
234 | for col in range( 1, endcol ) | ||
235 | let nextgroup = col < endcol ? synIDattr( synID( lnr, col, 1 ), 'name' ) : '' | ||
236 | if group == nextgroup | continue | endif | ||
237 | if group =~ '^BG\x\{6}$' | ||
238 | let regex = '\%'.lnr.'l\%'.groupstart.'c'.repeat( '.', col - groupstart ) | ||
239 | let w:css_color_match_id += [ matchadd( group, regex, -1 ) ] | ||
240 | endif | ||
241 | let group = nextgroup | ||
242 | let groupstart = col | ||
243 | endfor | ||
244 | endfunction | ||
245 | |||
246 | let s:_hexcolor = '#\(\x\{3}\%(\>\|\x\{3}\>\)\)' " submatch 1 | ||
247 | let s:_rgbacolor = '#\(\x\{3}\%(\>\|\x\%(\>\|\x\{2}\%(\>\|\x\{2}\>\)\)\)\)' " submatch 1 | ||
248 | let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2 | ||
249 | let s:_ws_ = '\s*' | ||
250 | let s:_numval = s:_ws_ . '\(\d\{1,3}%\?\)' " submatch 3,4,5 | ||
251 | let s:_listsep = s:_ws_ . ',' | ||
252 | let s:_otherargs_ = '\%(,[^)]*\)\?' | ||
253 | let s:_funcexpr = s:_funcname . '[(]' . s:_numval . s:_listsep . s:_numval . s:_listsep . s:_numval . s:_ws_ . s:_otherargs_ . '[)]' | ||
254 | let s:_csscolor = s:_rgbacolor . '\|' . s:_funcexpr | ||
255 | " N.B. sloppy heuristic constants for performance reasons: | ||
256 | " a) start somewhere left of screen in case of partially visible colorref | ||
257 | " b) take some multiple of &columns to handle multibyte chars etc | ||
258 | " N.B. these substitute() calls are here just for the side effect | ||
259 | " of invoking s:create_syn_match during substitution -- because | ||
260 | " match() and friends do not allow finding all matches in a single | ||
261 | " scan without examining the start of the string over and over | ||
262 | function! s:parse_screen() | ||
263 | let leftcol = winsaveview().leftcol | ||
264 | let left = max([ leftcol - 15, 0 ]) | ||
265 | let width = &columns * 4 | ||
266 | call filter( range( line('w0'), line('w$') ), 'substitute( strpart( getline(v:val), col([v:val, left]), width ), b:css_color_pat, ''\=s:create_syn_match()'', ''g'' )' ) | ||
267 | call s:flush_exe() | ||
268 | endfunction | ||
269 | |||
270 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
271 | |||
272 | function! css_color#reinit() | ||
273 | call s:recreate_highlights() | ||
274 | call s:flush_exe() | ||
275 | endfunction | ||
276 | |||
277 | function! css_color#enable() | ||
278 | if ! b:css_color_off | return | endif | ||
279 | if len( b:css_color_grp ) | exe 'syn cluster colorableGroup add=' . join( b:css_color_grp, ',' ) | endif | ||
280 | augroup CSSColor | ||
281 | autocmd! * <buffer> | ||
282 | if has('nvim-0.3.1') | ||
283 | autocmd CursorMoved,CursorMovedI <buffer> call s:parse_screen() | ||
284 | else | ||
285 | autocmd CursorMoved,CursorMovedI <buffer> call s:parse_screen() | call s:create_matches() | ||
286 | autocmd BufWinEnter <buffer> call s:create_matches() | ||
287 | autocmd BufWinLeave <buffer> call s:clear_matches() | ||
288 | endif | ||
289 | autocmd ColorScheme <buffer> call css_color#reinit() | ||
290 | augroup END | ||
291 | let b:css_color_off = 0 | ||
292 | doautocmd CSSColor CursorMoved | ||
293 | endfunction | ||
294 | |||
295 | function! css_color#disable() | ||
296 | if b:css_color_off | return | endif | ||
297 | if len( b:css_color_grp ) | exe 'syn cluster colorableGroup remove=' . join( b:css_color_grp, ',' ) | endif | ||
298 | autocmd! CSSColor * <buffer> | ||
299 | let b:css_color_off = 1 | ||
300 | endfunction | ||
301 | |||
302 | function! css_color#toggle() | ||
303 | if b:css_color_off | call css_color#enable() | ||
304 | else | call css_color#disable() | ||
305 | endif | ||
306 | endfunction | ||
307 | |||
308 | let s:type = [ 'none', 'hex', 'rgba', 'css', 'none' ] " with wraparound for index() == -1 | ||
309 | let s:pat_for_type = [ '^$', s:_hexcolor, s:_rgbacolor, s:_csscolor, '^$' ] | ||
310 | |||
311 | function! css_color#init(type, keywords, groups) | ||
312 | let new_type = index( s:type, a:type ) | ||
313 | let old_type = index( s:pat_for_type, get( b:, 'css_color_pat', '$^' ) ) | ||
314 | |||
315 | let b:css_color_pat = s:pat_for_type[ max( [ old_type, new_type ] ) ] | ||
316 | let b:css_color_grp = extend( get( b:, 'css_color_grp', [] ), split( a:groups, ',' ), 0 ) | ||
317 | let b:css_color_hi = {} | ||
318 | let b:css_color_syn = {} | ||
319 | let b:css_color_off = 1 | ||
320 | |||
321 | call css_color#enable() | ||
322 | |||
323 | if a:keywords != 'none' | ||
324 | exe 'syntax include syntax/colornames/'.a:keywords.'.vim' | ||
325 | call extend( s:color_bright, b:css_color_hi ) | ||
326 | endif | ||
327 | endfunction | ||
328 | |||
329 | " utility function for development use | ||
330 | function! css_color#dump_highlights() | ||
331 | call s:recreate_highlights() | ||
332 | let cmd = join( sort( remove( s:exe, 0, -1 ) ), "\n" ) | ||
333 | let cmd = substitute( cmd, '#......', '\U&', 'g' ) | ||
334 | let cmd = substitute( cmd, 'ctermbg=\zs\d\+', '\=printf("%-3d",submatch(0))', 'g' ) | ||
335 | return cmd | ||
336 | endfunction | ||
diff --git a/.vim/pack/css-color/start/css-color/syntax/colornames/basic.vim b/.vim/pack/css-color/start/css-color/syntax/colornames/basic.vim new file mode 100644 index 0000000..37730ce --- /dev/null +++ b/.vim/pack/css-color/start/css-color/syntax/colornames/basic.vim | |||
@@ -0,0 +1,47 @@ | |||
1 | " Language: Colorful CSS Color Preview | ||
2 | " Author: Aristotle Pagaltzis <pagaltzis@gmx.de> | ||
3 | " Commit: $Format:%H$ | ||
4 | " Licence: The MIT License (MIT) | ||
5 | |||
6 | " W3C basic colors | ||
7 | |||
8 | hi BG000000 guibg=#000000 guifg=#FFFFFF ctermbg=16 ctermfg=15 | ||
9 | hi BGc0c0c0 guibg=#C0C0C0 guifg=#000000 ctermbg=250 ctermfg=0 | ||
10 | hi BG808080 guibg=#808080 guifg=#000000 ctermbg=244 ctermfg=0 | ||
11 | hi BGffffff guibg=#FFFFFF guifg=#000000 ctermbg=231 ctermfg=0 | ||
12 | hi BG800000 guibg=#800000 guifg=#FFFFFF ctermbg=88 ctermfg=15 | ||
13 | hi BGff0000 guibg=#FF0000 guifg=#FFFFFF ctermbg=196 ctermfg=15 | ||
14 | hi BG800080 guibg=#800080 guifg=#FFFFFF ctermbg=90 ctermfg=15 | ||
15 | hi BGff00ff guibg=#FF00FF guifg=#FFFFFF ctermbg=201 ctermfg=15 | ||
16 | hi BG008000 guibg=#008000 guifg=#FFFFFF ctermbg=28 ctermfg=15 | ||
17 | hi BG00ff00 guibg=#00FF00 guifg=#000000 ctermbg=46 ctermfg=0 | ||
18 | hi BG808000 guibg=#808000 guifg=#FFFFFF ctermbg=100 ctermfg=15 | ||
19 | hi BGffff00 guibg=#FFFF00 guifg=#000000 ctermbg=226 ctermfg=0 | ||
20 | hi BG000080 guibg=#000080 guifg=#FFFFFF ctermbg=18 ctermfg=15 | ||
21 | hi BG0000ff guibg=#0000FF guifg=#FFFFFF ctermbg=21 ctermfg=15 | ||
22 | hi BG008080 guibg=#008080 guifg=#FFFFFF ctermbg=30 ctermfg=15 | ||
23 | hi BG00ffff guibg=#00FFFF guifg=#000000 ctermbg=51 ctermfg=0 | ||
24 | |||
25 | call extend( b:css_color_hi, | ||
26 | \{'000000':0,'c0c0c0':1,'808080':1,'ffffff':1,'800000':0,'ff0000':0 | ||
27 | \,'800080':0,'ff00ff':0,'008000':0,'00ff00':1,'808000':0,'ffff00':1 | ||
28 | \,'000080':0,'0000ff':0,'008080':0,'00ffff':1} ) | ||
29 | |||
30 | syn case ignore | ||
31 | |||
32 | syn keyword BG000000 black contained containedin=@colorableGroup | ||
33 | syn keyword BGc0c0c0 silver contained containedin=@colorableGroup | ||
34 | syn keyword BG808080 gray contained containedin=@colorableGroup | ||
35 | syn match BGffffff "\c\<white\(-\)\@!\>" contained containedin=@colorableGroup | ||
36 | syn keyword BG800000 maroon contained containedin=@colorableGroup | ||
37 | syn keyword BGff0000 red contained containedin=@colorableGroup | ||
38 | syn keyword BG800080 purple contained containedin=@colorableGroup | ||
39 | syn keyword BGff00ff fuchsia contained containedin=@colorableGroup | ||
40 | syn keyword BG008000 green contained containedin=@colorableGroup | ||
41 | syn keyword BG00ff00 lime contained containedin=@colorableGroup | ||
42 | syn keyword BG808000 olive contained containedin=@colorableGroup | ||
43 | syn keyword BGffff00 yellow contained containedin=@colorableGroup | ||
44 | syn keyword BG000080 navy contained containedin=@colorableGroup | ||
45 | syn keyword BG0000ff blue contained containedin=@colorableGroup | ||
46 | syn keyword BG008080 teal contained containedin=@colorableGroup | ||
47 | syn keyword BG00ffff aqua contained containedin=@colorableGroup | ||
diff --git a/.vim/pack/css-color/start/css-color/syntax/colornames/extended.vim b/.vim/pack/css-color/start/css-color/syntax/colornames/extended.vim new file mode 100644 index 0000000..13230ed --- /dev/null +++ b/.vim/pack/css-color/start/css-color/syntax/colornames/extended.vim | |||
@@ -0,0 +1,290 @@ | |||
1 | " Language: Colorful CSS Color Preview | ||
2 | " Author: Aristotle Pagaltzis <pagaltzis@gmx.de> | ||
3 | " Commit: $Format:%H$ | ||
4 | " Licence: The MIT License (MIT) | ||
5 | |||
6 | " W3C extended colors | ||
7 | |||
8 | syntax include syntax/colornames/basic.vim | ||
9 | |||
10 | hi BG00008b guibg=#00008B guifg=#FFFFFF ctermbg=18 ctermfg=15 | ||
11 | hi BG0000cd guibg=#0000CD guifg=#FFFFFF ctermbg=20 ctermfg=15 | ||
12 | hi BG006400 guibg=#006400 guifg=#FFFFFF ctermbg=22 ctermfg=15 | ||
13 | hi BG008b8b guibg=#008B8B guifg=#FFFFFF ctermbg=30 ctermfg=15 | ||
14 | hi BG00bfff guibg=#00BFFF guifg=#000000 ctermbg=74 ctermfg=0 | ||
15 | hi BG00ced1 guibg=#00CED1 guifg=#000000 ctermbg=6 ctermfg=0 | ||
16 | hi BG00fa9a guibg=#00FA9A guifg=#000000 ctermbg=49 ctermfg=0 | ||
17 | hi BG00ff7f guibg=#00FF7F guifg=#000000 ctermbg=48 ctermfg=0 | ||
18 | hi BG191970 guibg=#191970 guifg=#FFFFFF ctermbg=18 ctermfg=15 | ||
19 | hi BG1e90ff guibg=#1E90FF guifg=#000000 ctermbg=33 ctermfg=0 | ||
20 | hi BG20b2aa guibg=#20B2AA guifg=#000000 ctermbg=37 ctermfg=0 | ||
21 | hi BG228b22 guibg=#228B22 guifg=#FFFFFF ctermbg=28 ctermfg=15 | ||
22 | hi BG2e8b57 guibg=#2E8B57 guifg=#FFFFFF ctermbg=29 ctermfg=15 | ||
23 | hi BG2f4f4f guibg=#2F4F4F guifg=#FFFFFF ctermbg=23 ctermfg=15 | ||
24 | hi BG32cd32 guibg=#32CD32 guifg=#000000 ctermbg=2 ctermfg=0 | ||
25 | hi BG3cb371 guibg=#3CB371 guifg=#000000 ctermbg=35 ctermfg=0 | ||
26 | hi BG40e0d0 guibg=#40E0D0 guifg=#000000 ctermbg=44 ctermfg=0 | ||
27 | hi BG4169e1 guibg=#4169E1 guifg=#FFFFFF ctermbg=62 ctermfg=15 | ||
28 | hi BG4682b4 guibg=#4682B4 guifg=#FFFFFF ctermbg=67 ctermfg=15 | ||
29 | hi BG483d8b guibg=#483D8B guifg=#FFFFFF ctermbg=90 ctermfg=15 | ||
30 | hi BG48d1cc guibg=#48D1CC guifg=#000000 ctermbg=44 ctermfg=0 | ||
31 | hi BG4b0082 guibg=#4B0082 guifg=#FFFFFF ctermbg=54 ctermfg=15 | ||
32 | hi BG556b2f guibg=#556B2F guifg=#FFFFFF ctermbg=58 ctermfg=15 | ||
33 | hi BG5f9ea0 guibg=#5F9EA0 guifg=#000000 ctermbg=73 ctermfg=0 | ||
34 | hi BG6495ed guibg=#6495ED guifg=#000000 ctermbg=68 ctermfg=0 | ||
35 | hi BG663399 guibg=#663399 guifg=#FFFFFF ctermbg=91 ctermfg=15 | ||
36 | hi BG66cdaa guibg=#66CDAA guifg=#000000 ctermbg=79 ctermfg=0 | ||
37 | hi BG696969 guibg=#696969 guifg=#FFFFFF ctermbg=242 ctermfg=15 | ||
38 | hi BG6a5acd guibg=#6A5ACD guifg=#FFFFFF ctermbg=62 ctermfg=15 | ||
39 | hi BG6b8e23 guibg=#6B8E23 guifg=#FFFFFF ctermbg=64 ctermfg=15 | ||
40 | hi BG708090 guibg=#708090 guifg=#000000 ctermbg=8 ctermfg=0 | ||
41 | hi BG778899 guibg=#778899 guifg=#000000 ctermbg=67 ctermfg=0 | ||
42 | hi BG7b68ee guibg=#7B68EE guifg=#000000 ctermbg=98 ctermfg=0 | ||
43 | hi BG7cfc00 guibg=#7CFC00 guifg=#000000 ctermbg=118 ctermfg=0 | ||
44 | hi BG7fff00 guibg=#7FFF00 guifg=#000000 ctermbg=118 ctermfg=0 | ||
45 | hi BG7fffd4 guibg=#7FFFD4 guifg=#000000 ctermbg=122 ctermfg=0 | ||
46 | hi BG87ceeb guibg=#87CEEB guifg=#000000 ctermbg=117 ctermfg=0 | ||
47 | hi BG87cefa guibg=#87CEFA guifg=#000000 ctermbg=117 ctermfg=0 | ||
48 | hi BG8a2be2 guibg=#8A2BE2 guifg=#FFFFFF ctermbg=93 ctermfg=15 | ||
49 | hi BG8b0000 guibg=#8B0000 guifg=#FFFFFF ctermbg=88 ctermfg=15 | ||
50 | hi BG8b008b guibg=#8B008B guifg=#FFFFFF ctermbg=90 ctermfg=15 | ||
51 | hi BG8b4513 guibg=#8B4513 guifg=#FFFFFF ctermbg=130 ctermfg=15 | ||
52 | hi BG8fbc8f guibg=#8FBC8F guifg=#000000 ctermbg=108 ctermfg=0 | ||
53 | hi BG90ee90 guibg=#90EE90 guifg=#000000 ctermbg=120 ctermfg=0 | ||
54 | hi BG9370d8 guibg=#9370D8 guifg=#000000 ctermbg=134 ctermfg=0 | ||
55 | hi BG9400d3 guibg=#9400D3 guifg=#FFFFFF ctermbg=92 ctermfg=15 | ||
56 | hi BG98fb98 guibg=#98FB98 guifg=#000000 ctermbg=120 ctermfg=0 | ||
57 | hi BG9932cc guibg=#9932CC guifg=#FFFFFF ctermbg=128 ctermfg=15 | ||
58 | hi BG9acd32 guibg=#9ACD32 guifg=#000000 ctermbg=112 ctermfg=0 | ||
59 | hi BGa0522d guibg=#A0522D guifg=#FFFFFF ctermbg=130 ctermfg=15 | ||
60 | hi BGa52a2a guibg=#A52A2A guifg=#FFFFFF ctermbg=124 ctermfg=15 | ||
61 | hi BGa9a9a9 guibg=#A9A9A9 guifg=#000000 ctermbg=248 ctermfg=0 | ||
62 | hi BGadd8e6 guibg=#ADD8E6 guifg=#000000 ctermbg=152 ctermfg=0 | ||
63 | hi BGadff2f guibg=#ADFF2F guifg=#000000 ctermbg=154 ctermfg=0 | ||
64 | hi BGafeeee guibg=#AFEEEE guifg=#000000 ctermbg=159 ctermfg=0 | ||
65 | hi BGb0c4de guibg=#B0C4DE guifg=#000000 ctermbg=153 ctermfg=0 | ||
66 | hi BGb0e0e6 guibg=#B0E0E6 guifg=#000000 ctermbg=152 ctermfg=0 | ||
67 | hi BGb22222 guibg=#B22222 guifg=#FFFFFF ctermbg=124 ctermfg=15 | ||
68 | hi BGb8860b guibg=#B8860B guifg=#000000 ctermbg=136 ctermfg=0 | ||
69 | hi BGba55d3 guibg=#BA55D3 guifg=#000000 ctermbg=134 ctermfg=0 | ||
70 | hi BGbc8f8f guibg=#BC8F8F guifg=#000000 ctermbg=138 ctermfg=0 | ||
71 | hi BGbdb76b guibg=#BDB76B guifg=#000000 ctermbg=143 ctermfg=0 | ||
72 | hi BGc71585 guibg=#C71585 guifg=#FFFFFF ctermbg=162 ctermfg=15 | ||
73 | hi BGcd5c5c guibg=#CD5C5C guifg=#000000 ctermbg=167 ctermfg=0 | ||
74 | hi BGcd853f guibg=#CD853F guifg=#000000 ctermbg=172 ctermfg=0 | ||
75 | hi BGd2691e guibg=#D2691E guifg=#000000 ctermbg=166 ctermfg=0 | ||
76 | hi BGd2b48c guibg=#D2B48C guifg=#000000 ctermbg=180 ctermfg=0 | ||
77 | hi BGd3d3d3 guibg=#D3D3D3 guifg=#000000 ctermbg=252 ctermfg=0 | ||
78 | hi BGd87093 guibg=#D87093 guifg=#000000 ctermbg=168 ctermfg=0 | ||
79 | hi BGd8bfd8 guibg=#D8BFD8 guifg=#000000 ctermbg=182 ctermfg=0 | ||
80 | hi BGda70d6 guibg=#DA70D6 guifg=#000000 ctermbg=170 ctermfg=0 | ||
81 | hi BGdaa520 guibg=#DAA520 guifg=#000000 ctermbg=178 ctermfg=0 | ||
82 | hi BGdc143c guibg=#DC143C guifg=#FFFFFF ctermbg=197 ctermfg=15 | ||
83 | hi BGdcdcdc guibg=#DCDCDC guifg=#000000 ctermbg=253 ctermfg=0 | ||
84 | hi BGdda0dd guibg=#DDA0DD guifg=#000000 ctermbg=183 ctermfg=0 | ||
85 | hi BGdeb887 guibg=#DEB887 guifg=#000000 ctermbg=180 ctermfg=0 | ||
86 | hi BGe0ffff guibg=#E0FFFF guifg=#000000 ctermbg=195 ctermfg=0 | ||
87 | hi BGe6e6fa guibg=#E6E6FA guifg=#000000 ctermbg=189 ctermfg=0 | ||
88 | hi BGe9967a guibg=#E9967A guifg=#000000 ctermbg=209 ctermfg=0 | ||
89 | hi BGee82ee guibg=#EE82EE guifg=#000000 ctermbg=213 ctermfg=0 | ||
90 | hi BGeee8aa guibg=#EEE8AA guifg=#000000 ctermbg=229 ctermfg=0 | ||
91 | hi BGf08080 guibg=#F08080 guifg=#000000 ctermbg=210 ctermfg=0 | ||
92 | hi BGf0e68c guibg=#F0E68C guifg=#000000 ctermbg=186 ctermfg=0 | ||
93 | hi BGf0f8ff guibg=#F0F8FF guifg=#000000 ctermbg=231 ctermfg=0 | ||
94 | hi BGf0fff0 guibg=#F0FFF0 guifg=#000000 ctermbg=195 ctermfg=0 | ||
95 | hi BGf0ffff guibg=#F0FFFF guifg=#000000 ctermbg=231 ctermfg=0 | ||
96 | hi BGf4a460 guibg=#F4A460 guifg=#000000 ctermbg=215 ctermfg=0 | ||
97 | hi BGf5deb3 guibg=#F5DEB3 guifg=#000000 ctermbg=223 ctermfg=0 | ||
98 | hi BGf5f5dc guibg=#F5F5DC guifg=#000000 ctermbg=230 ctermfg=0 | ||
99 | hi BGf5f5f5 guibg=#F5F5F5 guifg=#000000 ctermbg=255 ctermfg=0 | ||
100 | hi BGf5fffa guibg=#F5FFFA guifg=#000000 ctermbg=231 ctermfg=0 | ||
101 | hi BGf8f8ff guibg=#F8F8FF guifg=#000000 ctermbg=231 ctermfg=0 | ||
102 | hi BGfa8072 guibg=#FA8072 guifg=#000000 ctermbg=210 ctermfg=0 | ||
103 | hi BGfaebd7 guibg=#FAEBD7 guifg=#000000 ctermbg=255 ctermfg=0 | ||
104 | hi BGfaf0e6 guibg=#FAF0E6 guifg=#000000 ctermbg=255 ctermfg=0 | ||
105 | hi BGfafad2 guibg=#FAFAD2 guifg=#000000 ctermbg=230 ctermfg=0 | ||
106 | hi BGfdf5e6 guibg=#FDF5E6 guifg=#000000 ctermbg=255 ctermfg=0 | ||
107 | hi BGff1493 guibg=#FF1493 guifg=#FFFFFF ctermbg=198 ctermfg=15 | ||
108 | hi BGff4500 guibg=#FF4500 guifg=#FFFFFF ctermbg=202 ctermfg=15 | ||
109 | hi BGff6347 guibg=#FF6347 guifg=#000000 ctermbg=203 ctermfg=0 | ||
110 | hi BGff69b4 guibg=#FF69B4 guifg=#000000 ctermbg=205 ctermfg=0 | ||
111 | hi BGff7f50 guibg=#FF7F50 guifg=#000000 ctermbg=209 ctermfg=0 | ||
112 | hi BGff8c00 guibg=#FF8C00 guifg=#000000 ctermbg=208 ctermfg=0 | ||
113 | hi BGffa07a guibg=#FFA07A guifg=#000000 ctermbg=216 ctermfg=0 | ||
114 | hi BGffa500 guibg=#FFA500 guifg=#000000 ctermbg=214 ctermfg=0 | ||
115 | hi BGffb6c1 guibg=#FFB6C1 guifg=#000000 ctermbg=217 ctermfg=0 | ||
116 | hi BGffc0cb guibg=#FFC0CB guifg=#000000 ctermbg=217 ctermfg=0 | ||
117 | hi BGffd700 guibg=#FFD700 guifg=#000000 ctermbg=220 ctermfg=0 | ||
118 | hi BGffdab9 guibg=#FFDAB9 guifg=#000000 ctermbg=223 ctermfg=0 | ||
119 | hi BGffdead guibg=#FFDEAD guifg=#000000 ctermbg=223 ctermfg=0 | ||
120 | hi BGffe4b5 guibg=#FFE4B5 guifg=#000000 ctermbg=223 ctermfg=0 | ||
121 | hi BGffe4c4 guibg=#FFE4C4 guifg=#000000 ctermbg=223 ctermfg=0 | ||
122 | hi BGffe4e1 guibg=#FFE4E1 guifg=#000000 ctermbg=224 ctermfg=0 | ||
123 | hi BGffebcd guibg=#FFEBCD guifg=#000000 ctermbg=223 ctermfg=0 | ||
124 | hi BGffefd5 guibg=#FFEFD5 guifg=#000000 ctermbg=230 ctermfg=0 | ||
125 | hi BGfff0f5 guibg=#FFF0F5 guifg=#000000 ctermbg=255 ctermfg=0 | ||
126 | hi BGfff5ee guibg=#FFF5EE guifg=#000000 ctermbg=231 ctermfg=0 | ||
127 | hi BGfff8dc guibg=#FFF8DC guifg=#000000 ctermbg=230 ctermfg=0 | ||
128 | hi BGfffacd guibg=#FFFACD guifg=#000000 ctermbg=230 ctermfg=0 | ||
129 | hi BGfffaf0 guibg=#FFFAF0 guifg=#000000 ctermbg=231 ctermfg=0 | ||
130 | hi BGfffafa guibg=#FFFAFA guifg=#000000 ctermbg=231 ctermfg=0 | ||
131 | hi BGffffe0 guibg=#FFFFE0 guifg=#000000 ctermbg=230 ctermfg=0 | ||
132 | hi BGfffff0 guibg=#FFFFF0 guifg=#000000 ctermbg=231 ctermfg=0 | ||
133 | |||
134 | call extend( b:css_color_hi, | ||
135 | \{'00008b':0,'0000cd':0,'006400':0,'008b8b':0,'00bfff':1,'00ced1':1 | ||
136 | \,'00fa9a':1,'00ff7f':1,'191970':0,'1e90ff':1,'20b2aa':1,'228b22':0 | ||
137 | \,'2e8b57':0,'2f4f4f':0,'32cd32':1,'3cb371':1,'40e0d0':1,'4169e1':0 | ||
138 | \,'4682b4':0,'483d8b':0,'48d1cc':1,'4b0082':0,'556b2f':0,'5f9ea0':1 | ||
139 | \,'6495ed':1,'66cdaa':1,'696969':0,'6a5acd':0,'6b8e23':0,'708090':1 | ||
140 | \,'778899':1,'7b68ee':1,'7cfc00':1,'7fff00':1,'7fffd4':1,'87ceeb':1 | ||
141 | \,'87cefa':1,'8a2be2':0,'8b0000':0,'8b008b':0,'8b4513':0,'8fbc8f':1 | ||
142 | \,'90ee90':1,'9370d8':1,'9400d3':0,'98fb98':1,'9932cc':0,'9acd32':1 | ||
143 | \,'a0522d':0,'a52a2a':0,'a9a9a9':1,'add8e6':1,'adff2f':1,'afeeee':1 | ||
144 | \,'b0c4de':1,'b0e0e6':1,'b22222':0,'b8860b':1,'ba55d3':1,'bc8f8f':1 | ||
145 | \,'bdb76b':1,'c71585':0,'cd5c5c':1,'cd853f':1,'d2691e':1,'d2b48c':1 | ||
146 | \,'d3d3d3':1,'d87093':1,'d8bfd8':1,'da70d6':1,'daa520':1,'dc143c':0 | ||
147 | \,'dcdcdc':1,'dda0dd':1,'deb887':1,'e0ffff':1,'e6e6fa':1,'e9967a':1 | ||
148 | \,'ee82ee':1,'eee8aa':1,'f08080':1,'f0e68c':1,'f0f8ff':1,'f0fff0':1 | ||
149 | \,'f0ffff':1,'f4a460':1,'f5deb3':1,'f5f5dc':1,'f5f5f5':1,'f5fffa':1 | ||
150 | \,'f8f8ff':1,'fa8072':1,'faebd7':1,'faf0e6':1,'fafad2':1,'fdf5e6':1 | ||
151 | \,'ff1493':0,'ff4500':0,'ff6347':1,'ff69b4':1,'ff7f50':1,'ff8c00':1 | ||
152 | \,'ffa07a':1,'ffa500':1,'ffb6c1':1,'ffc0cb':1,'ffd700':1,'ffdab9':1 | ||
153 | \,'ffdead':1,'ffe4b5':1,'ffe4c4':1,'ffe4e1':1,'ffebcd':1,'ffefd5':1 | ||
154 | \,'fff0f5':1,'fff5ee':1,'fff8dc':1,'fffacd':1,'fffaf0':1,'fffafa':1 | ||
155 | \,'ffffe0':1,'fffff0':1} ) | ||
156 | |||
157 | syn case ignore | ||
158 | |||
159 | syn keyword BGf0f8ff AliceBlue contained containedin=@colorableGroup | ||
160 | syn keyword BGfaebd7 AntiqueWhite contained containedin=@colorableGroup | ||
161 | syn keyword BG7fffd4 Aquamarine contained containedin=@colorableGroup | ||
162 | syn keyword BGf0ffff Azure contained containedin=@colorableGroup | ||
163 | syn keyword BGf5f5dc Beige contained containedin=@colorableGroup | ||
164 | syn keyword BGffe4c4 Bisque contained containedin=@colorableGroup | ||
165 | syn keyword BGffebcd BlanchedAlmond contained containedin=@colorableGroup | ||
166 | syn keyword BG8a2be2 BlueViolet contained containedin=@colorableGroup | ||
167 | syn keyword BGa52a2a Brown contained containedin=@colorableGroup | ||
168 | syn keyword BGdeb887 BurlyWood contained containedin=@colorableGroup | ||
169 | syn keyword BG5f9ea0 CadetBlue contained containedin=@colorableGroup | ||
170 | syn keyword BG7fff00 Chartreuse contained containedin=@colorableGroup | ||
171 | syn keyword BGd2691e Chocolate contained containedin=@colorableGroup | ||
172 | syn keyword BGff7f50 Coral contained containedin=@colorableGroup | ||
173 | syn keyword BG6495ed CornflowerBlue contained containedin=@colorableGroup | ||
174 | syn keyword BGfff8dc Cornsilk contained containedin=@colorableGroup | ||
175 | syn keyword BGdc143c Crimson contained containedin=@colorableGroup | ||
176 | syn keyword BG00ffff Cyan contained containedin=@colorableGroup | ||
177 | syn keyword BG00008b DarkBlue contained containedin=@colorableGroup | ||
178 | syn keyword BG008b8b DarkCyan contained containedin=@colorableGroup | ||
179 | syn keyword BGb8860b DarkGoldenRod contained containedin=@colorableGroup | ||
180 | syn keyword BGa9a9a9 DarkGray contained containedin=@colorableGroup | ||
181 | syn keyword BG006400 DarkGreen contained containedin=@colorableGroup | ||
182 | syn keyword BGa9a9a9 DarkGrey contained containedin=@colorableGroup | ||
183 | syn keyword BGbdb76b DarkKhaki contained containedin=@colorableGroup | ||
184 | syn keyword BG8b008b DarkMagenta contained containedin=@colorableGroup | ||
185 | syn keyword BG556b2f DarkOliveGreen contained containedin=@colorableGroup | ||
186 | syn keyword BG9932cc DarkOrchid contained containedin=@colorableGroup | ||
187 | syn keyword BG8b0000 DarkRed contained containedin=@colorableGroup | ||
188 | syn keyword BGe9967a DarkSalmon contained containedin=@colorableGroup | ||
189 | syn keyword BG8fbc8f DarkSeaGreen contained containedin=@colorableGroup | ||
190 | syn keyword BG483d8b DarkSlateBlue contained containedin=@colorableGroup | ||
191 | syn keyword BG2f4f4f DarkSlateGray contained containedin=@colorableGroup | ||
192 | syn keyword BG2f4f4f DarkSlateGrey contained containedin=@colorableGroup | ||
193 | syn keyword BG00ced1 DarkTurquoise contained containedin=@colorableGroup | ||
194 | syn keyword BG9400d3 DarkViolet contained containedin=@colorableGroup | ||
195 | syn keyword BGff8c00 Darkorange contained containedin=@colorableGroup | ||
196 | syn keyword BGff1493 DeepPink contained containedin=@colorableGroup | ||
197 | syn keyword BG00bfff DeepSkyBlue contained containedin=@colorableGroup | ||
198 | syn keyword BG696969 DimGray contained containedin=@colorableGroup | ||
199 | syn keyword BG696969 DimGrey contained containedin=@colorableGroup | ||
200 | syn keyword BG1e90ff DodgerBlue contained containedin=@colorableGroup | ||
201 | syn keyword BGb22222 FireBrick contained containedin=@colorableGroup | ||
202 | syn keyword BGfffaf0 FloralWhite contained containedin=@colorableGroup | ||
203 | syn keyword BG228b22 ForestGreen contained containedin=@colorableGroup | ||
204 | syn keyword BGdcdcdc Gainsboro contained containedin=@colorableGroup | ||
205 | syn keyword BGf8f8ff GhostWhite contained containedin=@colorableGroup | ||
206 | syn keyword BGffd700 Gold contained containedin=@colorableGroup | ||
207 | syn keyword BGdaa520 GoldenRod contained containedin=@colorableGroup | ||
208 | syn keyword BGadff2f GreenYellow contained containedin=@colorableGroup | ||
209 | syn keyword BG808080 Grey contained containedin=@colorableGroup | ||
210 | syn keyword BGf0fff0 HoneyDew contained containedin=@colorableGroup | ||
211 | syn keyword BGff69b4 HotPink contained containedin=@colorableGroup | ||
212 | syn keyword BGcd5c5c IndianRed contained containedin=@colorableGroup | ||
213 | syn keyword BG4b0082 Indigo contained containedin=@colorableGroup | ||
214 | syn keyword BGfffff0 Ivory contained containedin=@colorableGroup | ||
215 | syn keyword BGf0e68c Khaki contained containedin=@colorableGroup | ||
216 | syn keyword BGe6e6fa Lavender contained containedin=@colorableGroup | ||
217 | syn keyword BGfff0f5 LavenderBlush contained containedin=@colorableGroup | ||
218 | syn keyword BG7cfc00 LawnGreen contained containedin=@colorableGroup | ||
219 | syn keyword BGfffacd LemonChiffon contained containedin=@colorableGroup | ||
220 | syn keyword BGadd8e6 LightBlue contained containedin=@colorableGroup | ||
221 | syn keyword BGf08080 LightCoral contained containedin=@colorableGroup | ||
222 | syn keyword BGe0ffff LightCyan contained containedin=@colorableGroup | ||
223 | syn keyword BGfafad2 LightGoldenRodYellow contained containedin=@colorableGroup | ||
224 | syn keyword BGd3d3d3 LightGray contained containedin=@colorableGroup | ||
225 | syn keyword BG90ee90 LightGreen contained containedin=@colorableGroup | ||
226 | syn keyword BGd3d3d3 LightGrey contained containedin=@colorableGroup | ||
227 | syn keyword BGffb6c1 LightPink contained containedin=@colorableGroup | ||
228 | syn keyword BGffa07a LightSalmon contained containedin=@colorableGroup | ||
229 | syn keyword BG20b2aa LightSeaGreen contained containedin=@colorableGroup | ||
230 | syn keyword BG87cefa LightSkyBlue contained containedin=@colorableGroup | ||
231 | syn keyword BG778899 LightSlateGray contained containedin=@colorableGroup | ||
232 | syn keyword BG778899 LightSlateGrey contained containedin=@colorableGroup | ||
233 | syn keyword BGb0c4de LightSteelBlue contained containedin=@colorableGroup | ||
234 | syn keyword BGffffe0 LightYellow contained containedin=@colorableGroup | ||
235 | syn keyword BG32cd32 LimeGreen contained containedin=@colorableGroup | ||
236 | syn keyword BGfaf0e6 Linen contained containedin=@colorableGroup | ||
237 | syn keyword BGff00ff Magenta contained containedin=@colorableGroup | ||
238 | syn keyword BG66cdaa MediumAquaMarine contained containedin=@colorableGroup | ||
239 | syn keyword BG0000cd MediumBlue contained containedin=@colorableGroup | ||
240 | syn keyword BGba55d3 MediumOrchid contained containedin=@colorableGroup | ||
241 | syn keyword BG9370d8 MediumPurple contained containedin=@colorableGroup | ||
242 | syn keyword BG3cb371 MediumSeaGreen contained containedin=@colorableGroup | ||
243 | syn keyword BG7b68ee MediumSlateBlue contained containedin=@colorableGroup | ||
244 | syn keyword BG00fa9a MediumSpringGreen contained containedin=@colorableGroup | ||
245 | syn keyword BG48d1cc MediumTurquoise contained containedin=@colorableGroup | ||
246 | syn keyword BGc71585 MediumVioletRed contained containedin=@colorableGroup | ||
247 | syn keyword BG191970 MidnightBlue contained containedin=@colorableGroup | ||
248 | syn keyword BGf5fffa MintCream contained containedin=@colorableGroup | ||
249 | syn keyword BGffe4e1 MistyRose contained containedin=@colorableGroup | ||
250 | syn keyword BGffe4b5 Moccasin contained containedin=@colorableGroup | ||
251 | syn keyword BGffdead NavajoWhite contained containedin=@colorableGroup | ||
252 | syn keyword BGfdf5e6 OldLace contained containedin=@colorableGroup | ||
253 | syn keyword BG6b8e23 OliveDrab contained containedin=@colorableGroup | ||
254 | syn keyword BGffa500 Orange contained containedin=@colorableGroup | ||
255 | syn keyword BGff4500 OrangeRed contained containedin=@colorableGroup | ||
256 | syn keyword BGda70d6 Orchid contained containedin=@colorableGroup | ||
257 | syn keyword BGeee8aa PaleGoldenRod contained containedin=@colorableGroup | ||
258 | syn keyword BG98fb98 PaleGreen contained containedin=@colorableGroup | ||
259 | syn keyword BGafeeee PaleTurquoise contained containedin=@colorableGroup | ||
260 | syn keyword BGd87093 PaleVioletRed contained containedin=@colorableGroup | ||
261 | syn keyword BGffefd5 PapayaWhip contained containedin=@colorableGroup | ||
262 | syn keyword BGffdab9 PeachPuff contained containedin=@colorableGroup | ||
263 | syn keyword BGcd853f Peru contained containedin=@colorableGroup | ||
264 | syn keyword BGffc0cb Pink contained containedin=@colorableGroup | ||
265 | syn keyword BGdda0dd Plum contained containedin=@colorableGroup | ||
266 | syn keyword BGb0e0e6 PowderBlue contained containedin=@colorableGroup | ||
267 | syn keyword BGbc8f8f RosyBrown contained containedin=@colorableGroup | ||
268 | syn keyword BG4169e1 RoyalBlue contained containedin=@colorableGroup | ||
269 | syn keyword BG663399 RebeccaPurple contained containedin=@colorableGroup | ||
270 | syn keyword BG8b4513 SaddleBrown contained containedin=@colorableGroup | ||
271 | syn keyword BGfa8072 Salmon contained containedin=@colorableGroup | ||
272 | syn keyword BGf4a460 SandyBrown contained containedin=@colorableGroup | ||
273 | syn keyword BG2e8b57 SeaGreen contained containedin=@colorableGroup | ||
274 | syn keyword BGfff5ee SeaShell contained containedin=@colorableGroup | ||
275 | syn keyword BGa0522d Sienna contained containedin=@colorableGroup | ||
276 | syn keyword BG87ceeb SkyBlue contained containedin=@colorableGroup | ||
277 | syn keyword BG6a5acd SlateBlue contained containedin=@colorableGroup | ||
278 | syn keyword BG708090 SlateGray contained containedin=@colorableGroup | ||
279 | syn keyword BG708090 SlateGrey contained containedin=@colorableGroup | ||
280 | syn keyword BGfffafa Snow contained containedin=@colorableGroup | ||
281 | syn keyword BG00ff7f SpringGreen contained containedin=@colorableGroup | ||
282 | syn keyword BG4682b4 SteelBlue contained containedin=@colorableGroup | ||
283 | syn keyword BGd2b48c Tan contained containedin=@colorableGroup | ||
284 | syn keyword BGd8bfd8 Thistle contained containedin=@colorableGroup | ||
285 | syn keyword BGff6347 Tomato contained containedin=@colorableGroup | ||
286 | syn keyword BG40e0d0 Turquoise contained containedin=@colorableGroup | ||
287 | syn keyword BGee82ee Violet contained containedin=@colorableGroup | ||
288 | syn keyword BGf5deb3 Wheat contained containedin=@colorableGroup | ||
289 | syn keyword BGf5f5f5 WhiteSmoke contained containedin=@colorableGroup | ||
290 | syn keyword BG9acd32 YellowGreen contained containedin=@colorableGroup | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/bench b/.vim/pack/css-color/start/css-color/tests/bench new file mode 100755 index 0000000..21e6eea --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/bench | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | set -e | ||
3 | s=startuptime.txt | ||
4 | vim --startuptime $s -o -c qa "$@" | ||
5 | perl -lane'$sum += $F[1] if m!/\.vim/after/syntax/css\.vim$!; END {print $sum}' $s | ||
6 | rm $s | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.csh b/.vim/pack/css-color/start/css-color/tests/example.csh new file mode 100644 index 0000000..b5b1af4 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.csh | |||
@@ -0,0 +1,13 @@ | |||
1 | # TODO #0f0 should show up green | ||
2 | # TODO f00 should not show up red | ||
3 | |||
4 | set word = '#0f0' | ||
5 | echo "#0f0" | ||
6 | echo #f00 | ||
7 | #f00 | ||
8 | ##0f0 | ||
9 | # TODO #0f0 | ||
10 | # TODO #0f0 TODO | ||
11 | cat <<X | ||
12 | #0f0 | ||
13 | X | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.css b/.vim/pack/css-color/start/css-color/tests/example.css new file mode 100644 index 0000000..d420cbd --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.css | |||
@@ -0,0 +1,24 @@ | |||
1 | i { background: #359 } | ||
2 | b { background: #335599 } | ||
3 | u { background: rgba(144, 0, 0, .5) } | ||
4 | s { background: hsl(0, 100%, 50%) } | ||
5 | |||
6 | *::color1 { -x-: #359 } | ||
7 | *::color2 { -x-: #335599 } | ||
8 | *::color3 { -x-: rgba(144, 0, 0, .5) } | ||
9 | *::color4 { -x-: hsl(0, 100%, 50%) } | ||
10 | |||
11 | /* | ||
12 | * #123, #456 | ||
13 | */ | ||
14 | |||
15 | /* #123456 */ | ||
16 | |||
17 | ul { | ||
18 | color: white; | ||
19 | } | ||
20 | |||
21 | ul li { | ||
22 | color: yellow; | ||
23 | background: black; | ||
24 | } | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.fish b/.vim/pack/css-color/start/css-color/tests/example.fish new file mode 100644 index 0000000..f159d73 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.fish | |||
@@ -0,0 +1,10 @@ | |||
1 | # #0f0 should show up green | ||
2 | # f00 should not show up red | ||
3 | |||
4 | #f00 | ||
5 | ##0f0 | ||
6 | # #0f0 | ||
7 | echo '#0f0' | ||
8 | set result "#0f0" | ||
9 | echo #f00 | ||
10 | echo ##0f0 | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.jsx b/.vim/pack/css-color/start/css-color/tests/example.jsx new file mode 100644 index 0000000..0608466 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.jsx | |||
@@ -0,0 +1,11 @@ | |||
1 | var Example = React.createClass({ | ||
2 | render: function() { | ||
3 | var style = { | ||
4 | color: '#ffde00', | ||
5 | backgroundColor: 'green', | ||
6 | border: '3px dotted rgba(255,0,0)' | ||
7 | fontSize: 200 | ||
8 | }; | ||
9 | return <div style={style}> Hi! </div>; | ||
10 | } | ||
11 | }); | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.less b/.vim/pack/css-color/start/css-color/tests/example.less new file mode 100644 index 0000000..ffadbad --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.less | |||
@@ -0,0 +1,24 @@ | |||
1 | i { background: #359 } | ||
2 | b { background: #335599 } | ||
3 | u { background: rgba(144, 0, 0, .5) } | ||
4 | s { background: hsl(0, 100%, 50%) } | ||
5 | |||
6 | @color1: #359; | ||
7 | @color1: #335599; | ||
8 | @color3: rgba(144, 0, 0, .5); | ||
9 | @color4: hsl(0, 100%, 50%); | ||
10 | |||
11 | /* | ||
12 | * #123, #456 | ||
13 | */ | ||
14 | |||
15 | // #123456 | ||
16 | |||
17 | ul { | ||
18 | color: white; | ||
19 | |||
20 | li { | ||
21 | color: yellow; | ||
22 | background: black; | ||
23 | } | ||
24 | } | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.nix b/.vim/pack/css-color/start/css-color/tests/example.nix new file mode 100644 index 0000000..05f3438 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.nix | |||
@@ -0,0 +1,69 @@ | |||
1 | { config, lib, pkgs, ... }: | ||
2 | |||
3 | with lib; | ||
4 | |||
5 | let | ||
6 | cfg = config.colorscheme.nord; | ||
7 | hexColor = types.str // { | ||
8 | check = (x: hasPrefix "#" x && builtins.stringLength x == 7); | ||
9 | description = "hexadecimal color"; | ||
10 | }; | ||
11 | mkHexColorOption = name: default: | ||
12 | mkOption { | ||
13 | type = hexColor; | ||
14 | default = default; | ||
15 | description = name; | ||
16 | }; | ||
17 | in { | ||
18 | ## POLAR NIGHT | ||
19 | # The origin color or the Polar Night palette. | ||
20 | nord0 = mkHexColorOption "nord0" "#2E3440"; | ||
21 | |||
22 | # A brighter shade color based on nord0. | ||
23 | nord1 = mkHexColorOption "nord1" "#3B4252"; | ||
24 | |||
25 | # An even more brighter shade color of nord0. | ||
26 | nord2 = mkHexColorOption "nord2" "#434C5E"; | ||
27 | |||
28 | # The brightest shade color based on nord0. | ||
29 | nord3 = mkHexColorOption "nord3" "#4C566A"; | ||
30 | |||
31 | ## SNOW STORM | ||
32 | # The origin color or the Snow Storm palette. | ||
33 | nord4 = mkHexColorOption "nord4" "#D8DEE9"; | ||
34 | |||
35 | # A brighter shade color of nord4. | ||
36 | nord5 = mkHexColorOption "nord5" "#E5E9F0"; | ||
37 | |||
38 | # The brightest shade color based on nord4. | ||
39 | nord6 = mkHexColorOption "nord6" "#ECEFF4"; | ||
40 | |||
41 | ## FROST | ||
42 | # A calm and highly contrasted color reminiscent of frozen polar water. | ||
43 | nord7 = mkHexColorOption "nord7" "#8FBCBB"; | ||
44 | |||
45 | # The bright and shiny primary accent color reminiscent of pure and clear ice. | ||
46 | nord8 = mkHexColorOption "nord8" "#88C0D0"; | ||
47 | |||
48 | # A more darkened and less saturated color reminiscent of arctic waters. | ||
49 | nord9 = mkHexColorOption "nord9" "#81A1C1"; | ||
50 | |||
51 | # A dark and intensive color reminiscent of the deep arctic ocean. | ||
52 | nord10 = mkHexColorOption "nord10" "#5E81AC"; | ||
53 | |||
54 | ## AURORA | ||
55 | # RED | ||
56 | nord11 = mkHexColorOption "nord11" "#BF616A"; | ||
57 | |||
58 | # ORANGE | ||
59 | nord12 = mkHexColorOption "nord12" "#D08770"; | ||
60 | |||
61 | # YELLOW | ||
62 | nord13 = mkHexColorOption "nord13" "#EBCB8B"; | ||
63 | |||
64 | # GREEN | ||
65 | nord14 = mkHexColorOption "nord14" "#A3BE8C"; | ||
66 | |||
67 | # PURPLE | ||
68 | nord15 = mkHexColorOption "nord15" "#B48EAD"; | ||
69 | } | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.sass b/.vim/pack/css-color/start/css-color/tests/example.sass new file mode 100644 index 0000000..e1c8cd0 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.sass | |||
@@ -0,0 +1,25 @@ | |||
1 | i | ||
2 | background: #359 | ||
3 | b | ||
4 | background: #335599 | ||
5 | u | ||
6 | background: rgba(144, 0, 0, .5) | ||
7 | s | ||
8 | background: hsl(0, 100%, 50%) | ||
9 | |||
10 | !color1 = #359 | ||
11 | !color2 = #335599 | ||
12 | !color3 = rgba(144, 0, 0, .5) | ||
13 | !color4 = hsl(0, 100%, 50%) | ||
14 | |||
15 | /* | ||
16 | * #123, #456 | ||
17 | */ | ||
18 | |||
19 | // #123456 | ||
20 | |||
21 | ul | ||
22 | color = white | ||
23 | li | ||
24 | color = yellow | ||
25 | background = black | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.scss b/.vim/pack/css-color/start/css-color/tests/example.scss new file mode 100644 index 0000000..a93f4da --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.scss | |||
@@ -0,0 +1,24 @@ | |||
1 | i { background: #359 } | ||
2 | b { background: #335599 } | ||
3 | u { background: rgba(144, 0, 0, .5) } | ||
4 | s { background: hsl(0, 100%, 50%) } | ||
5 | |||
6 | $color1: #359; | ||
7 | $color2: #335599; | ||
8 | $color3: rgba(144, 0, 0, .5); | ||
9 | $color4: hsl(0, 100%, 50%); | ||
10 | |||
11 | /* | ||
12 | * #123, #456 | ||
13 | */ | ||
14 | |||
15 | // #123456 | ||
16 | |||
17 | ul { | ||
18 | color: white; | ||
19 | |||
20 | li { | ||
21 | color: yellow; | ||
22 | background: black; | ||
23 | } | ||
24 | } | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.sh b/.vim/pack/css-color/start/css-color/tests/example.sh new file mode 100644 index 0000000..676da41 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.sh | |||
@@ -0,0 +1,26 @@ | |||
1 | # XXX #0f0 should show up green | ||
2 | # XXX f00 should not show up red | ||
3 | # FIXME ff0 should show up yellow but are known not to | ||
4 | |||
5 | echo '#0f0' | ||
6 | echo ##0f0 | ||
7 | echo \#ff0 | ||
8 | echo #f00 | ||
9 | echo ##0f0 | ||
10 | echo # #0f0 | ||
11 | cmd '#0f0' | ||
12 | cmd "#0f0" | ||
13 | cmd \#ff0 | ||
14 | cmd #f00 | ||
15 | cmd ##0f0 | ||
16 | cmd # #0f0 | ||
17 | echo `foo # #0f0` | ||
18 | for (( x = '#0f0' )) ; do : ; done | ||
19 | for (( x = "#0f0" )) ; do : ; done | ||
20 | #f00 | ||
21 | ##0f0 XXX | ||
22 | # #0f0 XXX | ||
23 | # XXX #0f0 XXX | ||
24 | cat << '' | ||
25 | #0f0 | ||
26 | |||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.stylus b/.vim/pack/css-color/start/css-color/tests/example.stylus new file mode 100644 index 0000000..9789507 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.stylus | |||
@@ -0,0 +1,28 @@ | |||
1 | i | ||
2 | background #359 | ||
3 | b | ||
4 | background #335599 | ||
5 | u | ||
6 | background rgba(144, 0, 0, .5) | ||
7 | s | ||
8 | background hsl(0, 100%, 50%) | ||
9 | |||
10 | color1 = #359 | ||
11 | color2 = #335599 | ||
12 | color3 = rgba(144, 0, 0, .5) | ||
13 | color4 = hsl(0, 100%, 50%) | ||
14 | |||
15 | /* | ||
16 | * #123, #456 | ||
17 | */ | ||
18 | |||
19 | // #123456 | ||
20 | |||
21 | ul { | ||
22 | color: white; | ||
23 | |||
24 | li { | ||
25 | color: yellow; | ||
26 | background: black; | ||
27 | } | ||
28 | } | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.tcsh b/.vim/pack/css-color/start/css-color/tests/example.tcsh new file mode 100644 index 0000000..b5b1af4 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.tcsh | |||
@@ -0,0 +1,13 @@ | |||
1 | # TODO #0f0 should show up green | ||
2 | # TODO f00 should not show up red | ||
3 | |||
4 | set word = '#0f0' | ||
5 | echo "#0f0" | ||
6 | echo #f00 | ||
7 | #f00 | ||
8 | ##0f0 | ||
9 | # TODO #0f0 | ||
10 | # TODO #0f0 TODO | ||
11 | cat <<X | ||
12 | #0f0 | ||
13 | X | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.ts b/.vim/pack/css-color/start/css-color/tests/example.ts new file mode 100644 index 0000000..2509bd4 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.ts | |||
@@ -0,0 +1,21 @@ | |||
1 | import { DefaultTheme } from 'styled-components'; | ||
2 | |||
3 | const MyTheme = { | ||
4 | green2: '#2f7a5c', | ||
5 | green3: '#35b281', | ||
6 | green4: '#26805c', | ||
7 | green5: '#28664D', | ||
8 | }; | ||
9 | |||
10 | /* green darker variations | ||
11 | '#3fa27b' | ||
12 | '#378e6c' | ||
13 | '#2f7a5c' | ||
14 | '#28664D' | ||
15 | '#20513e' | ||
16 | */ | ||
17 | |||
18 | let x = '#20513e'; | ||
19 | let y = foo('#20513e'); | ||
20 | |||
21 | export default myTheme; | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.tsx b/.vim/pack/css-color/start/css-color/tests/example.tsx new file mode 100644 index 0000000..ad156c3 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.tsx | |||
@@ -0,0 +1,53 @@ | |||
1 | export class ResultRow extends b.Component<IFood> { | ||
2 | static id: string = "search-result-row"; | ||
3 | |||
4 | render(): b.INode { | ||
5 | return ( | ||
6 | <Tr style={this.rowColorStyle(this.data.pH)}> | ||
7 | <Td>{this.data.name}</Td> | ||
8 | <Td>{this.data.pH}</Td> | ||
9 | </Tr> | ||
10 | ); | ||
11 | } | ||
12 | |||
13 | private rowColorStyle(ph: number): b.IStyle { | ||
14 | let backgroundColor = "#00000000"; | ||
15 | let color = "whitesmoke"; | ||
16 | if (ph >= 9) { | ||
17 | backgroundColor = "#ac39ac"; | ||
18 | } else if (ph >= 8.5) { | ||
19 | backgroundColor = "#d279d2"; | ||
20 | } else if (ph >= 8.25) { | ||
21 | backgroundColor = "#e6b3e6"; | ||
22 | } else if (ph >= 8) { | ||
23 | backgroundColor = "#80bfff"; | ||
24 | } else if (ph >= 7.75) { | ||
25 | backgroundColor = "#77b300"; | ||
26 | } else if (ph >= 7.5) { | ||
27 | backgroundColor = "#5cd65c"; | ||
28 | } else if (ph >= 7.25) { | ||
29 | backgroundColor = "#00e600"; | ||
30 | } else if (ph >= 7) { | ||
31 | backgroundColor = "#ffff33"; | ||
32 | } else if (ph >= 6.5) { | ||
33 | backgroundColor = "#ffcc00"; | ||
34 | } else if (ph >= 6.25) { | ||
35 | backgroundColor = "#ff8000"; | ||
36 | } else if (ph >= 6) { | ||
37 | backgroundColor = "#ff6600"; | ||
38 | } else if (ph >= 5.5) { | ||
39 | backgroundColor = "#ff1a1a"; | ||
40 | } else if (ph >= 5) { | ||
41 | backgroundColor = "#cc0000"; | ||
42 | color = "#ffffff"; | ||
43 | } else if (ph >= 4.5) { | ||
44 | backgroundColor = "#990000"; | ||
45 | color = "#ffffff"; | ||
46 | } else { | ||
47 | backgroundColor = "#660000"; | ||
48 | color = "#ffffff"; | ||
49 | } | ||
50 | |||
51 | return { backgroundColor, color }; | ||
52 | } | ||
53 | } | ||
diff --git a/.vim/pack/css-color/start/css-color/tests/example.zsh b/.vim/pack/css-color/start/css-color/tests/example.zsh new file mode 100644 index 0000000..412a949 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/example.zsh | |||
@@ -0,0 +1,23 @@ | |||
1 | # XXX #0f0 should show up green | ||
2 | # XXX f00 should not show up red | ||
3 | # FIXME ff0 should show up yellow but are known not to | ||
4 | |||
5 | echo '#0f0' | ||
6 | echo ##0f0 | ||
7 | echo \#ff0 | ||
8 | echo #f00 | ||
9 | echo ##0f0 | ||
10 | echo # #0f0 | ||
11 | cmd '#0f0' | ||
12 | cmd "#0f0" | ||
13 | cmd \#ff0 | ||
14 | cmd #f00 | ||
15 | cmd ##0f0 | ||
16 | cmd # #0f0 | ||
17 | #f00 | ||
18 | ##0f0 XXX | ||
19 | # #0f0 XXX | ||
20 | # XXX #0f0 XXX | ||
21 | cat << '' | ||
22 | #0f0 | ||
23 | |||
diff --git a/.vim/pack/css-color/start/css-color/tests/torture.css b/.vim/pack/css-color/start/css-color/tests/torture.css new file mode 100644 index 0000000..5705f84 --- /dev/null +++ b/.vim/pack/css-color/start/css-color/tests/torture.css | |||
@@ -0,0 +1,256 @@ | |||
1 | p { color: #300000; color: #300001; color: #300002; color: #300003; color: #300004; color: #300005; color: #300006; color: #300007; color: #300008; color: #300009; color: #30000a; color: #30000b; color: #30000c; color: #30000d; color: #30000e; color: #30000f; | ||
2 | color: #300100; color: #300101; color: #300102; color: #300103; color: #300104; color: #300105; color: #300106; color: #300107; color: #300108; color: #300109; color: #30010a; color: #30010b; color: #30010c; color: #30010d; color: #30010e; color: #30010f; | ||
3 | color: #300200; color: #300201; color: #300202; color: #300203; color: #300204; color: #300205; color: #300206; color: #300207; color: #300208; color: #300209; color: #30020a; color: #30020b; color: #30020c; color: #30020d; color: #30020e; color: #30020f; | ||
4 | color: #300300; color: #300301; color: #300302; color: #300303; color: #300304; color: #300305; color: #300306; color: #300307; color: #300308; color: #300309; color: #30030a; color: #30030b; color: #30030c; color: #30030d; color: #30030e; color: #30030f; | ||
5 | color: #300400; color: #300401; color: #300402; color: #300403; color: #300404; color: #300405; color: #300406; color: #300407; color: #300408; color: #300409; color: #30040a; color: #30040b; color: #30040c; color: #30040d; color: #30040e; color: #30040f; | ||
6 | color: #300500; color: #300501; color: #300502; color: #300503; color: #300504; color: #300505; color: #300506; color: #300507; color: #300508; color: #300509; color: #30050a; color: #30050b; color: #30050c; color: #30050d; color: #30050e; color: #30050f; | ||
7 | color: #300600; color: #300601; color: #300602; color: #300603; color: #300604; color: #300605; color: #300606; color: #300607; color: #300608; color: #300609; color: #30060a; color: #30060b; color: #30060c; color: #30060d; color: #30060e; color: #30060f; | ||
8 | color: #300700; color: #300701; color: #300702; color: #300703; color: #300704; color: #300705; color: #300706; color: #300707; color: #300708; color: #300709; color: #30070a; color: #30070b; color: #30070c; color: #30070d; color: #30070e; color: #30070f; | ||
9 | color: #300800; color: #300801; color: #300802; color: #300803; color: #300804; color: #300805; color: #300806; color: #300807; color: #300808; color: #300809; color: #30080a; color: #30080b; color: #30080c; color: #30080d; color: #30080e; color: #30080f; | ||
10 | color: #300900; color: #300901; color: #300902; color: #300903; color: #300904; color: #300905; color: #300906; color: #300907; color: #300908; color: #300909; color: #30090a; color: #30090b; color: #30090c; color: #30090d; color: #30090e; color: #30090f; | ||
11 | color: #300a00; color: #300a01; color: #300a02; color: #300a03; color: #300a04; color: #300a05; color: #300a06; color: #300a07; color: #300a08; color: #300a09; color: #300a0a; color: #300a0b; color: #300a0c; color: #300a0d; color: #300a0e; color: #300a0f; | ||
12 | color: #300b00; color: #300b01; color: #300b02; color: #300b03; color: #300b04; color: #300b05; color: #300b06; color: #300b07; color: #300b08; color: #300b09; color: #300b0a; color: #300b0b; color: #300b0c; color: #300b0d; color: #300b0e; color: #300b0f; | ||
13 | color: #300c00; color: #300c01; color: #300c02; color: #300c03; color: #300c04; color: #300c05; color: #300c06; color: #300c07; color: #300c08; color: #300c09; color: #300c0a; color: #300c0b; color: #300c0c; color: #300c0d; color: #300c0e; color: #300c0f; | ||
14 | color: #300d00; color: #300d01; color: #300d02; color: #300d03; color: #300d04; color: #300d05; color: #300d06; color: #300d07; color: #300d08; color: #300d09; color: #300d0a; color: #300d0b; color: #300d0c; color: #300d0d; color: #300d0e; color: #300d0f; | ||
15 | color: #300e00; color: #300e01; color: #300e02; color: #300e03; color: #300e04; color: #300e05; color: #300e06; color: #300e07; color: #300e08; color: #300e09; color: #300e0a; color: #300e0b; color: #300e0c; color: #300e0d; color: #300e0e; color: #300e0f; | ||
16 | color: #300f00; color: #300f01; color: #300f02; color: #300f03; color: #300f04; color: #300f05; color: #300f06; color: #300f07; color: #300f08; color: #300f09; color: #300f0a; color: #300f0b; color: #300f0c; color: #300f0d; color: #300f0e; color: #300f0f; | ||
17 | color: #301000; color: #301001; color: #301002; color: #301003; color: #301004; color: #301005; color: #301006; color: #301007; color: #301008; color: #301009; color: #30100a; color: #30100b; color: #30100c; color: #30100d; color: #30100e; color: #30100f; | ||
18 | color: #301100; color: #301101; color: #301102; color: #301103; color: #301104; color: #301105; color: #301106; color: #301107; color: #301108; color: #301109; color: #30110a; color: #30110b; color: #30110c; color: #30110d; color: #30110e; color: #30110f; | ||
19 | color: #301200; color: #301201; color: #301202; color: #301203; color: #301204; color: #301205; color: #301206; color: #301207; color: #301208; color: #301209; color: #30120a; color: #30120b; color: #30120c; color: #30120d; color: #30120e; color: #30120f; | ||
20 | color: #301300; color: #301301; color: #301302; color: #301303; color: #301304; color: #301305; color: #301306; color: #301307; color: #301308; color: #301309; color: #30130a; color: #30130b; color: #30130c; color: #30130d; color: #30130e; color: #30130f; | ||
21 | color: #301400; color: #301401; color: #301402; color: #301403; color: #301404; color: #301405; color: #301406; color: #301407; color: #301408; color: #301409; color: #30140a; color: #30140b; color: #30140c; color: #30140d; color: #30140e; color: #30140f; | ||
22 | color: #301500; color: #301501; color: #301502; color: #301503; color: #301504; color: #301505; color: #301506; color: #301507; color: #301508; color: #301509; color: #30150a; color: #30150b; color: #30150c; color: #30150d; color: #30150e; color: #30150f; | ||
23 | color: #301600; color: #301601; color: #301602; color: #301603; color: #301604; color: #301605; color: #301606; color: #301607; color: #301608; color: #301609; color: #30160a; color: #30160b; color: #30160c; color: #30160d; color: #30160e; color: #30160f; | ||
24 | color: #301700; color: #301701; color: #301702; color: #301703; color: #301704; color: #301705; color: #301706; color: #301707; color: #301708; color: #301709; color: #30170a; color: #30170b; color: #30170c; color: #30170d; color: #30170e; color: #30170f; | ||
25 | color: #301800; color: #301801; color: #301802; color: #301803; color: #301804; color: #301805; color: #301806; color: #301807; color: #301808; color: #301809; color: #30180a; color: #30180b; color: #30180c; color: #30180d; color: #30180e; color: #30180f; | ||
26 | color: #301900; color: #301901; color: #301902; color: #301903; color: #301904; color: #301905; color: #301906; color: #301907; color: #301908; color: #301909; color: #30190a; color: #30190b; color: #30190c; color: #30190d; color: #30190e; color: #30190f; | ||
27 | color: #301a00; color: #301a01; color: #301a02; color: #301a03; color: #301a04; color: #301a05; color: #301a06; color: #301a07; color: #301a08; color: #301a09; color: #301a0a; color: #301a0b; color: #301a0c; color: #301a0d; color: #301a0e; color: #301a0f; | ||
28 | color: #301b00; color: #301b01; color: #301b02; color: #301b03; color: #301b04; color: #301b05; color: #301b06; color: #301b07; color: #301b08; color: #301b09; color: #301b0a; color: #301b0b; color: #301b0c; color: #301b0d; color: #301b0e; color: #301b0f; | ||
29 | color: #301c00; color: #301c01; color: #301c02; color: #301c03; color: #301c04; color: #301c05; color: #301c06; color: #301c07; color: #301c08; color: #301c09; color: #301c0a; color: #301c0b; color: #301c0c; color: #301c0d; color: #301c0e; color: #301c0f; | ||
30 | color: #301d00; color: #301d01; color: #301d02; color: #301d03; color: #301d04; color: #301d05; color: #301d06; color: #301d07; color: #301d08; color: #301d09; color: #301d0a; color: #301d0b; color: #301d0c; color: #301d0d; color: #301d0e; color: #301d0f; | ||
31 | color: #301e00; color: #301e01; color: #301e02; color: #301e03; color: #301e04; color: #301e05; color: #301e06; color: #301e07; color: #301e08; color: #301e09; color: #301e0a; color: #301e0b; color: #301e0c; color: #301e0d; color: #301e0e; color: #301e0f; | ||
32 | color: #301f00; color: #301f01; color: #301f02; color: #301f03; color: #301f04; color: #301f05; color: #301f06; color: #301f07; color: #301f08; color: #301f09; color: #301f0a; color: #301f0b; color: #301f0c; color: #301f0d; color: #301f0e; color: #301f0f; | ||
33 | color: #302000; color: #302001; color: #302002; color: #302003; color: #302004; color: #302005; color: #302006; color: #302007; color: #302008; color: #302009; color: #30200a; color: #30200b; color: #30200c; color: #30200d; color: #30200e; color: #30200f; | ||
34 | color: #302100; color: #302101; color: #302102; color: #302103; color: #302104; color: #302105; color: #302106; color: #302107; color: #302108; color: #302109; color: #30210a; color: #30210b; color: #30210c; color: #30210d; color: #30210e; color: #30210f; | ||
35 | color: #302200; color: #302201; color: #302202; color: #302203; color: #302204; color: #302205; color: #302206; color: #302207; color: #302208; color: #302209; color: #30220a; color: #30220b; color: #30220c; color: #30220d; color: #30220e; color: #30220f; | ||
36 | color: #302300; color: #302301; color: #302302; color: #302303; color: #302304; color: #302305; color: #302306; color: #302307; color: #302308; color: #302309; color: #30230a; color: #30230b; color: #30230c; color: #30230d; color: #30230e; color: #30230f; | ||
37 | color: #302400; color: #302401; color: #302402; color: #302403; color: #302404; color: #302405; color: #302406; color: #302407; color: #302408; color: #302409; color: #30240a; color: #30240b; color: #30240c; color: #30240d; color: #30240e; color: #30240f; | ||
38 | color: #302500; color: #302501; color: #302502; color: #302503; color: #302504; color: #302505; color: #302506; color: #302507; color: #302508; color: #302509; color: #30250a; color: #30250b; color: #30250c; color: #30250d; color: #30250e; color: #30250f; | ||
39 | color: #302600; color: #302601; color: #302602; color: #302603; color: #302604; color: #302605; color: #302606; color: #302607; color: #302608; color: #302609; color: #30260a; color: #30260b; color: #30260c; color: #30260d; color: #30260e; color: #30260f; | ||
40 | color: #302700; color: #302701; color: #302702; color: #302703; color: #302704; color: #302705; color: #302706; color: #302707; color: #302708; color: #302709; color: #30270a; color: #30270b; color: #30270c; color: #30270d; color: #30270e; color: #30270f; | ||
41 | color: #302800; color: #302801; color: #302802; color: #302803; color: #302804; color: #302805; color: #302806; color: #302807; color: #302808; color: #302809; color: #30280a; color: #30280b; color: #30280c; color: #30280d; color: #30280e; color: #30280f; | ||
42 | color: #302900; color: #302901; color: #302902; color: #302903; color: #302904; color: #302905; color: #302906; color: #302907; color: #302908; color: #302909; color: #30290a; color: #30290b; color: #30290c; color: #30290d; color: #30290e; color: #30290f; | ||
43 | color: #302a00; color: #302a01; color: #302a02; color: #302a03; color: #302a04; color: #302a05; color: #302a06; color: #302a07; color: #302a08; color: #302a09; color: #302a0a; color: #302a0b; color: #302a0c; color: #302a0d; color: #302a0e; color: #302a0f; | ||
44 | color: #302b00; color: #302b01; color: #302b02; color: #302b03; color: #302b04; color: #302b05; color: #302b06; color: #302b07; color: #302b08; color: #302b09; color: #302b0a; color: #302b0b; color: #302b0c; color: #302b0d; color: #302b0e; color: #302b0f; | ||
45 | color: #302c00; color: #302c01; color: #302c02; color: #302c03; color: #302c04; color: #302c05; color: #302c06; color: #302c07; color: #302c08; color: #302c09; color: #302c0a; color: #302c0b; color: #302c0c; color: #302c0d; color: #302c0e; color: #302c0f; | ||
46 | color: #302d00; color: #302d01; color: #302d02; color: #302d03; color: #302d04; color: #302d05; color: #302d06; color: #302d07; color: #302d08; color: #302d09; color: #302d0a; color: #302d0b; color: #302d0c; color: #302d0d; color: #302d0e; color: #302d0f; | ||
47 | color: #302e00; color: #302e01; color: #302e02; color: #302e03; color: #302e04; color: #302e05; color: #302e06; color: #302e07; color: #302e08; color: #302e09; color: #302e0a; color: #302e0b; color: #302e0c; color: #302e0d; color: #302e0e; color: #302e0f; | ||
48 | color: #302f00; color: #302f01; color: #302f02; color: #302f03; color: #302f04; color: #302f05; color: #302f06; color: #302f07; color: #302f08; color: #302f09; color: #302f0a; color: #302f0b; color: #302f0c; color: #302f0d; color: #302f0e; color: #302f0f; | ||
49 | color: #303000; color: #303001; color: #303002; color: #303003; color: #303004; color: #303005; color: #303006; color: #303007; color: #303008; color: #303009; color: #30300a; color: #30300b; color: #30300c; color: #30300d; color: #30300e; color: #30300f; | ||
50 | color: #303100; color: #303101; color: #303102; color: #303103; color: #303104; color: #303105; color: #303106; color: #303107; color: #303108; color: #303109; color: #30310a; color: #30310b; color: #30310c; color: #30310d; color: #30310e; color: #30310f; | ||
51 | color: #303200; color: #303201; color: #303202; color: #303203; color: #303204; color: #303205; color: #303206; color: #303207; color: #303208; color: #303209; color: #30320a; color: #30320b; color: #30320c; color: #30320d; color: #30320e; color: #30320f; | ||
52 | color: #303300; color: #303301; color: #303302; color: #303303; color: #303304; color: #303305; color: #303306; color: #303307; color: #303308; color: #303309; color: #30330a; color: #30330b; color: #30330c; color: #30330d; color: #30330e; color: #30330f; | ||
53 | color: #303400; color: #303401; color: #303402; color: #303403; color: #303404; color: #303405; color: #303406; color: #303407; color: #303408; color: #303409; color: #30340a; color: #30340b; color: #30340c; color: #30340d; color: #30340e; color: #30340f; | ||
54 | color: #303500; color: #303501; color: #303502; color: #303503; color: #303504; color: #303505; color: #303506; color: #303507; color: #303508; color: #303509; color: #30350a; color: #30350b; color: #30350c; color: #30350d; color: #30350e; color: #30350f; | ||
55 | color: #303600; color: #303601; color: #303602; color: #303603; color: #303604; color: #303605; color: #303606; color: #303607; color: #303608; color: #303609; color: #30360a; color: #30360b; color: #30360c; color: #30360d; color: #30360e; color: #30360f; | ||
56 | color: #303700; color: #303701; color: #303702; color: #303703; color: #303704; color: #303705; color: #303706; color: #303707; color: #303708; color: #303709; color: #30370a; color: #30370b; color: #30370c; color: #30370d; color: #30370e; color: #30370f; | ||
57 | color: #303800; color: #303801; color: #303802; color: #303803; color: #303804; color: #303805; color: #303806; color: #303807; color: #303808; color: #303809; color: #30380a; color: #30380b; color: #30380c; color: #30380d; color: #30380e; color: #30380f; | ||
58 | color: #303900; color: #303901; color: #303902; color: #303903; color: #303904; color: #303905; color: #303906; color: #303907; color: #303908; color: #303909; color: #30390a; color: #30390b; color: #30390c; color: #30390d; color: #30390e; color: #30390f; | ||
59 | color: #303a00; color: #303a01; color: #303a02; color: #303a03; color: #303a04; color: #303a05; color: #303a06; color: #303a07; color: #303a08; color: #303a09; color: #303a0a; color: #303a0b; color: #303a0c; color: #303a0d; color: #303a0e; color: #303a0f; | ||
60 | color: #303b00; color: #303b01; color: #303b02; color: #303b03; color: #303b04; color: #303b05; color: #303b06; color: #303b07; color: #303b08; color: #303b09; color: #303b0a; color: #303b0b; color: #303b0c; color: #303b0d; color: #303b0e; color: #303b0f; | ||
61 | color: #303c00; color: #303c01; color: #303c02; color: #303c03; color: #303c04; color: #303c05; color: #303c06; color: #303c07; color: #303c08; color: #303c09; color: #303c0a; color: #303c0b; color: #303c0c; color: #303c0d; color: #303c0e; color: #303c0f; | ||
62 | color: #303d00; color: #303d01; color: #303d02; color: #303d03; color: #303d04; color: #303d05; color: #303d06; color: #303d07; color: #303d08; color: #303d09; color: #303d0a; color: #303d0b; color: #303d0c; color: #303d0d; color: #303d0e; color: #303d0f; | ||
63 | color: #303e00; color: #303e01; color: #303e02; color: #303e03; color: #303e04; color: #303e05; color: #303e06; color: #303e07; color: #303e08; color: #303e09; color: #303e0a; color: #303e0b; color: #303e0c; color: #303e0d; color: #303e0e; color: #303e0f; | ||
64 | color: #303f00; color: #303f01; color: #303f02; color: #303f03; color: #303f04; color: #303f05; color: #303f06; color: #303f07; color: #303f08; color: #303f09; color: #303f0a; color: #303f0b; color: #303f0c; color: #303f0d; color: #303f0e; color: #303f0f; | ||
65 | color: #304000; color: #304001; color: #304002; color: #304003; color: #304004; color: #304005; color: #304006; color: #304007; color: #304008; color: #304009; color: #30400a; color: #30400b; color: #30400c; color: #30400d; color: #30400e; color: #30400f; | ||
66 | color: #304100; color: #304101; color: #304102; color: #304103; color: #304104; color: #304105; color: #304106; color: #304107; color: #304108; color: #304109; color: #30410a; color: #30410b; color: #30410c; color: #30410d; color: #30410e; color: #30410f; | ||
67 | color: #304200; color: #304201; color: #304202; color: #304203; color: #304204; color: #304205; color: #304206; color: #304207; color: #304208; color: #304209; color: #30420a; color: #30420b; color: #30420c; color: #30420d; color: #30420e; color: #30420f; | ||
68 | color: #304300; color: #304301; color: #304302; color: #304303; color: #304304; color: #304305; color: #304306; color: #304307; color: #304308; color: #304309; color: #30430a; color: #30430b; color: #30430c; color: #30430d; color: #30430e; color: #30430f; | ||
69 | color: #304400; color: #304401; color: #304402; color: #304403; color: #304404; color: #304405; color: #304406; color: #304407; color: #304408; color: #304409; color: #30440a; color: #30440b; color: #30440c; color: #30440d; color: #30440e; color: #30440f; | ||
70 | color: #304500; color: #304501; color: #304502; color: #304503; color: #304504; color: #304505; color: #304506; color: #304507; color: #304508; color: #304509; color: #30450a; color: #30450b; color: #30450c; color: #30450d; color: #30450e; color: #30450f; | ||
71 | color: #304600; color: #304601; color: #304602; color: #304603; color: #304604; color: #304605; color: #304606; color: #304607; color: #304608; color: #304609; color: #30460a; color: #30460b; color: #30460c; color: #30460d; color: #30460e; color: #30460f; | ||
72 | color: #304700; color: #304701; color: #304702; color: #304703; color: #304704; color: #304705; color: #304706; color: #304707; color: #304708; color: #304709; color: #30470a; color: #30470b; color: #30470c; color: #30470d; color: #30470e; color: #30470f; | ||
73 | color: #304800; color: #304801; color: #304802; color: #304803; color: #304804; color: #304805; color: #304806; color: #304807; color: #304808; color: #304809; color: #30480a; color: #30480b; color: #30480c; color: #30480d; color: #30480e; color: #30480f; | ||
74 | color: #304900; color: #304901; color: #304902; color: #304903; color: #304904; color: #304905; color: #304906; color: #304907; color: #304908; color: #304909; color: #30490a; color: #30490b; color: #30490c; color: #30490d; color: #30490e; color: #30490f; | ||
75 | color: #304a00; color: #304a01; color: #304a02; color: #304a03; color: #304a04; color: #304a05; color: #304a06; color: #304a07; color: #304a08; color: #304a09; color: #304a0a; color: #304a0b; color: #304a0c; color: #304a0d; color: #304a0e; color: #304a0f; | ||
76 | color: #304b00; color: #304b01; color: #304b02; color: #304b03; color: #304b04; color: #304b05; color: #304b06; color: #304b07; color: #304b08; color: #304b09; color: #304b0a; color: #304b0b; color: #304b0c; color: #304b0d; color: #304b0e; color: #304b0f; | ||
77 | color: #304c00; color: #304c01; color: #304c02; color: #304c03; color: #304c04; color: #304c05; color: #304c06; color: #304c07; color: #304c08; color: #304c09; color: #304c0a; color: #304c0b; color: #304c0c; color: #304c0d; color: #304c0e; color: #304c0f; | ||
78 | color: #304d00; color: #304d01; color: #304d02; color: #304d03; color: #304d04; color: #304d05; color: #304d06; color: #304d07; color: #304d08; color: #304d09; color: #304d0a; color: #304d0b; color: #304d0c; color: #304d0d; color: #304d0e; color: #304d0f; | ||
79 | color: #304e00; color: #304e01; color: #304e02; color: #304e03; color: #304e04; color: #304e05; color: #304e06; color: #304e07; color: #304e08; color: #304e09; color: #304e0a; color: #304e0b; color: #304e0c; color: #304e0d; color: #304e0e; color: #304e0f; | ||
80 | color: #304f00; color: #304f01; color: #304f02; color: #304f03; color: #304f04; color: #304f05; color: #304f06; color: #304f07; color: #304f08; color: #304f09; color: #304f0a; color: #304f0b; color: #304f0c; color: #304f0d; color: #304f0e; color: #304f0f; | ||
81 | color: #305000; color: #305001; color: #305002; color: #305003; color: #305004; color: #305005; color: #305006; color: #305007; color: #305008; color: #305009; color: #30500a; color: #30500b; color: #30500c; color: #30500d; color: #30500e; color: #30500f; | ||
82 | color: #305100; color: #305101; color: #305102; color: #305103; color: #305104; color: #305105; color: #305106; color: #305107; color: #305108; color: #305109; color: #30510a; color: #30510b; color: #30510c; color: #30510d; color: #30510e; color: #30510f; | ||
83 | color: #305200; color: #305201; color: #305202; color: #305203; color: #305204; color: #305205; color: #305206; color: #305207; color: #305208; color: #305209; color: #30520a; color: #30520b; color: #30520c; color: #30520d; color: #30520e; color: #30520f; | ||
84 | color: #305300; color: #305301; color: #305302; color: #305303; color: #305304; color: #305305; color: #305306; color: #305307; color: #305308; color: #305309; color: #30530a; color: #30530b; color: #30530c; color: #30530d; color: #30530e; color: #30530f; | ||
85 | color: #305400; color: #305401; color: #305402; color: #305403; color: #305404; color: #305405; color: #305406; color: #305407; color: #305408; color: #305409; color: #30540a; color: #30540b; color: #30540c; color: #30540d; color: #30540e; color: #30540f; | ||
86 | color: #305500; color: #305501; color: #305502; color: #305503; color: #305504; color: #305505; color: #305506; color: #305507; color: #305508; color: #305509; color: #30550a; color: #30550b; color: #30550c; color: #30550d; color: #30550e; color: #30550f; | ||
87 | color: #305600; color: #305601; color: #305602; color: #305603; color: #305604; color: #305605; color: #305606; color: #305607; color: #305608; color: #305609; color: #30560a; color: #30560b; color: #30560c; color: #30560d; color: #30560e; color: #30560f; | ||
88 | color: #305700; color: #305701; color: #305702; color: #305703; color: #305704; color: #305705; color: #305706; color: #305707; color: #305708; color: #305709; color: #30570a; color: #30570b; color: #30570c; color: #30570d; color: #30570e; color: #30570f; | ||
89 | color: #305800; color: #305801; color: #305802; color: #305803; color: #305804; color: #305805; color: #305806; color: #305807; color: #305808; color: #305809; color: #30580a; color: #30580b; color: #30580c; color: #30580d; color: #30580e; color: #30580f; | ||
90 | color: #305900; color: #305901; color: #305902; color: #305903; color: #305904; color: #305905; color: #305906; color: #305907; color: #305908; color: #305909; color: #30590a; color: #30590b; color: #30590c; color: #30590d; color: #30590e; color: #30590f; | ||
91 | color: #305a00; color: #305a01; color: #305a02; color: #305a03; color: #305a04; color: #305a05; color: #305a06; color: #305a07; color: #305a08; color: #305a09; color: #305a0a; color: #305a0b; color: #305a0c; color: #305a0d; color: #305a0e; color: #305a0f; | ||
92 | color: #305b00; color: #305b01; color: #305b02; color: #305b03; color: #305b04; color: #305b05; color: #305b06; color: #305b07; color: #305b08; color: #305b09; color: #305b0a; color: #305b0b; color: #305b0c; color: #305b0d; color: #305b0e; color: #305b0f; | ||
93 | color: #305c00; color: #305c01; color: #305c02; color: #305c03; color: #305c04; color: #305c05; color: #305c06; color: #305c07; color: #305c08; color: #305c09; color: #305c0a; color: #305c0b; color: #305c0c; color: #305c0d; color: #305c0e; color: #305c0f; | ||
94 | color: #305d00; color: #305d01; color: #305d02; color: #305d03; color: #305d04; color: #305d05; color: #305d06; color: #305d07; color: #305d08; color: #305d09; color: #305d0a; color: #305d0b; color: #305d0c; color: #305d0d; color: #305d0e; color: #305d0f; | ||
95 | color: #305e00; color: #305e01; color: #305e02; color: #305e03; color: #305e04; color: #305e05; color: #305e06; color: #305e07; color: #305e08; color: #305e09; color: #305e0a; color: #305e0b; color: #305e0c; color: #305e0d; color: #305e0e; color: #305e0f; | ||
96 | color: #305f00; color: #305f01; color: #305f02; color: #305f03; color: #305f04; color: #305f05; color: #305f06; color: #305f07; color: #305f08; color: #305f09; color: #305f0a; color: #305f0b; color: #305f0c; color: #305f0d; color: #305f0e; color: #305f0f; | ||
97 | color: #306000; color: #306001; color: #306002; color: #306003; color: #306004; color: #306005; color: #306006; color: #306007; color: #306008; color: #306009; color: #30600a; color: #30600b; color: #30600c; color: #30600d; color: #30600e; color: #30600f; | ||
98 | color: #306100; color: #306101; color: #306102; color: #306103; color: #306104; color: #306105; color: #306106; color: #306107; color: #306108; color: #306109; color: #30610a; color: #30610b; color: #30610c; color: #30610d; color: #30610e; color: #30610f; | ||
99 | color: #306200; color: #306201; color: #306202; color: #306203; color: #306204; color: #306205; color: #306206; color: #306207; color: #306208; color: #306209; color: #30620a; color: #30620b; color: #30620c; color: #30620d; color: #30620e; color: #30620f; | ||
100 | color: #306300; color: #306301; color: #306302; color: #306303; color: #306304; color: #306305; color: #306306; color: #306307; color: #306308; color: #306309; color: #30630a; color: #30630b; color: #30630c; color: #30630d; color: #30630e; color: #30630f; | ||
101 | color: #306400; color: #306401; color: #306402; color: #306403; color: #306404; color: #306405; color: #306406; color: #306407; color: #306408; color: #306409; color: #30640a; color: #30640b; color: #30640c; color: #30640d; color: #30640e; color: #30640f; | ||
102 | color: #306500; color: #306501; color: #306502; color: #306503; color: #306504; color: #306505; color: #306506; color: #306507; color: #306508; color: #306509; color: #30650a; color: #30650b; color: #30650c; color: #30650d; color: #30650e; color: #30650f; | ||
103 | color: #306600; color: #306601; color: #306602; color: #306603; color: #306604; color: #306605; color: #306606; color: #306607; color: #306608; color: #306609; color: #30660a; color: #30660b; color: #30660c; color: #30660d; color: #30660e; color: #30660f; | ||
104 | color: #306700; color: #306701; color: #306702; color: #306703; color: #306704; color: #306705; color: #306706; color: #306707; color: #306708; color: #306709; color: #30670a; color: #30670b; color: #30670c; color: #30670d; color: #30670e; color: #30670f; | ||
105 | color: #306800; color: #306801; color: #306802; color: #306803; color: #306804; color: #306805; color: #306806; color: #306807; color: #306808; color: #306809; color: #30680a; color: #30680b; color: #30680c; color: #30680d; color: #30680e; color: #30680f; | ||
106 | color: #306900; color: #306901; color: #306902; color: #306903; color: #306904; color: #306905; color: #306906; color: #306907; color: #306908; color: #306909; color: #30690a; color: #30690b; color: #30690c; color: #30690d; color: #30690e; color: #30690f; | ||
107 | color: #306a00; color: #306a01; color: #306a02; color: #306a03; color: #306a04; color: #306a05; color: #306a06; color: #306a07; color: #306a08; color: #306a09; color: #306a0a; color: #306a0b; color: #306a0c; color: #306a0d; color: #306a0e; color: #306a0f; | ||
108 | color: #306b00; color: #306b01; color: #306b02; color: #306b03; color: #306b04; color: #306b05; color: #306b06; color: #306b07; color: #306b08; color: #306b09; color: #306b0a; color: #306b0b; color: #306b0c; color: #306b0d; color: #306b0e; color: #306b0f; | ||
109 | color: #306c00; color: #306c01; color: #306c02; color: #306c03; color: #306c04; color: #306c05; color: #306c06; color: #306c07; color: #306c08; color: #306c09; color: #306c0a; color: #306c0b; color: #306c0c; color: #306c0d; color: #306c0e; color: #306c0f; | ||
110 | color: #306d00; color: #306d01; color: #306d02; color: #306d03; color: #306d04; color: #306d05; color: #306d06; color: #306d07; color: #306d08; color: #306d09; color: #306d0a; color: #306d0b; color: #306d0c; color: #306d0d; color: #306d0e; color: #306d0f; | ||
111 | color: #306e00; color: #306e01; color: #306e02; color: #306e03; color: #306e04; color: #306e05; color: #306e06; color: #306e07; color: #306e08; color: #306e09; color: #306e0a; color: #306e0b; color: #306e0c; color: #306e0d; color: #306e0e; color: #306e0f; | ||
112 | color: #306f00; color: #306f01; color: #306f02; color: #306f03; color: #306f04; color: #306f05; color: #306f06; color: #306f07; color: #306f08; color: #306f09; color: #306f0a; color: #306f0b; color: #306f0c; color: #306f0d; color: #306f0e; color: #306f0f; | ||
113 | color: #307000; color: #307001; color: #307002; color: #307003; color: #307004; color: #307005; color: #307006; color: #307007; color: #307008; color: #307009; color: #30700a; color: #30700b; color: #30700c; color: #30700d; color: #30700e; color: #30700f; | ||
114 | color: #307100; color: #307101; color: #307102; color: #307103; color: #307104; color: #307105; color: #307106; color: #307107; color: #307108; color: #307109; color: #30710a; color: #30710b; color: #30710c; color: #30710d; color: #30710e; color: #30710f; | ||
115 | color: #307200; color: #307201; color: #307202; color: #307203; color: #307204; color: #307205; color: #307206; color: #307207; color: #307208; color: #307209; color: #30720a; color: #30720b; color: #30720c; color: #30720d; color: #30720e; color: #30720f; | ||
116 | color: #307300; color: #307301; color: #307302; color: #307303; color: #307304; color: #307305; color: #307306; color: #307307; color: #307308; color: #307309; color: #30730a; color: #30730b; color: #30730c; color: #30730d; color: #30730e; color: #30730f; | ||
117 | color: #307400; color: #307401; color: #307402; color: #307403; color: #307404; color: #307405; color: #307406; color: #307407; color: #307408; color: #307409; color: #30740a; color: #30740b; color: #30740c; color: #30740d; color: #30740e; color: #30740f; | ||
118 | color: #307500; color: #307501; color: #307502; color: #307503; color: #307504; color: #307505; color: #307506; color: #307507; color: #307508; color: #307509; color: #30750a; color: #30750b; color: #30750c; color: #30750d; color: #30750e; color: #30750f; | ||
119 | color: #307600; color: #307601; color: #307602; color: #307603; color: #307604; color: #307605; color: #307606; color: #307607; color: #307608; color: #307609; color: #30760a; color: #30760b; color: #30760c; color: #30760d; color: #30760e; color: #30760f; | ||
120 | color: #307700; color: #307701; color: #307702; color: #307703; color: #307704; color: #307705; color: #307706; color: #307707; color: #307708; color: #307709; color: #30770a; color: #30770b; color: #30770c; color: #30770d; color: #30770e; color: #30770f; | ||
121 | color: #307800; color: #307801; color: #307802; color: #307803; color: #307804; color: #307805; color: #307806; color: #307807; color: #307808; color: #307809; color: #30780a; color: #30780b; color: #30780c; color: #30780d; color: #30780e; color: #30780f; | ||
122 | color: #307900; color: #307901; color: #307902; color: #307903; color: #307904; color: #307905; color: #307906; color: #307907; color: #307908; color: #307909; color: #30790a; color: #30790b; color: #30790c; color: #30790d; color: #30790e; color: #30790f; | ||
123 | color: #307a00; color: #307a01; color: #307a02; color: #307a03; color: #307a04; color: #307a05; color: #307a06; color: #307a07; color: #307a08; color: #307a09; color: #307a0a; color: #307a0b; color: #307a0c; color: #307a0d; color: #307a0e; color: #307a0f; | ||
124 | color: #307b00; color: #307b01; color: #307b02; color: #307b03; color: #307b04; color: #307b05; color: #307b06; color: #307b07; color: #307b08; color: #307b09; color: #307b0a; color: #307b0b; color: #307b0c; color: #307b0d; color: #307b0e; color: #307b0f; | ||
125 | color: #307c00; color: #307c01; color: #307c02; color: #307c03; color: #307c04; color: #307c05; color: #307c06; color: #307c07; color: #307c08; color: #307c09; color: #307c0a; color: #307c0b; color: #307c0c; color: #307c0d; color: #307c0e; color: #307c0f; | ||
126 | color: #307d00; color: #307d01; color: #307d02; color: #307d03; color: #307d04; color: #307d05; color: #307d06; color: #307d07; color: #307d08; color: #307d09; color: #307d0a; color: #307d0b; color: #307d0c; color: #307d0d; color: #307d0e; color: #307d0f; | ||
127 | color: #307e00; color: #307e01; color: #307e02; color: #307e03; color: #307e04; color: #307e05; color: #307e06; color: #307e07; color: #307e08; color: #307e09; color: #307e0a; color: #307e0b; color: #307e0c; color: #307e0d; color: #307e0e; color: #307e0f; | ||
128 | color: #307f00; color: #307f01; color: #307f02; color: #307f03; color: #307f04; color: #307f05; color: #307f06; color: #307f07; color: #307f08; color: #307f09; color: #307f0a; color: #307f0b; color: #307f0c; color: #307f0d; color: #307f0e; color: #307f0f; | ||
129 | color: #308000; color: #308001; color: #308002; color: #308003; color: #308004; color: #308005; color: #308006; color: #308007; color: #308008; color: #308009; color: #30800a; color: #30800b; color: #30800c; color: #30800d; color: #30800e; color: #30800f; | ||
130 | color: #308100; color: #308101; color: #308102; color: #308103; color: #308104; color: #308105; color: #308106; color: #308107; color: #308108; color: #308109; color: #30810a; color: #30810b; color: #30810c; color: #30810d; color: #30810e; color: #30810f; | ||
131 | color: #308200; color: #308201; color: #308202; color: #308203; color: #308204; color: #308205; color: #308206; color: #308207; color: #308208; color: #308209; color: #30820a; color: #30820b; color: #30820c; color: #30820d; color: #30820e; color: #30820f; | ||
132 | color: #308300; color: #308301; color: #308302; color: #308303; color: #308304; color: #308305; color: #308306; color: #308307; color: #308308; color: #308309; color: #30830a; color: #30830b; color: #30830c; color: #30830d; color: #30830e; color: #30830f; | ||
133 | color: #308400; color: #308401; color: #308402; color: #308403; color: #308404; color: #308405; color: #308406; color: #308407; color: #308408; color: #308409; color: #30840a; color: #30840b; color: #30840c; color: #30840d; color: #30840e; color: #30840f; | ||
134 | color: #308500; color: #308501; color: #308502; color: #308503; color: #308504; color: #308505; color: #308506; color: #308507; color: #308508; color: #308509; color: #30850a; color: #30850b; color: #30850c; color: #30850d; color: #30850e; color: #30850f; | ||
135 | color: #308600; color: #308601; color: #308602; color: #308603; color: #308604; color: #308605; color: #308606; color: #308607; color: #308608; color: #308609; color: #30860a; color: #30860b; color: #30860c; color: #30860d; color: #30860e; color: #30860f; | ||
136 | color: #308700; color: #308701; color: #308702; color: #308703; color: #308704; color: #308705; color: #308706; color: #308707; color: #308708; color: #308709; color: #30870a; color: #30870b; color: #30870c; color: #30870d; color: #30870e; color: #30870f; | ||
137 | color: #308800; color: #308801; color: #308802; color: #308803; color: #308804; color: #308805; color: #308806; color: #308807; color: #308808; color: #308809; color: #30880a; color: #30880b; color: #30880c; color: #30880d; color: #30880e; color: #30880f; | ||
138 | color: #308900; color: #308901; color: #308902; color: #308903; color: #308904; color: #308905; color: #308906; color: #308907; color: #308908; color: #308909; color: #30890a; color: #30890b; color: #30890c; color: #30890d; color: #30890e; color: #30890f; | ||
139 | color: #308a00; color: #308a01; color: #308a02; color: #308a03; color: #308a04; color: #308a05; color: #308a06; color: #308a07; color: #308a08; color: #308a09; color: #308a0a; color: #308a0b; color: #308a0c; color: #308a0d; color: #308a0e; color: #308a0f; | ||
140 | color: #308b00; color: #308b01; color: #308b02; color: #308b03; color: #308b04; color: #308b05; color: #308b06; color: #308b07; color: #308b08; color: #308b09; color: #308b0a; color: #308b0b; color: #308b0c; color: #308b0d; color: #308b0e; color: #308b0f; | ||
141 | color: #308c00; color: #308c01; color: #308c02; color: #308c03; color: #308c04; color: #308c05; color: #308c06; color: #308c07; color: #308c08; color: #308c09; color: #308c0a; color: #308c0b; color: #308c0c; color: #308c0d; color: #308c0e; color: #308c0f; | ||
142 | color: #308d00; color: #308d01; color: #308d02; color: #308d03; color: #308d04; color: #308d05; color: #308d06; color: #308d07; color: #308d08; color: #308d09; color: #308d0a; color: #308d0b; color: #308d0c; color: #308d0d; color: #308d0e; color: #308d0f; | ||
143 | color: #308e00; color: #308e01; color: #308e02; color: #308e03; color: #308e04; color: #308e05; color: #308e06; color: #308e07; color: #308e08; color: #308e09; color: #308e0a; color: #308e0b; color: #308e0c; color: #308e0d; color: #308e0e; color: #308e0f; | ||
144 | color: #308f00; color: #308f01; color: #308f02; color: #308f03; color: #308f04; color: #308f05; color: #308f06; color: #308f07; color: #308f08; color: #308f09; color: #308f0a; color: #308f0b; color: #308f0c; color: #308f0d; color: #308f0e; color: #308f0f; | ||
145 | color: #309000; color: #309001; color: #309002; color: #309003; color: #309004; color: #309005; color: #309006; color: #309007; color: #309008; color: #309009; color: #30900a; color: #30900b; color: #30900c; color: #30900d; color: #30900e; color: #30900f; | ||
146 | color: #309100; color: #309101; color: #309102; color: #309103; color: #309104; color: #309105; color: #309106; color: #309107; color: #309108; color: #309109; color: #30910a; color: #30910b; color: #30910c; color: #30910d; color: #30910e; color: #30910f; | ||
147 | color: #309200; color: #309201; color: #309202; color: #309203; color: #309204; color: #309205; color: #309206; color: #309207; color: #309208; color: #309209; color: #30920a; color: #30920b; color: #30920c; color: #30920d; color: #30920e; color: #30920f; | ||
148 | color: #309300; color: #309301; color: #309302; color: #309303; color: #309304; color: #309305; color: #309306; color: #309307; color: #309308; color: #309309; color: #30930a; color: #30930b; color: #30930c; color: #30930d; color: #30930e; color: #30930f; | ||
149 | color: #309400; color: #309401; color: #309402; color: #309403; color: #309404; color: #309405; color: #309406; color: #309407; color: #309408; color: #309409; color: #30940a; color: #30940b; color: #30940c; color: #30940d; color: #30940e; color: #30940f; | ||
150 | color: #309500; color: #309501; color: #309502; color: #309503; color: #309504; color: #309505; color: #309506; color: #309507; color: #309508; color: #309509; color: #30950a; color: #30950b; color: #30950c; color: #30950d; color: #30950e; color: #30950f; | ||
151 | color: #309600; color: #309601; color: #309602; color: #309603; color: #309604; color: #309605; color: #309606; color: #309607; color: #309608; color: #309609; color: #30960a; color: #30960b; color: #30960c; color: #30960d; color: #30960e; color: #30960f; | ||
152 | color: #309700; color: #309701; color: #309702; color: #309703; color: #309704; color: #309705; color: #309706; color: #309707; color: #309708; color: #309709; color: #30970a; color: #30970b; color: #30970c; color: #30970d; color: #30970e; color: #30970f; | ||
153 | color: #309800; color: #309801; color: #309802; color: #309803; color: #309804; color: #309805; color: #309806; color: #309807; color: #309808; color: #309809; color: #30980a; color: #30980b; color: #30980c; color: #30980d; color: #30980e; color: #30980f; | ||
154 | color: #309900; color: #309901; color: #309902; color: #309903; color: #309904; color: #309905; color: #309906; color: #309907; color: #309908; color: #309909; color: #30990a; color: #30990b; color: #30990c; color: #30990d; color: #30990e; color: #30990f; | ||
155 | color: #309a00; color: #309a01; color: #309a02; color: #309a03; color: #309a04; color: #309a05; color: #309a06; color: #309a07; color: #309a08; color: #309a09; color: #309a0a; color: #309a0b; color: #309a0c; color: #309a0d; color: #309a0e; color: #309a0f; | ||
156 | color: #309b00; color: #309b01; color: #309b02; color: #309b03; color: #309b04; color: #309b05; color: #309b06; color: #309b07; color: #309b08; color: #309b09; color: #309b0a; color: #309b0b; color: #309b0c; color: #309b0d; color: #309b0e; color: #309b0f; | ||
157 | color: #309c00; color: #309c01; color: #309c02; color: #309c03; color: #309c04; color: #309c05; color: #309c06; color: #309c07; color: #309c08; color: #309c09; color: #309c0a; color: #309c0b; color: #309c0c; color: #309c0d; color: #309c0e; color: #309c0f; | ||
158 | color: #309d00; color: #309d01; color: #309d02; color: #309d03; color: #309d04; color: #309d05; color: #309d06; color: #309d07; color: #309d08; color: #309d09; color: #309d0a; color: #309d0b; color: #309d0c; color: #309d0d; color: #309d0e; color: #309d0f; | ||
159 | color: #309e00; color: #309e01; color: #309e02; color: #309e03; color: #309e04; color: #309e05; color: #309e06; color: #309e07; color: #309e08; color: #309e09; color: #309e0a; color: #309e0b; color: #309e0c; color: #309e0d; color: #309e0e; color: #309e0f; | ||
160 | color: #309f00; color: #309f01; color: #309f02; color: #309f03; color: #309f04; color: #309f05; color: #309f06; color: #309f07; color: #309f08; color: #309f09; color: #309f0a; color: #309f0b; color: #309f0c; color: #309f0d; color: #309f0e; color: #309f0f; | ||
161 | color: #30a000; color: #30a001; color: #30a002; color: #30a003; color: #30a004; color: #30a005; color: #30a006; color: #30a007; color: #30a008; color: #30a009; color: #30a00a; color: #30a00b; color: #30a00c; color: #30a00d; color: #30a00e; color: #30a00f; | ||
162 | color: #30a100; color: #30a101; color: #30a102; color: #30a103; color: #30a104; color: #30a105; color: #30a106; color: #30a107; color: #30a108; color: #30a109; color: #30a10a; color: #30a10b; color: #30a10c; color: #30a10d; color: #30a10e; color: #30a10f; | ||
163 | color: #30a200; color: #30a201; color: #30a202; color: #30a203; color: #30a204; color: #30a205; color: #30a206; color: #30a207; color: #30a208; color: #30a209; color: #30a20a; color: #30a20b; color: #30a20c; color: #30a20d; color: #30a20e; color: #30a20f; | ||
164 | color: #30a300; color: #30a301; color: #30a302; color: #30a303; color: #30a304; color: #30a305; color: #30a306; color: #30a307; color: #30a308; color: #30a309; color: #30a30a; color: #30a30b; color: #30a30c; color: #30a30d; color: #30a30e; color: #30a30f; | ||
165 | color: #30a400; color: #30a401; color: #30a402; color: #30a403; color: #30a404; color: #30a405; color: #30a406; color: #30a407; color: #30a408; color: #30a409; color: #30a40a; color: #30a40b; color: #30a40c; color: #30a40d; color: #30a40e; color: #30a40f; | ||
166 | color: #30a500; color: #30a501; color: #30a502; color: #30a503; color: #30a504; color: #30a505; color: #30a506; color: #30a507; color: #30a508; color: #30a509; color: #30a50a; color: #30a50b; color: #30a50c; color: #30a50d; color: #30a50e; color: #30a50f; | ||
167 | color: #30a600; color: #30a601; color: #30a602; color: #30a603; color: #30a604; color: #30a605; color: #30a606; color: #30a607; color: #30a608; color: #30a609; color: #30a60a; color: #30a60b; color: #30a60c; color: #30a60d; color: #30a60e; color: #30a60f; | ||
168 | color: #30a700; color: #30a701; color: #30a702; color: #30a703; color: #30a704; color: #30a705; color: #30a706; color: #30a707; color: #30a708; color: #30a709; color: #30a70a; color: #30a70b; color: #30a70c; color: #30a70d; color: #30a70e; color: #30a70f; | ||
169 | color: #30a800; color: #30a801; color: #30a802; color: #30a803; color: #30a804; color: #30a805; color: #30a806; color: #30a807; color: #30a808; color: #30a809; color: #30a80a; color: #30a80b; color: #30a80c; color: #30a80d; color: #30a80e; color: #30a80f; | ||
170 | color: #30a900; color: #30a901; color: #30a902; color: #30a903; color: #30a904; color: #30a905; color: #30a906; color: #30a907; color: #30a908; color: #30a909; color: #30a90a; color: #30a90b; color: #30a90c; color: #30a90d; color: #30a90e; color: #30a90f; | ||
171 | color: #30aa00; color: #30aa01; color: #30aa02; color: #30aa03; color: #30aa04; color: #30aa05; color: #30aa06; color: #30aa07; color: #30aa08; color: #30aa09; color: #30aa0a; color: #30aa0b; color: #30aa0c; color: #30aa0d; color: #30aa0e; color: #30aa0f; | ||
172 | color: #30ab00; color: #30ab01; color: #30ab02; color: #30ab03; color: #30ab04; color: #30ab05; color: #30ab06; color: #30ab07; color: #30ab08; color: #30ab09; color: #30ab0a; color: #30ab0b; color: #30ab0c; color: #30ab0d; color: #30ab0e; color: #30ab0f; | ||
173 | color: #30ac00; color: #30ac01; color: #30ac02; color: #30ac03; color: #30ac04; color: #30ac05; color: #30ac06; color: #30ac07; color: #30ac08; color: #30ac09; color: #30ac0a; color: #30ac0b; color: #30ac0c; color: #30ac0d; color: #30ac0e; color: #30ac0f; | ||
174 | color: #30ad00; color: #30ad01; color: #30ad02; color: #30ad03; color: #30ad04; color: #30ad05; color: #30ad06; color: #30ad07; color: #30ad08; color: #30ad09; color: #30ad0a; color: #30ad0b; color: #30ad0c; color: #30ad0d; color: #30ad0e; color: #30ad0f; | ||
175 | color: #30ae00; color: #30ae01; color: #30ae02; color: #30ae03; color: #30ae04; color: #30ae05; color: #30ae06; color: #30ae07; color: #30ae08; color: #30ae09; color: #30ae0a; color: #30ae0b; color: #30ae0c; color: #30ae0d; color: #30ae0e; color: #30ae0f; | ||
176 | color: #30af00; color: #30af01; color: #30af02; color: #30af03; color: #30af04; color: #30af05; color: #30af06; color: #30af07; color: #30af08; color: #30af09; color: #30af0a; color: #30af0b; color: #30af0c; color: #30af0d; color: #30af0e; color: #30af0f; | ||
177 | color: #30b000; color: #30b001; color: #30b002; color: #30b003; color: #30b004; color: #30b005; color: #30b006; color: #30b007; color: #30b008; color: #30b009; color: #30b00a; color: #30b00b; color: #30b00c; color: #30b00d; color: #30b00e; color: #30b00f; | ||
178 | color: #30b100; color: #30b101; color: #30b102; color: #30b103; color: #30b104; color: #30b105; color: #30b106; color: #30b107; color: #30b108; color: #30b109; color: #30b10a; color: #30b10b; color: #30b10c; color: #30b10d; color: #30b10e; color: #30b10f; | ||
179 | color: #30b200; color: #30b201; color: #30b202; color: #30b203; color: #30b204; color: #30b205; color: #30b206; color: #30b207; color: #30b208; color: #30b209; color: #30b20a; color: #30b20b; color: #30b20c; color: #30b20d; color: #30b20e; color: #30b20f; | ||
180 | color: #30b300; color: #30b301; color: #30b302; color: #30b303; color: #30b304; color: #30b305; color: #30b306; color: #30b307; color: #30b308; color: #30b309; color: #30b30a; color: #30b30b; color: #30b30c; color: #30b30d; color: #30b30e; color: #30b30f; | ||
181 | color: #30b400; color: #30b401; color: #30b402; color: #30b403; color: #30b404; color: #30b405; color: #30b406; color: #30b407; color: #30b408; color: #30b409; color: #30b40a; color: #30b40b; color: #30b40c; color: #30b40d; color: #30b40e; color: #30b40f; | ||
182 | color: #30b500; color: #30b501; color: #30b502; color: #30b503; color: #30b504; color: #30b505; color: #30b506; color: #30b507; color: #30b508; color: #30b509; color: #30b50a; color: #30b50b; color: #30b50c; color: #30b50d; color: #30b50e; color: #30b50f; | ||
183 | color: #30b600; color: #30b601; color: #30b602; color: #30b603; color: #30b604; color: #30b605; color: #30b606; color: #30b607; color: #30b608; color: #30b609; color: #30b60a; color: #30b60b; color: #30b60c; color: #30b60d; color: #30b60e; color: #30b60f; | ||
184 | color: #30b700; color: #30b701; color: #30b702; color: #30b703; color: #30b704; color: #30b705; color: #30b706; color: #30b707; color: #30b708; color: #30b709; color: #30b70a; color: #30b70b; color: #30b70c; color: #30b70d; color: #30b70e; color: #30b70f; | ||
185 | color: #30b800; color: #30b801; color: #30b802; color: #30b803; color: #30b804; color: #30b805; color: #30b806; color: #30b807; color: #30b808; color: #30b809; color: #30b80a; color: #30b80b; color: #30b80c; color: #30b80d; color: #30b80e; color: #30b80f; | ||
186 | color: #30b900; color: #30b901; color: #30b902; color: #30b903; color: #30b904; color: #30b905; color: #30b906; color: #30b907; color: #30b908; color: #30b909; color: #30b90a; color: #30b90b; color: #30b90c; color: #30b90d; color: #30b90e; color: #30b90f; | ||
187 | color: #30ba00; color: #30ba01; color: #30ba02; color: #30ba03; color: #30ba04; color: #30ba05; color: #30ba06; color: #30ba07; color: #30ba08; color: #30ba09; color: #30ba0a; color: #30ba0b; color: #30ba0c; color: #30ba0d; color: #30ba0e; color: #30ba0f; | ||
188 | color: #30bb00; color: #30bb01; color: #30bb02; color: #30bb03; color: #30bb04; color: #30bb05; color: #30bb06; color: #30bb07; color: #30bb08; color: #30bb09; color: #30bb0a; color: #30bb0b; color: #30bb0c; color: #30bb0d; color: #30bb0e; color: #30bb0f; | ||
189 | color: #30bc00; color: #30bc01; color: #30bc02; color: #30bc03; color: #30bc04; color: #30bc05; color: #30bc06; color: #30bc07; color: #30bc08; color: #30bc09; color: #30bc0a; color: #30bc0b; color: #30bc0c; color: #30bc0d; color: #30bc0e; color: #30bc0f; | ||
190 | color: #30bd00; color: #30bd01; color: #30bd02; color: #30bd03; color: #30bd04; color: #30bd05; color: #30bd06; color: #30bd07; color: #30bd08; color: #30bd09; color: #30bd0a; color: #30bd0b; color: #30bd0c; color: #30bd0d; color: #30bd0e; color: #30bd0f; | ||
191 | color: #30be00; color: #30be01; color: #30be02; color: #30be03; color: #30be04; color: #30be05; color: #30be06; color: #30be07; color: #30be08; color: #30be09; color: #30be0a; color: #30be0b; color: #30be0c; color: #30be0d; color: #30be0e; color: #30be0f; | ||
192 | color: #30bf00; color: #30bf01; color: #30bf02; color: #30bf03; color: #30bf04; color: #30bf05; color: #30bf06; color: #30bf07; color: #30bf08; color: #30bf09; color: #30bf0a; color: #30bf0b; color: #30bf0c; color: #30bf0d; color: #30bf0e; color: #30bf0f; | ||
193 | color: #30c000; color: #30c001; color: #30c002; color: #30c003; color: #30c004; color: #30c005; color: #30c006; color: #30c007; color: #30c008; color: #30c009; color: #30c00a; color: #30c00b; color: #30c00c; color: #30c00d; color: #30c00e; color: #30c00f; | ||
194 | color: #30c100; color: #30c101; color: #30c102; color: #30c103; color: #30c104; color: #30c105; color: #30c106; color: #30c107; color: #30c108; color: #30c109; color: #30c10a; color: #30c10b; color: #30c10c; color: #30c10d; color: #30c10e; color: #30c10f; | ||
195 | color: #30c200; color: #30c201; color: #30c202; color: #30c203; color: #30c204; color: #30c205; color: #30c206; color: #30c207; color: #30c208; color: #30c209; color: #30c20a; color: #30c20b; color: #30c20c; color: #30c20d; color: #30c20e; color: #30c20f; | ||
196 | color: #30c300; color: #30c301; color: #30c302; color: #30c303; color: #30c304; color: #30c305; color: #30c306; color: #30c307; color: #30c308; color: #30c309; color: #30c30a; color: #30c30b; color: #30c30c; color: #30c30d; color: #30c30e; color: #30c30f; | ||
197 | color: #30c400; color: #30c401; color: #30c402; color: #30c403; color: #30c404; color: #30c405; color: #30c406; color: #30c407; color: #30c408; color: #30c409; color: #30c40a; color: #30c40b; color: #30c40c; color: #30c40d; color: #30c40e; color: #30c40f; | ||
198 | color: #30c500; color: #30c501; color: #30c502; color: #30c503; color: #30c504; color: #30c505; color: #30c506; color: #30c507; color: #30c508; color: #30c509; color: #30c50a; color: #30c50b; color: #30c50c; color: #30c50d; color: #30c50e; color: #30c50f; | ||
199 | color: #30c600; color: #30c601; color: #30c602; color: #30c603; color: #30c604; color: #30c605; color: #30c606; color: #30c607; color: #30c608; color: #30c609; color: #30c60a; color: #30c60b; color: #30c60c; color: #30c60d; color: #30c60e; color: #30c60f; | ||
200 | color: #30c700; color: #30c701; color: #30c702; color: #30c703; color: #30c704; color: #30c705; color: #30c706; color: #30c707; color: #30c708; color: #30c709; color: #30c70a; color: #30c70b; color: #30c70c; color: #30c70d; color: #30c70e; color: #30c70f; | ||
201 | color: #30c800; color: #30c801; color: #30c802; color: #30c803; color: #30c804; color: #30c805; color: #30c806; color: #30c807; color: #30c808; color: #30c809; color: #30c80a; color: #30c80b; color: #30c80c; color: #30c80d; color: #30c80e; color: #30c80f; | ||
202 | color: #30c900; color: #30c901; color: #30c902; color: #30c903; color: #30c904; color: #30c905; color: #30c906; color: #30c907; color: #30c908; color: #30c909; color: #30c90a; color: #30c90b; color: #30c90c; color: #30c90d; color: #30c90e; color: #30c90f; | ||
203 | color: #30ca00; color: #30ca01; color: #30ca02; color: #30ca03; color: #30ca04; color: #30ca05; color: #30ca06; color: #30ca07; color: #30ca08; color: #30ca09; color: #30ca0a; color: #30ca0b; color: #30ca0c; color: #30ca0d; color: #30ca0e; color: #30ca0f; | ||
204 | color: #30cb00; color: #30cb01; color: #30cb02; color: #30cb03; color: #30cb04; color: #30cb05; color: #30cb06; color: #30cb07; color: #30cb08; color: #30cb09; color: #30cb0a; color: #30cb0b; color: #30cb0c; color: #30cb0d; color: #30cb0e; color: #30cb0f; | ||
205 | color: #30cc00; color: #30cc01; color: #30cc02; color: #30cc03; color: #30cc04; color: #30cc05; color: #30cc06; color: #30cc07; color: #30cc08; color: #30cc09; color: #30cc0a; color: #30cc0b; color: #30cc0c; color: #30cc0d; color: #30cc0e; color: #30cc0f; | ||
206 | color: #30cd00; color: #30cd01; color: #30cd02; color: #30cd03; color: #30cd04; color: #30cd05; color: #30cd06; color: #30cd07; color: #30cd08; color: #30cd09; color: #30cd0a; color: #30cd0b; color: #30cd0c; color: #30cd0d; color: #30cd0e; color: #30cd0f; | ||
207 | color: #30ce00; color: #30ce01; color: #30ce02; color: #30ce03; color: #30ce04; color: #30ce05; color: #30ce06; color: #30ce07; color: #30ce08; color: #30ce09; color: #30ce0a; color: #30ce0b; color: #30ce0c; color: #30ce0d; color: #30ce0e; color: #30ce0f; | ||
208 | color: #30cf00; color: #30cf01; color: #30cf02; color: #30cf03; color: #30cf04; color: #30cf05; color: #30cf06; color: #30cf07; color: #30cf08; color: #30cf09; color: #30cf0a; color: #30cf0b; color: #30cf0c; color: #30cf0d; color: #30cf0e; color: #30cf0f; | ||
209 | color: #30d000; color: #30d001; color: #30d002; color: #30d003; color: #30d004; color: #30d005; color: #30d006; color: #30d007; color: #30d008; color: #30d009; color: #30d00a; color: #30d00b; color: #30d00c; color: #30d00d; color: #30d00e; color: #30d00f; | ||
210 | color: #30d100; color: #30d101; color: #30d102; color: #30d103; color: #30d104; color: #30d105; color: #30d106; color: #30d107; color: #30d108; color: #30d109; color: #30d10a; color: #30d10b; color: #30d10c; color: #30d10d; color: #30d10e; color: #30d10f; | ||
211 | color: #30d200; color: #30d201; color: #30d202; color: #30d203; color: #30d204; color: #30d205; color: #30d206; color: #30d207; color: #30d208; color: #30d209; color: #30d20a; color: #30d20b; color: #30d20c; color: #30d20d; color: #30d20e; color: #30d20f; | ||
212 | color: #30d300; color: #30d301; color: #30d302; color: #30d303; color: #30d304; color: #30d305; color: #30d306; color: #30d307; color: #30d308; color: #30d309; color: #30d30a; color: #30d30b; color: #30d30c; color: #30d30d; color: #30d30e; color: #30d30f; | ||
213 | color: #30d400; color: #30d401; color: #30d402; color: #30d403; color: #30d404; color: #30d405; color: #30d406; color: #30d407; color: #30d408; color: #30d409; color: #30d40a; color: #30d40b; color: #30d40c; color: #30d40d; color: #30d40e; color: #30d40f; | ||
214 | color: #30d500; color: #30d501; color: #30d502; color: #30d503; color: #30d504; color: #30d505; color: #30d506; color: #30d507; color: #30d508; color: #30d509; color: #30d50a; color: #30d50b; color: #30d50c; color: #30d50d; color: #30d50e; color: #30d50f; | ||
215 | color: #30d600; color: #30d601; color: #30d602; color: #30d603; color: #30d604; color: #30d605; color: #30d606; color: #30d607; color: #30d608; color: #30d609; color: #30d60a; color: #30d60b; color: #30d60c; color: #30d60d; color: #30d60e; color: #30d60f; | ||
216 | color: #30d700; color: #30d701; color: #30d702; color: #30d703; color: #30d704; color: #30d705; color: #30d706; color: #30d707; color: #30d708; color: #30d709; color: #30d70a; color: #30d70b; color: #30d70c; color: #30d70d; color: #30d70e; color: #30d70f; | ||
217 | color: #30d800; color: #30d801; color: #30d802; color: #30d803; color: #30d804; color: #30d805; color: #30d806; color: #30d807; color: #30d808; color: #30d809; color: #30d80a; color: #30d80b; color: #30d80c; color: #30d80d; color: #30d80e; color: #30d80f; | ||
218 | color: #30d900; color: #30d901; color: #30d902; color: #30d903; color: #30d904; color: #30d905; color: #30d906; color: #30d907; color: #30d908; color: #30d909; color: #30d90a; color: #30d90b; color: #30d90c; color: #30d90d; color: #30d90e; color: #30d90f; | ||
219 | color: #30da00; color: #30da01; color: #30da02; color: #30da03; color: #30da04; color: #30da05; color: #30da06; color: #30da07; color: #30da08; color: #30da09; color: #30da0a; color: #30da0b; color: #30da0c; color: #30da0d; color: #30da0e; color: #30da0f; | ||
220 | color: #30db00; color: #30db01; color: #30db02; color: #30db03; color: #30db04; color: #30db05; color: #30db06; color: #30db07; color: #30db08; color: #30db09; color: #30db0a; color: #30db0b; color: #30db0c; color: #30db0d; color: #30db0e; color: #30db0f; | ||
221 | color: #30dc00; color: #30dc01; color: #30dc02; color: #30dc03; color: #30dc04; color: #30dc05; color: #30dc06; color: #30dc07; color: #30dc08; color: #30dc09; color: #30dc0a; color: #30dc0b; color: #30dc0c; color: #30dc0d; color: #30dc0e; color: #30dc0f; | ||
222 | color: #30dd00; color: #30dd01; color: #30dd02; color: #30dd03; color: #30dd04; color: #30dd05; color: #30dd06; color: #30dd07; color: #30dd08; color: #30dd09; color: #30dd0a; color: #30dd0b; color: #30dd0c; color: #30dd0d; color: #30dd0e; color: #30dd0f; | ||
223 | color: #30de00; color: #30de01; color: #30de02; color: #30de03; color: #30de04; color: #30de05; color: #30de06; color: #30de07; color: #30de08; color: #30de09; color: #30de0a; color: #30de0b; color: #30de0c; color: #30de0d; color: #30de0e; color: #30de0f; | ||
224 | color: #30df00; color: #30df01; color: #30df02; color: #30df03; color: #30df04; color: #30df05; color: #30df06; color: #30df07; color: #30df08; color: #30df09; color: #30df0a; color: #30df0b; color: #30df0c; color: #30df0d; color: #30df0e; color: #30df0f; | ||
225 | color: #30e000; color: #30e001; color: #30e002; color: #30e003; color: #30e004; color: #30e005; color: #30e006; color: #30e007; color: #30e008; color: #30e009; color: #30e00a; color: #30e00b; color: #30e00c; color: #30e00d; color: #30e00e; color: #30e00f; | ||
226 | color: #30e100; color: #30e101; color: #30e102; color: #30e103; color: #30e104; color: #30e105; color: #30e106; color: #30e107; color: #30e108; color: #30e109; color: #30e10a; color: #30e10b; color: #30e10c; color: #30e10d; color: #30e10e; color: #30e10f; | ||
227 | color: #30e200; color: #30e201; color: #30e202; color: #30e203; color: #30e204; color: #30e205; color: #30e206; color: #30e207; color: #30e208; color: #30e209; color: #30e20a; color: #30e20b; color: #30e20c; color: #30e20d; color: #30e20e; color: #30e20f; | ||
228 | color: #30e300; color: #30e301; color: #30e302; color: #30e303; color: #30e304; color: #30e305; color: #30e306; color: #30e307; color: #30e308; color: #30e309; color: #30e30a; color: #30e30b; color: #30e30c; color: #30e30d; color: #30e30e; color: #30e30f; | ||
229 | color: #30e400; color: #30e401; color: #30e402; color: #30e403; color: #30e404; color: #30e405; color: #30e406; color: #30e407; color: #30e408; color: #30e409; color: #30e40a; color: #30e40b; color: #30e40c; color: #30e40d; color: #30e40e; color: #30e40f; | ||
230 | color: #30e500; color: #30e501; color: #30e502; color: #30e503; color: #30e504; color: #30e505; color: #30e506; color: #30e507; color: #30e508; color: #30e509; color: #30e50a; color: #30e50b; color: #30e50c; color: #30e50d; color: #30e50e; color: #30e50f; | ||
231 | color: #30e600; color: #30e601; color: #30e602; color: #30e603; color: #30e604; color: #30e605; color: #30e606; color: #30e607; color: #30e608; color: #30e609; color: #30e60a; color: #30e60b; color: #30e60c; color: #30e60d; color: #30e60e; color: #30e60f; | ||
232 | color: #30e700; color: #30e701; color: #30e702; color: #30e703; color: #30e704; color: #30e705; color: #30e706; color: #30e707; color: #30e708; color: #30e709; color: #30e70a; color: #30e70b; color: #30e70c; color: #30e70d; color: #30e70e; color: #30e70f; | ||
233 | color: #30e800; color: #30e801; color: #30e802; color: #30e803; color: #30e804; color: #30e805; color: #30e806; color: #30e807; color: #30e808; color: #30e809; color: #30e80a; color: #30e80b; color: #30e80c; color: #30e80d; color: #30e80e; color: #30e80f; | ||
234 | color: #30e900; color: #30e901; color: #30e902; color: #30e903; color: #30e904; color: #30e905; color: #30e906; color: #30e907; color: #30e908; color: #30e909; color: #30e90a; color: #30e90b; color: #30e90c; color: #30e90d; color: #30e90e; color: #30e90f; | ||
235 | color: #30ea00; color: #30ea01; color: #30ea02; color: #30ea03; color: #30ea04; color: #30ea05; color: #30ea06; color: #30ea07; color: #30ea08; color: #30ea09; color: #30ea0a; color: #30ea0b; color: #30ea0c; color: #30ea0d; color: #30ea0e; color: #30ea0f; | ||
236 | color: #30eb00; color: #30eb01; color: #30eb02; color: #30eb03; color: #30eb04; color: #30eb05; color: #30eb06; color: #30eb07; color: #30eb08; color: #30eb09; color: #30eb0a; color: #30eb0b; color: #30eb0c; color: #30eb0d; color: #30eb0e; color: #30eb0f; | ||
237 | color: #30ec00; color: #30ec01; color: #30ec02; color: #30ec03; color: #30ec04; color: #30ec05; color: #30ec06; color: #30ec07; color: #30ec08; color: #30ec09; color: #30ec0a; color: #30ec0b; color: #30ec0c; color: #30ec0d; color: #30ec0e; color: #30ec0f; | ||
238 | color: #30ed00; color: #30ed01; color: #30ed02; color: #30ed03; color: #30ed04; color: #30ed05; color: #30ed06; color: #30ed07; color: #30ed08; color: #30ed09; color: #30ed0a; color: #30ed0b; color: #30ed0c; color: #30ed0d; color: #30ed0e; color: #30ed0f; | ||
239 | color: #30ee00; color: #30ee01; color: #30ee02; color: #30ee03; color: #30ee04; color: #30ee05; color: #30ee06; color: #30ee07; color: #30ee08; color: #30ee09; color: #30ee0a; color: #30ee0b; color: #30ee0c; color: #30ee0d; color: #30ee0e; color: #30ee0f; | ||
240 | color: #30ef00; color: #30ef01; color: #30ef02; color: #30ef03; color: #30ef04; color: #30ef05; color: #30ef06; color: #30ef07; color: #30ef08; color: #30ef09; color: #30ef0a; color: #30ef0b; color: #30ef0c; color: #30ef0d; color: #30ef0e; color: #30ef0f; | ||
241 | color: #30f000; color: #30f001; color: #30f002; color: #30f003; color: #30f004; color: #30f005; color: #30f006; color: #30f007; color: #30f008; color: #30f009; color: #30f00a; color: #30f00b; color: #30f00c; color: #30f00d; color: #30f00e; color: #30f00f; | ||
242 | color: #30f100; color: #30f101; color: #30f102; color: #30f103; color: #30f104; color: #30f105; color: #30f106; color: #30f107; color: #30f108; color: #30f109; color: #30f10a; color: #30f10b; color: #30f10c; color: #30f10d; color: #30f10e; color: #30f10f; | ||
243 | color: #30f200; color: #30f201; color: #30f202; color: #30f203; color: #30f204; color: #30f205; color: #30f206; color: #30f207; color: #30f208; color: #30f209; color: #30f20a; color: #30f20b; color: #30f20c; color: #30f20d; color: #30f20e; color: #30f20f; | ||
244 | color: #30f300; color: #30f301; color: #30f302; color: #30f303; color: #30f304; color: #30f305; color: #30f306; color: #30f307; color: #30f308; color: #30f309; color: #30f30a; color: #30f30b; color: #30f30c; color: #30f30d; color: #30f30e; color: #30f30f; | ||
245 | color: #30f400; color: #30f401; color: #30f402; color: #30f403; color: #30f404; color: #30f405; color: #30f406; color: #30f407; color: #30f408; color: #30f409; color: #30f40a; color: #30f40b; color: #30f40c; color: #30f40d; color: #30f40e; color: #30f40f; | ||
246 | color: #30f500; color: #30f501; color: #30f502; color: #30f503; color: #30f504; color: #30f505; color: #30f506; color: #30f507; color: #30f508; color: #30f509; color: #30f50a; color: #30f50b; color: #30f50c; color: #30f50d; color: #30f50e; color: #30f50f; | ||
247 | color: #30f600; color: #30f601; color: #30f602; color: #30f603; color: #30f604; color: #30f605; color: #30f606; color: #30f607; color: #30f608; color: #30f609; color: #30f60a; color: #30f60b; color: #30f60c; color: #30f60d; color: #30f60e; color: #30f60f; | ||
248 | color: #30f700; color: #30f701; color: #30f702; color: #30f703; color: #30f704; color: #30f705; color: #30f706; color: #30f707; color: #30f708; color: #30f709; color: #30f70a; color: #30f70b; color: #30f70c; color: #30f70d; color: #30f70e; color: #30f70f; | ||
249 | color: #30f800; color: #30f801; color: #30f802; color: #30f803; color: #30f804; color: #30f805; color: #30f806; color: #30f807; color: #30f808; color: #30f809; color: #30f80a; color: #30f80b; color: #30f80c; color: #30f80d; color: #30f80e; color: #30f80f; | ||
250 | color: #30f900; color: #30f901; color: #30f902; color: #30f903; color: #30f904; color: #30f905; color: #30f906; color: #30f907; color: #30f908; color: #30f909; color: #30f90a; color: #30f90b; color: #30f90c; color: #30f90d; color: #30f90e; color: #30f90f; | ||
251 | color: #30fa00; color: #30fa01; color: #30fa02; color: #30fa03; color: #30fa04; color: #30fa05; color: #30fa06; color: #30fa07; color: #30fa08; color: #30fa09; color: #30fa0a; color: #30fa0b; color: #30fa0c; color: #30fa0d; color: #30fa0e; color: #30fa0f; | ||
252 | color: #30fb00; color: #30fb01; color: #30fb02; color: #30fb03; color: #30fb04; color: #30fb05; color: #30fb06; color: #30fb07; color: #30fb08; color: #30fb09; color: #30fb0a; color: #30fb0b; color: #30fb0c; color: #30fb0d; color: #30fb0e; color: #30fb0f; | ||
253 | color: #30fc00; color: #30fc01; color: #30fc02; color: #30fc03; color: #30fc04; color: #30fc05; color: #30fc06; color: #30fc07; color: #30fc08; color: #30fc09; color: #30fc0a; color: #30fc0b; color: #30fc0c; color: #30fc0d; color: #30fc0e; color: #30fc0f; | ||
254 | color: #30fd00; color: #30fd01; color: #30fd02; color: #30fd03; color: #30fd04; color: #30fd05; color: #30fd06; color: #30fd07; color: #30fd08; color: #30fd09; color: #30fd0a; color: #30fd0b; color: #30fd0c; color: #30fd0d; color: #30fd0e; color: #30fd0f; | ||
255 | color: #30fe00; color: #30fe01; color: #30fe02; color: #30fe03; color: #30fe04; color: #30fe05; color: #30fe06; color: #30fe07; color: #30fe08; color: #30fe09; color: #30fe0a; color: #30fe0b; color: #30fe0c; color: #30fe0d; color: #30fe0e; color: #30fe0f; | ||
256 | color: #30ff00; color: #30ff01; color: #30ff02; color: #30ff03; color: #30ff04; color: #30ff05; color: #30ff06; color: #30ff07; color: #30ff08; color: #30ff09; color: #30ff0a; color: #30ff0b; color: #30ff0c; color: #30ff0d; color: #30ff0e; color: #30ff0f; } | ||
diff --git a/.vim/pack/default/start/gruvbox/autoload/airline/themes/gruvbox.vim b/.vim/pack/default/start/gruvbox/autoload/airline/themes/gruvbox.vim new file mode 100644 index 0000000..6862a81 --- /dev/null +++ b/.vim/pack/default/start/gruvbox/autoload/airline/themes/gruvbox.vim | |||
@@ -0,0 +1,79 @@ | |||
1 | " ----------------------------------------------------------------------------- | ||
2 | " File: gruvbox.vim | ||
3 | " Description: Retro groove color scheme for Airline | ||
4 | " Author: morhetz <morhetz@gmail.com> | ||
5 | " Source: https://github.com/morhetz/gruvbox | ||
6 | " Last Modified: 12 Aug 2017 | ||
7 | " ----------------------------------------------------------------------------- | ||
8 | |||
9 | let g:airline#themes#gruvbox#palette = {} | ||
10 | |||
11 | function! airline#themes#gruvbox#refresh() | ||
12 | |||
13 | let M0 = airline#themes#get_highlight('Identifier') | ||
14 | let accents_group = airline#themes#get_highlight('Special') | ||
15 | let modified_group = [M0[0], '', M0[2], '', ''] | ||
16 | let warning_group = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg']) | ||
17 | let error_group = airline#themes#get_highlight2(['Normal', 'bg'], ['WarningMsg', 'fg']) | ||
18 | |||
19 | let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['StatusLineNC', 'bg']) | ||
20 | let s:N2 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['Pmenu', 'bg']) | ||
21 | let s:N3 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['CursorLine', 'bg']) | ||
22 | let g:airline#themes#gruvbox#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) | ||
23 | let g:airline#themes#gruvbox#palette.normal_modified = { 'airline_c': modified_group } | ||
24 | let g:airline#themes#gruvbox#palette.normal.airline_warning = warning_group | ||
25 | let g:airline#themes#gruvbox#palette.normal_modified.airline_warning = warning_group | ||
26 | let g:airline#themes#gruvbox#palette.normal.airline_error = error_group | ||
27 | let g:airline#themes#gruvbox#palette.normal_modified.airline_error = error_group | ||
28 | |||
29 | let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Identifier', 'fg']) | ||
30 | let s:I2 = s:N2 | ||
31 | let s:I3 = airline#themes#get_highlight2(['Normal', 'fg'], ['Pmenu', 'bg']) | ||
32 | let g:airline#themes#gruvbox#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) | ||
33 | let g:airline#themes#gruvbox#palette.insert_modified = g:airline#themes#gruvbox#palette.normal_modified | ||
34 | let g:airline#themes#gruvbox#palette.insert.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning | ||
35 | let g:airline#themes#gruvbox#palette.insert_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning | ||
36 | let g:airline#themes#gruvbox#palette.insert.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error | ||
37 | let g:airline#themes#gruvbox#palette.insert_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error | ||
38 | |||
39 | let s:R1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Structure', 'fg']) | ||
40 | let s:R2 = s:I2 | ||
41 | let s:R3 = s:I3 | ||
42 | let g:airline#themes#gruvbox#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) | ||
43 | let g:airline#themes#gruvbox#palette.replace_modified = g:airline#themes#gruvbox#palette.normal_modified | ||
44 | let g:airline#themes#gruvbox#palette.replace.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning | ||
45 | let g:airline#themes#gruvbox#palette.replace_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning | ||
46 | let g:airline#themes#gruvbox#palette.replace.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error | ||
47 | let g:airline#themes#gruvbox#palette.replace_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error | ||
48 | |||
49 | let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg']) | ||
50 | let s:V2 = s:N2 | ||
51 | let s:V3 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLine', 'fg']) | ||
52 | let g:airline#themes#gruvbox#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) | ||
53 | let g:airline#themes#gruvbox#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] } | ||
54 | let g:airline#themes#gruvbox#palette.visual.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning | ||
55 | let g:airline#themes#gruvbox#palette.visual_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning | ||
56 | let g:airline#themes#gruvbox#palette.visual.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error | ||
57 | let g:airline#themes#gruvbox#palette.visual_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error | ||
58 | |||
59 | let s:IA = airline#themes#get_highlight2(['TabLine', 'fg'], ['CursorLine', 'bg']) | ||
60 | let g:airline#themes#gruvbox#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) | ||
61 | let g:airline#themes#gruvbox#palette.inactive_modified = { 'airline_c': modified_group } | ||
62 | |||
63 | let g:airline#themes#gruvbox#palette.accents = { 'red': accents_group } | ||
64 | |||
65 | let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg']) | ||
66 | let g:airline#themes#gruvbox#palette.tabline = { | ||
67 | \ 'airline_tab': s:N2, | ||
68 | \ 'airline_tabsel': s:N1, | ||
69 | \ 'airline_tabtype': s:V1, | ||
70 | \ 'airline_tabfill': s:TF, | ||
71 | \ 'airline_tabhid': s:IA, | ||
72 | \ 'airline_tabmod': s:I1 | ||
73 | \ } | ||
74 | |||
75 | endfunction | ||
76 | |||
77 | call airline#themes#gruvbox#refresh() | ||
78 | |||
79 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: | ||
diff --git a/.vim/pack/default/start/gruvbox/autoload/gruvbox.vim b/.vim/pack/default/start/gruvbox/autoload/gruvbox.vim new file mode 100644 index 0000000..44bec6e --- /dev/null +++ b/.vim/pack/default/start/gruvbox/autoload/gruvbox.vim | |||
@@ -0,0 +1,41 @@ | |||
1 | " ----------------------------------------------------------------------------- | ||
2 | " File: gruvbox.vim | ||
3 | " Description: Retro groove color scheme for Vim | ||
4 | " Author: morhetz <morhetz@gmail.com> | ||
5 | " Source: https://github.com/morhetz/gruvbox | ||
6 | " Last Modified: 09 Apr 2014 | ||
7 | " ----------------------------------------------------------------------------- | ||
8 | |||
9 | function! gruvbox#invert_signs_toggle() | ||
10 | if g:gruvbox_invert_signs == 0 | ||
11 | let g:gruvbox_invert_signs=1 | ||
12 | else | ||
13 | let g:gruvbox_invert_signs=0 | ||
14 | endif | ||
15 | |||
16 | colorscheme gruvbox | ||
17 | endfunction | ||
18 | |||
19 | " Search Highlighting {{{ | ||
20 | |||
21 | function! gruvbox#hls_show() | ||
22 | set hlsearch | ||
23 | call GruvboxHlsShowCursor() | ||
24 | endfunction | ||
25 | |||
26 | function! gruvbox#hls_hide() | ||
27 | set nohlsearch | ||
28 | call GruvboxHlsHideCursor() | ||
29 | endfunction | ||
30 | |||
31 | function! gruvbox#hls_toggle() | ||
32 | if &hlsearch | ||
33 | call gruvbox#hls_hide() | ||
34 | else | ||
35 | call gruvbox#hls_show() | ||
36 | endif | ||
37 | endfunction | ||
38 | |||
39 | " }}} | ||
40 | |||
41 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: | ||
diff --git a/.vim/pack/default/start/gruvbox/autoload/lightline/colorscheme/gruvbox.vim b/.vim/pack/default/start/gruvbox/autoload/lightline/colorscheme/gruvbox.vim new file mode 100644 index 0000000..4730c09 --- /dev/null +++ b/.vim/pack/default/start/gruvbox/autoload/lightline/colorscheme/gruvbox.vim | |||
@@ -0,0 +1,57 @@ | |||
1 | " ----------------------------------------------------------------------------- | ||
2 | " File: gruvbox.vim | ||
3 | " Description: Gruvbox colorscheme for Lightline (itchyny/lightline.vim) | ||
4 | " Author: gmoe <me@griffinmoe.com> | ||
5 | " Source: https://github.com/morhetz/gruvbox | ||
6 | " Last Modified: 20 Sep 2017 | ||
7 | " ----------------------------------------------------------------------------- | ||
8 | |||
9 | function! s:getGruvColor(group) | ||
10 | let guiColor = synIDattr(hlID(a:group), "fg", "gui") | ||
11 | let termColor = synIDattr(hlID(a:group), "fg", "cterm") | ||
12 | return [ guiColor, termColor ] | ||
13 | endfunction | ||
14 | |||
15 | if exists('g:lightline') | ||
16 | |||
17 | let s:bg0 = s:getGruvColor('GruvboxBg0') | ||
18 | let s:bg1 = s:getGruvColor('GruvboxBg1') | ||
19 | let s:bg2 = s:getGruvColor('GruvboxBg2') | ||
20 | let s:bg4 = s:getGruvColor('GruvboxBg4') | ||
21 | let s:fg1 = s:getGruvColor('GruvboxFg1') | ||
22 | let s:fg4 = s:getGruvColor('GruvboxFg4') | ||
23 | |||
24 | let s:yellow = s:getGruvColor('GruvboxYellow') | ||
25 | let s:blue = s:getGruvColor('GruvboxBlue') | ||
26 | let s:aqua = s:getGruvColor('GruvboxAqua') | ||
27 | let s:orange = s:getGruvColor('GruvboxOrange') | ||
28 | let s:green = s:getGruvColor('GruvboxGreen') | ||
29 | |||
30 | let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}, 'terminal':{}} | ||
31 | let s:p.normal.left = [ [ s:bg0, s:fg4, 'bold' ], [ s:fg4, s:bg2 ] ] | ||
32 | let s:p.normal.right = [ [ s:bg0, s:fg4 ], [ s:fg4, s:bg2 ] ] | ||
33 | let s:p.normal.middle = [ [ s:fg4, s:bg1 ] ] | ||
34 | let s:p.inactive.right = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] | ||
35 | let s:p.inactive.left = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] | ||
36 | let s:p.inactive.middle = [ [ s:bg4, s:bg1 ] ] | ||
37 | let s:p.insert.left = [ [ s:bg0, s:blue, 'bold' ], [ s:fg1, s:bg2 ] ] | ||
38 | let s:p.insert.right = [ [ s:bg0, s:blue ], [ s:fg1, s:bg2 ] ] | ||
39 | let s:p.insert.middle = [ [ s:fg4, s:bg2 ] ] | ||
40 | let s:p.terminal.left = [ [ s:bg0, s:green, 'bold' ], [ s:fg1, s:bg2 ] ] | ||
41 | let s:p.terminal.right = [ [ s:bg0, s:green ], [ s:fg1, s:bg2 ] ] | ||
42 | let s:p.terminal.middle = [ [ s:fg4, s:bg2 ] ] | ||
43 | let s:p.replace.left = [ [ s:bg0, s:aqua, 'bold' ], [ s:fg1, s:bg2 ] ] | ||
44 | let s:p.replace.right = [ [ s:bg0, s:aqua ], [ s:fg1, s:bg2 ] ] | ||
45 | let s:p.replace.middle = [ [ s:fg4, s:bg2 ] ] | ||
46 | let s:p.visual.left = [ [ s:bg0, s:orange, 'bold' ], [ s:bg0, s:bg4 ] ] | ||
47 | let s:p.visual.right = [ [ s:bg0, s:orange ], [ s:bg0, s:bg4 ] ] | ||
48 | let s:p.visual.middle = [ [ s:fg4, s:bg1 ] ] | ||
49 | let s:p.tabline.left = [ [ s:fg4, s:bg2 ] ] | ||
50 | let s:p.tabline.tabsel = [ [ s:bg0, s:fg4 ] ] | ||
51 | let s:p.tabline.middle = [ [ s:bg0, s:bg0 ] ] | ||
52 | let s:p.tabline.right = [ [ s:bg0, s:orange ] ] | ||
53 | let s:p.normal.error = [ [ s:bg0, s:orange ] ] | ||
54 | let s:p.normal.warning = [ [ s:bg2, s:yellow ] ] | ||
55 | |||
56 | let g:lightline#colorscheme#gruvbox#palette = lightline#colorscheme#flatten(s:p) | ||
57 | endif | ||
diff --git a/.vim/pack/default/start/gruvbox/colors/gruvbox.vim b/.vim/pack/default/start/gruvbox/colors/gruvbox.vim new file mode 100644 index 0000000..66246fb --- /dev/null +++ b/.vim/pack/default/start/gruvbox/colors/gruvbox.vim | |||
@@ -0,0 +1,1418 @@ | |||
1 | " ----------------------------------------------------------------------------- | ||
2 | " File: gruvbox.vim | ||
3 | " Description: Retro groove color scheme for Vim | ||
4 | " Author: morhetz <morhetz@gmail.com> | ||
5 | " Source: https://github.com/morhetz/gruvbox | ||
6 | " Last Modified: 12 Aug 2017 | ||
7 | " ----------------------------------------------------------------------------- | ||
8 | |||
9 | " Supporting code ------------------------------------------------------------- | ||
10 | " Initialisation: {{{ | ||
11 | |||
12 | if version > 580 | ||
13 | hi clear | ||
14 | if exists("syntax_on") | ||
15 | syntax reset | ||
16 | endif | ||
17 | endif | ||
18 | |||
19 | let g:colors_name='gruvbox' | ||
20 | |||
21 | if !(has('termguicolors') && &termguicolors) && !has('gui_running') && &t_Co != 256 | ||
22 | finish | ||
23 | endif | ||
24 | |||
25 | " }}} | ||
26 | " Global Settings: {{{ | ||
27 | |||
28 | if !exists('g:gruvbox_bold') | ||
29 | let g:gruvbox_bold=1 | ||
30 | endif | ||
31 | if !exists('g:gruvbox_italic') | ||
32 | if has('gui_running') || $TERM_ITALICS == 'true' | ||
33 | let g:gruvbox_italic=1 | ||
34 | else | ||
35 | let g:gruvbox_italic=0 | ||
36 | endif | ||
37 | endif | ||
38 | if !exists('g:gruvbox_undercurl') | ||
39 | let g:gruvbox_undercurl=1 | ||
40 | endif | ||
41 | if !exists('g:gruvbox_underline') | ||
42 | let g:gruvbox_underline=1 | ||
43 | endif | ||
44 | if !exists('g:gruvbox_inverse') | ||
45 | let g:gruvbox_inverse=1 | ||
46 | endif | ||
47 | |||
48 | if !exists('g:gruvbox_guisp_fallback') || index(['fg', 'bg'], g:gruvbox_guisp_fallback) == -1 | ||
49 | let g:gruvbox_guisp_fallback='NONE' | ||
50 | endif | ||
51 | |||
52 | if !exists('g:gruvbox_improved_strings') | ||
53 | let g:gruvbox_improved_strings=0 | ||
54 | endif | ||
55 | |||
56 | if !exists('g:gruvbox_improved_warnings') | ||
57 | let g:gruvbox_improved_warnings=0 | ||
58 | endif | ||
59 | |||
60 | if !exists('g:gruvbox_termcolors') | ||
61 | let g:gruvbox_termcolors=256 | ||
62 | endif | ||
63 | |||
64 | if !exists('g:gruvbox_invert_indent_guides') | ||
65 | let g:gruvbox_invert_indent_guides=0 | ||
66 | endif | ||
67 | |||
68 | if exists('g:gruvbox_contrast') | ||
69 | echo 'g:gruvbox_contrast is deprecated; use g:gruvbox_contrast_light and g:gruvbox_contrast_dark instead' | ||
70 | endif | ||
71 | |||
72 | if !exists('g:gruvbox_contrast_dark') | ||
73 | let g:gruvbox_contrast_dark='medium' | ||
74 | endif | ||
75 | |||
76 | if !exists('g:gruvbox_contrast_light') | ||
77 | let g:gruvbox_contrast_light='medium' | ||
78 | endif | ||
79 | |||
80 | let s:is_dark=(&background == 'dark') | ||
81 | |||
82 | " }}} | ||
83 | " Palette: {{{ | ||
84 | |||
85 | " setup palette dictionary | ||
86 | let s:gb = {} | ||
87 | |||
88 | " fill it with absolute colors | ||
89 | let s:gb.dark0_hard = ['#1d2021', 234] " 29-32-33 | ||
90 | let s:gb.dark0 = ['#282828', 235] " 40-40-40 | ||
91 | let s:gb.dark0_soft = ['#32302f', 236] " 50-48-47 | ||
92 | let s:gb.dark1 = ['#3c3836', 237] " 60-56-54 | ||
93 | let s:gb.dark2 = ['#504945', 239] " 80-73-69 | ||
94 | let s:gb.dark3 = ['#665c54', 241] " 102-92-84 | ||
95 | let s:gb.dark4 = ['#7c6f64', 243] " 124-111-100 | ||
96 | let s:gb.dark4_256 = ['#7c6f64', 243] " 124-111-100 | ||
97 | |||
98 | let s:gb.gray_245 = ['#928374', 245] " 146-131-116 | ||
99 | let s:gb.gray_244 = ['#928374', 244] " 146-131-116 | ||
100 | |||
101 | let s:gb.light0_hard = ['#f9f5d7', 230] " 249-245-215 | ||
102 | let s:gb.light0 = ['#fbf1c7', 229] " 253-244-193 | ||
103 | let s:gb.light0_soft = ['#f2e5bc', 228] " 242-229-188 | ||
104 | let s:gb.light1 = ['#ebdbb2', 223] " 235-219-178 | ||
105 | let s:gb.light2 = ['#d5c4a1', 250] " 213-196-161 | ||
106 | let s:gb.light3 = ['#bdae93', 248] " 189-174-147 | ||
107 | let s:gb.light4 = ['#a89984', 246] " 168-153-132 | ||
108 | let s:gb.light4_256 = ['#a89984', 246] " 168-153-132 | ||
109 | |||
110 | let s:gb.bright_red = ['#fb4934', 167] " 251-73-52 | ||
111 | let s:gb.bright_green = ['#b8bb26', 142] " 184-187-38 | ||
112 | let s:gb.bright_yellow = ['#fabd2f', 214] " 250-189-47 | ||
113 | let s:gb.bright_blue = ['#83a598', 109] " 131-165-152 | ||
114 | let s:gb.bright_purple = ['#d3869b', 175] " 211-134-155 | ||
115 | let s:gb.bright_aqua = ['#8ec07c', 108] " 142-192-124 | ||
116 | let s:gb.bright_orange = ['#fe8019', 208] " 254-128-25 | ||
117 | |||
118 | let s:gb.neutral_red = ['#cc241d', 124] " 204-36-29 | ||
119 | let s:gb.neutral_green = ['#98971a', 106] " 152-151-26 | ||
120 | let s:gb.neutral_yellow = ['#d79921', 172] " 215-153-33 | ||
121 | let s:gb.neutral_blue = ['#458588', 66] " 69-133-136 | ||
122 | let s:gb.neutral_purple = ['#b16286', 132] " 177-98-134 | ||
123 | let s:gb.neutral_aqua = ['#689d6a', 72] " 104-157-106 | ||
124 | let s:gb.neutral_orange = ['#d65d0e', 166] " 214-93-14 | ||
125 | |||
126 | let s:gb.faded_red = ['#9d0006', 88] " 157-0-6 | ||
127 | let s:gb.faded_green = ['#79740e', 100] " 121-116-14 | ||
128 | let s:gb.faded_yellow = ['#b57614', 136] " 181-118-20 | ||
129 | let s:gb.faded_blue = ['#076678', 24] " 7-102-120 | ||
130 | let s:gb.faded_purple = ['#8f3f71', 96] " 143-63-113 | ||
131 | let s:gb.faded_aqua = ['#427b58', 66] " 66-123-88 | ||
132 | let s:gb.faded_orange = ['#af3a03', 130] " 175-58-3 | ||
133 | |||
134 | " }}} | ||
135 | " Setup Emphasis: {{{ | ||
136 | |||
137 | let s:bold = 'bold,' | ||
138 | if g:gruvbox_bold == 0 | ||
139 | let s:bold = '' | ||
140 | endif | ||
141 | |||
142 | let s:italic = 'italic,' | ||
143 | if g:gruvbox_italic == 0 | ||
144 | let s:italic = '' | ||
145 | endif | ||
146 | |||
147 | let s:underline = 'underline,' | ||
148 | if g:gruvbox_underline == 0 | ||
149 | let s:underline = '' | ||
150 | endif | ||
151 | |||
152 | let s:undercurl = 'undercurl,' | ||
153 | if g:gruvbox_undercurl == 0 | ||
154 | let s:undercurl = '' | ||
155 | endif | ||
156 | |||
157 | let s:inverse = 'inverse,' | ||
158 | if g:gruvbox_inverse == 0 | ||
159 | let s:inverse = '' | ||
160 | endif | ||
161 | |||
162 | " }}} | ||
163 | " Setup Colors: {{{ | ||
164 | |||
165 | let s:vim_bg = ['bg', 'bg'] | ||
166 | let s:vim_fg = ['fg', 'fg'] | ||
167 | let s:none = ['NONE', 'NONE'] | ||
168 | |||
169 | " determine relative colors | ||
170 | if s:is_dark | ||
171 | let s:bg0 = s:gb.dark0 | ||
172 | if g:gruvbox_contrast_dark == 'soft' | ||
173 | let s:bg0 = s:gb.dark0_soft | ||
174 | elseif g:gruvbox_contrast_dark == 'hard' | ||
175 | let s:bg0 = s:gb.dark0_hard | ||
176 | endif | ||
177 | |||
178 | let s:bg1 = s:gb.dark1 | ||
179 | let s:bg2 = s:gb.dark2 | ||
180 | let s:bg3 = s:gb.dark3 | ||
181 | let s:bg4 = s:gb.dark4 | ||
182 | |||
183 | let s:gray = s:gb.gray_245 | ||
184 | |||
185 | let s:fg0 = s:gb.light0 | ||
186 | let s:fg1 = s:gb.light1 | ||
187 | let s:fg2 = s:gb.light2 | ||
188 | let s:fg3 = s:gb.light3 | ||
189 | let s:fg4 = s:gb.light4 | ||
190 | |||
191 | let s:fg4_256 = s:gb.light4_256 | ||
192 | |||
193 | let s:red = s:gb.bright_red | ||
194 | let s:green = s:gb.bright_green | ||
195 | let s:yellow = s:gb.bright_yellow | ||
196 | let s:blue = s:gb.bright_blue | ||
197 | let s:purple = s:gb.bright_purple | ||
198 | let s:aqua = s:gb.bright_aqua | ||
199 | let s:orange = s:gb.bright_orange | ||
200 | else | ||
201 | let s:bg0 = s:gb.light0 | ||
202 | if g:gruvbox_contrast_light == 'soft' | ||
203 | let s:bg0 = s:gb.light0_soft | ||
204 | elseif g:gruvbox_contrast_light == 'hard' | ||
205 | let s:bg0 = s:gb.light0_hard | ||
206 | endif | ||
207 | |||
208 | let s:bg1 = s:gb.light1 | ||
209 | let s:bg2 = s:gb.light2 | ||
210 | let s:bg3 = s:gb.light3 | ||
211 | let s:bg4 = s:gb.light4 | ||
212 | |||
213 | let s:gray = s:gb.gray_244 | ||
214 | |||
215 | let s:fg0 = s:gb.dark0 | ||
216 | let s:fg1 = s:gb.dark1 | ||
217 | let s:fg2 = s:gb.dark2 | ||
218 | let s:fg3 = s:gb.dark3 | ||
219 | let s:fg4 = s:gb.dark4 | ||
220 | |||
221 | let s:fg4_256 = s:gb.dark4_256 | ||
222 | |||
223 | let s:red = s:gb.faded_red | ||
224 | let s:green = s:gb.faded_green | ||
225 | let s:yellow = s:gb.faded_yellow | ||
226 | let s:blue = s:gb.faded_blue | ||
227 | let s:purple = s:gb.faded_purple | ||
228 | let s:aqua = s:gb.faded_aqua | ||
229 | let s:orange = s:gb.faded_orange | ||
230 | endif | ||
231 | |||
232 | " reset to 16 colors fallback | ||
233 | if g:gruvbox_termcolors == 16 | ||
234 | let s:bg0[1] = 0 | ||
235 | let s:fg4[1] = 7 | ||
236 | let s:gray[1] = 8 | ||
237 | let s:red[1] = 9 | ||
238 | let s:green[1] = 10 | ||
239 | let s:yellow[1] = 11 | ||
240 | let s:blue[1] = 12 | ||
241 | let s:purple[1] = 13 | ||
242 | let s:aqua[1] = 14 | ||
243 | let s:fg1[1] = 15 | ||
244 | endif | ||
245 | |||
246 | " save current relative colors back to palette dictionary | ||
247 | let s:gb.bg0 = s:bg0 | ||
248 | let s:gb.bg1 = s:bg1 | ||
249 | let s:gb.bg2 = s:bg2 | ||
250 | let s:gb.bg3 = s:bg3 | ||
251 | let s:gb.bg4 = s:bg4 | ||
252 | |||
253 | let s:gb.gray = s:gray | ||
254 | |||
255 | let s:gb.fg0 = s:fg0 | ||
256 | let s:gb.fg1 = s:fg1 | ||
257 | let s:gb.fg2 = s:fg2 | ||
258 | let s:gb.fg3 = s:fg3 | ||
259 | let s:gb.fg4 = s:fg4 | ||
260 | |||
261 | let s:gb.fg4_256 = s:fg4_256 | ||
262 | |||
263 | let s:gb.red = s:red | ||
264 | let s:gb.green = s:green | ||
265 | let s:gb.yellow = s:yellow | ||
266 | let s:gb.blue = s:blue | ||
267 | let s:gb.purple = s:purple | ||
268 | let s:gb.aqua = s:aqua | ||
269 | let s:gb.orange = s:orange | ||
270 | |||
271 | " }}} | ||
272 | " Setup Terminal Colors For Neovim: {{{ | ||
273 | |||
274 | if has('nvim') | ||
275 | let g:terminal_color_0 = s:bg0[0] | ||
276 | let g:terminal_color_8 = s:gray[0] | ||
277 | |||
278 | let g:terminal_color_1 = s:gb.neutral_red[0] | ||
279 | let g:terminal_color_9 = s:red[0] | ||
280 | |||
281 | let g:terminal_color_2 = s:gb.neutral_green[0] | ||
282 | let g:terminal_color_10 = s:green[0] | ||
283 | |||
284 | let g:terminal_color_3 = s:gb.neutral_yellow[0] | ||
285 | let g:terminal_color_11 = s:yellow[0] | ||
286 | |||
287 | let g:terminal_color_4 = s:gb.neutral_blue[0] | ||
288 | let g:terminal_color_12 = s:blue[0] | ||
289 | |||
290 | let g:terminal_color_5 = s:gb.neutral_purple[0] | ||
291 | let g:terminal_color_13 = s:purple[0] | ||
292 | |||
293 | let g:terminal_color_6 = s:gb.neutral_aqua[0] | ||
294 | let g:terminal_color_14 = s:aqua[0] | ||
295 | |||
296 | let g:terminal_color_7 = s:fg4[0] | ||
297 | let g:terminal_color_15 = s:fg1[0] | ||
298 | endif | ||
299 | |||
300 | " }}} | ||
301 | " Overload Setting: {{{ | ||
302 | |||
303 | let s:hls_cursor = s:orange | ||
304 | if exists('g:gruvbox_hls_cursor') | ||
305 | let s:hls_cursor = get(s:gb, g:gruvbox_hls_cursor) | ||
306 | endif | ||
307 | |||
308 | let s:number_column = s:none | ||
309 | if exists('g:gruvbox_number_column') | ||
310 | let s:number_column = get(s:gb, g:gruvbox_number_column) | ||
311 | endif | ||
312 | |||
313 | let s:sign_column = s:bg1 | ||
314 | |||
315 | if exists('g:gitgutter_override_sign_column_highlight') && | ||
316 | \ g:gitgutter_override_sign_column_highlight == 1 | ||
317 | let s:sign_column = s:number_column | ||
318 | else | ||
319 | let g:gitgutter_override_sign_column_highlight = 0 | ||
320 | |||
321 | if exists('g:gruvbox_sign_column') | ||
322 | let s:sign_column = get(s:gb, g:gruvbox_sign_column) | ||
323 | endif | ||
324 | endif | ||
325 | |||
326 | let s:color_column = s:bg1 | ||
327 | if exists('g:gruvbox_color_column') | ||
328 | let s:color_column = get(s:gb, g:gruvbox_color_column) | ||
329 | endif | ||
330 | |||
331 | let s:vert_split = s:bg0 | ||
332 | if exists('g:gruvbox_vert_split') | ||
333 | let s:vert_split = get(s:gb, g:gruvbox_vert_split) | ||
334 | endif | ||
335 | |||
336 | let s:invert_signs = '' | ||
337 | if exists('g:gruvbox_invert_signs') | ||
338 | if g:gruvbox_invert_signs == 1 | ||
339 | let s:invert_signs = s:inverse | ||
340 | endif | ||
341 | endif | ||
342 | |||
343 | let s:invert_selection = s:inverse | ||
344 | if exists('g:gruvbox_invert_selection') | ||
345 | if g:gruvbox_invert_selection == 0 | ||
346 | let s:invert_selection = '' | ||
347 | endif | ||
348 | endif | ||
349 | |||
350 | let s:invert_tabline = '' | ||
351 | if exists('g:gruvbox_invert_tabline') | ||
352 | if g:gruvbox_invert_tabline == 1 | ||
353 | let s:invert_tabline = s:inverse | ||
354 | endif | ||
355 | endif | ||
356 | |||
357 | let s:italicize_comments = s:italic | ||
358 | if exists('g:gruvbox_italicize_comments') | ||
359 | if g:gruvbox_italicize_comments == 0 | ||
360 | let s:italicize_comments = '' | ||
361 | endif | ||
362 | endif | ||
363 | |||
364 | let s:italicize_strings = '' | ||
365 | if exists('g:gruvbox_italicize_strings') | ||
366 | if g:gruvbox_italicize_strings == 1 | ||
367 | let s:italicize_strings = s:italic | ||
368 | endif | ||
369 | endif | ||
370 | |||
371 | " }}} | ||
372 | " Highlighting Function: {{{ | ||
373 | |||
374 | function! s:HL(group, fg, ...) | ||
375 | " Arguments: group, guifg, guibg, gui, guisp | ||
376 | |||
377 | " foreground | ||
378 | let fg = a:fg | ||
379 | |||
380 | " background | ||
381 | if a:0 >= 1 | ||
382 | let bg = a:1 | ||
383 | else | ||
384 | let bg = s:none | ||
385 | endif | ||
386 | |||
387 | " emphasis | ||
388 | if a:0 >= 2 && strlen(a:2) | ||
389 | let emstr = a:2 | ||
390 | else | ||
391 | let emstr = 'NONE,' | ||
392 | endif | ||
393 | |||
394 | " special fallback | ||
395 | if a:0 >= 3 | ||
396 | if g:gruvbox_guisp_fallback != 'NONE' | ||
397 | let fg = a:3 | ||
398 | endif | ||
399 | |||
400 | " bg fallback mode should invert higlighting | ||
401 | if g:gruvbox_guisp_fallback == 'bg' | ||
402 | let emstr .= 'inverse,' | ||
403 | endif | ||
404 | endif | ||
405 | |||
406 | let histring = [ 'hi', a:group, | ||
407 | \ 'guifg=' . fg[0], 'ctermfg=' . fg[1], | ||
408 | \ 'guibg=' . bg[0], 'ctermbg=' . bg[1], | ||
409 | \ 'gui=' . emstr[:-2], 'cterm=' . emstr[:-2] | ||
410 | \ ] | ||
411 | |||
412 | " special | ||
413 | if a:0 >= 3 | ||
414 | call add(histring, 'guisp=' . a:3[0]) | ||
415 | endif | ||
416 | |||
417 | execute join(histring, ' ') | ||
418 | endfunction | ||
419 | |||
420 | " }}} | ||
421 | " Gruvbox Hi Groups: {{{ | ||
422 | |||
423 | " memoize common hi groups | ||
424 | call s:HL('GruvboxFg0', s:fg0) | ||
425 | call s:HL('GruvboxFg1', s:fg1) | ||
426 | call s:HL('GruvboxFg2', s:fg2) | ||
427 | call s:HL('GruvboxFg3', s:fg3) | ||
428 | call s:HL('GruvboxFg4', s:fg4) | ||
429 | call s:HL('GruvboxGray', s:gray) | ||
430 | call s:HL('GruvboxBg0', s:bg0) | ||
431 | call s:HL('GruvboxBg1', s:bg1) | ||
432 | call s:HL('GruvboxBg2', s:bg2) | ||
433 | call s:HL('GruvboxBg3', s:bg3) | ||
434 | call s:HL('GruvboxBg4', s:bg4) | ||
435 | |||
436 | call s:HL('GruvboxRed', s:red) | ||
437 | call s:HL('GruvboxRedBold', s:red, s:none, s:bold) | ||
438 | call s:HL('GruvboxGreen', s:green) | ||
439 | call s:HL('GruvboxGreenBold', s:green, s:none, s:bold) | ||
440 | call s:HL('GruvboxYellow', s:yellow) | ||
441 | call s:HL('GruvboxYellowBold', s:yellow, s:none, s:bold) | ||
442 | call s:HL('GruvboxBlue', s:blue) | ||
443 | call s:HL('GruvboxBlueBold', s:blue, s:none, s:bold) | ||
444 | call s:HL('GruvboxPurple', s:purple) | ||
445 | call s:HL('GruvboxPurpleBold', s:purple, s:none, s:bold) | ||
446 | call s:HL('GruvboxAqua', s:aqua) | ||
447 | call s:HL('GruvboxAquaBold', s:aqua, s:none, s:bold) | ||
448 | call s:HL('GruvboxOrange', s:orange) | ||
449 | call s:HL('GruvboxOrangeBold', s:orange, s:none, s:bold) | ||
450 | |||
451 | call s:HL('GruvboxRedSign', s:red, s:sign_column, s:invert_signs) | ||
452 | call s:HL('GruvboxGreenSign', s:green, s:sign_column, s:invert_signs) | ||
453 | call s:HL('GruvboxYellowSign', s:yellow, s:sign_column, s:invert_signs) | ||
454 | call s:HL('GruvboxBlueSign', s:blue, s:sign_column, s:invert_signs) | ||
455 | call s:HL('GruvboxPurpleSign', s:purple, s:sign_column, s:invert_signs) | ||
456 | call s:HL('GruvboxAquaSign', s:aqua, s:sign_column, s:invert_signs) | ||
457 | call s:HL('GruvboxOrangeSign', s:orange, s:sign_column, s:invert_signs) | ||
458 | |||
459 | " }}} | ||
460 | |||
461 | " Vanilla colorscheme --------------------------------------------------------- | ||
462 | " General UI: {{{ | ||
463 | |||
464 | " Normal text | ||
465 | call s:HL('Normal', s:fg1, s:bg0) | ||
466 | |||
467 | " Correct background (see issue #7): | ||
468 | " --- Problem with changing between dark and light on 256 color terminal | ||
469 | " --- https://github.com/morhetz/gruvbox/issues/7 | ||
470 | if s:is_dark | ||
471 | set background=dark | ||
472 | else | ||
473 | set background=light | ||
474 | endif | ||
475 | |||
476 | if version >= 700 | ||
477 | " Screen line that the cursor is | ||
478 | call s:HL('CursorLine', s:none, s:bg1) | ||
479 | " Screen column that the cursor is | ||
480 | hi! link CursorColumn CursorLine | ||
481 | |||
482 | " Tab pages line filler | ||
483 | call s:HL('TabLineFill', s:bg4, s:bg1, s:invert_tabline) | ||
484 | " Active tab page label | ||
485 | call s:HL('TabLineSel', s:green, s:bg1, s:invert_tabline) | ||
486 | " Not active tab page label | ||
487 | hi! link TabLine TabLineFill | ||
488 | |||
489 | " Match paired bracket under the cursor | ||
490 | call s:HL('MatchParen', s:none, s:bg3, s:bold) | ||
491 | endif | ||
492 | |||
493 | if version >= 703 | ||
494 | " Highlighted screen columns | ||
495 | call s:HL('ColorColumn', s:none, s:color_column) | ||
496 | |||
497 | " Concealed element: \lambda → λ | ||
498 | call s:HL('Conceal', s:blue, s:none) | ||
499 | |||
500 | " Line number of CursorLine | ||
501 | call s:HL('CursorLineNr', s:yellow, s:bg1) | ||
502 | endif | ||
503 | |||
504 | hi! link NonText GruvboxBg2 | ||
505 | hi! link SpecialKey GruvboxBg2 | ||
506 | |||
507 | call s:HL('Visual', s:none, s:bg3, s:invert_selection) | ||
508 | hi! link VisualNOS Visual | ||
509 | |||
510 | call s:HL('Search', s:yellow, s:bg0, s:inverse) | ||
511 | call s:HL('IncSearch', s:hls_cursor, s:bg0, s:inverse) | ||
512 | |||
513 | call s:HL('Underlined', s:blue, s:none, s:underline) | ||
514 | |||
515 | call s:HL('StatusLine', s:bg2, s:fg1, s:inverse) | ||
516 | call s:HL('StatusLineNC', s:bg1, s:fg4, s:inverse) | ||
517 | |||
518 | " The column separating vertically split windows | ||
519 | call s:HL('VertSplit', s:bg3, s:vert_split) | ||
520 | |||
521 | " Current match in wildmenu completion | ||
522 | call s:HL('WildMenu', s:blue, s:bg2, s:bold) | ||
523 | |||
524 | " Directory names, special names in listing | ||
525 | hi! link Directory GruvboxGreenBold | ||
526 | |||
527 | " Titles for output from :set all, :autocmd, etc. | ||
528 | hi! link Title GruvboxGreenBold | ||
529 | |||
530 | " Error messages on the command line | ||
531 | call s:HL('ErrorMsg', s:bg0, s:red, s:bold) | ||
532 | " More prompt: -- More -- | ||
533 | hi! link MoreMsg GruvboxYellowBold | ||
534 | " Current mode message: -- INSERT -- | ||
535 | hi! link ModeMsg GruvboxYellowBold | ||
536 | " 'Press enter' prompt and yes/no questions | ||
537 | hi! link Question GruvboxOrangeBold | ||
538 | " Warning messages | ||
539 | hi! link WarningMsg GruvboxRedBold | ||
540 | |||
541 | " }}} | ||
542 | " Gutter: {{{ | ||
543 | |||
544 | " Line number for :number and :# commands | ||
545 | call s:HL('LineNr', s:bg4, s:number_column) | ||
546 | |||
547 | " Column where signs are displayed | ||
548 | call s:HL('SignColumn', s:none, s:sign_column) | ||
549 | |||
550 | " Line used for closed folds | ||
551 | call s:HL('Folded', s:gray, s:bg1, s:italic) | ||
552 | " Column where folds are displayed | ||
553 | call s:HL('FoldColumn', s:gray, s:bg1) | ||
554 | |||
555 | " }}} | ||
556 | " Cursor: {{{ | ||
557 | |||
558 | " Character under cursor | ||
559 | call s:HL('Cursor', s:none, s:none, s:inverse) | ||
560 | " Visual mode cursor, selection | ||
561 | hi! link vCursor Cursor | ||
562 | " Input moder cursor | ||
563 | hi! link iCursor Cursor | ||
564 | " Language mapping cursor | ||
565 | hi! link lCursor Cursor | ||
566 | |||
567 | " }}} | ||
568 | " Syntax Highlighting: {{{ | ||
569 | |||
570 | if g:gruvbox_improved_strings == 0 | ||
571 | hi! link Special GruvboxOrange | ||
572 | else | ||
573 | call s:HL('Special', s:orange, s:bg1, s:italicize_strings) | ||
574 | endif | ||
575 | |||
576 | call s:HL('Comment', s:gray, s:none, s:italicize_comments) | ||
577 | call s:HL('Todo', s:vim_fg, s:vim_bg, s:bold . s:italic) | ||
578 | call s:HL('Error', s:red, s:vim_bg, s:bold . s:inverse) | ||
579 | |||
580 | " Generic statement | ||
581 | hi! link Statement GruvboxRed | ||
582 | " if, then, else, endif, swicth, etc. | ||
583 | hi! link Conditional GruvboxRed | ||
584 | " for, do, while, etc. | ||
585 | hi! link Repeat GruvboxRed | ||
586 | " case, default, etc. | ||
587 | hi! link Label GruvboxRed | ||
588 | " try, catch, throw | ||
589 | hi! link Exception GruvboxRed | ||
590 | " sizeof, "+", "*", etc. | ||
591 | hi! link Operator Normal | ||
592 | " Any other keyword | ||
593 | hi! link Keyword GruvboxRed | ||
594 | |||
595 | " Variable name | ||
596 | hi! link Identifier GruvboxBlue | ||
597 | " Function name | ||
598 | hi! link Function GruvboxGreenBold | ||
599 | |||
600 | " Generic preprocessor | ||
601 | hi! link PreProc GruvboxAqua | ||
602 | " Preprocessor #include | ||
603 | hi! link Include GruvboxAqua | ||
604 | " Preprocessor #define | ||
605 | hi! link Define GruvboxAqua | ||
606 | " Same as Define | ||
607 | hi! link Macro GruvboxAqua | ||
608 | " Preprocessor #if, #else, #endif, etc. | ||
609 | hi! link PreCondit GruvboxAqua | ||
610 | |||
611 | " Generic constant | ||
612 | hi! link Constant GruvboxPurple | ||
613 | " Character constant: 'c', '/n' | ||
614 | hi! link Character GruvboxPurple | ||
615 | " String constant: "this is a string" | ||
616 | if g:gruvbox_improved_strings == 0 | ||
617 | call s:HL('String', s:green, s:none, s:italicize_strings) | ||
618 | else | ||
619 | call s:HL('String', s:fg1, s:bg1, s:italicize_strings) | ||
620 | endif | ||
621 | " Boolean constant: TRUE, false | ||
622 | hi! link Boolean GruvboxPurple | ||
623 | " Number constant: 234, 0xff | ||
624 | hi! link Number GruvboxPurple | ||
625 | " Floating point constant: 2.3e10 | ||
626 | hi! link Float GruvboxPurple | ||
627 | |||
628 | " Generic type | ||
629 | hi! link Type GruvboxYellow | ||
630 | " static, register, volatile, etc | ||
631 | hi! link StorageClass GruvboxOrange | ||
632 | " struct, union, enum, etc. | ||
633 | hi! link Structure GruvboxAqua | ||
634 | " typedef | ||
635 | hi! link Typedef GruvboxYellow | ||
636 | |||
637 | " }}} | ||
638 | " Completion Menu: {{{ | ||
639 | |||
640 | if version >= 700 | ||
641 | " Popup menu: normal item | ||
642 | call s:HL('Pmenu', s:fg1, s:bg2) | ||
643 | " Popup menu: selected item | ||
644 | call s:HL('PmenuSel', s:bg2, s:blue, s:bold) | ||
645 | " Popup menu: scrollbar | ||
646 | call s:HL('PmenuSbar', s:none, s:bg2) | ||
647 | " Popup menu: scrollbar thumb | ||
648 | call s:HL('PmenuThumb', s:none, s:bg4) | ||
649 | endif | ||
650 | |||
651 | " }}} | ||
652 | " Diffs: {{{ | ||
653 | |||
654 | call s:HL('DiffDelete', s:red, s:bg0, s:inverse) | ||
655 | call s:HL('DiffAdd', s:green, s:bg0, s:inverse) | ||
656 | "call s:HL('DiffChange', s:bg0, s:blue) | ||
657 | "call s:HL('DiffText', s:bg0, s:yellow) | ||
658 | |||
659 | " Alternative setting | ||
660 | call s:HL('DiffChange', s:aqua, s:bg0, s:inverse) | ||
661 | call s:HL('DiffText', s:yellow, s:bg0, s:inverse) | ||
662 | |||
663 | " }}} | ||
664 | " Spelling: {{{ | ||
665 | |||
666 | if has("spell") | ||
667 | " Not capitalised word, or compile warnings | ||
668 | if g:gruvbox_improved_warnings == 0 | ||
669 | call s:HL('SpellCap', s:none, s:none, s:undercurl, s:red) | ||
670 | else | ||
671 | call s:HL('SpellCap', s:green, s:none, s:bold . s:italic) | ||
672 | endif | ||
673 | " Not recognized word | ||
674 | call s:HL('SpellBad', s:none, s:none, s:undercurl, s:blue) | ||
675 | " Wrong spelling for selected region | ||
676 | call s:HL('SpellLocal', s:none, s:none, s:undercurl, s:aqua) | ||
677 | " Rare word | ||
678 | call s:HL('SpellRare', s:none, s:none, s:undercurl, s:purple) | ||
679 | endif | ||
680 | |||
681 | " }}} | ||
682 | |||
683 | " Plugin specific ------------------------------------------------------------- | ||
684 | " EasyMotion: {{{ | ||
685 | |||
686 | hi! link EasyMotionTarget Search | ||
687 | hi! link EasyMotionShade Comment | ||
688 | |||
689 | " }}} | ||
690 | " Sneak: {{{ | ||
691 | |||
692 | hi! link Sneak Search | ||
693 | hi! link SneakLabel Search | ||
694 | |||
695 | " }}} | ||
696 | " Indent Guides: {{{ | ||
697 | |||
698 | if !exists('g:indent_guides_auto_colors') | ||
699 | let g:indent_guides_auto_colors = 0 | ||
700 | endif | ||
701 | |||
702 | if g:indent_guides_auto_colors == 0 | ||
703 | if g:gruvbox_invert_indent_guides == 0 | ||
704 | call s:HL('IndentGuidesOdd', s:vim_bg, s:bg2) | ||
705 | call s:HL('IndentGuidesEven', s:vim_bg, s:bg1) | ||
706 | else | ||
707 | call s:HL('IndentGuidesOdd', s:vim_bg, s:bg2, s:inverse) | ||
708 | call s:HL('IndentGuidesEven', s:vim_bg, s:bg3, s:inverse) | ||
709 | endif | ||
710 | endif | ||
711 | |||
712 | " }}} | ||
713 | " IndentLine: {{{ | ||
714 | |||
715 | if !exists('g:indentLine_color_term') | ||
716 | let g:indentLine_color_term = s:bg2[1] | ||
717 | endif | ||
718 | if !exists('g:indentLine_color_gui') | ||
719 | let g:indentLine_color_gui = s:bg2[0] | ||
720 | endif | ||
721 | |||
722 | " }}} | ||
723 | " Rainbow Parentheses: {{{ | ||
724 | |||
725 | if !exists('g:rbpt_colorpairs') | ||
726 | let g:rbpt_colorpairs = | ||
727 | \ [ | ||
728 | \ ['blue', '#458588'], ['magenta', '#b16286'], | ||
729 | \ ['red', '#cc241d'], ['166', '#d65d0e'] | ||
730 | \ ] | ||
731 | endif | ||
732 | |||
733 | let g:rainbow_guifgs = [ '#d65d0e', '#cc241d', '#b16286', '#458588' ] | ||
734 | let g:rainbow_ctermfgs = [ '166', 'red', 'magenta', 'blue' ] | ||
735 | |||
736 | if !exists('g:rainbow_conf') | ||
737 | let g:rainbow_conf = {} | ||
738 | endif | ||
739 | if !has_key(g:rainbow_conf, 'guifgs') | ||
740 | let g:rainbow_conf['guifgs'] = g:rainbow_guifgs | ||
741 | endif | ||
742 | if !has_key(g:rainbow_conf, 'ctermfgs') | ||
743 | let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs | ||
744 | endif | ||
745 | |||
746 | let g:niji_dark_colours = g:rbpt_colorpairs | ||
747 | let g:niji_light_colours = g:rbpt_colorpairs | ||
748 | |||
749 | "}}} | ||
750 | " GitGutter: {{{ | ||
751 | |||
752 | hi! link GitGutterAdd GruvboxGreenSign | ||
753 | hi! link GitGutterChange GruvboxAquaSign | ||
754 | hi! link GitGutterDelete GruvboxRedSign | ||
755 | hi! link GitGutterChangeDelete GruvboxAquaSign | ||
756 | |||
757 | " }}} | ||
758 | " GitCommit: "{{{ | ||
759 | |||
760 | hi! link gitcommitSelectedFile GruvboxGreen | ||
761 | hi! link gitcommitDiscardedFile GruvboxRed | ||
762 | |||
763 | " }}} | ||
764 | " Signify: {{{ | ||
765 | |||
766 | hi! link SignifySignAdd GruvboxGreenSign | ||
767 | hi! link SignifySignChange GruvboxAquaSign | ||
768 | hi! link SignifySignDelete GruvboxRedSign | ||
769 | |||
770 | " }}} | ||
771 | " Syntastic: {{{ | ||
772 | |||
773 | call s:HL('SyntasticError', s:none, s:none, s:undercurl, s:red) | ||
774 | call s:HL('SyntasticWarning', s:none, s:none, s:undercurl, s:yellow) | ||
775 | |||
776 | hi! link SyntasticErrorSign GruvboxRedSign | ||
777 | hi! link SyntasticWarningSign GruvboxYellowSign | ||
778 | |||
779 | " }}} | ||
780 | " Signature: {{{ | ||
781 | hi! link SignatureMarkText GruvboxBlueSign | ||
782 | hi! link SignatureMarkerText GruvboxPurpleSign | ||
783 | |||
784 | " }}} | ||
785 | " ShowMarks: {{{ | ||
786 | |||
787 | hi! link ShowMarksHLl GruvboxBlueSign | ||
788 | hi! link ShowMarksHLu GruvboxBlueSign | ||
789 | hi! link ShowMarksHLo GruvboxBlueSign | ||
790 | hi! link ShowMarksHLm GruvboxBlueSign | ||
791 | |||
792 | " }}} | ||
793 | " CtrlP: {{{ | ||
794 | |||
795 | hi! link CtrlPMatch GruvboxYellow | ||
796 | hi! link CtrlPNoEntries GruvboxRed | ||
797 | hi! link CtrlPPrtBase GruvboxBg2 | ||
798 | hi! link CtrlPPrtCursor GruvboxBlue | ||
799 | hi! link CtrlPLinePre GruvboxBg2 | ||
800 | |||
801 | call s:HL('CtrlPMode1', s:blue, s:bg2, s:bold) | ||
802 | call s:HL('CtrlPMode2', s:bg0, s:blue, s:bold) | ||
803 | call s:HL('CtrlPStats', s:fg4, s:bg2, s:bold) | ||
804 | |||
805 | " }}} | ||
806 | " Startify: {{{ | ||
807 | |||
808 | hi! link StartifyBracket GruvboxFg3 | ||
809 | hi! link StartifyFile GruvboxFg1 | ||
810 | hi! link StartifyNumber GruvboxBlue | ||
811 | hi! link StartifyPath GruvboxGray | ||
812 | hi! link StartifySlash GruvboxGray | ||
813 | hi! link StartifySection GruvboxYellow | ||
814 | hi! link StartifySpecial GruvboxBg2 | ||
815 | hi! link StartifyHeader GruvboxOrange | ||
816 | hi! link StartifyFooter GruvboxBg2 | ||
817 | |||
818 | " }}} | ||
819 | " Vimshell: {{{ | ||
820 | |||
821 | let g:vimshell_escape_colors = [ | ||
822 | \ s:bg4[0], s:red[0], s:green[0], s:yellow[0], | ||
823 | \ s:blue[0], s:purple[0], s:aqua[0], s:fg4[0], | ||
824 | \ s:bg0[0], s:red[0], s:green[0], s:orange[0], | ||
825 | \ s:blue[0], s:purple[0], s:aqua[0], s:fg0[0] | ||
826 | \ ] | ||
827 | |||
828 | " }}} | ||
829 | " BufTabLine: {{{ | ||
830 | |||
831 | call s:HL('BufTabLineCurrent', s:bg0, s:fg4) | ||
832 | call s:HL('BufTabLineActive', s:fg4, s:bg2) | ||
833 | call s:HL('BufTabLineHidden', s:bg4, s:bg1) | ||
834 | call s:HL('BufTabLineFill', s:bg0, s:bg0) | ||
835 | |||
836 | " }}} | ||
837 | " Asynchronous Lint Engine: {{{ | ||
838 | |||
839 | call s:HL('ALEError', s:none, s:none, s:undercurl, s:red) | ||
840 | call s:HL('ALEWarning', s:none, s:none, s:undercurl, s:yellow) | ||
841 | call s:HL('ALEInfo', s:none, s:none, s:undercurl, s:blue) | ||
842 | |||
843 | hi! link ALEErrorSign GruvboxRedSign | ||
844 | hi! link ALEWarningSign GruvboxYellowSign | ||
845 | hi! link ALEInfoSign GruvboxBlueSign | ||
846 | |||
847 | " }}} | ||
848 | " Dirvish: {{{ | ||
849 | |||
850 | hi! link DirvishPathTail GruvboxAqua | ||
851 | hi! link DirvishArg GruvboxYellow | ||
852 | |||
853 | " }}} | ||
854 | " Netrw: {{{ | ||
855 | |||
856 | hi! link netrwDir GruvboxAqua | ||
857 | hi! link netrwClassify GruvboxAqua | ||
858 | hi! link netrwLink GruvboxGray | ||
859 | hi! link netrwSymLink GruvboxFg1 | ||
860 | hi! link netrwExe GruvboxYellow | ||
861 | hi! link netrwComment GruvboxGray | ||
862 | hi! link netrwList GruvboxBlue | ||
863 | hi! link netrwHelpCmd GruvboxAqua | ||
864 | hi! link netrwCmdSep GruvboxFg3 | ||
865 | hi! link netrwVersion GruvboxGreen | ||
866 | |||
867 | " }}} | ||
868 | " NERDTree: {{{ | ||
869 | |||
870 | hi! link NERDTreeDir GruvboxAqua | ||
871 | hi! link NERDTreeDirSlash GruvboxAqua | ||
872 | |||
873 | hi! link NERDTreeOpenable GruvboxOrange | ||
874 | hi! link NERDTreeClosable GruvboxOrange | ||
875 | |||
876 | hi! link NERDTreeFile GruvboxFg1 | ||
877 | hi! link NERDTreeExecFile GruvboxYellow | ||
878 | |||
879 | hi! link NERDTreeUp GruvboxGray | ||
880 | hi! link NERDTreeCWD GruvboxGreen | ||
881 | hi! link NERDTreeHelp GruvboxFg1 | ||
882 | |||
883 | hi! link NERDTreeToggleOn GruvboxGreen | ||
884 | hi! link NERDTreeToggleOff GruvboxRed | ||
885 | |||
886 | " }}} | ||
887 | " Vim Multiple Cursors: {{{ | ||
888 | |||
889 | call s:HL('multiple_cursors_cursor', s:none, s:none, s:inverse) | ||
890 | call s:HL('multiple_cursors_visual', s:none, s:bg2) | ||
891 | |||
892 | " }}} | ||
893 | " coc.nvim: {{{ | ||
894 | |||
895 | hi! link CocErrorSign GruvboxRedSign | ||
896 | hi! link CocWarningSign GruvboxOrangeSign | ||
897 | hi! link CocInfoSign GruvboxYellowSign | ||
898 | hi! link CocHintSign GruvboxBlueSign | ||
899 | hi! link CocErrorFloat GruvboxRed | ||
900 | hi! link CocWarningFloat GruvboxOrange | ||
901 | hi! link CocInfoFloat GruvboxYellow | ||
902 | hi! link CocHintFloat GruvboxBlue | ||
903 | hi! link CocDiagnosticsError GruvboxRed | ||
904 | hi! link CocDiagnosticsWarning GruvboxOrange | ||
905 | hi! link CocDiagnosticsInfo GruvboxYellow | ||
906 | hi! link CocDiagnosticsHint GruvboxBlue | ||
907 | |||
908 | hi! link CocSelectedText GruvboxRed | ||
909 | hi! link CocCodeLens GruvboxGray | ||
910 | |||
911 | call s:HL('CocErrorHighlight', s:none, s:none, s:undercurl, s:red) | ||
912 | call s:HL('CocWarningHighlight', s:none, s:none, s:undercurl, s:orange) | ||
913 | call s:HL('CocInfoHighlight', s:none, s:none, s:undercurl, s:yellow) | ||
914 | call s:HL('CocHintHighlight', s:none, s:none, s:undercurl, s:blue) | ||
915 | |||
916 | " }}} | ||
917 | |||
918 | " Filetype specific ----------------------------------------------------------- | ||
919 | " Diff: {{{ | ||
920 | |||
921 | hi! link diffAdded GruvboxGreen | ||
922 | hi! link diffRemoved GruvboxRed | ||
923 | hi! link diffChanged GruvboxAqua | ||
924 | |||
925 | hi! link diffFile GruvboxOrange | ||
926 | hi! link diffNewFile GruvboxYellow | ||
927 | |||
928 | hi! link diffLine GruvboxBlue | ||
929 | |||
930 | " }}} | ||
931 | " Html: {{{ | ||
932 | |||
933 | hi! link htmlTag GruvboxBlue | ||
934 | hi! link htmlEndTag GruvboxBlue | ||
935 | |||
936 | hi! link htmlTagName GruvboxAquaBold | ||
937 | hi! link htmlArg GruvboxAqua | ||
938 | |||
939 | hi! link htmlScriptTag GruvboxPurple | ||
940 | hi! link htmlTagN GruvboxFg1 | ||
941 | hi! link htmlSpecialTagName GruvboxAquaBold | ||
942 | |||
943 | call s:HL('htmlLink', s:fg4, s:none, s:underline) | ||
944 | |||
945 | hi! link htmlSpecialChar GruvboxOrange | ||
946 | |||
947 | call s:HL('htmlBold', s:vim_fg, s:vim_bg, s:bold) | ||
948 | call s:HL('htmlBoldUnderline', s:vim_fg, s:vim_bg, s:bold . s:underline) | ||
949 | call s:HL('htmlBoldItalic', s:vim_fg, s:vim_bg, s:bold . s:italic) | ||
950 | call s:HL('htmlBoldUnderlineItalic', s:vim_fg, s:vim_bg, s:bold . s:underline . s:italic) | ||
951 | |||
952 | call s:HL('htmlUnderline', s:vim_fg, s:vim_bg, s:underline) | ||
953 | call s:HL('htmlUnderlineItalic', s:vim_fg, s:vim_bg, s:underline . s:italic) | ||
954 | call s:HL('htmlItalic', s:vim_fg, s:vim_bg, s:italic) | ||
955 | |||
956 | " }}} | ||
957 | " Xml: {{{ | ||
958 | |||
959 | hi! link xmlTag GruvboxBlue | ||
960 | hi! link xmlEndTag GruvboxBlue | ||
961 | hi! link xmlTagName GruvboxBlue | ||
962 | hi! link xmlEqual GruvboxBlue | ||
963 | hi! link docbkKeyword GruvboxAquaBold | ||
964 | |||
965 | hi! link xmlDocTypeDecl GruvboxGray | ||
966 | hi! link xmlDocTypeKeyword GruvboxPurple | ||
967 | hi! link xmlCdataStart GruvboxGray | ||
968 | hi! link xmlCdataCdata GruvboxPurple | ||
969 | hi! link dtdFunction GruvboxGray | ||
970 | hi! link dtdTagName GruvboxPurple | ||
971 | |||
972 | hi! link xmlAttrib GruvboxAqua | ||
973 | hi! link xmlProcessingDelim GruvboxGray | ||
974 | hi! link dtdParamEntityPunct GruvboxGray | ||
975 | hi! link dtdParamEntityDPunct GruvboxGray | ||
976 | hi! link xmlAttribPunct GruvboxGray | ||
977 | |||
978 | hi! link xmlEntity GruvboxOrange | ||
979 | hi! link xmlEntityPunct GruvboxOrange | ||
980 | " }}} | ||
981 | " Vim: {{{ | ||
982 | |||
983 | call s:HL('vimCommentTitle', s:fg4_256, s:none, s:bold . s:italicize_comments) | ||
984 | |||
985 | hi! link vimNotation GruvboxOrange | ||
986 | hi! link vimBracket GruvboxOrange | ||
987 | hi! link vimMapModKey GruvboxOrange | ||
988 | hi! link vimFuncSID GruvboxFg3 | ||
989 | hi! link vimSetSep GruvboxFg3 | ||
990 | hi! link vimSep GruvboxFg3 | ||
991 | hi! link vimContinue GruvboxFg3 | ||
992 | |||
993 | " }}} | ||
994 | " Clojure: {{{ | ||
995 | |||
996 | hi! link clojureKeyword GruvboxBlue | ||
997 | hi! link clojureCond GruvboxOrange | ||
998 | hi! link clojureSpecial GruvboxOrange | ||
999 | hi! link clojureDefine GruvboxOrange | ||
1000 | |||
1001 | hi! link clojureFunc GruvboxYellow | ||
1002 | hi! link clojureRepeat GruvboxYellow | ||
1003 | hi! link clojureCharacter GruvboxAqua | ||
1004 | hi! link clojureStringEscape GruvboxAqua | ||
1005 | hi! link clojureException GruvboxRed | ||
1006 | |||
1007 | hi! link clojureRegexp GruvboxAqua | ||
1008 | hi! link clojureRegexpEscape GruvboxAqua | ||
1009 | call s:HL('clojureRegexpCharClass', s:fg3, s:none, s:bold) | ||
1010 | hi! link clojureRegexpMod clojureRegexpCharClass | ||
1011 | hi! link clojureRegexpQuantifier clojureRegexpCharClass | ||
1012 | |||
1013 | hi! link clojureParen GruvboxFg3 | ||
1014 | hi! link clojureAnonArg GruvboxYellow | ||
1015 | hi! link clojureVariable GruvboxBlue | ||
1016 | hi! link clojureMacro GruvboxOrange | ||
1017 | |||
1018 | hi! link clojureMeta GruvboxYellow | ||
1019 | hi! link clojureDeref GruvboxYellow | ||
1020 | hi! link clojureQuote GruvboxYellow | ||
1021 | hi! link clojureUnquote GruvboxYellow | ||
1022 | |||
1023 | " }}} | ||
1024 | " C: {{{ | ||
1025 | |||
1026 | hi! link cOperator GruvboxPurple | ||
1027 | hi! link cStructure GruvboxOrange | ||
1028 | |||
1029 | " }}} | ||
1030 | " Python: {{{ | ||
1031 | |||
1032 | hi! link pythonBuiltin GruvboxOrange | ||
1033 | hi! link pythonBuiltinObj GruvboxOrange | ||
1034 | hi! link pythonBuiltinFunc GruvboxOrange | ||
1035 | hi! link pythonFunction GruvboxAqua | ||
1036 | hi! link pythonDecorator GruvboxRed | ||
1037 | hi! link pythonInclude GruvboxBlue | ||
1038 | hi! link pythonImport GruvboxBlue | ||
1039 | hi! link pythonRun GruvboxBlue | ||
1040 | hi! link pythonCoding GruvboxBlue | ||
1041 | hi! link pythonOperator GruvboxRed | ||
1042 | hi! link pythonException GruvboxRed | ||
1043 | hi! link pythonExceptions GruvboxPurple | ||
1044 | hi! link pythonBoolean GruvboxPurple | ||
1045 | hi! link pythonDot GruvboxFg3 | ||
1046 | hi! link pythonConditional GruvboxRed | ||
1047 | hi! link pythonRepeat GruvboxRed | ||
1048 | hi! link pythonDottedName GruvboxGreenBold | ||
1049 | |||
1050 | " }}} | ||
1051 | " CSS: {{{ | ||
1052 | |||
1053 | hi! link cssBraces GruvboxBlue | ||
1054 | hi! link cssFunctionName GruvboxYellow | ||
1055 | hi! link cssIdentifier GruvboxOrange | ||
1056 | hi! link cssClassName GruvboxGreen | ||
1057 | hi! link cssColor GruvboxBlue | ||
1058 | hi! link cssSelectorOp GruvboxBlue | ||
1059 | hi! link cssSelectorOp2 GruvboxBlue | ||
1060 | hi! link cssImportant GruvboxGreen | ||
1061 | hi! link cssVendor GruvboxFg1 | ||
1062 | |||
1063 | hi! link cssTextProp GruvboxAqua | ||
1064 | hi! link cssAnimationProp GruvboxAqua | ||
1065 | hi! link cssUIProp GruvboxYellow | ||
1066 | hi! link cssTransformProp GruvboxAqua | ||
1067 | hi! link cssTransitionProp GruvboxAqua | ||
1068 | hi! link cssPrintProp GruvboxAqua | ||
1069 | hi! link cssPositioningProp GruvboxYellow | ||
1070 | hi! link cssBoxProp GruvboxAqua | ||
1071 | hi! link cssFontDescriptorProp GruvboxAqua | ||
1072 | hi! link cssFlexibleBoxProp GruvboxAqua | ||
1073 | hi! link cssBorderOutlineProp GruvboxAqua | ||
1074 | hi! link cssBackgroundProp GruvboxAqua | ||
1075 | hi! link cssMarginProp GruvboxAqua | ||
1076 | hi! link cssListProp GruvboxAqua | ||
1077 | hi! link cssTableProp GruvboxAqua | ||
1078 | hi! link cssFontProp GruvboxAqua | ||
1079 | hi! link cssPaddingProp GruvboxAqua | ||
1080 | hi! link cssDimensionProp GruvboxAqua | ||
1081 | hi! link cssRenderProp GruvboxAqua | ||
1082 | hi! link cssColorProp GruvboxAqua | ||
1083 | hi! link cssGeneratedContentProp GruvboxAqua | ||
1084 | |||
1085 | " }}} | ||
1086 | " JavaScript: {{{ | ||
1087 | |||
1088 | hi! link javaScriptBraces GruvboxFg1 | ||
1089 | hi! link javaScriptFunction GruvboxAqua | ||
1090 | hi! link javaScriptIdentifier GruvboxRed | ||
1091 | hi! link javaScriptMember GruvboxBlue | ||
1092 | hi! link javaScriptNumber GruvboxPurple | ||
1093 | hi! link javaScriptNull GruvboxPurple | ||
1094 | hi! link javaScriptParens GruvboxFg3 | ||
1095 | |||
1096 | " }}} | ||
1097 | " YAJS: {{{ | ||
1098 | |||
1099 | hi! link javascriptImport GruvboxAqua | ||
1100 | hi! link javascriptExport GruvboxAqua | ||
1101 | hi! link javascriptClassKeyword GruvboxAqua | ||
1102 | hi! link javascriptClassExtends GruvboxAqua | ||
1103 | hi! link javascriptDefault GruvboxAqua | ||
1104 | |||
1105 | hi! link javascriptClassName GruvboxYellow | ||
1106 | hi! link javascriptClassSuperName GruvboxYellow | ||
1107 | hi! link javascriptGlobal GruvboxYellow | ||
1108 | |||
1109 | hi! link javascriptEndColons GruvboxFg1 | ||
1110 | hi! link javascriptFuncArg GruvboxFg1 | ||
1111 | hi! link javascriptGlobalMethod GruvboxFg1 | ||
1112 | hi! link javascriptNodeGlobal GruvboxFg1 | ||
1113 | hi! link javascriptBOMWindowProp GruvboxFg1 | ||
1114 | hi! link javascriptArrayMethod GruvboxFg1 | ||
1115 | hi! link javascriptArrayStaticMethod GruvboxFg1 | ||
1116 | hi! link javascriptCacheMethod GruvboxFg1 | ||
1117 | hi! link javascriptDateMethod GruvboxFg1 | ||
1118 | hi! link javascriptMathStaticMethod GruvboxFg1 | ||
1119 | |||
1120 | " hi! link javascriptProp GruvboxFg1 | ||
1121 | hi! link javascriptURLUtilsProp GruvboxFg1 | ||
1122 | hi! link javascriptBOMNavigatorProp GruvboxFg1 | ||
1123 | hi! link javascriptDOMDocMethod GruvboxFg1 | ||
1124 | hi! link javascriptDOMDocProp GruvboxFg1 | ||
1125 | hi! link javascriptBOMLocationMethod GruvboxFg1 | ||
1126 | hi! link javascriptBOMWindowMethod GruvboxFg1 | ||
1127 | hi! link javascriptStringMethod GruvboxFg1 | ||
1128 | |||
1129 | hi! link javascriptVariable GruvboxOrange | ||
1130 | " hi! link javascriptVariable GruvboxRed | ||
1131 | " hi! link javascriptIdentifier GruvboxOrange | ||
1132 | " hi! link javascriptClassSuper GruvboxOrange | ||
1133 | hi! link javascriptIdentifier GruvboxOrange | ||
1134 | hi! link javascriptClassSuper GruvboxOrange | ||
1135 | |||
1136 | " hi! link javascriptFuncKeyword GruvboxOrange | ||
1137 | " hi! link javascriptAsyncFunc GruvboxOrange | ||
1138 | hi! link javascriptFuncKeyword GruvboxAqua | ||
1139 | hi! link javascriptAsyncFunc GruvboxAqua | ||
1140 | hi! link javascriptClassStatic GruvboxOrange | ||
1141 | |||
1142 | hi! link javascriptOperator GruvboxRed | ||
1143 | hi! link javascriptForOperator GruvboxRed | ||
1144 | hi! link javascriptYield GruvboxRed | ||
1145 | hi! link javascriptExceptions GruvboxRed | ||
1146 | hi! link javascriptMessage GruvboxRed | ||
1147 | |||
1148 | hi! link javascriptTemplateSB GruvboxAqua | ||
1149 | hi! link javascriptTemplateSubstitution GruvboxFg1 | ||
1150 | |||
1151 | " hi! link javascriptLabel GruvboxBlue | ||
1152 | " hi! link javascriptObjectLabel GruvboxBlue | ||
1153 | " hi! link javascriptPropertyName GruvboxBlue | ||
1154 | hi! link javascriptLabel GruvboxFg1 | ||
1155 | hi! link javascriptObjectLabel GruvboxFg1 | ||
1156 | hi! link javascriptPropertyName GruvboxFg1 | ||
1157 | |||
1158 | hi! link javascriptLogicSymbols GruvboxFg1 | ||
1159 | hi! link javascriptArrowFunc GruvboxYellow | ||
1160 | |||
1161 | hi! link javascriptDocParamName GruvboxFg4 | ||
1162 | hi! link javascriptDocTags GruvboxFg4 | ||
1163 | hi! link javascriptDocNotation GruvboxFg4 | ||
1164 | hi! link javascriptDocParamType GruvboxFg4 | ||
1165 | hi! link javascriptDocNamedParamType GruvboxFg4 | ||
1166 | |||
1167 | hi! link javascriptBrackets GruvboxFg1 | ||
1168 | hi! link javascriptDOMElemAttrs GruvboxFg1 | ||
1169 | hi! link javascriptDOMEventMethod GruvboxFg1 | ||
1170 | hi! link javascriptDOMNodeMethod GruvboxFg1 | ||
1171 | hi! link javascriptDOMStorageMethod GruvboxFg1 | ||
1172 | hi! link javascriptHeadersMethod GruvboxFg1 | ||
1173 | |||
1174 | hi! link javascriptAsyncFuncKeyword GruvboxRed | ||
1175 | hi! link javascriptAwaitFuncKeyword GruvboxRed | ||
1176 | |||
1177 | " }}} | ||
1178 | " PanglossJS: {{{ | ||
1179 | |||
1180 | hi! link jsClassKeyword GruvboxAqua | ||
1181 | hi! link jsExtendsKeyword GruvboxAqua | ||
1182 | hi! link jsExportDefault GruvboxAqua | ||
1183 | hi! link jsTemplateBraces GruvboxAqua | ||
1184 | hi! link jsGlobalNodeObjects GruvboxFg1 | ||
1185 | hi! link jsGlobalObjects GruvboxFg1 | ||
1186 | hi! link jsFunction GruvboxAqua | ||
1187 | hi! link jsFuncParens GruvboxFg3 | ||
1188 | hi! link jsParens GruvboxFg3 | ||
1189 | hi! link jsNull GruvboxPurple | ||
1190 | hi! link jsUndefined GruvboxPurple | ||
1191 | hi! link jsClassDefinition GruvboxYellow | ||
1192 | |||
1193 | " }}} | ||
1194 | " TypeScript: {{{ | ||
1195 | |||
1196 | hi! link typeScriptReserved GruvboxAqua | ||
1197 | hi! link typeScriptLabel GruvboxAqua | ||
1198 | hi! link typeScriptFuncKeyword GruvboxAqua | ||
1199 | hi! link typeScriptIdentifier GruvboxOrange | ||
1200 | hi! link typeScriptBraces GruvboxFg1 | ||
1201 | hi! link typeScriptEndColons GruvboxFg1 | ||
1202 | hi! link typeScriptDOMObjects GruvboxFg1 | ||
1203 | hi! link typeScriptAjaxMethods GruvboxFg1 | ||
1204 | hi! link typeScriptLogicSymbols GruvboxFg1 | ||
1205 | hi! link typeScriptDocSeeTag Comment | ||
1206 | hi! link typeScriptDocParam Comment | ||
1207 | hi! link typeScriptDocTags vimCommentTitle | ||
1208 | hi! link typeScriptGlobalObjects GruvboxFg1 | ||
1209 | hi! link typeScriptParens GruvboxFg3 | ||
1210 | hi! link typeScriptOpSymbols GruvboxFg3 | ||
1211 | hi! link typeScriptHtmlElemProperties GruvboxFg1 | ||
1212 | hi! link typeScriptNull GruvboxPurple | ||
1213 | hi! link typeScriptInterpolationDelimiter GruvboxAqua | ||
1214 | |||
1215 | " }}} | ||
1216 | " PureScript: {{{ | ||
1217 | |||
1218 | hi! link purescriptModuleKeyword GruvboxAqua | ||
1219 | hi! link purescriptModuleName GruvboxFg1 | ||
1220 | hi! link purescriptWhere GruvboxAqua | ||
1221 | hi! link purescriptDelimiter GruvboxFg4 | ||
1222 | hi! link purescriptType GruvboxFg1 | ||
1223 | hi! link purescriptImportKeyword GruvboxAqua | ||
1224 | hi! link purescriptHidingKeyword GruvboxAqua | ||
1225 | hi! link purescriptAsKeyword GruvboxAqua | ||
1226 | hi! link purescriptStructure GruvboxAqua | ||
1227 | hi! link purescriptOperator GruvboxBlue | ||
1228 | |||
1229 | hi! link purescriptTypeVar GruvboxFg1 | ||
1230 | hi! link purescriptConstructor GruvboxFg1 | ||
1231 | hi! link purescriptFunction GruvboxFg1 | ||
1232 | hi! link purescriptConditional GruvboxOrange | ||
1233 | hi! link purescriptBacktick GruvboxOrange | ||
1234 | |||
1235 | " }}} | ||
1236 | " CoffeeScript: {{{ | ||
1237 | |||
1238 | hi! link coffeeExtendedOp GruvboxFg3 | ||
1239 | hi! link coffeeSpecialOp GruvboxFg3 | ||
1240 | hi! link coffeeCurly GruvboxOrange | ||
1241 | hi! link coffeeParen GruvboxFg3 | ||
1242 | hi! link coffeeBracket GruvboxOrange | ||
1243 | |||
1244 | " }}} | ||
1245 | " Ruby: {{{ | ||
1246 | |||
1247 | hi! link rubyStringDelimiter GruvboxGreen | ||
1248 | hi! link rubyInterpolationDelimiter GruvboxAqua | ||
1249 | |||
1250 | " }}} | ||
1251 | " ObjectiveC: {{{ | ||
1252 | |||
1253 | hi! link objcTypeModifier GruvboxRed | ||
1254 | hi! link objcDirective GruvboxBlue | ||
1255 | |||
1256 | " }}} | ||
1257 | " Go: {{{ | ||
1258 | |||
1259 | hi! link goDirective GruvboxAqua | ||
1260 | hi! link goConstants GruvboxPurple | ||
1261 | hi! link goDeclaration GruvboxRed | ||
1262 | hi! link goDeclType GruvboxBlue | ||
1263 | hi! link goBuiltins GruvboxOrange | ||
1264 | |||
1265 | " }}} | ||
1266 | " Lua: {{{ | ||
1267 | |||
1268 | hi! link luaIn GruvboxRed | ||
1269 | hi! link luaFunction GruvboxAqua | ||
1270 | hi! link luaTable GruvboxOrange | ||
1271 | |||
1272 | " }}} | ||
1273 | " MoonScript: {{{ | ||
1274 | |||
1275 | hi! link moonSpecialOp GruvboxFg3 | ||
1276 | hi! link moonExtendedOp GruvboxFg3 | ||
1277 | hi! link moonFunction GruvboxFg3 | ||
1278 | hi! link moonObject GruvboxYellow | ||
1279 | |||
1280 | " }}} | ||
1281 | " Java: {{{ | ||
1282 | |||
1283 | hi! link javaAnnotation GruvboxBlue | ||
1284 | hi! link javaDocTags GruvboxAqua | ||
1285 | hi! link javaCommentTitle vimCommentTitle | ||
1286 | hi! link javaParen GruvboxFg3 | ||
1287 | hi! link javaParen1 GruvboxFg3 | ||
1288 | hi! link javaParen2 GruvboxFg3 | ||
1289 | hi! link javaParen3 GruvboxFg3 | ||
1290 | hi! link javaParen4 GruvboxFg3 | ||
1291 | hi! link javaParen5 GruvboxFg3 | ||
1292 | hi! link javaOperator GruvboxOrange | ||
1293 | |||
1294 | hi! link javaVarArg GruvboxGreen | ||
1295 | |||
1296 | " }}} | ||
1297 | " Elixir: {{{ | ||
1298 | |||
1299 | hi! link elixirDocString Comment | ||
1300 | |||
1301 | hi! link elixirStringDelimiter GruvboxGreen | ||
1302 | hi! link elixirInterpolationDelimiter GruvboxAqua | ||
1303 | |||
1304 | hi! link elixirModuleDeclaration GruvboxYellow | ||
1305 | |||
1306 | " }}} | ||
1307 | " Scala: {{{ | ||
1308 | |||
1309 | " NB: scala vim syntax file is kinda horrible | ||
1310 | hi! link scalaNameDefinition GruvboxFg1 | ||
1311 | hi! link scalaCaseFollowing GruvboxFg1 | ||
1312 | hi! link scalaCapitalWord GruvboxFg1 | ||
1313 | hi! link scalaTypeExtension GruvboxFg1 | ||
1314 | |||
1315 | hi! link scalaKeyword GruvboxRed | ||
1316 | hi! link scalaKeywordModifier GruvboxRed | ||
1317 | |||
1318 | hi! link scalaSpecial GruvboxAqua | ||
1319 | hi! link scalaOperator GruvboxFg1 | ||
1320 | |||
1321 | hi! link scalaTypeDeclaration GruvboxYellow | ||
1322 | hi! link scalaTypeTypePostDeclaration GruvboxYellow | ||
1323 | |||
1324 | hi! link scalaInstanceDeclaration GruvboxFg1 | ||
1325 | hi! link scalaInterpolation GruvboxAqua | ||
1326 | |||
1327 | " }}} | ||
1328 | " Markdown: {{{ | ||
1329 | |||
1330 | call s:HL('markdownItalic', s:fg3, s:none, s:italic) | ||
1331 | |||
1332 | hi! link markdownH1 GruvboxGreenBold | ||
1333 | hi! link markdownH2 GruvboxGreenBold | ||
1334 | hi! link markdownH3 GruvboxYellowBold | ||
1335 | hi! link markdownH4 GruvboxYellowBold | ||
1336 | hi! link markdownH5 GruvboxYellow | ||
1337 | hi! link markdownH6 GruvboxYellow | ||
1338 | |||
1339 | hi! link markdownCode GruvboxAqua | ||
1340 | hi! link markdownCodeBlock GruvboxAqua | ||
1341 | hi! link markdownCodeDelimiter GruvboxAqua | ||
1342 | |||
1343 | hi! link markdownBlockquote GruvboxGray | ||
1344 | hi! link markdownListMarker GruvboxGray | ||
1345 | hi! link markdownOrderedListMarker GruvboxGray | ||
1346 | hi! link markdownRule GruvboxGray | ||
1347 | hi! link markdownHeadingRule GruvboxGray | ||
1348 | |||
1349 | hi! link markdownUrlDelimiter GruvboxFg3 | ||
1350 | hi! link markdownLinkDelimiter GruvboxFg3 | ||
1351 | hi! link markdownLinkTextDelimiter GruvboxFg3 | ||
1352 | |||
1353 | hi! link markdownHeadingDelimiter GruvboxOrange | ||
1354 | hi! link markdownUrl GruvboxPurple | ||
1355 | hi! link markdownUrlTitleDelimiter GruvboxGreen | ||
1356 | |||
1357 | call s:HL('markdownLinkText', s:gray, s:none, s:underline) | ||
1358 | hi! link markdownIdDeclaration markdownLinkText | ||
1359 | |||
1360 | " }}} | ||
1361 | " Haskell: {{{ | ||
1362 | |||
1363 | " hi! link haskellType GruvboxYellow | ||
1364 | " hi! link haskellOperators GruvboxOrange | ||
1365 | " hi! link haskellConditional GruvboxAqua | ||
1366 | " hi! link haskellLet GruvboxOrange | ||
1367 | " | ||
1368 | hi! link haskellType GruvboxFg1 | ||
1369 | hi! link haskellIdentifier GruvboxFg1 | ||
1370 | hi! link haskellSeparator GruvboxFg1 | ||
1371 | hi! link haskellDelimiter GruvboxFg4 | ||
1372 | hi! link haskellOperators GruvboxBlue | ||
1373 | " | ||
1374 | hi! link haskellBacktick GruvboxOrange | ||
1375 | hi! link haskellStatement GruvboxOrange | ||
1376 | hi! link haskellConditional GruvboxOrange | ||
1377 | |||
1378 | hi! link haskellLet GruvboxAqua | ||
1379 | hi! link haskellDefault GruvboxAqua | ||
1380 | hi! link haskellWhere GruvboxAqua | ||
1381 | hi! link haskellBottom GruvboxAqua | ||
1382 | hi! link haskellBlockKeywords GruvboxAqua | ||
1383 | hi! link haskellImportKeywords GruvboxAqua | ||
1384 | hi! link haskellDeclKeyword GruvboxAqua | ||
1385 | hi! link haskellDeriving GruvboxAqua | ||
1386 | hi! link haskellAssocType GruvboxAqua | ||
1387 | |||
1388 | hi! link haskellNumber GruvboxPurple | ||
1389 | hi! link haskellPragma GruvboxPurple | ||
1390 | |||
1391 | hi! link haskellString GruvboxGreen | ||
1392 | hi! link haskellChar GruvboxGreen | ||
1393 | |||
1394 | " }}} | ||
1395 | " Json: {{{ | ||
1396 | |||
1397 | hi! link jsonKeyword GruvboxGreen | ||
1398 | hi! link jsonQuote GruvboxGreen | ||
1399 | hi! link jsonBraces GruvboxFg1 | ||
1400 | hi! link jsonString GruvboxFg1 | ||
1401 | |||
1402 | " }}} | ||
1403 | |||
1404 | |||
1405 | " Functions ------------------------------------------------------------------- | ||
1406 | " Search Highlighting Cursor {{{ | ||
1407 | |||
1408 | function! GruvboxHlsShowCursor() | ||
1409 | call s:HL('Cursor', s:bg0, s:hls_cursor) | ||
1410 | endfunction | ||
1411 | |||
1412 | function! GruvboxHlsHideCursor() | ||
1413 | call s:HL('Cursor', s:none, s:none, s:inverse) | ||
1414 | endfunction | ||
1415 | |||
1416 | " }}} | ||
1417 | |||
1418 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: | ||
diff --git a/.vim/pack/default/start/gruvbox/gruvbox_256palette.sh b/.vim/pack/default/start/gruvbox/gruvbox_256palette.sh new file mode 100755 index 0000000..c7fd190 --- /dev/null +++ b/.vim/pack/default/start/gruvbox/gruvbox_256palette.sh | |||
@@ -0,0 +1,118 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ "${TERM%%-*}" = "screen" ]; then | ||
4 | if [ -n "$TMUX" ]; then | ||
5 | printf "\033Ptmux;\033\033]4;236;rgb:32/30/2f\007\033\\" | ||
6 | printf "\033Ptmux;\033\033]4;234;rgb:1d/20/21\007\033\\" | ||
7 | |||
8 | printf "\033Ptmux;\033\033]4;235;rgb:28/28/28\007\033\\" | ||
9 | printf "\033Ptmux;\033\033]4;237;rgb:3c/38/36\007\033\\" | ||
10 | printf "\033Ptmux;\033\033]4;239;rgb:50/49/45\007\033\\" | ||
11 | printf "\033Ptmux;\033\033]4;241;rgb:66/5c/54\007\033\\" | ||
12 | printf "\033Ptmux;\033\033]4;243;rgb:7c/6f/64\007\033\\" | ||
13 | |||
14 | printf "\033Ptmux;\033\033]4;244;rgb:92/83/74\007\033\\" | ||
15 | printf "\033Ptmux;\033\033]4;245;rgb:92/83/74\007\033\\" | ||
16 | |||
17 | printf "\033Ptmux;\033\033]4;228;rgb:f2/e5/bc\007\033\\" | ||
18 | printf "\033Ptmux;\033\033]4;230;rgb:f9/f5/d7\007\033\\" | ||
19 | |||
20 | printf "\033Ptmux;\033\033]4;229;rgb:fb/f1/c7\007\033\\" | ||
21 | printf "\033Ptmux;\033\033]4;223;rgb:eb/db/b2\007\033\\" | ||
22 | printf "\033Ptmux;\033\033]4;250;rgb:d5/c4/a1\007\033\\" | ||
23 | printf "\033Ptmux;\033\033]4;248;rgb:bd/ae/93\007\033\\" | ||
24 | printf "\033Ptmux;\033\033]4;246;rgb:a8/99/84\007\033\\" | ||
25 | |||
26 | printf "\033Ptmux;\033\033]4;167;rgb:fb/49/34\007\033\\" | ||
27 | printf "\033Ptmux;\033\033]4;142;rgb:b8/bb/26\007\033\\" | ||
28 | printf "\033Ptmux;\033\033]4;214;rgb:fa/bd/2f\007\033\\" | ||
29 | printf "\033Ptmux;\033\033]4;109;rgb:83/a5/98\007\033\\" | ||
30 | printf "\033Ptmux;\033\033]4;175;rgb:d3/86/9b\007\033\\" | ||
31 | printf "\033Ptmux;\033\033]4;108;rgb:8e/c0/7c\007\033\\" | ||
32 | printf "\033Ptmux;\033\033]4;208;rgb:fe/80/19\007\033\\" | ||
33 | |||
34 | printf "\033Ptmux;\033\033]4;88;rgb:9d/00/06\007\033\\" | ||
35 | printf "\033Ptmux;\033\033]4;100;rgb:79/74/0e\007\033\\" | ||
36 | printf "\033Ptmux;\033\033]4;136;rgb:b5/76/14\007\033\\" | ||
37 | printf "\033Ptmux;\033\033]4;24;rgb:07/66/78\007\033\\" | ||
38 | printf "\033Ptmux;\033\033]4;96;rgb:8f/3f/71\007\033\\" | ||
39 | printf "\033Ptmux;\033\033]4;66;rgb:42/7b/58\007\033\\" | ||
40 | printf "\033Ptmux;\033\033]4;130;rgb:af/3a/03\007\033\\" | ||
41 | else | ||
42 | printf "\033P\033]4;236;rgb:32/30/2f\007\033\\" | ||
43 | printf "\033P\033]4;234;rgb:1d/20/21\007\033\\" | ||
44 | |||
45 | printf "\033P\033]4;235;rgb:28/28/28\007\033\\" | ||
46 | printf "\033P\033]4;237;rgb:3c/38/36\007\033\\" | ||
47 | printf "\033P\033]4;239;rgb:50/49/45\007\033\\" | ||
48 | printf "\033P\033]4;241;rgb:66/5c/54\007\033\\" | ||
49 | printf "\033P\033]4;243;rgb:7c/6f/64\007\033\\" | ||
50 | |||
51 | printf "\033P\033]4;244;rgb:92/83/74\007\033\\" | ||
52 | printf "\033P\033]4;245;rgb:92/83/74\007\033\\" | ||
53 | |||
54 | printf "\033P\033]4;228;rgb:f2/e5/bc\007\033\\" | ||
55 | printf "\033P\033]4;230;rgb:f9/f5/d7\007\033\\" | ||
56 | |||
57 | printf "\033P\033]4;229;rgb:fb/f1/c7\007\033\\" | ||
58 | printf "\033P\033]4;223;rgb:eb/db/b2\007\033\\" | ||
59 | printf "\033P\033]4;250;rgb:d5/c4/a1\007\033\\" | ||
60 | printf "\033P\033]4;248;rgb:bd/ae/93\007\033\\" | ||
61 | printf "\033P\033]4;246;rgb:a8/99/84\007\033\\" | ||
62 | |||
63 | printf "\033P\033]4;167;rgb:fb/49/34\007\033\\" | ||
64 | printf "\033P\033]4;142;rgb:b8/bb/26\007\033\\" | ||
65 | printf "\033P\033]4;214;rgb:fa/bd/2f\007\033\\" | ||
66 | printf "\033P\033]4;109;rgb:83/a5/98\007\033\\" | ||
67 | printf "\033P\033]4;175;rgb:d3/86/9b\007\033\\" | ||
68 | printf "\033P\033]4;108;rgb:8e/c0/7c\007\033\\" | ||
69 | printf "\033P\033]4;208;rgb:fe/80/19\007\033\\" | ||
70 | |||
71 | printf "\033P\033]4;88;rgb:9d/00/06\007\033\\" | ||
72 | printf "\033P\033]4;100;rgb:79/74/0e\007\033\\" | ||
73 | printf "\033P\033]4;136;rgb:b5/76/14\007\033\\" | ||
74 | printf "\033P\033]4;24;rgb:07/66/78\007\033\\" | ||
75 | printf "\033P\033]4;96;rgb:8f/3f/71\007\033\\" | ||
76 | printf "\033P\033]4;66;rgb:42/7b/58\007\033\\" | ||
77 | printf "\033P\033]4;130;rgb:af/3a/03\007\033\\" | ||
78 | fi | ||
79 | |||
80 | elif [ "$TERM" != "linux" ] && [ "$TERM" != "vt100" ] && [ "$TERM" != "vt220" ]; then | ||
81 | |||
82 | printf "\033]4;236;rgb:32/30/2f\033\\" | ||
83 | printf "\033]4;234;rgb:1d/20/21\033\\" | ||
84 | |||
85 | printf "\033]4;235;rgb:28/28/28\033\\" | ||
86 | printf "\033]4;237;rgb:3c/38/36\033\\" | ||
87 | printf "\033]4;239;rgb:50/49/45\033\\" | ||
88 | printf "\033]4;241;rgb:66/5c/54\033\\" | ||
89 | printf "\033]4;243;rgb:7c/6f/64\033\\" | ||
90 | |||
91 | printf "\033]4;244;rgb:92/83/74\033\\" | ||
92 | printf "\033]4;245;rgb:92/83/74\033\\" | ||
93 | |||
94 | printf "\033]4;228;rgb:f2/e5/bc\033\\" | ||
95 | printf "\033]4;230;rgb:f9/f5/d7\033\\" | ||
96 | |||
97 | printf "\033]4;229;rgb:fb/f1/c7\033\\" | ||
98 | printf "\033]4;223;rgb:eb/db/b2\033\\" | ||
99 | printf "\033]4;250;rgb:d5/c4/a1\033\\" | ||
100 | printf "\033]4;248;rgb:bd/ae/93\033\\" | ||
101 | printf "\033]4;246;rgb:a8/99/84\033\\" | ||
102 | |||
103 | printf "\033]4;167;rgb:fb/49/34\033\\" | ||
104 | printf "\033]4;142;rgb:b8/bb/26\033\\" | ||
105 | printf "\033]4;214;rgb:fa/bd/2f\033\\" | ||
106 | printf "\033]4;109;rgb:83/a5/98\033\\" | ||
107 | printf "\033]4;175;rgb:d3/86/9b\033\\" | ||
108 | printf "\033]4;108;rgb:8e/c0/7c\033\\" | ||
109 | printf "\033]4;208;rgb:fe/80/19\033\\" | ||
110 | |||
111 | printf "\033]4;88;rgb:9d/00/06\033\\" | ||
112 | printf "\033]4;100;rgb:79/74/0e\033\\" | ||
113 | printf "\033]4;136;rgb:b5/76/14\033\\" | ||
114 | printf "\033]4;24;rgb:07/66/78\033\\" | ||
115 | printf "\033]4;96;rgb:8f/3f/71\033\\" | ||
116 | printf "\033]4;66;rgb:42/7b/58\033\\" | ||
117 | printf "\033]4;130;rgb:af/3a/03\033\\" | ||
118 | fi | ||
diff --git a/.vim/pack/default/start/gruvbox/gruvbox_256palette_osx.sh b/.vim/pack/default/start/gruvbox/gruvbox_256palette_osx.sh new file mode 100755 index 0000000..ad5111a --- /dev/null +++ b/.vim/pack/default/start/gruvbox/gruvbox_256palette_osx.sh | |||
@@ -0,0 +1,116 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ "${TERM%%-*}" = "screen" ]; then | ||
4 | if [ -n "$TMUX" ]; then | ||
5 | printf "\033Ptmux;\033\033]4;236;rgb:26/24/23\007\033\\" | ||
6 | printf "\033Ptmux;\033\033]4;234;rgb:16/18/19\007\033\\" | ||
7 | |||
8 | printf "\033Ptmux;\033\033]4;235;rgb:1e/1e/1e\007\033\\" | ||
9 | printf "\033Ptmux;\033\033]4;237;rgb:2e/2a/29\007\033\\" | ||
10 | printf "\033Ptmux;\033\033]4;239;rgb:3f/39/35\007\033\\" | ||
11 | printf "\033Ptmux;\033\033]4;241;rgb:53/4a/42\007\033\\" | ||
12 | printf "\033Ptmux;\033\033]4;243;rgb:68/5c/51\007\033\\" | ||
13 | |||
14 | printf "\033Ptmux;\033\033]4;244;rgb:7f/70/61\007\033\\" | ||
15 | printf "\033Ptmux;\033\033]4;245;rgb:7f/70/61\007\033\\" | ||
16 | |||
17 | printf "\033Ptmux;\033\033]4;228;rgb:ef/df/ae\007\033\\" | ||
18 | printf "\033Ptmux;\033\033]4;230;rgb:f8/f4/cd\007\033\\" | ||
19 | |||
20 | printf "\033Ptmux;\033\033]4;229;rgb:fa/ee/bb\007\033\\" | ||
21 | printf "\033Ptmux;\033\033]4;223;rgb:e6/d4/a3\007\033\\" | ||
22 | printf "\033Ptmux;\033\033]4;250;rgb:cb/b8/90\007\033\\" | ||
23 | printf "\033Ptmux;\033\033]4;248;rgb:af/9f/81\007\033\\" | ||
24 | printf "\033Ptmux;\033\033]4;246;rgb:97/87/71\007\033\\" | ||
25 | |||
26 | printf "\033Ptmux;\033\033]4;167;rgb:f7/30/28\007\033\\" | ||
27 | printf "\033Ptmux;\033\033]4;142;rgb:aa/b0/1e\007\033\\" | ||
28 | printf "\033Ptmux;\033\033]4;214;rgb:f7/b1/25\007\033\\" | ||
29 | printf "\033Ptmux;\033\033]4;109;rgb:71/95/86\007\033\\" | ||
30 | printf "\033Ptmux;\033\033]4;175;rgb:c7/70/89\007\033\\" | ||
31 | printf "\033Ptmux;\033\033]4;108;rgb:7d/b6/69\007\033\\" | ||
32 | printf "\033Ptmux;\033\033]4;208;rgb:fb/6a/16\007\033\\" | ||
33 | |||
34 | printf "\033Ptmux;\033\033]4;88;rgb:89/00/09\007\033\\" | ||
35 | printf "\033Ptmux;\033\033]4;100;rgb:66/62/0d\007\033\\" | ||
36 | printf "\033Ptmux;\033\033]4;136;rgb:a5/63/11\007\033\\" | ||
37 | printf "\033Ptmux;\033\033]4;24;rgb:0e/53/65\007\033\\" | ||
38 | printf "\033Ptmux;\033\033]4;96;rgb:7b/2b/5e\007\033\\" | ||
39 | printf "\033Ptmux;\033\033]4;66;rgb:35/6a/46\007\033\\" | ||
40 | printf "\033Ptmux;\033\033]4;130;rgb:9d/28/07\007\033\\" | ||
41 | else | ||
42 | printf "\033P\033]4;236;rgb:26/24/23\007\033\\" | ||
43 | printf "\033P\033]4;234;rgb:16/18/19\007\033\\" | ||
44 | |||
45 | printf "\033P\033]4;235;rgb:1e/1e/1e\007\033\\" | ||
46 | printf "\033P\033]4;237;rgb:2e/2a/29\007\033\\" | ||
47 | printf "\033P\033]4;239;rgb:3f/39/35\007\033\\" | ||
48 | printf "\033P\033]4;241;rgb:53/4a/42\007\033\\" | ||
49 | printf "\033P\033]4;243;rgb:68/5c/51\007\033\\" | ||
50 | |||
51 | printf "\033P\033]4;244;rgb:7f/70/61\007\033\\" | ||
52 | printf "\033P\033]4;245;rgb:7f/70/61\007\033\\" | ||
53 | |||
54 | printf "\033P\033]4;228;rgb:ef/df/ae\007\033\\" | ||
55 | printf "\033P\033]4;230;rgb:f8/f4/cd\007\033\\" | ||
56 | |||
57 | printf "\033P\033]4;229;rgb:fa/ee/bb\007\033\\" | ||
58 | printf "\033P\033]4;223;rgb:e6/d4/a3\007\033\\" | ||
59 | printf "\033P\033]4;250;rgb:cb/b8/90\007\033\\" | ||
60 | printf "\033P\033]4;248;rgb:af/9f/81\007\033\\" | ||
61 | printf "\033P\033]4;246;rgb:97/87/71\007\033\\" | ||
62 | |||
63 | printf "\033P\033]4;167;rgb:f7/30/28\007\033\\" | ||
64 | printf "\033P\033]4;142;rgb:aa/b0/1e\007\033\\" | ||
65 | printf "\033P\033]4;214;rgb:f7/b1/25\007\033\\" | ||
66 | printf "\033P\033]4;109;rgb:71/95/86\007\033\\" | ||
67 | printf "\033P\033]4;175;rgb:c7/70/89\007\033\\" | ||
68 | printf "\033P\033]4;108;rgb:7d/b6/69\007\033\\" | ||
69 | printf "\033P\033]4;208;rgb:fb/6a/16\007\033\\" | ||
70 | |||
71 | printf "\033P\033]4;88;rgb:89/00/09\007\033\\" | ||
72 | printf "\033P\033]4;100;rgb:66/62/0d\007\033\\" | ||
73 | printf "\033P\033]4;136;rgb:a5/63/11\007\033\\" | ||
74 | printf "\033P\033]4;24;rgb:0e/53/65\007\033\\" | ||
75 | printf "\033P\033]4;96;rgb:7b/2b/5e\007\033\\" | ||
76 | printf "\033P\033]4;66;rgb:35/6a/46\007\033\\" | ||
77 | printf "\033P\033]4;130;rgb:9d/28/07\007\033\\" | ||
78 | fi | ||
79 | else | ||
80 | printf "\033]4;236;rgb:26/24/23\033\\" | ||
81 | printf "\033]4;234;rgb:16/18/19\033\\" | ||
82 | |||
83 | printf "\033]4;235;rgb:1e/1e/1e\033\\" | ||
84 | printf "\033]4;237;rgb:2e/2a/29\033\\" | ||
85 | printf "\033]4;239;rgb:3f/39/35\033\\" | ||
86 | printf "\033]4;241;rgb:53/4a/42\033\\" | ||
87 | printf "\033]4;243;rgb:68/5c/51\033\\" | ||
88 | |||
89 | printf "\033]4;244;rgb:7f/70/61\033\\" | ||
90 | printf "\033]4;245;rgb:7f/70/61\033\\" | ||
91 | |||
92 | printf "\033]4;228;rgb:ef/df/ae\033\\" | ||
93 | printf "\033]4;230;rgb:f8/f4/cd\033\\" | ||
94 | |||
95 | printf "\033]4;229;rgb:fa/ee/bb\033\\" | ||
96 | printf "\033]4;223;rgb:e6/d4/a3\033\\" | ||
97 | printf "\033]4;250;rgb:cb/b8/90\033\\" | ||
98 | printf "\033]4;248;rgb:af/9f/81\033\\" | ||
99 | printf "\033]4;246;rgb:97/87/71\033\\" | ||
100 | |||
101 | printf "\033]4;167;rgb:f7/30/28\033\\" | ||
102 | printf "\033]4;142;rgb:aa/b0/1e\033\\" | ||
103 | printf "\033]4;214;rgb:f7/b1/25\033\\" | ||
104 | printf "\033]4;109;rgb:71/95/86\033\\" | ||
105 | printf "\033]4;175;rgb:c7/70/89\033\\" | ||
106 | printf "\033]4;108;rgb:7d/b6/69\033\\" | ||
107 | printf "\033]4;208;rgb:fb/6a/16\033\\" | ||
108 | |||
109 | printf "\033]4;88;rgb:89/00/09\033\\" | ||
110 | printf "\033]4;100;rgb:66/62/0d\033\\" | ||
111 | printf "\033]4;136;rgb:a5/63/11\033\\" | ||
112 | printf "\033]4;24;rgb:0e/53/65\033\\" | ||
113 | printf "\033]4;96;rgb:7b/2b/5e\033\\" | ||
114 | printf "\033]4;66;rgb:35/6a/46\033\\" | ||
115 | printf "\033]4;130;rgb:9d/28/07\033\\" | ||
116 | fi | ||
diff --git a/.vim/pack/vendor/start/nerdtree/autoload/nerdtree.vim b/.vim/pack/vendor/start/nerdtree/autoload/nerdtree.vim new file mode 100644 index 0000000..ba70871 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/autoload/nerdtree.vim | |||
@@ -0,0 +1,249 @@ | |||
1 | if exists('g:loaded_nerdtree_autoload') | ||
2 | finish | ||
3 | endif | ||
4 | let g:loaded_nerdtree_autoload = 1 | ||
5 | |||
6 | let s:rootNERDTreePath = resolve(expand('<sfile>:p:h:h')) | ||
7 | |||
8 | "FUNCTION: nerdtree#version(...) {{{1 | ||
9 | " If any value is given as an argument, the entire line of text from the | ||
10 | " change log is shown for the current version; otherwise, only the version | ||
11 | " number is shown. | ||
12 | function! nerdtree#version(...) abort | ||
13 | let l:text = 'Unknown' | ||
14 | try | ||
15 | let l:changelog = readfile(join([s:rootNERDTreePath, 'CHANGELOG.md'], nerdtree#slash())) | ||
16 | let l:line = 0 | ||
17 | while l:line <= len(l:changelog) | ||
18 | if l:changelog[l:line] =~# '\d\+\.\d\+' | ||
19 | let l:text = substitute(l:changelog[l:line], '.*\(\d\+.\d\+\).*', '\1', '') | ||
20 | let l:text .= substitute(l:changelog[l:line+1], '^.\{-}\(\.\d\+\).\{-}:\(.*\)', a:0>0 ? '\1:\2' : '\1', '') | ||
21 | break | ||
22 | endif | ||
23 | let l:line += 1 | ||
24 | endwhile | ||
25 | catch | ||
26 | endtry | ||
27 | return l:text | ||
28 | endfunction | ||
29 | |||
30 | " SECTION: General Functions {{{1 | ||
31 | "============================================================ | ||
32 | |||
33 | " FUNCTION: nerdtree#closeTreeOnOpen() {{{2 | ||
34 | function! nerdtree#closeTreeOnOpen() abort | ||
35 | return g:NERDTreeQuitOnOpen == 1 || g:NERDTreeQuitOnOpen == 3 | ||
36 | endfunction | ||
37 | |||
38 | " FUNCTION: nerdtree#closeBookmarksOnOpen() {{{2 | ||
39 | function! nerdtree#closeBookmarksOnOpen() abort | ||
40 | return g:NERDTreeQuitOnOpen == 2 || g:NERDTreeQuitOnOpen == 3 | ||
41 | endfunction | ||
42 | |||
43 | " FUNCTION: nerdtree#slash() {{{2 | ||
44 | " Return the path separator used by the underlying file system. Special | ||
45 | " consideration is taken for the use of the 'shellslash' option on Windows | ||
46 | " systems. | ||
47 | function! nerdtree#slash() abort | ||
48 | if nerdtree#runningWindows() | ||
49 | if exists('+shellslash') && &shellslash | ||
50 | return '/' | ||
51 | endif | ||
52 | |||
53 | return '\' | ||
54 | endif | ||
55 | |||
56 | return '/' | ||
57 | endfunction | ||
58 | |||
59 | "FUNCTION: nerdtree#checkForBrowse(dir) {{{2 | ||
60 | "inits a window tree in the current buffer if appropriate | ||
61 | function! nerdtree#checkForBrowse(dir) abort | ||
62 | if !isdirectory(a:dir) | ||
63 | return | ||
64 | endif | ||
65 | |||
66 | if s:reuseWin(a:dir) | ||
67 | return | ||
68 | endif | ||
69 | |||
70 | call g:NERDTreeCreator.CreateWindowTree(a:dir) | ||
71 | endfunction | ||
72 | |||
73 | "FUNCTION: s:reuseWin(dir) {{{2 | ||
74 | "finds a NERDTree buffer with root of dir, and opens it. | ||
75 | function! s:reuseWin(dir) abort | ||
76 | let path = g:NERDTreePath.New(fnamemodify(a:dir, ':p')) | ||
77 | |||
78 | for i in range(1, bufnr('$')) | ||
79 | unlet! nt | ||
80 | let nt = getbufvar(i, 'NERDTree') | ||
81 | if empty(nt) | ||
82 | continue | ||
83 | endif | ||
84 | |||
85 | if nt.isWinTree() && nt.root.path.equals(path) | ||
86 | call nt.setPreviousBuf(bufnr('#')) | ||
87 | exec 'buffer ' . i | ||
88 | return 1 | ||
89 | endif | ||
90 | endfor | ||
91 | |||
92 | return 0 | ||
93 | endfunction | ||
94 | |||
95 | " FUNCTION: nerdtree#completeBookmarks(A,L,P) {{{2 | ||
96 | " completion function for the bookmark commands | ||
97 | function! nerdtree#completeBookmarks(A,L,P) abort | ||
98 | return filter(g:NERDTreeBookmark.BookmarkNames(), 'v:val =~# "^' . a:A . '"') | ||
99 | endfunction | ||
100 | |||
101 | "FUNCTION: nerdtree#compareNodes(n1, n2) {{{2 | ||
102 | function! nerdtree#compareNodes(n1, n2) abort | ||
103 | return nerdtree#compareNodePaths(a:n1.path, a:n2.path) | ||
104 | endfunction | ||
105 | |||
106 | "FUNCTION: nerdtree#compareNodePaths(p1, p2) {{{2 | ||
107 | function! nerdtree#compareNodePaths(p1, p2) abort | ||
108 | let sortKey1 = a:p1.getSortKey() | ||
109 | let sortKey2 = a:p2.getSortKey() | ||
110 | let i = 0 | ||
111 | while i < min([len(sortKey1), len(sortKey2)]) | ||
112 | " Compare chunks upto common length. | ||
113 | " If chunks have different type, the one which has | ||
114 | " integer type is the lesser. | ||
115 | if type(sortKey1[i]) == type(sortKey2[i]) | ||
116 | if sortKey1[i] <# sortKey2[i] | ||
117 | return - 1 | ||
118 | elseif sortKey1[i] ># sortKey2[i] | ||
119 | return 1 | ||
120 | endif | ||
121 | elseif type(sortKey1[i]) == type(0) | ||
122 | return -1 | ||
123 | elseif type(sortKey2[i]) == type(0) | ||
124 | return 1 | ||
125 | endif | ||
126 | let i += 1 | ||
127 | endwhile | ||
128 | |||
129 | " Keys are identical upto common length. | ||
130 | " The key which has smaller chunks is the lesser one. | ||
131 | if len(sortKey1) < len(sortKey2) | ||
132 | return -1 | ||
133 | elseif len(sortKey1) > len(sortKey2) | ||
134 | return 1 | ||
135 | else | ||
136 | return 0 | ||
137 | endif | ||
138 | endfunction | ||
139 | |||
140 | " FUNCTION: nerdtree#deprecated(func, [msg]) {{{2 | ||
141 | " Issue a deprecation warning for a:func. If a second arg is given, use this | ||
142 | " as the deprecation message | ||
143 | function! nerdtree#deprecated(func, ...) abort | ||
144 | let msg = a:0 ? a:func . ' ' . a:1 : a:func . ' is deprecated' | ||
145 | |||
146 | if !exists('s:deprecationWarnings') | ||
147 | let s:deprecationWarnings = {} | ||
148 | endif | ||
149 | if !has_key(s:deprecationWarnings, a:func) | ||
150 | let s:deprecationWarnings[a:func] = 1 | ||
151 | echomsg msg | ||
152 | endif | ||
153 | endfunction | ||
154 | |||
155 | " FUNCTION: nerdtree#exec(cmd, ignoreAll) {{{2 | ||
156 | " Same as :exec cmd but, if ignoreAll is TRUE, set eventignore=all for the duration | ||
157 | function! nerdtree#exec(cmd, ignoreAll) abort | ||
158 | let old_ei = &eventignore | ||
159 | if a:ignoreAll | ||
160 | set eventignore=all | ||
161 | endif | ||
162 | try | ||
163 | exec a:cmd | ||
164 | finally | ||
165 | let &eventignore = old_ei | ||
166 | endtry | ||
167 | endfunction | ||
168 | |||
169 | " FUNCTION: nerdtree#has_opt(options, name) {{{2 | ||
170 | function! nerdtree#has_opt(options, name) abort | ||
171 | return has_key(a:options, a:name) && a:options[a:name] ==# 1 | ||
172 | endfunction | ||
173 | |||
174 | " FUNCTION: nerdtree#loadClassFiles() {{{2 | ||
175 | function! nerdtree#loadClassFiles() abort | ||
176 | runtime lib/nerdtree/path.vim | ||
177 | runtime lib/nerdtree/menu_controller.vim | ||
178 | runtime lib/nerdtree/menu_item.vim | ||
179 | runtime lib/nerdtree/key_map.vim | ||
180 | runtime lib/nerdtree/bookmark.vim | ||
181 | runtime lib/nerdtree/tree_file_node.vim | ||
182 | runtime lib/nerdtree/tree_dir_node.vim | ||
183 | runtime lib/nerdtree/opener.vim | ||
184 | runtime lib/nerdtree/creator.vim | ||
185 | runtime lib/nerdtree/flag_set.vim | ||
186 | runtime lib/nerdtree/nerdtree.vim | ||
187 | runtime lib/nerdtree/ui.vim | ||
188 | runtime lib/nerdtree/event.vim | ||
189 | runtime lib/nerdtree/notifier.vim | ||
190 | endfunction | ||
191 | |||
192 | " FUNCTION: nerdtree#postSourceActions() {{{2 | ||
193 | function! nerdtree#postSourceActions() abort | ||
194 | call g:NERDTreeBookmark.CacheBookmarks(1) | ||
195 | call nerdtree#ui_glue#createDefaultBindings() | ||
196 | |||
197 | "load all nerdtree plugins | ||
198 | runtime! nerdtree_plugin/**/*.vim | ||
199 | endfunction | ||
200 | |||
201 | "FUNCTION: nerdtree#runningWindows(dir) {{{2 | ||
202 | function! nerdtree#runningWindows() abort | ||
203 | return has('win16') || has('win32') || has('win64') | ||
204 | endfunction | ||
205 | |||
206 | "FUNCTION: nerdtree#runningCygwin(dir) {{{2 | ||
207 | function! nerdtree#runningCygwin() abort | ||
208 | return has('win32unix') | ||
209 | endfunction | ||
210 | |||
211 | " SECTION: View Functions {{{1 | ||
212 | "============================================================ | ||
213 | |||
214 | "FUNCTION: nerdtree#echo {{{2 | ||
215 | "A wrapper for :echo. Appends 'NERDTree:' on the front of all messages | ||
216 | " | ||
217 | "Args: | ||
218 | "msg: the message to echo | ||
219 | function! nerdtree#echo(msg) abort | ||
220 | redraw | ||
221 | echomsg empty(a:msg) ? '' : ('NERDTree: ' . a:msg) | ||
222 | endfunction | ||
223 | |||
224 | "FUNCTION: nerdtree#echoError {{{2 | ||
225 | "Wrapper for nerdtree#echo, sets the message type to errormsg for this message | ||
226 | "Args: | ||
227 | "msg: the message to echo | ||
228 | function! nerdtree#echoError(msg) abort | ||
229 | echohl errormsg | ||
230 | call nerdtree#echo(a:msg) | ||
231 | echohl normal | ||
232 | endfunction | ||
233 | |||
234 | "FUNCTION: nerdtree#echoWarning {{{2 | ||
235 | "Wrapper for nerdtree#echo, sets the message type to warningmsg for this message | ||
236 | "Args: | ||
237 | "msg: the message to echo | ||
238 | function! nerdtree#echoWarning(msg) abort | ||
239 | echohl warningmsg | ||
240 | call nerdtree#echo(a:msg) | ||
241 | echohl normal | ||
242 | endfunction | ||
243 | |||
244 | "FUNCTION: nerdtree#renderView {{{2 | ||
245 | function! nerdtree#renderView() abort | ||
246 | call b:NERDTree.render() | ||
247 | endfunction | ||
248 | |||
249 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/autoload/nerdtree/ui_glue.vim b/.vim/pack/vendor/start/nerdtree/autoload/nerdtree/ui_glue.vim new file mode 100644 index 0000000..fc22f21 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/autoload/nerdtree/ui_glue.vim | |||
@@ -0,0 +1,732 @@ | |||
1 | if exists('g:loaded_nerdtree_ui_glue_autoload') | ||
2 | finish | ||
3 | endif | ||
4 | let g:loaded_nerdtree_ui_glue_autoload = 1 | ||
5 | |||
6 | " FUNCTION: nerdtree#ui_glue#createDefaultBindings() {{{1 | ||
7 | function! nerdtree#ui_glue#createDefaultBindings() abort | ||
8 | let s = '<SNR>' . s:SID() . '_' | ||
9 | |||
10 | call NERDTreeAddKeyMap({ 'key': '<MiddleMouse>', 'scope': 'all', 'callback': s . 'handleMiddleMouse' }) | ||
11 | call NERDTreeAddKeyMap({ 'key': '<LeftRelease>', 'scope': 'all', 'callback': s.'handleLeftClick' }) | ||
12 | call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': 'DirNode', 'callback': s.'activateDirNode' }) | ||
13 | call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': 'FileNode', 'callback': s.'activateFileNode' }) | ||
14 | call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': 'Bookmark', 'callback': s.'activateBookmark' }) | ||
15 | call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': 'all', 'callback': s.'activateAll' }) | ||
16 | |||
17 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'FileNode', 'callback': s.'customOpenFile'}) | ||
18 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'DirNode', 'callback': s.'customOpenDir'}) | ||
19 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'Bookmark', 'callback': s.'customOpenBookmark'}) | ||
20 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'all', 'callback': s.'activateAll' }) | ||
21 | |||
22 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'DirNode', 'callback': s.'activateDirNode' }) | ||
23 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'FileNode', 'callback': s.'activateFileNode' }) | ||
24 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'Bookmark', 'callback': s.'activateBookmark' }) | ||
25 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': 'Bookmark', 'callback': s.'previewBookmark' }) | ||
26 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'all', 'callback': s.'activateAll' }) | ||
27 | |||
28 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': 'FileNode', 'callback': s.'openHSplit' }) | ||
29 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': 'Bookmark', 'callback': s.'openHSplitBookmark' }) | ||
30 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': 'FileNode', 'callback': s.'openVSplit' }) | ||
31 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': 'Bookmark', 'callback': s.'openVSplitBookmark' }) | ||
32 | |||
33 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': 'FileNode', 'callback': s.'previewNodeCurrent' }) | ||
34 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': 'FileNode', 'callback': s.'previewNodeHSplit' }) | ||
35 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': 'Bookmark', 'callback': s.'previewNodeHSplitBookmark' }) | ||
36 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': 'FileNode', 'callback': s.'previewNodeVSplit' }) | ||
37 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': 'Bookmark', 'callback': s.'previewNodeVSplitBookmark' }) | ||
38 | |||
39 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenRecursively, 'scope': 'DirNode', 'callback': s.'openNodeRecursively' }) | ||
40 | |||
41 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapUpdir, 'scope': 'all', 'callback': s . 'upDirCurrentRootClosed' }) | ||
42 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapUpdirKeepOpen, 'scope': 'all', 'callback': s . 'upDirCurrentRootOpen' }) | ||
43 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapChangeRoot, 'scope': 'Node', 'callback': s . 'chRoot' }) | ||
44 | |||
45 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapChdir, 'scope': 'Node', 'callback': s.'chCwd' }) | ||
46 | |||
47 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapQuit, 'scope': 'all', 'callback': s.'closeTreeWindow' }) | ||
48 | |||
49 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCWD, 'scope': 'all', 'callback': 'nerdtree#ui_glue#chRootCwd' }) | ||
50 | |||
51 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapRefreshRoot, 'scope': 'all', 'callback': s.'refreshRoot' }) | ||
52 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapRefresh, 'scope': 'Node', 'callback': s.'refreshCurrent' }) | ||
53 | |||
54 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapHelp, 'scope': 'all', 'callback': s.'displayHelp' }) | ||
55 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleZoom, 'scope': 'all', 'callback': s.'toggleZoom' }) | ||
56 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleHidden, 'scope': 'all', 'callback': s.'toggleShowHidden' }) | ||
57 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleFilters, 'scope': 'all', 'callback': s.'toggleIgnoreFilter' }) | ||
58 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleFiles, 'scope': 'all', 'callback': s.'toggleShowFiles' }) | ||
59 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleBookmarks, 'scope': 'all', 'callback': s.'toggleShowBookmarks' }) | ||
60 | |||
61 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCloseDir, 'scope': 'Node', 'callback': s.'closeCurrentDir' }) | ||
62 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCloseChildren, 'scope': 'DirNode', 'callback': s.'closeChildren' }) | ||
63 | |||
64 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapMenu, 'scope': 'Node', 'callback': s.'showMenu' }) | ||
65 | |||
66 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpParent, 'scope': 'Node', 'callback': s.'jumpToParent' }) | ||
67 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpFirstChild, 'scope': 'Node', 'callback': s.'jumpToFirstChild' }) | ||
68 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpLastChild, 'scope': 'Node', 'callback': s.'jumpToLastChild' }) | ||
69 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpRoot, 'scope': 'all', 'callback': s.'jumpToRoot' }) | ||
70 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpNextSibling, 'scope': 'Node', 'callback': s.'jumpToNextSibling' }) | ||
71 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpPrevSibling, 'scope': 'Node', 'callback': s.'jumpToPrevSibling' }) | ||
72 | |||
73 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTab, 'scope': 'Node', 'callback': s . 'openInNewTab' }) | ||
74 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTabSilent, 'scope': 'Node', 'callback': s . 'openInNewTabSilent' }) | ||
75 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTab, 'scope': 'Bookmark', 'callback': s . 'openInNewTab' }) | ||
76 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTabSilent, 'scope': 'Bookmark', 'callback': s . 'openInNewTabSilent' }) | ||
77 | |||
78 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenExpl, 'scope': 'DirNode', 'callback': s.'openExplorer' }) | ||
79 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenExpl, 'scope': 'FileNode', 'callback': s.'openExplorer' }) | ||
80 | |||
81 | call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapDeleteBookmark, 'scope': 'Bookmark', 'callback': s.'deleteBookmark' }) | ||
82 | endfunction | ||
83 | |||
84 | |||
85 | "SECTION: Interface bindings {{{1 | ||
86 | "============================================================ | ||
87 | |||
88 | "FUNCTION: s:customOpenFile() {{{1 | ||
89 | " Open file node with the 'custom' key, initially <CR>. | ||
90 | function! s:customOpenFile(node) abort | ||
91 | call a:node.activate(s:initCustomOpenArgs().file) | ||
92 | endfunction | ||
93 | |||
94 | "FUNCTION: s:customOpenDir() {{{1 | ||
95 | " Open directory node with the 'custom' key, initially <CR>. | ||
96 | function! s:customOpenDir(node) abort | ||
97 | call s:activateDirNode(a:node, s:initCustomOpenArgs().dir) | ||
98 | endfunction | ||
99 | |||
100 | "FUNCTION: s:customOpenBookmark() {{{1 | ||
101 | " Open bookmark node with the 'custom' key, initially <CR>. | ||
102 | function! s:customOpenBookmark(node) abort | ||
103 | if a:node.path.isDirectory | ||
104 | call a:node.activate(b:NERDTree, s:initCustomOpenArgs().dir) | ||
105 | else | ||
106 | call a:node.activate(b:NERDTree, s:initCustomOpenArgs().file) | ||
107 | endif | ||
108 | endfunction | ||
109 | |||
110 | "FUNCTION: s:initCustomOpenArgs() {{{1 | ||
111 | function! s:initCustomOpenArgs() abort | ||
112 | let l:defaultOpenArgs = {'file': {'reuse': 'all', 'where': 'p', 'keepopen':!nerdtree#closeTreeOnOpen()}, 'dir': {}} | ||
113 | try | ||
114 | let g:NERDTreeCustomOpenArgs = get(g:, 'NERDTreeCustomOpenArgs', {}) | ||
115 | call extend(g:NERDTreeCustomOpenArgs, l:defaultOpenArgs, 'keep') | ||
116 | catch /^Vim(\a\+):E712:/ | ||
117 | call nerdtree#echoWarning('g:NERDTreeCustomOpenArgs is not set properly. Using default value.') | ||
118 | let g:NERDTreeCustomOpenArgs = l:defaultOpenArgs | ||
119 | finally | ||
120 | return g:NERDTreeCustomOpenArgs | ||
121 | endtry | ||
122 | endfunction | ||
123 | |||
124 | "FUNCTION: s:activateAll() {{{1 | ||
125 | "handle the user activating the updir line | ||
126 | function! s:activateAll() abort | ||
127 | if getline('.') ==# g:NERDTreeUI.UpDirLine() | ||
128 | return nerdtree#ui_glue#upDir(0) | ||
129 | endif | ||
130 | endfunction | ||
131 | |||
132 | " FUNCTION: s:activateDirNode(directoryNode, options) {{{1 | ||
133 | " Open a directory with optional options | ||
134 | function! s:activateDirNode(directoryNode, ...) abort | ||
135 | |||
136 | if a:directoryNode.isRoot() && a:directoryNode.isOpen | ||
137 | call nerdtree#echo('cannot close tree root') | ||
138 | return | ||
139 | endif | ||
140 | |||
141 | call a:directoryNode.activate((a:0 > 0) ? a:1 : {}) | ||
142 | endfunction | ||
143 | |||
144 | "FUNCTION: s:activateFileNode() {{{1 | ||
145 | "handle the user activating a tree node | ||
146 | function! s:activateFileNode(node) abort | ||
147 | call a:node.activate({'reuse': 'all', 'where': 'p', 'keepopen': !nerdtree#closeTreeOnOpen()}) | ||
148 | endfunction | ||
149 | |||
150 | "FUNCTION: s:activateBookmark(bookmark) {{{1 | ||
151 | "handle the user activating a bookmark | ||
152 | function! s:activateBookmark(bm) abort | ||
153 | call a:bm.activate(b:NERDTree, !a:bm.path.isDirectory ? {'where': 'p', 'keepopen': !nerdtree#closeTreeOnOpen()} : {}) | ||
154 | endfunction | ||
155 | |||
156 | " FUNCTION: nerdtree#ui_glue#bookmarkNode(name) {{{1 | ||
157 | " Associate the current node with the given name | ||
158 | function! nerdtree#ui_glue#bookmarkNode(...) abort | ||
159 | let currentNode = g:NERDTreeFileNode.GetSelected() | ||
160 | if currentNode !=# {} | ||
161 | let name = a:1 | ||
162 | if empty(name) | ||
163 | let name = currentNode.path.getLastPathComponent(0) | ||
164 | endif | ||
165 | try | ||
166 | call currentNode.bookmark(name) | ||
167 | call b:NERDTree.render() | ||
168 | catch /^NERDTree.IllegalBookmarkNameError/ | ||
169 | call nerdtree#echo('bookmark names must not contain spaces') | ||
170 | endtry | ||
171 | else | ||
172 | call nerdtree#echo('select a node first') | ||
173 | endif | ||
174 | endfunction | ||
175 | |||
176 | " FUNCTION: s:chCwd(node) {{{1 | ||
177 | function! s:chCwd(node) abort | ||
178 | try | ||
179 | call a:node.path.changeToDir() | ||
180 | catch /^NERDTree.PathChangeError/ | ||
181 | call nerdtree#echoWarning('could not change cwd') | ||
182 | endtry | ||
183 | endfunction | ||
184 | |||
185 | " FUNCTION: s:chRoot(node) {{{1 | ||
186 | " changes the current root to the selected one | ||
187 | function! s:chRoot(node) abort | ||
188 | call b:NERDTree.changeRoot(a:node) | ||
189 | endfunction | ||
190 | |||
191 | " FUNCTION: s:nerdtree#ui_glue#chRootCwd() {{{1 | ||
192 | " Change the NERDTree root to match the current working directory. | ||
193 | function! nerdtree#ui_glue#chRootCwd() abort | ||
194 | NERDTreeCWD | ||
195 | endfunction | ||
196 | |||
197 | " FUNCTION: nnerdtree#ui_glue#clearBookmarks(bookmarks) {{{1 | ||
198 | function! nerdtree#ui_glue#clearBookmarks(bookmarks) abort | ||
199 | if a:bookmarks ==# '' | ||
200 | let currentNode = g:NERDTreeFileNode.GetSelected() | ||
201 | if currentNode !=# {} | ||
202 | call currentNode.clearBookmarks() | ||
203 | endif | ||
204 | else | ||
205 | for name in split(a:bookmarks, ' ') | ||
206 | let bookmark = g:NERDTreeBookmark.BookmarkFor(name) | ||
207 | call bookmark.delete() | ||
208 | endfor | ||
209 | endif | ||
210 | call b:NERDTree.root.refresh() | ||
211 | call b:NERDTree.render() | ||
212 | endfunction | ||
213 | |||
214 | " FUNCTION: s:closeChildren(node) {{{1 | ||
215 | " closes all childnodes of the current node | ||
216 | function! s:closeChildren(node) abort | ||
217 | call a:node.closeChildren() | ||
218 | call b:NERDTree.render() | ||
219 | call a:node.putCursorHere(0, 0) | ||
220 | endfunction | ||
221 | |||
222 | " FUNCTION: s:closeCurrentDir(node) {{{1 | ||
223 | " Close the parent directory of the current node. | ||
224 | function! s:closeCurrentDir(node) abort | ||
225 | |||
226 | if a:node.isRoot() | ||
227 | call nerdtree#echo('cannot close parent of tree root') | ||
228 | return | ||
229 | endif | ||
230 | |||
231 | let l:parent = a:node.parent | ||
232 | |||
233 | while l:parent.isCascadable() | ||
234 | let l:parent = l:parent.parent | ||
235 | endwhile | ||
236 | |||
237 | if l:parent.isRoot() | ||
238 | call nerdtree#echo('cannot close tree root') | ||
239 | return | ||
240 | endif | ||
241 | |||
242 | call l:parent.close() | ||
243 | call b:NERDTree.render() | ||
244 | call l:parent.putCursorHere(0, 0) | ||
245 | endfunction | ||
246 | |||
247 | " FUNCTION: s:closeTreeWindow() {{{1 | ||
248 | " close the tree window | ||
249 | function! s:closeTreeWindow() abort | ||
250 | if b:NERDTree.isWinTree() && b:NERDTree.previousBuf() !=# -1 | ||
251 | exec 'buffer ' . b:NERDTree.previousBuf() | ||
252 | else | ||
253 | if winnr('$') > 1 | ||
254 | call g:NERDTree.Close() | ||
255 | else | ||
256 | call nerdtree#echo('Cannot close last window') | ||
257 | endif | ||
258 | endif | ||
259 | endfunction | ||
260 | |||
261 | " FUNCTION: s:deleteBookmark(bookmark) {{{1 | ||
262 | " Prompt the user to confirm the deletion of the selected bookmark. | ||
263 | function! s:deleteBookmark(bookmark) abort | ||
264 | let l:message = 'Delete the bookmark "' . a:bookmark.name | ||
265 | \ . '" from the bookmark list?' | ||
266 | |||
267 | let l:choices = "&Yes\n&No" | ||
268 | |||
269 | echo | redraw | ||
270 | let l:selection = confirm(l:message, l:choices, 1, 'Warning') | ||
271 | |||
272 | if l:selection !=# 1 | ||
273 | call nerdtree#echo('bookmark not deleted') | ||
274 | return | ||
275 | endif | ||
276 | |||
277 | try | ||
278 | call a:bookmark.delete() | ||
279 | silent call b:NERDTree.root.refresh() | ||
280 | call b:NERDTree.render() | ||
281 | echo | redraw | ||
282 | catch /^NERDTree/ | ||
283 | call nerdtree#echoWarning('could not remove bookmark') | ||
284 | endtry | ||
285 | endfunction | ||
286 | |||
287 | " FUNCTION: s:displayHelp() {{{1 | ||
288 | " toggles the help display | ||
289 | function! s:displayHelp() abort | ||
290 | call b:NERDTree.ui.toggleHelp() | ||
291 | call b:NERDTree.render() | ||
292 | call b:NERDTree.ui.centerView() | ||
293 | endfunction | ||
294 | |||
295 | " FUNCTION: s:findAndRevealPath(pathStr) {{{1 | ||
296 | function! s:findAndRevealPath(pathStr) abort | ||
297 | let l:pathStr = !empty(a:pathStr) ? a:pathStr : expand('%:p') | ||
298 | let l:revealOpts = {} | ||
299 | |||
300 | if empty(l:pathStr) | ||
301 | call nerdtree#echoWarning('no file for the current buffer') | ||
302 | return | ||
303 | endif | ||
304 | |||
305 | if !filereadable(l:pathStr) | ||
306 | let l:pathStr = fnamemodify(l:pathStr, ':h') | ||
307 | let l:revealOpts['open'] = 1 | ||
308 | endif | ||
309 | |||
310 | try | ||
311 | let l:pathStr = g:NERDTreePath.Resolve(l:pathStr) | ||
312 | let l:pathObj = g:NERDTreePath.New(l:pathStr) | ||
313 | catch /^NERDTree.InvalidArgumentsError/ | ||
314 | call nerdtree#echoWarning('invalid path') | ||
315 | return | ||
316 | endtry | ||
317 | |||
318 | if !g:NERDTree.ExistsForTab() | ||
319 | try | ||
320 | let l:cwd = g:NERDTreePath.New(getcwd()) | ||
321 | catch /^NERDTree.InvalidArgumentsError/ | ||
322 | call nerdtree#echo('current directory does not exist.') | ||
323 | let l:cwd = l:pathObj.getParent() | ||
324 | endtry | ||
325 | |||
326 | if l:pathObj.isUnder(l:cwd) | ||
327 | call g:NERDTreeCreator.CreateTabTree(l:cwd.str()) | ||
328 | else | ||
329 | call g:NERDTreeCreator.CreateTabTree(l:pathObj.getParent().str()) | ||
330 | endif | ||
331 | else | ||
332 | NERDTreeFocus | ||
333 | |||
334 | if !l:pathObj.isUnder(b:NERDTree.root.path) | ||
335 | call s:chRoot(g:NERDTreeDirNode.New(l:pathObj.getParent(), b:NERDTree)) | ||
336 | endif | ||
337 | endif | ||
338 | |||
339 | if l:pathObj.isHiddenUnder(b:NERDTree.root.path) | ||
340 | call b:NERDTree.ui.setShowHidden(1) | ||
341 | endif | ||
342 | |||
343 | let l:node = b:NERDTree.root.reveal(l:pathObj, l:revealOpts) | ||
344 | call b:NERDTree.render() | ||
345 | call l:node.putCursorHere(1, 0) | ||
346 | endfunction | ||
347 | |||
348 | "FUNCTION: s:handleLeftClick() {{{1 | ||
349 | "Checks if the click should open the current node | ||
350 | function! s:handleLeftClick() abort | ||
351 | let currentNode = g:NERDTreeFileNode.GetSelected() | ||
352 | if currentNode !=# {} | ||
353 | |||
354 | "the dir arrows are multibyte chars, and vim's string functions only | ||
355 | "deal with single bytes - so split the line up with the hack below and | ||
356 | "take the line substring manually | ||
357 | let line = split(getline(line('.')), '\zs') | ||
358 | let startToCur = '' | ||
359 | for i in range(0,len(line)-1) | ||
360 | let startToCur .= line[i] | ||
361 | endfor | ||
362 | |||
363 | if currentNode.path.isDirectory | ||
364 | if startToCur =~# g:NERDTreeUI.MarkupReg() && startToCur =~# '[+~'.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.'] \?$' | ||
365 | call currentNode.activate() | ||
366 | return | ||
367 | endif | ||
368 | endif | ||
369 | |||
370 | if (g:NERDTreeMouseMode ==# 2 && currentNode.path.isDirectory) || g:NERDTreeMouseMode ==# 3 | ||
371 | let char = strpart(startToCur, strlen(startToCur)-1, 1) | ||
372 | if char !~# g:NERDTreeUI.MarkupReg() | ||
373 | if currentNode.path.isDirectory | ||
374 | call currentNode.activate() | ||
375 | else | ||
376 | call currentNode.activate({'reuse': 'all', 'where': 'p', 'keepopen':!nerdtree#closeTreeOnOpen()}) | ||
377 | endif | ||
378 | return | ||
379 | endif | ||
380 | endif | ||
381 | endif | ||
382 | endfunction | ||
383 | |||
384 | " FUNCTION: s:handleMiddleMouse() {{{1 | ||
385 | function! s:handleMiddleMouse() abort | ||
386 | |||
387 | " A middle mouse click does not automatically position the cursor as one | ||
388 | " would expect. Forcing the execution of a regular left mouse click here | ||
389 | " fixes this problem. | ||
390 | execute "normal! \<LeftMouse>" | ||
391 | |||
392 | let l:currentNode = g:NERDTreeFileNode.GetSelected() | ||
393 | if empty(l:currentNode) | ||
394 | call nerdtree#echoError('use the pointer to select a node') | ||
395 | return | ||
396 | endif | ||
397 | |||
398 | if l:currentNode.path.isDirectory | ||
399 | call l:currentNode.openExplorer() | ||
400 | else | ||
401 | call l:currentNode.open({'where': 'h'}) | ||
402 | endif | ||
403 | endfunction | ||
404 | |||
405 | " FUNCTION: nerdtree#ui_glue#invokeKeyMap(key) {{{1 | ||
406 | "this is needed since I cant figure out how to invoke dict functions from a | ||
407 | "key map | ||
408 | function! nerdtree#ui_glue#invokeKeyMap(key) abort | ||
409 | call g:NERDTreeKeyMap.Invoke(a:key) | ||
410 | endfunction | ||
411 | |||
412 | " FUNCTION: s:jumpToFirstChild(node) {{{1 | ||
413 | function! s:jumpToFirstChild(node) abort | ||
414 | call s:jumpToChild(a:node, 0) | ||
415 | endfunction | ||
416 | |||
417 | " FUNCTION: s:jumpToLastChild(node) {{{1 | ||
418 | function! s:jumpToLastChild(node) abort | ||
419 | call s:jumpToChild(a:node, 1) | ||
420 | endfunction | ||
421 | |||
422 | " FUNCTION: s:jumpToChild(node, last) {{{1 | ||
423 | " Jump to the first or last child node at the same file system level. | ||
424 | " | ||
425 | " Args: | ||
426 | " node: the node on which the cursor currently sits | ||
427 | " last: 1 (true) if jumping to last child, 0 (false) if jumping to first | ||
428 | function! s:jumpToChild(node, last) abort | ||
429 | let l:node = a:node.path.isDirectory ? a:node.getCascadeRoot() : a:node | ||
430 | |||
431 | if l:node.isRoot() | ||
432 | return | ||
433 | endif | ||
434 | |||
435 | let l:parent = l:node.parent | ||
436 | let l:children = l:parent.getVisibleChildren() | ||
437 | |||
438 | let l:target = a:last ? l:children[len(l:children) - 1] : l:children[0] | ||
439 | |||
440 | call l:target.putCursorHere(1, 0) | ||
441 | call b:NERDTree.ui.centerView() | ||
442 | endfunction | ||
443 | |||
444 | " FUNCTION: s:jumpToParent(node) {{{1 | ||
445 | " Move the cursor to the parent of the specified node. For a cascade, move to | ||
446 | " the parent of the cascade's first node. At the root node, do nothing. | ||
447 | function! s:jumpToParent(node) abort | ||
448 | let l:node = a:node.path.isDirectory ? a:node.getCascadeRoot() : a:node | ||
449 | |||
450 | if l:node.isRoot() | ||
451 | return | ||
452 | endif | ||
453 | |||
454 | if empty(l:node.parent) | ||
455 | call nerdtree#echo('could not jump to parent node') | ||
456 | return | ||
457 | endif | ||
458 | |||
459 | call l:node.parent.putCursorHere(1, 0) | ||
460 | call b:NERDTree.ui.centerView() | ||
461 | endfunction | ||
462 | |||
463 | " FUNCTION: s:jumpToRoot() {{{1 | ||
464 | " moves the cursor to the root node | ||
465 | function! s:jumpToRoot() abort | ||
466 | call b:NERDTree.root.putCursorHere(1, 0) | ||
467 | call b:NERDTree.ui.centerView() | ||
468 | endfunction | ||
469 | |||
470 | " FUNCTION: s:jumpToNextSibling(node) {{{1 | ||
471 | function! s:jumpToNextSibling(node) abort | ||
472 | call s:jumpToSibling(a:node, 1) | ||
473 | endfunction | ||
474 | |||
475 | " FUNCTION: s:jumpToPrevSibling(node) {{{1 | ||
476 | function! s:jumpToPrevSibling(node) abort | ||
477 | call s:jumpToSibling(a:node, 0) | ||
478 | endfunction | ||
479 | |||
480 | " FUNCTION: s:jumpToSibling(node, forward) {{{1 | ||
481 | " Move the cursor to the next or previous node at the same file system level. | ||
482 | " | ||
483 | " Args: | ||
484 | " node: the node on which the cursor currently sits | ||
485 | " forward: 0 to jump to previous sibling, 1 to jump to next sibling | ||
486 | function! s:jumpToSibling(node, forward) abort | ||
487 | let l:node = a:node.path.isDirectory ? a:node.getCascadeRoot() : a:node | ||
488 | let l:sibling = l:node.findSibling(a:forward) | ||
489 | |||
490 | if empty(l:sibling) | ||
491 | return | ||
492 | endif | ||
493 | |||
494 | call l:sibling.putCursorHere(1, 0) | ||
495 | call b:NERDTree.ui.centerView() | ||
496 | endfunction | ||
497 | |||
498 | " FUNCTION: nerdtree#ui_glue#openBookmark(name) {{{1 | ||
499 | " Open the Bookmark that has the specified name. This function provides the | ||
500 | " implementation for the :OpenBookmark command. | ||
501 | function! nerdtree#ui_glue#openBookmark(name) abort | ||
502 | try | ||
503 | let l:bookmark = g:NERDTreeBookmark.BookmarkFor(a:name) | ||
504 | catch /^NERDTree.BookmarkNotFoundError/ | ||
505 | call nerdtree#echoError('bookmark "' . a:name . '" not found') | ||
506 | return | ||
507 | endtry | ||
508 | if l:bookmark.path.isDirectory | ||
509 | call l:bookmark.open(b:NERDTree) | ||
510 | return | ||
511 | endif | ||
512 | |||
513 | call l:bookmark.open(b:NERDTree, s:initCustomOpenArgs().file) | ||
514 | endfunction | ||
515 | |||
516 | " FUNCTION: s:openHSplit(target) {{{1 | ||
517 | function! s:openHSplit(target) abort | ||
518 | call a:target.activate({'where': 'h', 'keepopen': !nerdtree#closeTreeOnOpen()}) | ||
519 | endfunction | ||
520 | |||
521 | " FUNCTION: s:openVSplit(target) {{{1 | ||
522 | function! s:openVSplit(target) abort | ||
523 | call a:target.activate({'where': 'v', 'keepopen': !nerdtree#closeTreeOnOpen()}) | ||
524 | endfunction | ||
525 | |||
526 | "FUNCTION: s:openHSplitBookmark(bookmark) {{{1 | ||
527 | "handle the user activating a bookmark | ||
528 | function! s:openHSplitBookmark(bm) abort | ||
529 | call a:bm.activate(b:NERDTree, !a:bm.path.isDirectory ? {'where': 'h', 'keepopen': !nerdtree#closeTreeOnOpen()} : {}) | ||
530 | endfunction | ||
531 | |||
532 | "FUNCTION: s:openVSplitBookmark(bookmark) {{{1 | ||
533 | "handle the user activating a bookmark | ||
534 | function! s:openVSplitBookmark(bm) abort | ||
535 | call a:bm.activate(b:NERDTree, !a:bm.path.isDirectory ? {'where': 'v', 'keepopen': !nerdtree#closeTreeOnOpen()} : {}) | ||
536 | endfunction | ||
537 | |||
538 | " FUNCTION: s:previewHSplitBookmark(bookmark) {{{1 | ||
539 | function! s:previewNodeHSplitBookmark(bookmark) abort | ||
540 | call a:bookmark.activate(b:NERDTree, !a:bookmark.path.isDirectory ? {'stay': 1, 'where': 'h', 'keepopen': 1} : {}) | ||
541 | endfunction | ||
542 | |||
543 | " FUNCTION: s:previewVSplitBookmark(bookmark) {{{1 | ||
544 | function! s:previewNodeVSplitBookmark(bookmark) abort | ||
545 | call a:bookmark.activate(b:NERDTree, !a:bookmark.path.isDirectory ? {'stay': 1, 'where': 'v', 'keepopen': 1} : {}) | ||
546 | endfunction | ||
547 | |||
548 | " FUNCTION: s:openExplorer(node) {{{1 | ||
549 | function! s:openExplorer(node) abort | ||
550 | call a:node.openExplorer() | ||
551 | endfunction | ||
552 | |||
553 | " FUNCTION: s:openInNewTab(target) {{{1 | ||
554 | function! s:openInNewTab(target) abort | ||
555 | let l:opener = g:NERDTreeOpener.New(a:target.path, {'where': 't', 'keepopen': !nerdtree#closeTreeOnOpen()}) | ||
556 | call l:opener.open(a:target) | ||
557 | endfunction | ||
558 | |||
559 | " FUNCTION: s:openInNewTabSilent(target) {{{1 | ||
560 | function! s:openInNewTabSilent(target) abort | ||
561 | let l:opener = g:NERDTreeOpener.New(a:target.path, {'where': 't', 'keepopen': !nerdtree#closeTreeOnOpen(), 'stay': 1}) | ||
562 | call l:opener.open(a:target) | ||
563 | endfunction | ||
564 | |||
565 | " FUNCTION: s:openNodeRecursively(node) {{{1 | ||
566 | function! s:openNodeRecursively(node) abort | ||
567 | call nerdtree#echo('Recursively opening node. Please wait...') | ||
568 | call a:node.openRecursively() | ||
569 | call b:NERDTree.render() | ||
570 | call nerdtree#echo('') | ||
571 | endfunction | ||
572 | |||
573 | " FUNCTION: s:previewBookmark(bookmark) {{{1 | ||
574 | function! s:previewBookmark(bookmark) abort | ||
575 | if a:bookmark.path.isDirectory | ||
576 | execute 'NERDTreeFind '.a:bookmark.path.str() | ||
577 | else | ||
578 | call a:bookmark.activate(b:NERDTree, {'stay': 1, 'where': 'p', 'keepopen': 1}) | ||
579 | endif | ||
580 | endfunction | ||
581 | |||
582 | "FUNCTION: s:previewNodeCurrent(node) {{{1 | ||
583 | function! s:previewNodeCurrent(node) abort | ||
584 | call a:node.open({'stay': 1, 'where': 'p', 'keepopen': 1}) | ||
585 | endfunction | ||
586 | |||
587 | "FUNCTION: s:previewNodeHSplit(node) {{{1 | ||
588 | function! s:previewNodeHSplit(node) abort | ||
589 | call a:node.open({'stay': 1, 'where': 'h', 'keepopen': 1}) | ||
590 | endfunction | ||
591 | |||
592 | "FUNCTION: s:previewNodeVSplit(node) {{{1 | ||
593 | function! s:previewNodeVSplit(node) abort | ||
594 | call a:node.open({'stay': 1, 'where': 'v', 'keepopen': 1}) | ||
595 | endfunction | ||
596 | |||
597 | " FUNCTION: nerdtree#ui_glue#revealBookmark(name) {{{1 | ||
598 | " put the cursor on the node associate with the given name | ||
599 | function! nerdtree#ui_glue#revealBookmark(name) abort | ||
600 | try | ||
601 | let targetNode = g:NERDTreeBookmark.GetNodeForName(a:name, 0, b:NERDTree) | ||
602 | call targetNode.putCursorHere(0, 1) | ||
603 | catch /^NERDTree.BookmarkNotFoundError/ | ||
604 | call nerdtree#echo('Bookmark isn''t cached under the current root') | ||
605 | endtry | ||
606 | endfunction | ||
607 | |||
608 | " FUNCTION: s:refreshRoot() {{{1 | ||
609 | " Reloads the current root. All nodes below this will be lost and the root dir | ||
610 | " will be reloaded. | ||
611 | function! s:refreshRoot() abort | ||
612 | if !g:NERDTree.IsOpen() | ||
613 | return | ||
614 | endif | ||
615 | call nerdtree#echo('Refreshing the root node. This could take a while...') | ||
616 | |||
617 | let l:curWin = winnr() | ||
618 | call nerdtree#exec(g:NERDTree.GetWinNum() . 'wincmd w', 1) | ||
619 | call b:NERDTree.root.refresh() | ||
620 | call b:NERDTree.render() | ||
621 | redraw | ||
622 | call nerdtree#exec(l:curWin . 'wincmd w', 1) | ||
623 | call nerdtree#echo('') | ||
624 | endfunction | ||
625 | |||
626 | " FUNCTION: s:refreshCurrent(node) {{{1 | ||
627 | " refreshes the root for the current node | ||
628 | function! s:refreshCurrent(node) abort | ||
629 | let node = a:node | ||
630 | if !node.path.isDirectory | ||
631 | let node = node.parent | ||
632 | endif | ||
633 | |||
634 | call nerdtree#echo('Refreshing node. This could take a while...') | ||
635 | call node.refresh() | ||
636 | call b:NERDTree.render() | ||
637 | call nerdtree#echo('') | ||
638 | endfunction | ||
639 | |||
640 | " FUNCTION: nerdtree#ui_glue#setupCommands() {{{1 | ||
641 | function! nerdtree#ui_glue#setupCommands() abort | ||
642 | command! -n=? -complete=dir -bar NERDTree :call g:NERDTreeCreator.CreateTabTree('<args>') | ||
643 | command! -n=? -complete=dir -bar NERDTreeToggle :call g:NERDTreeCreator.ToggleTabTree('<args>') | ||
644 | command! -n=0 -bar NERDTreeClose :call g:NERDTree.Close() | ||
645 | command! -n=1 -complete=customlist,nerdtree#completeBookmarks -bar NERDTreeFromBookmark call g:NERDTreeCreator.CreateTabTree('<args>') | ||
646 | command! -n=0 -bar NERDTreeMirror call g:NERDTreeCreator.CreateMirror() | ||
647 | command! -n=? -complete=file -bar NERDTreeFind call s:findAndRevealPath('<args>') | ||
648 | command! -n=0 -bar NERDTreeRefreshRoot call s:refreshRoot() | ||
649 | command! -n=0 -bar NERDTreeFocus call NERDTreeFocus() | ||
650 | command! -n=0 -bar NERDTreeCWD call NERDTreeCWD() | ||
651 | endfunction | ||
652 | |||
653 | " Function: s:SID() {{{1 | ||
654 | function! s:SID() abort | ||
655 | if !exists('s:sid') | ||
656 | let s:sid = matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$') | ||
657 | endif | ||
658 | return s:sid | ||
659 | endfun | ||
660 | |||
661 | " FUNCTION: s:showMenu(node) {{{1 | ||
662 | function! s:showMenu(node) abort | ||
663 | let mc = g:NERDTreeMenuController.New(g:NERDTreeMenuItem.AllEnabled()) | ||
664 | call mc.showMenu() | ||
665 | endfunction | ||
666 | |||
667 | " FUNCTION: s:toggleIgnoreFilter() {{{1 | ||
668 | function! s:toggleIgnoreFilter() abort | ||
669 | call b:NERDTree.ui.toggleIgnoreFilter() | ||
670 | endfunction | ||
671 | |||
672 | " FUNCTION: s:toggleShowBookmarks() {{{1 | ||
673 | function! s:toggleShowBookmarks() abort | ||
674 | call b:NERDTree.ui.toggleShowBookmarks() | ||
675 | endfunction | ||
676 | |||
677 | " FUNCTION: s:toggleShowFiles() {{{1 | ||
678 | function! s:toggleShowFiles() abort | ||
679 | call b:NERDTree.ui.toggleShowFiles() | ||
680 | endfunction | ||
681 | |||
682 | " FUNCTION: s:toggleShowHidden() {{{1 | ||
683 | " toggles the display of hidden files | ||
684 | function! s:toggleShowHidden() abort | ||
685 | call b:NERDTree.ui.toggleShowHidden() | ||
686 | endfunction | ||
687 | |||
688 | " FUNCTION: s:toggleZoom() {{{1 | ||
689 | function! s:toggleZoom() abort | ||
690 | call b:NERDTree.ui.toggleZoom() | ||
691 | endfunction | ||
692 | |||
693 | " FUNCTION: nerdtree#ui_glue#upDir(preserveState) {{{1 | ||
694 | " Move the NERDTree up one level. | ||
695 | " | ||
696 | " Args: | ||
697 | " preserveState: if 1, the current root is left open when the new tree is | ||
698 | " rendered; if 0, the current root node is closed | ||
699 | function! nerdtree#ui_glue#upDir(preserveState) abort | ||
700 | |||
701 | try | ||
702 | call b:NERDTree.root.cacheParent() | ||
703 | catch /^NERDTree.CannotCacheParentError/ | ||
704 | call nerdtree#echo('already at root directory') | ||
705 | return | ||
706 | endtry | ||
707 | |||
708 | let l:oldRoot = b:NERDTree.root | ||
709 | let l:newRoot = b:NERDTree.root.parent | ||
710 | |||
711 | call l:newRoot.open() | ||
712 | call l:newRoot.transplantChild(l:oldRoot) | ||
713 | |||
714 | if !a:preserveState | ||
715 | call l:oldRoot.close() | ||
716 | endif | ||
717 | |||
718 | call b:NERDTree.changeRoot(l:newRoot) | ||
719 | call l:oldRoot.putCursorHere(0, 0) | ||
720 | endfunction | ||
721 | |||
722 | " FUNCTION: s:upDirCurrentRootOpen() {{{1 | ||
723 | function! s:upDirCurrentRootOpen() abort | ||
724 | call nerdtree#ui_glue#upDir(1) | ||
725 | endfunction | ||
726 | |||
727 | " FUNCTION: s:upDirCurrentRootClosed() {{{1 | ||
728 | function! s:upDirCurrentRootClosed() abort | ||
729 | call nerdtree#ui_glue#upDir(0) | ||
730 | endfunction | ||
731 | |||
732 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/doc/NERDTree.txt b/.vim/pack/vendor/start/nerdtree/doc/NERDTree.txt new file mode 100644 index 0000000..55c25cd --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/doc/NERDTree.txt | |||
@@ -0,0 +1,1534 @@ | |||
1 | *NERDTree.txt* A tree explorer plugin to rule the Vim world. Bwahahaha!! | ||
2 | |||
3 | # #### #### ~ | ||
4 | ### \/#|### |/#### ~ | ||
5 | d8 888 ##\/#/ \||/##/_/##/_# ~ | ||
6 | d88 888 ee ,e e, ### \/###|/ \/ # ### ~ | ||
7 | d88888 888 88b d88 88b ##_\_#\_\## | #/###_/_#### ~ | ||
8 | 888 888 888 888 , ## #### # \ #| / #### ##/## ~ | ||
9 | 888 888 888 "YeeP" __#_--###`. |{,###---###-~ ~ | ||
10 | \ % @% ~ | ||
11 | Y88b Y88 888'Y88 888 88e 888 88e \%@% 88P'888'Y88 ~ | ||
12 | Y88b Y8 888 ,'Y 888 888D 888 888b %o% P' 888 'Y 888,8, ,e e, ,e e, ~ | ||
13 | b Y88b Y 888C8 888 88" 888 8888D %@% 888 888 " d88 88b d88 88b ~ | ||
14 | 8b Y88b 888 ",d 888 b, 888 888P %@% 888 888 888 , 888 , ~ | ||
15 | 88b Y88b 888,d88 888 88b, 888 88" %@% 888 888 "YeeP" "YeeP" ~ | ||
16 | , -=-%{@%-^- _ ~ | ||
17 | ejm `} Reference Manual ~ | ||
18 | { ~ | ||
19 | ============================================================================== | ||
20 | CONTENTS *NERDTree-contents* | ||
21 | |||
22 | 1.Intro...................................|NERDTree| | ||
23 | 2.Functionality provided..................|NERDTreeFunctionality| | ||
24 | 2.1.Global commands...................|NERDTreeGlobalCommands| | ||
25 | 2.2.Bookmarks.........................|NERDTreeBookmarks| | ||
26 | 2.2.1.The bookmark table..........|NERDTreeBookmarkTable| | ||
27 | 2.2.2.Bookmark commands...........|NERDTreeBookmarkCommands| | ||
28 | 2.2.3.Invalid bookmarks...........|NERDTreeInvalidBookmarks| | ||
29 | 2.3.NERDTree mappings.................|NERDTreeMappings| | ||
30 | 2.4.The NERDTree menu.................|NERDTreeMenu| | ||
31 | 3.Settings................................|NERDTreeSettings| | ||
32 | 3.1.Settings summary..................|NERDTreeSettingsSummary| | ||
33 | 3.2.Settings details..................|NERDTreeSettingsDetails| | ||
34 | 4.The NERDTree API........................|NERDTreeAPI| | ||
35 | 4.1.Key map API.......................|NERDTreeKeymapAPI| | ||
36 | 4.2.Menu API..........................|NERDTreeMenuAPI| | ||
37 | 4.3.Menu API..........................|NERDTreeAddPathFilter()| | ||
38 | 4.4.Path Listener API.................|NERDTreePathListenerAPI| | ||
39 | 5.About...................................|NERDTreeAbout| | ||
40 | 6.License.................................|NERDTreeLicense| | ||
41 | |||
42 | ============================================================================== | ||
43 | 1. Intro *NERDTree* | ||
44 | |||
45 | What is this "NERDTree"?? | ||
46 | |||
47 | The NERDTree allows you to explore your filesystem and to open files and | ||
48 | directories. It presents the filesystem to you in the form of a tree which you | ||
49 | manipulate with the keyboard and/or mouse. It also allows you to perform | ||
50 | simple filesystem operations. | ||
51 | |||
52 | The following features and functionality are provided by the NERDTree: | ||
53 | * Files and directories are displayed in a hierarchical tree structure | ||
54 | * Different highlighting is provided for the following types of nodes: | ||
55 | * files | ||
56 | * directories | ||
57 | * sym-links | ||
58 | * windows .lnk files | ||
59 | * read-only files | ||
60 | * executable files | ||
61 | * Many (customisable) mappings are provided to manipulate the tree: | ||
62 | * Mappings to open/close/explore directory nodes | ||
63 | * Mappings to open files in new/existing windows/tabs | ||
64 | * Mappings to change the current root of the tree | ||
65 | * Mappings to navigate around the tree | ||
66 | * ... | ||
67 | * Directories and files can be bookmarked. | ||
68 | * Most NERDTree navigation can also be done with the mouse | ||
69 | * Filtering of tree content (can be toggled at runtime) | ||
70 | * custom file filters to prevent e.g. vim backup files being displayed | ||
71 | * optional displaying of hidden files (. files) | ||
72 | * files can be "turned off" so that only directories are displayed | ||
73 | * The position and size of the NERDTree window can be customised | ||
74 | * The order in which the nodes in the tree are listed can be customised. | ||
75 | * A model of your filesystem is created/maintained as you explore it. This | ||
76 | has several advantages: | ||
77 | * All filesystem information is cached and is only re-read on demand | ||
78 | * If you revisit a part of the tree that you left earlier in your | ||
79 | session, the directory nodes will be opened/closed as you left them | ||
80 | * The script remembers the cursor position and window position in the NERD | ||
81 | tree so you can toggle it off (or just close the tree window) and then | ||
82 | reopen it (with NERDTreeToggle) the NERDTree window will appear exactly | ||
83 | as you left it | ||
84 | * You can have a separate NERDTree for each tab, share trees across tabs, | ||
85 | or a mix of both. | ||
86 | * By default the script overrides the default file browser (netrw), so if | ||
87 | you :edit a directory a (slightly modified) NERDTree will appear in the | ||
88 | current window | ||
89 | * A programmable menu system is provided (simulates right clicking on a | ||
90 | node) | ||
91 | * one default menu plugin is provided to perform basic filesystem | ||
92 | operations (create/delete/move/copy files/directories) | ||
93 | * There's an API for adding your own keymappings | ||
94 | |||
95 | |||
96 | ============================================================================== | ||
97 | 2. Functionality provided *NERDTreeFunctionality* | ||
98 | |||
99 | ------------------------------------------------------------------------------ | ||
100 | 2.1. Global Commands *NERDTreeGlobalCommands* | ||
101 | |||
102 | :NERDTree [<start-directory> | <bookmark>] *:NERDTree* | ||
103 | Opens a fresh NERDTree. The root of the tree depends on the argument | ||
104 | given. There are 3 cases: If no argument is given, the current directory | ||
105 | will be used. If a directory is given, that will be used. If a bookmark | ||
106 | name is given, the corresponding directory will be used. For example: > | ||
107 | :NERDTree /home/marty/vim7/src | ||
108 | :NERDTree foo (foo is the name of a bookmark) | ||
109 | < | ||
110 | :NERDTreeVCS [<start-directory> | <bookmark>] *:NERDTreeVCS* | ||
111 | Like |:NERDTree|, but searches up the directory tree to find the top of | ||
112 | the version control system repository, and roots the NERDTree there. It | ||
113 | works with Git, Subversion, Mercurial, Bazaar, and Darcs repositories. A | ||
114 | couple of examples: > | ||
115 | :NERDTreeVCS /home/marty/nerdtree/doc (opens /home/marty/nerdtree) | ||
116 | :NERDTreeVCS (opens root of repository containing CWD) | ||
117 | < | ||
118 | :NERDTreeFromBookmark <bookmark> *:NERDTreeFromBookmark* | ||
119 | Opens a fresh NERDTree with the root initialized to the directory for | ||
120 | <bookmark>. The only reason to use this command over :NERDTree is for | ||
121 | the completion (which is for bookmarks rather than directories). | ||
122 | |||
123 | :NERDTreeToggle [<start-directory> | <bookmark>] *:NERDTreeToggle* | ||
124 | If a NERDTree already exists for this tab, it is reopened and rendered | ||
125 | again. If <start-directory> or <bookmark> is given, the root of NERDTree | ||
126 | is set to that path. If no NERDTree exists for this tab then this command | ||
127 | acts the same as the |:NERDTree| command. | ||
128 | |||
129 | :NERDTreeToggleVCS [<start-directory> | <bookmark>] *:NERDTreeToggleVCS* | ||
130 | Like |:NERDTreeToggle|, but searches up the directory tree to find the top of | ||
131 | the version control system repository, and roots the NERDTree there. It | ||
132 | works with Git, Subversion, Mercurial, Bazaar, and Darcs repositories. A | ||
133 | couple of examples: > | ||
134 | :NERDTreeToggleVCS /home/marty/nerdtree/doc (opens /home/marty/nerdtree) | ||
135 | :NERDTreeToggleVCS (opens root of repository containing CWD) | ||
136 | |||
137 | :NERDTreeFocus *:NERDTreeFocus* | ||
138 | Opens (or reopens) the NERDTree if it is not currently visible; | ||
139 | otherwise, the cursor is moved to the already-open NERDTree. | ||
140 | |||
141 | :NERDTreeMirror *:NERDTreeMirror* | ||
142 | Shares an existing NERDTree, from another tab, in the current tab. | ||
143 | Changes made to one tree are reflected in both as they are actually the | ||
144 | same buffer. | ||
145 | |||
146 | If only one other NERDTree exists, that tree is automatically mirrored. | ||
147 | If more than one exists, the script will ask which tree to mirror. | ||
148 | |||
149 | :NERDTreeClose *:NERDTreeClose* | ||
150 | Close the NERDTree in this tab. | ||
151 | |||
152 | :NERDTreeFind [<path>] *:NERDTreeFind* | ||
153 | Without the optional argument, find and reveal the file for the active | ||
154 | buffer in the NERDTree window. With the <path> argument, find and | ||
155 | reveal the specified path. | ||
156 | |||
157 | Focus will be shifted to the NERDTree window, and the cursor will be | ||
158 | placed on the tree node for the determined path. If a NERDTree for the | ||
159 | current tab does not exist, a new one will be initialized. | ||
160 | |||
161 | :NERDTreeCWD *:NERDTreeCWD* | ||
162 | Change the NERDTree root to the current working directory. If no | ||
163 | NERDTree exists for this tab, a new one is opened. | ||
164 | |||
165 | :NERDTreeRefreshRoot *:NERDTreeRefreshRoot* | ||
166 | Refreshes the NERDTree root node. | ||
167 | |||
168 | ------------------------------------------------------------------------------ | ||
169 | 2.2. Bookmarks *NERDTreeBookmarks* | ||
170 | |||
171 | Bookmarks in the NERDTree are a way to tag files or directories of interest. | ||
172 | For example, you could use bookmarks to tag all of your project directories. | ||
173 | |||
174 | ------------------------------------------------------------------------------ | ||
175 | 2.2.1. The Bookmark Table *NERDTreeBookmarkTable* | ||
176 | |||
177 | If the bookmark table is active (see |NERDTree-B| and | ||
178 | |NERDTreeShowBookmarks|), it will be rendered above the tree. You can double | ||
179 | click bookmarks or use the |NERDTree-o| mapping to activate them. See also, | ||
180 | |NERDTree-t| and |NERDTree-T| | ||
181 | |||
182 | ------------------------------------------------------------------------------ | ||
183 | 2.2.2. Bookmark commands *NERDTreeBookmarkCommands* | ||
184 | |||
185 | Note: The following commands are only available within the NERDTree buffer. | ||
186 | |||
187 | :Bookmark [<name>] | ||
188 | Bookmark the current node as <name>. If there is already a <name> | ||
189 | bookmark, it is overwritten. <name> must not contain spaces. | ||
190 | If <name> is not provided, it defaults to the file or directory name. | ||
191 | For directories, a trailing slash is present. | ||
192 | |||
193 | :BookmarkToRoot <bookmark> | ||
194 | Make the directory corresponding to <bookmark> the new root. If a treenode | ||
195 | corresponding to <bookmark> is already cached somewhere in the tree then | ||
196 | the current tree will be used, otherwise a fresh tree will be opened. | ||
197 | Note that if <bookmark> points to a file then its parent will be used | ||
198 | instead. | ||
199 | |||
200 | :RevealBookmark <bookmark> | ||
201 | If the node is cached under the current root then it will be revealed | ||
202 | (i.e. directory nodes above it will be opened) and the cursor will be | ||
203 | placed on it. | ||
204 | |||
205 | :OpenBookmark <name> | ||
206 | The Bookmark named <name> is opened as if |NERDTree-o| was applied to | ||
207 | its entry in the Bookmark table. If the Bookmark points to a directory, | ||
208 | it is made the new root of the current NERDTree. If the Bookmark points | ||
209 | to a file, that file is opened for editing in another window. | ||
210 | |||
211 | :ClearBookmarks [<bookmarks>] | ||
212 | Remove all the given bookmarks. If no bookmarks are given then remove all | ||
213 | bookmarks on the current node. | ||
214 | |||
215 | :ClearAllBookmarks | ||
216 | Remove all bookmarks. | ||
217 | |||
218 | :EditBookmarks | ||
219 | Opens the bookmarks file for manual editing, e.g. for removing invalid | ||
220 | bookmarks. | ||
221 | |||
222 | :ReadBookmarks | ||
223 | Re-read the bookmarks in the |NERDTreeBookmarksFile|. | ||
224 | |||
225 | See also |:NERDTree| and |:NERDTreeFromBookmark|. | ||
226 | |||
227 | ------------------------------------------------------------------------------ | ||
228 | 2.2.3. Invalid Bookmarks *NERDTreeInvalidBookmarks* | ||
229 | |||
230 | If invalid bookmarks are detected, the script will issue an error message and | ||
231 | the invalid bookmarks will become unavailable for use. | ||
232 | |||
233 | These bookmarks will still be stored in the bookmarks file (see | ||
234 | |NERDTreeBookmarksFile|), down at the bottom. There will always be a blank line | ||
235 | after the valid bookmarks but before the invalid ones. | ||
236 | |||
237 | Each line in the bookmarks file represents one bookmark. The proper format is: | ||
238 | <bookmark name><space><full path to the bookmark location> | ||
239 | |||
240 | You can use the :EditBookmarks command to open the bookmarks file for editing. | ||
241 | After you have corrected any invalid bookmarks, either restart vim, or run | ||
242 | :ReadBookmarks from the NERDTree window. | ||
243 | |||
244 | ------------------------------------------------------------------------------ | ||
245 | 2.3. NERDTree Mappings *NERDTreeMappings* | ||
246 | |||
247 | Default~ | ||
248 | Key Description help-tag~ | ||
249 | |||
250 | o........Open files, directories and bookmarks......................|NERDTree-o| | ||
251 | go.......Open selected file, but leave cursor in the NERDTree......|NERDTree-go| | ||
252 | Find selected bookmark directory in current NERDTree | ||
253 | t........Open selected node/bookmark in a new tab...................|NERDTree-t| | ||
254 | T........Same as 't' but keep the focus on the current tab..........|NERDTree-T| | ||
255 | i........Open selected file in a split window.......................|NERDTree-i| | ||
256 | gi.......Same as i, but leave the cursor on the NERDTree...........|NERDTree-gi| | ||
257 | s........Open selected file in a new vsplit.........................|NERDTree-s| | ||
258 | gs.......Same as s, but leave the cursor on the NERDTree...........|NERDTree-gs| | ||
259 | <CR>.....User-definable custom open action.......................|NERDTree-<CR>| | ||
260 | O........Recursively open the selected directory....................|NERDTree-O| | ||
261 | x........Close the current nodes parent.............................|NERDTree-x| | ||
262 | X........Recursively close all children of the current node.........|NERDTree-X| | ||
263 | e........Edit the current directory.................................|NERDTree-e| | ||
264 | |||
265 | double-click....same as |NERDTree-o|. | ||
266 | middle-click....same as |NERDTree-i| for files, and |NERDTree-e| for directories. | ||
267 | |||
268 | D........Delete the current bookmark ...............................|NERDTree-D| | ||
269 | |||
270 | P........Jump to the root node......................................|NERDTree-P| | ||
271 | p........Jump to current nodes parent...............................|NERDTree-p| | ||
272 | K........Jump up inside directories at the current tree depth.......|NERDTree-K| | ||
273 | J........Jump down inside directories at the current tree depth.....|NERDTree-J| | ||
274 | <C-J>....Jump down to next sibling of the current directory.......|NERDTree-C-J| | ||
275 | <C-K>....Jump up to previous sibling of the current directory.....|NERDTree-C-K| | ||
276 | |||
277 | C........Change the tree root to the selected directory.............|NERDTree-C| | ||
278 | u........Move the tree root up one directory........................|NERDTree-u| | ||
279 | U........Same as 'u' except the old root node is left open..........|NERDTree-U| | ||
280 | r........Recursively refresh the current directory..................|NERDTree-r| | ||
281 | R........Recursively refresh the current root.......................|NERDTree-R| | ||
282 | m........Display the NERDTree menu..................................|NERDTree-m| | ||
283 | cd.......Change the CWD to the directory of the selected node......|NERDTree-cd| | ||
284 | CD.......Change tree root to the CWD...............................|NERDTree-CD| | ||
285 | |||
286 | I........Toggle whether hidden files displayed......................|NERDTree-I| | ||
287 | f........Toggle whether the file filters are used...................|NERDTree-f| | ||
288 | F........Toggle whether files are displayed.........................|NERDTree-F| | ||
289 | B........Toggle whether the bookmark table is displayed.............|NERDTree-B| | ||
290 | |||
291 | q........Close the NERDTree window..................................|NERDTree-q| | ||
292 | A........Zoom (maximize/minimize) the NERDTree window...............|NERDTree-A| | ||
293 | ?........Toggle the display of the quick help.......................|NERDTree-?| | ||
294 | |||
295 | ------------------------------------------------------------------------------ | ||
296 | *NERDTree-o* | ||
297 | Default key: o | ||
298 | Map setting: NERDTreeMapActivateNode | ||
299 | Applies to: files and directories. | ||
300 | |||
301 | If a file node is selected, it is opened in the previous window. | ||
302 | |||
303 | If a directory is selected it is opened or closed depending on its current | ||
304 | state. | ||
305 | |||
306 | If a bookmark that links to a directory is selected then that directory | ||
307 | becomes the new root. | ||
308 | |||
309 | If a bookmark that links to a file is selected then that file is opened in the | ||
310 | previous window. | ||
311 | |||
312 | ------------------------------------------------------------------------------ | ||
313 | *NERDTree-go* | ||
314 | Default key: go | ||
315 | Map setting: NERDTreeMapPreview | ||
316 | Applies to: files. | ||
317 | |||
318 | If a file node or a bookmark that links to a file is selected, it is opened in | ||
319 | the previous window, but the cursor does not move. | ||
320 | |||
321 | If a bookmark that links to a directory is selected then that directory | ||
322 | becomes the new root. | ||
323 | |||
324 | The default key combo for this mapping is "g" + NERDTreeMapActivateNode (see | ||
325 | |NERDTree-o|). | ||
326 | |||
327 | ------------------------------------------------------------------------------ | ||
328 | *NERDTree-t* | ||
329 | Default key: t | ||
330 | Map setting: *NERDTreeMapOpenInTab* | ||
331 | Applies to: files and directories. | ||
332 | |||
333 | Opens the selected file in a new tab. If a directory is selected, a fresh | ||
334 | NERDTree for that directory is opened in a new tab. | ||
335 | |||
336 | If a bookmark which points to a directory is selected, open a NERDTree for | ||
337 | that directory in a new tab. If the bookmark points to a file, open that file | ||
338 | in a new tab. | ||
339 | |||
340 | ------------------------------------------------------------------------------ | ||
341 | *NERDTree-T* | ||
342 | Default key: T | ||
343 | Map setting: *NERDTreeMapOpenInTabSilent* | ||
344 | Applies to: files and directories. | ||
345 | |||
346 | The same as |NERDTree-t| except that the focus is kept in the current tab. | ||
347 | |||
348 | ------------------------------------------------------------------------------ | ||
349 | *NERDTree-i* | ||
350 | Default key: i | ||
351 | Map setting: *NERDTreeMapOpenSplit* | ||
352 | Applies to: files, and bookmarks pointing to files. | ||
353 | |||
354 | Opens the selected file in a new split window and puts the cursor in the new | ||
355 | window. | ||
356 | |||
357 | ------------------------------------------------------------------------------ | ||
358 | *NERDTree-gi* | ||
359 | Default key: gi | ||
360 | Map setting: *NERDTreeMapPreviewSplit* | ||
361 | Applies to: files, and bookmarks pointing to files. | ||
362 | |||
363 | The same as |NERDTree-i| except that the cursor is not moved. | ||
364 | |||
365 | The default key combo for this mapping is "g" + NERDTreeMapOpenSplit (see | ||
366 | |NERDTree-i|). | ||
367 | |||
368 | ------------------------------------------------------------------------------ | ||
369 | *NERDTree-s* | ||
370 | Default key: s | ||
371 | Map setting: *NERDTreeMapOpenVSplit* | ||
372 | Applies to: files, and bookmarks pointing to files. | ||
373 | |||
374 | Opens the selected file in a new vertically split window and puts the cursor | ||
375 | in the new window. | ||
376 | |||
377 | ------------------------------------------------------------------------------ | ||
378 | *NERDTree-gs* | ||
379 | Default key: gs | ||
380 | Map setting: *NERDTreeMapPreviewVSplit* | ||
381 | Applies to: files, and bookmarks pointing to files. | ||
382 | |||
383 | The same as |NERDTree-s| except that the cursor is not moved. | ||
384 | |||
385 | The default key combo for this mapping is "g" + NERDTreeMapOpenVSplit (see | ||
386 | |NERDTree-s|). | ||
387 | |||
388 | ------------------------------------------------------------------------------ | ||
389 | *NERDTree-<CR>* | ||
390 | Default key: <CR> | ||
391 | Map setting: *NERDTreeMapCustomOpen* | ||
392 | Applies to: files, directories, and bookmarks | ||
393 | |||
394 | Performs a customized open action on the selected node. This allows the user | ||
395 | to define an action that behaves differently from any of the standard | ||
396 | keys. See |NERDTreeCustomOpenArgs| for more details. | ||
397 | ------------------------------------------------------------------------------ | ||
398 | *NERDTree-O* | ||
399 | Default key: O | ||
400 | Map setting: *NERDTreeMapOpenRecursively* | ||
401 | Applies to: directories. | ||
402 | |||
403 | Recursively opens the selected directory. | ||
404 | |||
405 | All files and directories are cached, but if a directory would not be | ||
406 | displayed due to file filters (see |NERDTreeIgnore| |NERDTree-f|) or the | ||
407 | hidden file filter (see |NERDTreeShowHidden|) then its contents are not | ||
408 | cached. This is handy, especially if you have .svn directories. | ||
409 | |||
410 | ------------------------------------------------------------------------------ | ||
411 | *NERDTree-x* | ||
412 | Default key: x | ||
413 | Map setting: *NERDTreeMapCloseDir* | ||
414 | Applies to: files and directories. | ||
415 | |||
416 | Closes the parent of the selected node. | ||
417 | |||
418 | ------------------------------------------------------------------------------ | ||
419 | *NERDTree-X* | ||
420 | Default key: X | ||
421 | Map setting: *NERDTreeMapCloseChildren* | ||
422 | Applies to: directories. | ||
423 | |||
424 | Recursively closes all children of the selected directory. | ||
425 | |||
426 | Tip: To quickly "reset" the tree, use |NERDTree-P| with this mapping. | ||
427 | |||
428 | ------------------------------------------------------------------------------ | ||
429 | *NERDTree-e* | ||
430 | Default key: e | ||
431 | Map setting: *NERDTreeMapOpenExpl* | ||
432 | Applies to: files and directories. | ||
433 | |||
434 | |:edit|s the selected directory, or the selected file's directory. This could | ||
435 | result in a NERDTree or a netrw being opened, depending on | ||
436 | |NERDTreeHijackNetrw|. | ||
437 | |||
438 | ------------------------------------------------------------------------------ | ||
439 | *NERDTree-D* | ||
440 | Default key: D | ||
441 | Map setting: *NERDTreeMapDeleteBookmark* | ||
442 | Applies to: lines in the bookmarks table | ||
443 | |||
444 | Deletes the currently selected bookmark. | ||
445 | |||
446 | ------------------------------------------------------------------------------ | ||
447 | *NERDTree-P* | ||
448 | Default key: P | ||
449 | Map setting: *NERDTreeMapJumpRoot* | ||
450 | Applies to: no restrictions. | ||
451 | |||
452 | Jump to the tree root. | ||
453 | |||
454 | ------------------------------------------------------------------------------ | ||
455 | *NERDTree-p* | ||
456 | Default key: p | ||
457 | Map setting: *NERDTreeMapJumpParent* | ||
458 | Applies to: files and directories. | ||
459 | |||
460 | Jump to the parent node of the selected node. | ||
461 | |||
462 | ------------------------------------------------------------------------------ | ||
463 | *NERDTree-K* | ||
464 | Default key: K | ||
465 | Map setting: *NERDTreeMapJumpFirstChild* | ||
466 | Applies to: files and directories. | ||
467 | |||
468 | Jump to the first child of the current nodes parent. | ||
469 | |||
470 | If the cursor is already on the first node then do the following: | ||
471 | * loop back thru the siblings of the current nodes parent until we find an | ||
472 | open directory with children | ||
473 | * go to the first child of that node | ||
474 | |||
475 | ------------------------------------------------------------------------------ | ||
476 | *NERDTree-J* | ||
477 | Default key: J | ||
478 | Map setting: *NERDTreeMapJumpLastChild* | ||
479 | Applies to: files and directories. | ||
480 | |||
481 | Jump to the last child of the current nodes parent. | ||
482 | |||
483 | If the cursor is already on the last node then do the following: | ||
484 | * loop forward thru the siblings of the current nodes parent until we find | ||
485 | an open directory with children | ||
486 | * go to the last child of that node | ||
487 | |||
488 | ------------------------------------------------------------------------------ | ||
489 | *NERDTree-C-J* | ||
490 | Default key: <C-J> | ||
491 | Map setting: *NERDTreeMapJumpNextSibling* | ||
492 | Applies to: files and directories. | ||
493 | |||
494 | Jump to the next sibling of the selected node. | ||
495 | |||
496 | ------------------------------------------------------------------------------ | ||
497 | *NERDTree-C-K* | ||
498 | Default key: <C-K> | ||
499 | Map setting: *NERDTreeMapJumpPrevSibling* | ||
500 | Applies to: files and directories. | ||
501 | |||
502 | Jump to the previous sibling of the selected node. | ||
503 | |||
504 | ------------------------------------------------------------------------------ | ||
505 | *NERDTree-C* | ||
506 | Default key: C | ||
507 | Map setting: *NERDTreeMapChangeRoot* | ||
508 | Applies to: files and directories. | ||
509 | |||
510 | Make the selected directory node the new tree root. If a file is selected, its | ||
511 | parent is used. | ||
512 | |||
513 | ------------------------------------------------------------------------------ | ||
514 | *NERDTree-u* | ||
515 | Default key: u | ||
516 | Map setting: *NERDTreeMapUpdir* | ||
517 | Applies to: no restrictions. | ||
518 | |||
519 | Move the tree root up a directory (like doing a "cd .."). | ||
520 | |||
521 | ------------------------------------------------------------------------------ | ||
522 | *NERDTree-U* | ||
523 | Default key: U | ||
524 | Map setting: *NERDTreeMapUpdirKeepOpen* | ||
525 | Applies to: no restrictions. | ||
526 | |||
527 | Like |NERDTree-u| except that the old tree root is kept open. | ||
528 | |||
529 | ------------------------------------------------------------------------------ | ||
530 | *NERDTree-r* | ||
531 | Default key: r | ||
532 | Map setting: *NERDTreeMapRefresh* | ||
533 | Applies to: files and directories. | ||
534 | |||
535 | If a directory is selected, recursively refresh that directory, i.e. scan the | ||
536 | filesystem for changes and represent them in the tree. | ||
537 | |||
538 | If a file node is selected then the above is done on it's parent. | ||
539 | |||
540 | ------------------------------------------------------------------------------ | ||
541 | *NERDTree-R* | ||
542 | Default key: R | ||
543 | Map setting: *NERDTreeMapRefreshRoot* | ||
544 | Applies to: no restrictions. | ||
545 | |||
546 | Recursively refresh the tree root. | ||
547 | |||
548 | ------------------------------------------------------------------------------ | ||
549 | *NERDTree-m* | ||
550 | Default key: m | ||
551 | Map setting: *NERDTreeMapMenu* | ||
552 | Applies to: files and directories. | ||
553 | |||
554 | Display the NERDTree menu. See |NERDTreeMenu| for details. | ||
555 | |||
556 | ------------------------------------------------------------------------------ | ||
557 | *NERDTree-cd* | ||
558 | Default key: cd | ||
559 | Map setting: *NERDTreeMapChdir* | ||
560 | Applies to: files and directories. | ||
561 | |||
562 | Change Vim's current working directory to that of the selected node. | ||
563 | |||
564 | ------------------------------------------------------------------------------ | ||
565 | *NERDTree-CD* | ||
566 | Default key: CD | ||
567 | Map setting: *NERDTreeMapCWD* | ||
568 | Applies to: no restrictions. | ||
569 | |||
570 | Change the NERDTree root to Vim's current working directory. | ||
571 | |||
572 | ------------------------------------------------------------------------------ | ||
573 | *NERDTree-I* | ||
574 | Default key: I | ||
575 | Map setting: *NERDTreeMapToggleHidden* | ||
576 | Applies to: no restrictions. | ||
577 | |||
578 | Toggles whether hidden files (i.e. "dot files") are displayed. | ||
579 | |||
580 | ------------------------------------------------------------------------------ | ||
581 | *NERDTree-f* | ||
582 | Default key: f | ||
583 | Map setting: *NERDTreeMapToggleFilters* | ||
584 | Applies to: no restrictions. | ||
585 | |||
586 | Toggles whether file filters are used. See |NERDTreeIgnore| for details. | ||
587 | |||
588 | ------------------------------------------------------------------------------ | ||
589 | *NERDTree-F* | ||
590 | Default key: F | ||
591 | Map setting: *NERDTreeMapToggleFiles* | ||
592 | Applies to: no restrictions. | ||
593 | |||
594 | Toggles whether file nodes are displayed. | ||
595 | |||
596 | ------------------------------------------------------------------------------ | ||
597 | *NERDTree-B* | ||
598 | Default key: B | ||
599 | Map setting: *NERDTreeMapToggleBookmarks* | ||
600 | Applies to: no restrictions. | ||
601 | |||
602 | Toggles whether the bookmarks table is displayed. | ||
603 | |||
604 | ------------------------------------------------------------------------------ | ||
605 | *NERDTree-q* | ||
606 | Default key: q | ||
607 | Map setting: *NERDTreeMapQuit* | ||
608 | Applies to: no restrictions. | ||
609 | |||
610 | Closes the NERDTree window. | ||
611 | |||
612 | ------------------------------------------------------------------------------ | ||
613 | *NERDTree-A* | ||
614 | Default key: A | ||
615 | Map setting: *NERDTreeMapToggleZoom* | ||
616 | Applies to: no restrictions. | ||
617 | |||
618 | Maximize (zoom) and minimize the NERDTree window. | ||
619 | |||
620 | ------------------------------------------------------------------------------ | ||
621 | *NERDTree-?* | ||
622 | Default key: ? | ||
623 | Map setting: *NERDTreeMapHelp* | ||
624 | Applies to: no restrictions. | ||
625 | |||
626 | Toggles whether the quickhelp is displayed. | ||
627 | |||
628 | ------------------------------------------------------------------------------ | ||
629 | 2.3. The NERDTree menu *NERDTreeMenu* | ||
630 | |||
631 | The NERDTree has a menu that can be programmed via the an API (see | ||
632 | |NERDTreeMenuAPI|). The idea is to simulate the "right click" menus that most | ||
633 | file explorers have. | ||
634 | |||
635 | The script comes with two default menu plugins: exec_menuitem.vim and | ||
636 | fs_menu.vim. fs_menu.vim adds some basic filesystem operations to the menu for | ||
637 | creating/deleting/moving/copying files and directories. exec_menuitem.vim | ||
638 | provides a menu item to execute executable files. | ||
639 | |||
640 | Related tags: |NERDTree-m| |NERDTreeApi| | ||
641 | |||
642 | ------------------------------------------------------------------------------ | ||
643 | *NERDTreeMenu-j* | ||
644 | Default key: j | ||
645 | Map option: *NERDTreeMenuDown* | ||
646 | Applies to: The NERDTree menu. | ||
647 | |||
648 | Moves the cursor down. | ||
649 | |||
650 | ------------------------------------------------------------------------------ | ||
651 | *NERDTreeMenu-k* | ||
652 | Default key: k | ||
653 | Map option: *NERDTreeMenuUp* | ||
654 | Applies to: The NERDTree menu. | ||
655 | |||
656 | Moves the cursor up. | ||
657 | |||
658 | ============================================================================== | ||
659 | 3. Customisation *NERDTreeSettings* | ||
660 | |||
661 | |||
662 | ------------------------------------------------------------------------------ | ||
663 | 3.1. Customisation summary *NERDTreeSettingsSummary* | ||
664 | |||
665 | The plugin provides the following settings that can customise the behaviour | ||
666 | the NERDTree. These settings should be set in your vimrc, using `:let`. | ||
667 | |||
668 | |loaded_nerd_tree| Turns off the script. | ||
669 | |||
670 | |NERDTreeAutoCenter| Controls whether the NERDTree window centers | ||
671 | when the cursor moves within a specified | ||
672 | distance to the top/bottom of the window. | ||
673 | |||
674 | |NERDTreeAutoCenterThreshold| Controls the sensitivity of autocentering. | ||
675 | |||
676 | |NERDTreeCaseSensitiveSort| Tells the NERDTree whether to be case | ||
677 | sensitive or not when sorting nodes. | ||
678 | |||
679 | |NERDTreeNaturalSort| Tells the NERDTree whether to use natural sort | ||
680 | order or not when sorting nodes. | ||
681 | |||
682 | |NERDTreeSortHiddenFirst| Tells the NERDTree whether to take the dot at | ||
683 | the beginning of the hidden file names into | ||
684 | account when sorting nodes. | ||
685 | |||
686 | |NERDTreeChDirMode| Tells the NERDTree if/when it should change | ||
687 | vim's current working directory. | ||
688 | |||
689 | |NERDTreeHighlightCursorline| Tell the NERDTree whether to highlight the | ||
690 | current cursor line. | ||
691 | |||
692 | |NERDTreeHijackNetrw| Tell the NERDTree whether to replace the netrw | ||
693 | autocommands for exploring local directories. | ||
694 | |||
695 | |NERDTreeIgnore| Tells the NERDTree which files to ignore. | ||
696 | |||
697 | |NERDTreeRespectWildIgnore| Tells the NERDTree to respect `'wildignore'`. | ||
698 | |||
699 | |NERDTreeBookmarksFile| Where the bookmarks are stored. | ||
700 | |||
701 | |NERDTreeBookmarksSort| Control how the Bookmark table is sorted. | ||
702 | |||
703 | |NERDTreeMarkBookmarks| Render bookmarked nodes with markers. | ||
704 | |||
705 | |NERDTreeMouseMode| Manage the interpretation of mouse clicks. | ||
706 | |||
707 | |NERDTreeQuitOnOpen| Closes the tree window or bookmark table after | ||
708 | opening a file. | ||
709 | |||
710 | |NERDTreeShowBookmarks| Tells the NERDTree whether to display the | ||
711 | bookmarks table on startup. | ||
712 | |||
713 | |NERDTreeShowFiles| Tells the NERDTree whether to display files in | ||
714 | the tree on startup. | ||
715 | |||
716 | |NERDTreeShowHidden| Tells the NERDTree whether to display hidden | ||
717 | files on startup. | ||
718 | |||
719 | |NERDTreeShowLineNumbers| Tells the NERDTree whether to display line | ||
720 | numbers in the tree window. | ||
721 | |||
722 | |NERDTreeSortOrder| Tell the NERDTree how to sort the nodes in the | ||
723 | tree. | ||
724 | |||
725 | |NERDTreeStatusline| Set a statusline for NERDTree windows. | ||
726 | |||
727 | |NERDTreeWinPos| Tells the script where to put the NERDTree | ||
728 | window. | ||
729 | |||
730 | |NERDTreeWinSize| Sets the window size when the NERDTree is | ||
731 | opened. | ||
732 | |||
733 | |NERDTreeWinSizeMax| Sets the maximum window size when the NERDTree | ||
734 | is zoomed. | ||
735 | |||
736 | |NERDTreeMinimalUI| Disables display of the 'Bookmarks' label and | ||
737 | 'Press ? for help' text. | ||
738 | |||
739 | |NERDTreeMinimalMenu| Use a compact menu that fits on a single line | ||
740 | for adding, copying, deleting, etc | ||
741 | |||
742 | |NERDTreeCascadeSingleChildDir| | ||
743 | Collapses on the same line directories that have | ||
744 | only one child directory. | ||
745 | |||
746 | |NERDTreeCascadeOpenSingleChildDir| | ||
747 | Cascade open while selected directory has only | ||
748 | one child that also is a directory. | ||
749 | |||
750 | |NERDTreeAutoDeleteBuffer| Tells the NERDTree to automatically remove a | ||
751 | buffer when a file is being deleted or renamed | ||
752 | via a context menu command. | ||
753 | |||
754 | |NERDTreeCreatePrefix| Specify a prefix to be used when creating the | ||
755 | NERDTree window. | ||
756 | |||
757 | |NERDTreeRemoveFileCmd| Specify a custom shell command to be used when | ||
758 | deleting files. Note that it should include one | ||
759 | space character at the end of the command and it | ||
760 | applies only to files. | ||
761 | |||
762 | |NERDTreeRemoveDirCmd| Specify a custom shell command to be used when | ||
763 | deleting directories. Note that it should | ||
764 | include one space character at the end of the | ||
765 | command and it applies only to directories. | ||
766 | |||
767 | |NERDTreeDirArrowCollapsible| These characters indicate when a directory is | ||
768 | |NERDTreeDirArrowExpandable| either collapsible or expandable. | ||
769 | |||
770 | |NERDTreeNodeDelimiter| A single character that is used to separate the | ||
771 | file or directory name from the rest of the | ||
772 | characters on the line of text. | ||
773 | |||
774 | |NERDTreeCustomOpenArgs| A dictionary with values that control how a node | ||
775 | is opened with the |NERDTree-<CR>| key. | ||
776 | |||
777 | ------------------------------------------------------------------------------ | ||
778 | 3.2. Customisation details *NERDTreeSettingsDetails* | ||
779 | |||
780 | To enable any of the below settings you should put an appropriate > | ||
781 | let <setting>=<value> | ||
782 | <line in your ~/.vimrc. | ||
783 | |||
784 | *loaded_nerd_tree* | ||
785 | If this plugin is making you feel homicidal, it may be a good idea to turn it | ||
786 | off with this line in your vimrc: > | ||
787 | let loaded_nerd_tree=1 | ||
788 | < | ||
789 | ------------------------------------------------------------------------------ | ||
790 | *NERDTreeAutoCenter* | ||
791 | Values: 0 or 1. | ||
792 | Default: 1 | ||
793 | |||
794 | If set to 1, the NERDTree window will center around the cursor if it moves to | ||
795 | within |NERDTreeAutoCenterThreshold| lines of the top/bottom of the window. | ||
796 | |||
797 | This is ONLY done in response to tree navigation mappings, | ||
798 | i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-C-K| |NERDTree-p| | ||
799 | |NERDTree-P| | ||
800 | |||
801 | The centering is done with a |zz| operation. | ||
802 | |||
803 | ------------------------------------------------------------------------------ | ||
804 | *NERDTreeAutoCenterThreshold* | ||
805 | Values: Any natural number. | ||
806 | Default: 3 | ||
807 | |||
808 | This setting controls the "sensitivity" of the NERDTree auto centering. See | ||
809 | |NERDTreeAutoCenter| for details. | ||
810 | |||
811 | ------------------------------------------------------------------------------ | ||
812 | *NERDTreeCaseSensitiveSort* | ||
813 | Values: 0 or 1. | ||
814 | Default: 0. | ||
815 | |||
816 | By default the NERDTree does not sort nodes case sensitively, i.e. nodes | ||
817 | could appear like this: > | ||
818 | bar.c | ||
819 | Baz.c | ||
820 | blarg.c | ||
821 | boner.c | ||
822 | Foo.c | ||
823 | < | ||
824 | But, if you set this setting to 1 then the case of the nodes will be taken | ||
825 | into account. The above nodes would then be sorted like this: > | ||
826 | Baz.c | ||
827 | Foo.c | ||
828 | bar.c | ||
829 | blarg.c | ||
830 | boner.c | ||
831 | < | ||
832 | ------------------------------------------------------------------------------ | ||
833 | *NERDTreeNaturalSort* | ||
834 | Values: 0 or 1. | ||
835 | Default: 0. | ||
836 | |||
837 | By default the NERDTree does not sort nodes in natural sort order, i.e. nodes | ||
838 | could appear like this: > | ||
839 | z1.txt | ||
840 | z10.txt | ||
841 | z100.txt | ||
842 | z11.txt | ||
843 | z110.txt | ||
844 | z2.txt | ||
845 | z20.txt | ||
846 | z3.txt | ||
847 | < | ||
848 | But if you set this setting to 1 then the natural sort order will be used. The | ||
849 | above nodes would then be sorted like this: > | ||
850 | z1.txt | ||
851 | z2.txt | ||
852 | z3.txt | ||
853 | z10.txt | ||
854 | z11.txt | ||
855 | z20.txt | ||
856 | z100.txt | ||
857 | z110.txt | ||
858 | < | ||
859 | ------------------------------------------------------------------------------ | ||
860 | *NERDTreeUseTCD* | ||
861 | Values: 0 or 1. | ||
862 | Default: 0. | ||
863 | |||
864 | By default, NERDTree will use the `:cd` command to change the current working | ||
865 | directory. If this setting is turned on, and the `:tcd` command is available, it | ||
866 | will be used instead. | ||
867 | |||
868 | ------------------------------------------------------------------------------ | ||
869 | *NERDTreeChDirMode* | ||
870 | Values: 0, 1, 2, or 3. | ||
871 | Default: 0. | ||
872 | |||
873 | Use this setting to tell the script when (if at all) to change the current | ||
874 | working directory (CWD) for vim. | ||
875 | |||
876 | If it is set to 0 then the CWD is never changed by the NERDTree. | ||
877 | |||
878 | If set to 1 then the CWD is changed when the NERDTree is first loaded to the | ||
879 | directory it is initialized in. For example, if you start the NERDTree with > | ||
880 | :NERDTree /home/marty/foobar | ||
881 | < | ||
882 | then the CWD will be changed to /home/marty/foobar and will not be changed | ||
883 | again unless you init another NERDTree with a similar command. | ||
884 | |||
885 | If the setting is set to 2 then it behaves the same as if set to 1 except that | ||
886 | the CWD is changed whenever the tree root is changed. For example, if the CWD | ||
887 | is /home/marty/foobar and you make the node for /home/marty/foobar/baz the new | ||
888 | root then the CWD will become /home/marty/foobar/baz. | ||
889 | |||
890 | If the set to 3, then it behaves the same as if set to 2, and the CWD is | ||
891 | changed whenever changing tabs to whatever the tree root is on that tab. | ||
892 | |||
893 | ------------------------------------------------------------------------------ | ||
894 | *NERDTreeHighlightCursorline* | ||
895 | Values: 0 or 1. | ||
896 | Default: 1. | ||
897 | |||
898 | If set to 1, the current cursor line in the NERDTree buffer will be | ||
899 | highlighted. This is done using the `'cursorline'` Vim option. | ||
900 | |||
901 | ------------------------------------------------------------------------------ | ||
902 | *NERDTreeHijackNetrw* | ||
903 | Values: 0 or 1. | ||
904 | Default: 1. | ||
905 | |||
906 | If set to 1, doing a > | ||
907 | :edit <some directory> | ||
908 | < | ||
909 | will open up a window level NERDTree instead of a netrw in the target window. | ||
910 | |||
911 | Window level trees behaves slightly different from a regular trees in the | ||
912 | following respects: | ||
913 | 1. 'o' will open the selected file in the same window as the tree, | ||
914 | replacing it. | ||
915 | 2. you can have one tree per window - instead of per tab. | ||
916 | |||
917 | ------------------------------------------------------------------------------ | ||
918 | *NERDTreeIgnore* | ||
919 | Values: a list of regular expressions. | ||
920 | Default: ['\~$']. | ||
921 | |||
922 | This setting is used to specify which files the NERDTree should ignore. It | ||
923 | must be a list of regular expressions. When the NERDTree is rendered, any | ||
924 | files/directories that match any of the regex's in NERDTreeIgnore won't be | ||
925 | displayed. | ||
926 | |||
927 | For example if you put the following line in your vimrc: > | ||
928 | let NERDTreeIgnore=['\.vim$', '\~$'] | ||
929 | < | ||
930 | then all files ending in .vim or ~ will be ignored. | ||
931 | |||
932 | There are 3 magic flags that can be appended to the end of each regular | ||
933 | expression to specify that the regex should match only filenames, only lowest | ||
934 | level directories, or a full path. These flags are "[[dir]]", "[[file]]", and | ||
935 | "[[path]]". Example: > | ||
936 | let NERDTreeIgnore=['\.d$[[dir]]', '\.o$[[file]]', 'tmp/cache$[[path]]'] | ||
937 | < | ||
938 | This will cause all directories ending in ".d" to be ignored, all files ending | ||
939 | in ".o" to be ignored, and the "cache" subdirectory of any "tmp" directory to | ||
940 | be ignored. All other "cache" directories will be displayed. | ||
941 | |||
942 | When using the "[[path]]" tag on Windows, make sure you use escaped | ||
943 | backslashes for the separators in the regex, eg. 'Temp\\cache$[[path]]' | ||
944 | |||
945 | Note: to tell the NERDTree not to ignore any files you must use the following | ||
946 | line: > | ||
947 | let NERDTreeIgnore=[] | ||
948 | < | ||
949 | The file filters can be turned on and off dynamically with the |NERDTree-f| | ||
950 | mapping. | ||
951 | |||
952 | ------------------------------------------------------------------------------ | ||
953 | *NERDTreeRespectWildIgnore* | ||
954 | Values: 0 or 1. | ||
955 | Default: 0. | ||
956 | |||
957 | If set to 1, the `'wildignore'` setting is respected. | ||
958 | |||
959 | ------------------------------------------------------------------------------ | ||
960 | *NERDTreeBookmarksFile* | ||
961 | Values: a path | ||
962 | Default: $HOME/.NERDTreeBookmarks | ||
963 | |||
964 | This is where bookmarks are saved. See |NERDTreeBookmarkCommands|. | ||
965 | |||
966 | ------------------------------------------------------------------------------ | ||
967 | *NERDTreeBookmarksSort* | ||
968 | Values: 0, 1, or 2 | ||
969 | Default: 1 | ||
970 | |||
971 | This setting controls the method by which the list of user bookmarks is | ||
972 | sorted. When sorted, bookmarks will render in alphabetical order by name. | ||
973 | |||
974 | If set to 0, the bookmarks list is not sorted. | ||
975 | If set to 1, the bookmarks list is sorted in a case-insensitive manner. | ||
976 | If set to 2, the bookmarks list is sorted in a case-sensitive manner. | ||
977 | |||
978 | ------------------------------------------------------------------------------ | ||
979 | *NERDTreeMarkBookmarks* | ||
980 | Values: 0 or 1 | ||
981 | Default: 1 | ||
982 | |||
983 | If set to 1, Bookmarks will be specially marked whenever the NERDTree is | ||
984 | rendered. Users of the |NERDTreeMinimalUI| setting may prefer to disable | ||
985 | this setting for even less visual clutter. | ||
986 | |||
987 | ------------------------------------------------------------------------------ | ||
988 | *NERDTreeMouseMode* | ||
989 | Values: 1, 2 or 3. | ||
990 | Default: 1. | ||
991 | |||
992 | If set to 1 then a double click on a node is required to open it. | ||
993 | If set to 2 then a single click will open directory nodes, while a double | ||
994 | click will still be required for file nodes. | ||
995 | If set to 3 then a single click will open any node. | ||
996 | |||
997 | Note: a double click anywhere on a line that a tree node is on will | ||
998 | activate it, but all single-click activations must be done on name of the node | ||
999 | itself. For example, if you have the following node: > | ||
1000 | | | |-application.rb | ||
1001 | < | ||
1002 | then (to single click activate it) you must click somewhere in | ||
1003 | 'application.rb'. | ||
1004 | |||
1005 | ------------------------------------------------------------------------------ | ||
1006 | *NERDTreeQuitOnOpen* | ||
1007 | Values: 0,1,2 or 3. | ||
1008 | Default: 0 | ||
1009 | |||
1010 | This setting governs whether the NERDTree window or the bookmarks table closes | ||
1011 | after opening a file with the |NERDTree-o|, |NERDTree-i|, |NERDTree-t| and | ||
1012 | |NERDTree-T| mappings. | ||
1013 | |||
1014 | Value | NERDTree Window Behavior | ||
1015 | -------+------------------------------------------------------- | ||
1016 | 0 | No change | ||
1017 | 1 | Closes after opening a file | ||
1018 | 2 | Closes the bookmark table after opening a bookmark | ||
1019 | 3(1+2) | Same as both 1 and 2 | ||
1020 | |||
1021 | ------------------------------------------------------------------------------ | ||
1022 | *NERDTreeShowBookmarks* | ||
1023 | Values: 0 or 1. | ||
1024 | Default: 0. | ||
1025 | |||
1026 | If this setting is set to 1 then the bookmarks table will be displayed. | ||
1027 | |||
1028 | This setting can be toggled dynamically, per tree, with the |NERDTree-B| | ||
1029 | mapping. | ||
1030 | |||
1031 | ------------------------------------------------------------------------------ | ||
1032 | *NERDTreeShowFiles* | ||
1033 | Values: 0 or 1. | ||
1034 | Default: 1. | ||
1035 | |||
1036 | If this setting is set to 1 then files are displayed in the NERDTree. If it | ||
1037 | is set to 0 then only directories are displayed. | ||
1038 | |||
1039 | This setting can be toggled dynamically, per tree, with the |NERDTree-F| | ||
1040 | mapping and is useful for drastically shrinking the tree when you are | ||
1041 | navigating to a different part of the tree. | ||
1042 | |||
1043 | ------------------------------------------------------------------------------ | ||
1044 | *NERDTreeShowHidden* | ||
1045 | Values: 0 or 1. | ||
1046 | Default: 0. | ||
1047 | |||
1048 | This setting tells vim whether to display hidden files by default. This | ||
1049 | setting can be dynamically toggled, per tree, with the |NERDTree-I| mapping. | ||
1050 | Use one of the follow lines for this setting: > | ||
1051 | let NERDTreeShowHidden=0 | ||
1052 | let NERDTreeShowHidden=1 | ||
1053 | < | ||
1054 | ------------------------------------------------------------------------------ | ||
1055 | *NERDTreeShowLineNumbers* | ||
1056 | Values: 0 or 1. | ||
1057 | Default: 0. | ||
1058 | |||
1059 | This setting tells vim whether to display line numbers for the NERDTree | ||
1060 | window. Use one of the follow lines for this setting: > | ||
1061 | let NERDTreeShowLineNumbers=0 | ||
1062 | let NERDTreeShowLineNumbers=1 | ||
1063 | < | ||
1064 | ------------------------------------------------------------------------------ | ||
1065 | *NERDTreeSortOrder* | ||
1066 | Values: a list of regular expressions. | ||
1067 | Default: ['\/$', '*', '\.swp$', '\.bak$', '\~$'] | ||
1068 | |||
1069 | This setting is a list of regular expressions which are used to group or sort | ||
1070 | the nodes under their parent. | ||
1071 | |||
1072 | For example, if the setting is: > | ||
1073 | ['\.vim$', '\.c$', '\.h$', '*', 'foobar'] | ||
1074 | < | ||
1075 | then all .vim files will be grouped at the top, followed by all .c files then | ||
1076 | all .h files. All files containing the string 'foobar' will be placed at the | ||
1077 | end. The star is a special flag: it tells the script that every node that | ||
1078 | doesn't match any of the other regexps should be placed here. | ||
1079 | |||
1080 | If no star is present in NERDTreeSortOrder, then one is automatically | ||
1081 | appended to the end of the list. | ||
1082 | |||
1083 | The regex '\/$' should be used to match directory nodes. | ||
1084 | |||
1085 | Files can also be sorted by 1) the modification timestamp, 2) the size, or 3) | ||
1086 | the extension. Directories are always sorted by name. To accomplish this, the | ||
1087 | following special flags are used: | ||
1088 | [[timestamp]] [[-timestamp]] [[size]] [[-size]] [[extension]] | ||
1089 | The hyphen specifies a descending sort; extensions are sorted in ascending | ||
1090 | order only. If placed at the beginning of the list, files are sorted according | ||
1091 | to these flags first, and then grouped by the remaining items in the list. If | ||
1092 | the flags are in any other position of the list, this special sorting is done | ||
1093 | secondarily. See examples 4, 5, and 6 below. | ||
1094 | |||
1095 | After this sorting is done, the files in each group are sorted alphabetically. | ||
1096 | |||
1097 | Examples: > | ||
1098 | (1) ['*', '\/$'] | ||
1099 | (2) [] | ||
1100 | (3) ['\/$', '\.rb$', '\.php$', '*', '\.swp$', '\.bak$', '\~$'] | ||
1101 | (4) ['[[-size]]'] | ||
1102 | (5) ['\/$', '*', '[[timestamp]]'] | ||
1103 | (6) ['foo','\/$','[[extension]]'] | ||
1104 | < | ||
1105 | 1. Directories will appear last, everything else will appear above. | ||
1106 | 2. Everything will simply appear in alphabetical order. | ||
1107 | 3. Directories will appear first, then ruby and php. Swap files, bak files | ||
1108 | and vim backup files will appear last with everything else preceding them. | ||
1109 | 4. Everything is sorted by size, largest to smallest, with directories | ||
1110 | considered to have size 0 bytes. | ||
1111 | 5. Directories will appear first alphabetically, followed by files, sorted by | ||
1112 | timestamp, oldest first. | ||
1113 | 6. Files and directories matching 'foo' first, followed by other directories, | ||
1114 | then all other files. Each section of files is sorted by file extension. | ||
1115 | |||
1116 | ------------------------------------------------------------------------------ | ||
1117 | *NERDTreeStatusline* | ||
1118 | Values: Any valid `'statusline'` setting. | ||
1119 | Default: %{exists('b:NERDTree')?b:NERDTree.root.path.str():''} | ||
1120 | |||
1121 | Defines the value for the `'statusline'` setting in NERDTree windows. | ||
1122 | |||
1123 | Note: The setting is actually applied using |:let-&|, not |:set|, so | ||
1124 | escaping spaces is not necessary. | ||
1125 | |||
1126 | Setting this to -1 will deactivate it so that your global `'statusline'` | ||
1127 | setting is used. | ||
1128 | |||
1129 | ------------------------------------------------------------------------------ | ||
1130 | *NERDTreeWinPos* | ||
1131 | Values: "left" or "right" | ||
1132 | Default: "left". | ||
1133 | |||
1134 | This setting is used to determine where NERDTree window is placed on the | ||
1135 | screen. | ||
1136 | |||
1137 | This setting makes it possible to use two different explorer plugins | ||
1138 | simultaneously. For example, you could have the taglist plugin on the left of | ||
1139 | the window and the NERDTree on the right. | ||
1140 | |||
1141 | ------------------------------------------------------------------------------ | ||
1142 | *NERDTreeWinSize* | ||
1143 | Values: a positive integer. | ||
1144 | Default: 31. | ||
1145 | |||
1146 | This setting is used to change the size of the NERDTree when it is loaded. | ||
1147 | |||
1148 | ------------------------------------------------------------------------------ | ||
1149 | *NERDTreeMinimalUI* | ||
1150 | Values: 0 or 1 | ||
1151 | Default: 0 | ||
1152 | |||
1153 | This setting disables the 'Bookmarks' label 'Press ? for help' text. Use one | ||
1154 | of the following lines for this setting: > | ||
1155 | let NERDTreeMinimalUI=0 | ||
1156 | let NERDTreeMinimalUI=1 | ||
1157 | < | ||
1158 | ------------------------------------------------------------------------------ | ||
1159 | *NERDTreeMinimalMenu* | ||
1160 | Values: 0 or 1 | ||
1161 | Default: 0 | ||
1162 | |||
1163 | This setting makes NERDTree use a smaller, more compact menu for adding, | ||
1164 | copying, deleting nodes. This menu fits on a single line so Vim doesn't need to | ||
1165 | scroll down to present it. This setting is recommended for users already | ||
1166 | familiar with the menu items. It will look similar to this: | ||
1167 | |||
1168 | Menu: [ (a)dd ,m,d,r,o,q,c,l] (Use j/k/enter or shortcut): | ||
1169 | |||
1170 | An action can be selected with its shortcut key or with the NERDTreeMenuUp and | ||
1171 | NERDTreeMenuDown keys, then pressing enter. | ||
1172 | |||
1173 | Use one of the following lines for this setting: > | ||
1174 | let NERDTreeMinimalMenu=0 | ||
1175 | let NERDTreeMinimalMenu=1 | ||
1176 | < | ||
1177 | ------------------------------------------------------------------------------ | ||
1178 | *NERDTreeCascadeSingleChildDir* | ||
1179 | Values: 0 or 1 | ||
1180 | Default: 1. | ||
1181 | |||
1182 | When displaying directory nodes, this setting tells NERDTree to collapse | ||
1183 | directories that have only one child. Use one of the following lines for this | ||
1184 | setting: > | ||
1185 | let NERDTreeCascadeSingleChildDir=0 | ||
1186 | let NERDTreeCascadeSingleChildDir=1 | ||
1187 | < | ||
1188 | ------------------------------------------------------------------------------ | ||
1189 | *NERDTreeCascadeOpenSingleChildDir* | ||
1190 | Values: 0 or 1 | ||
1191 | Default: 1. | ||
1192 | |||
1193 | When opening directory nodes, this setting tells NERDTree to recursively open | ||
1194 | directories that have only one child which is also a directory. NERDTree will | ||
1195 | stop when it finds a directory that contains anything but another single | ||
1196 | directory. This setting also causes the |NERDTree-x| mapping to close | ||
1197 | directories in the same manner. This setting may be useful for Java projects. | ||
1198 | Use one of the following lines for this setting: > | ||
1199 | let NERDTreeCascadeOpenSingleChildDir=0 | ||
1200 | let NERDTreeCascadeOpenSingleChildDir=1 | ||
1201 | < | ||
1202 | ------------------------------------------------------------------------------ | ||
1203 | *NERDTreeAutoDeleteBuffer* | ||
1204 | Values: 0 or 1 | ||
1205 | Default: 0. | ||
1206 | |||
1207 | When using a context menu to delete or rename a file you may also want to | ||
1208 | delete the buffer which is no more valid. If the setting is not set you will | ||
1209 | see a confirmation if you really want to delete an old buffer. If you always | ||
1210 | press 'y' then it's worth it to set this setting to 1. Use one of the | ||
1211 | following lines for this setting: > | ||
1212 | let NERDTreeAutoDeleteBuffer=0 | ||
1213 | let NERDTreeAutoDeleteBuffer=1 | ||
1214 | < | ||
1215 | ------------------------------------------------------------------------------ | ||
1216 | *NERDTreeCreatePrefix* | ||
1217 | Values: Any valid command prefix. | ||
1218 | Default: "silent". | ||
1219 | |||
1220 | Internally, NERDTree uses the |:edit| command to create a buffer in which to | ||
1221 | display its tree view. You can augment this behavior by specifying a prefix | ||
1222 | string such as "keepalt" or similar. For example, to have NERDTree create its | ||
1223 | tree window using `silent keepalt keepjumps edit`: > | ||
1224 | let NERDTreeCreatePrefix='silent keepalt keepjumps' | ||
1225 | < | ||
1226 | ------------------------------------------------------------------------------ | ||
1227 | *NERDTreeDirArrowCollapsible* *NERDTreeDirArrowExpandable* | ||
1228 | Values: Any single character. | ||
1229 | Defaults: Windows: ~ and + Others: ▾ and ▸ | ||
1230 | |||
1231 | These characters indicate whether a directory is collapsible or expandable. | ||
1232 | Example: > | ||
1233 | let NERDTreeDirArrowExpandable=">" | ||
1234 | let NERDTreeDirArrowCollapsible="v" | ||
1235 | < | ||
1236 | They can be set to "\u00a0" to replace the arrows with a non-breaking space. | ||
1237 | If you do this you may need to change the node delimiter. See | ||
1238 | |NERDTreeNodeDelimiter|. You cannot use the same character for both the arrows | ||
1239 | and the delimiter. | ||
1240 | |||
1241 | Alternatively, they can be set to '' (an empty string). This removes the | ||
1242 | arrows and the single space that follows them, shifting the entire tree two | ||
1243 | character positions to the left. | ||
1244 | |||
1245 | ------------------------------------------------------------------------------ | ||
1246 | *NERDTreeNodeDelimiter* | ||
1247 | Values: Any single character. | ||
1248 | Default: varies (see below) | ||
1249 | |||
1250 | This character is used to separate the file or directory name from the rest of | ||
1251 | the characters in the line of text. It allows filenames to contain special | ||
1252 | characters that are otherwise used in the NERDTree, such as square brackets, | ||
1253 | braces, trailing asterisk, and leading space. For more details, see the | ||
1254 | responsible pull request: https://github.com/preservim/nerdtree/pull/868. | ||
1255 | |||
1256 | The default value of this variable depends on the features compiled into your | ||
1257 | vim and the values of |NERDTreeDirArrowCollapsible| and | ||
1258 | |NERDTreeDirArrowExpandable|. | ||
1259 | * If your vim is compiled with the +conceal feature, it is the "\x07" | ||
1260 | (BEL) character, and it is hidden by setting 'conceallevel' to 2. If you | ||
1261 | use autocommands, make sure none of them change that setting in the | ||
1262 | NERD_Tree_* buffers. | ||
1263 | * If your vim does NOT have the +conceal feature and you're using "\u00a0" | ||
1264 | (non-breaking space) to hide the directory arrows, "\u00b7" (middle dot) | ||
1265 | is used as the default delimiter. | ||
1266 | * If neither condition above applies, NERDTree uses "\u00a0" (non-breaking | ||
1267 | space) as the default delimiter. | ||
1268 | |||
1269 | In the 2nd and 3rd cases, NERDTree will use the Ignore highlight group to | ||
1270 | "hide" the delimiter. It should appear as an empty space. | ||
1271 | |||
1272 | Other plugins can interfere with these defaults, so if you need to change the | ||
1273 | delimiter, be sure to choose a character that won't appear in your filenames | ||
1274 | or any of the flags set by your installed NERDTree plugins. The suggestions | ||
1275 | below are but a few of the many possibilities. Remember to use double quotes | ||
1276 | when specifying by hex or Unicode. > | ||
1277 | let NERDTreeNodeDelimiter="\x07" "bell | ||
1278 | let NERDTreeNodeDelimiter="\u00b7" "middle dot | ||
1279 | let NERDTreeNodeDelimiter="\u00a0" "non-breaking space | ||
1280 | let NERDTreeNodeDelimiter="😀" "smiley face | ||
1281 | < | ||
1282 | ------------------------------------------------------------------------------ | ||
1283 | *NERDTreeCustomOpenArgs* | ||
1284 | Values: A nested dictionary, as described below | ||
1285 | Default: {'file': {'reuse': 'all', 'where': 'p'}, 'dir': {}} | ||
1286 | |||
1287 | This dictionary contains two keys, 'file' and 'dir', whose values each are | ||
1288 | another dictionary. The inner dictionary is a set of parameters used by | ||
1289 | |NERDTree-<CR>| to open a file or directory. Setting these parameters allows you | ||
1290 | to customize the way the node is opened. The default value matches what | ||
1291 | |NERDTree-o| does. To change that behavior, use these keys and | ||
1292 | values in the inner dictionaries: | ||
1293 | |||
1294 | 'where': specifies whether the node should be opened in a new split ("h" or | ||
1295 | "v"), in a new tab ("t") or, in the last window ("p"). | ||
1296 | 'reuse': if file is already shown in a window, jump there; takes values | ||
1297 | "all", "currenttab", or empty | ||
1298 | 'keepopen': boolean (0 or 1); if true, the tree window will not be closed | ||
1299 | 'stay': boolean (0 or 1); if true, remain in tree window after opening | ||
1300 | |||
1301 | For example: | ||
1302 | To open files and directories (creating a new NERDTree) in a new tab, > | ||
1303 | {'file':{'where': 't'}, 'dir':{'where':'t'}} | ||
1304 | < | ||
1305 | To open a file always in the current tab, and expand directories in place, > | ||
1306 | {'file': {'reuse':'currenttab', 'where':'p', 'keepopen':1, 'stay':1}} | ||
1307 | < | ||
1308 | ============================================================================== | ||
1309 | 4. The NERDTree API *NERDTreeAPI* | ||
1310 | |||
1311 | The NERDTree script allows you to add custom key mappings and menu items via | ||
1312 | a set of API calls. Any scripts that use this API should be placed in | ||
1313 | ~/.vim/nerdtree_plugin/ (*nix) or ~/vimfiles/nerdtree_plugin (windows). | ||
1314 | |||
1315 | The script exposes some prototype objects that can be used to manipulate the | ||
1316 | tree and/or get information from it: > | ||
1317 | g:NERDTreePath | ||
1318 | g:NERDTreeDirNode | ||
1319 | g:NERDTreeFileNode | ||
1320 | g:NERDTreeBookmark | ||
1321 | < | ||
1322 | See the code/comments in NERD_tree.vim to find how to use these objects. The | ||
1323 | following code conventions are used: | ||
1324 | * class members start with a capital letter | ||
1325 | * instance members start with a lower case letter | ||
1326 | * private members start with an underscore | ||
1327 | |||
1328 | See this blog post for more details: | ||
1329 | http://got-ravings.blogspot.com/2008/09/vim-pr0n-prototype-based-objects.html | ||
1330 | |||
1331 | A number of API functions take a callback argument to call. The callback can | ||
1332 | be either a string with the name of a function to call, or a |Funcref| object | ||
1333 | which will be called directly. | ||
1334 | |||
1335 | ------------------------------------------------------------------------------ | ||
1336 | 4.1. Key map API *NERDTreeKeymapAPI* | ||
1337 | |||
1338 | NERDTreeAddKeyMap({options}) *NERDTreeAddKeyMap()* | ||
1339 | Adds a new keymapping for all NERDTree buffers. | ||
1340 | {options} must be a dictionary, and must contain the following keys: | ||
1341 | "key" - the trigger key for the new mapping | ||
1342 | "callback" - the function the new mapping will be bound to | ||
1343 | "quickhelpText" - the text that will appear in the quickhelp (see | ||
1344 | |NERDTree-?|) | ||
1345 | "override" - if 1 then this new mapping will override whatever previous | ||
1346 | mapping was defined for the key/scope combo. Useful for overriding the | ||
1347 | default mappings. | ||
1348 | |||
1349 | Additionally, a "scope" argument may be supplied. This constrains the | ||
1350 | mapping so that it is only activated if the cursor is on a certain object. | ||
1351 | That object is then passed into the handling method. Possible values are: | ||
1352 | |||
1353 | "FileNode" .... a file node | ||
1354 | "DirNode" ..... a directory node | ||
1355 | "Node" ........ a file node OR a directory node | ||
1356 | "Bookmark" .... a bookmark | ||
1357 | "all" ......... global scope; handler receives no arguments (default) | ||
1358 | |||
1359 | Example: > | ||
1360 | call NERDTreeAddKeyMap({ | ||
1361 | \ 'key': 'foo', | ||
1362 | \ 'callback': 'NERDTreeEchoPathHandler', | ||
1363 | \ 'quickhelpText': 'echo full path of current node', | ||
1364 | \ 'scope': 'DirNode' }) | ||
1365 | |||
1366 | function! NERDTreeEchoPathHandler(dirnode) | ||
1367 | echo a:dirnode.path.str() | ||
1368 | endfunction | ||
1369 | < | ||
1370 | This code should sit in a file like ~/.vim/nerdtree_plugin/mymapping.vim. | ||
1371 | It adds a (redundant) mapping on 'foo' which changes vim's CWD to that of | ||
1372 | the current directory node. Note this mapping will only fire when the | ||
1373 | cursor is on a directory node. | ||
1374 | |||
1375 | ------------------------------------------------------------------------------ | ||
1376 | 4.2. Menu API *NERDTreeMenuAPI* | ||
1377 | |||
1378 | NERDTreeAddSubmenu({options}) *NERDTreeAddSubmenu()* | ||
1379 | Creates and returns a new submenu. | ||
1380 | |||
1381 | {options} must be a dictionary and must contain the following keys: | ||
1382 | "text" - the text of the submenu that the user will see | ||
1383 | "shortcut" - a shortcut key for the submenu (need not be unique) | ||
1384 | |||
1385 | The following keys are optional: | ||
1386 | "isActiveCallback" - a function that will be called to determine whether | ||
1387 | this submenu item will be displayed or not. The callback function must | ||
1388 | return 0 or 1. | ||
1389 | "parent" - the parent submenu of the new submenu (returned from a previous | ||
1390 | invocation of NERDTreeAddSubmenu()). If this key is left out then the new | ||
1391 | submenu will sit under the top level menu. | ||
1392 | |||
1393 | See below for an example. | ||
1394 | |||
1395 | NERDTreeAddMenuItem({options}) *NERDTreeAddMenuItem()* | ||
1396 | Adds a new menu item to the NERDTree menu (see |NERDTreeMenu|). | ||
1397 | |||
1398 | {options} must be a dictionary and must contain the | ||
1399 | following keys: | ||
1400 | "text" - the text of the menu item which the user will see | ||
1401 | "shortcut" - a shortcut key for the menu item (need not be unique) | ||
1402 | "callback" - the function that will be called when the user activates the | ||
1403 | menu item. | ||
1404 | |||
1405 | The following keys are optional: | ||
1406 | "isActiveCallback" - a function that will be called to determine whether | ||
1407 | this menu item will be displayed or not. The callback function must return | ||
1408 | 0 or 1. | ||
1409 | "parent" - if the menu item belongs under a submenu then this key must be | ||
1410 | specified. This value for this key will be the object that | ||
1411 | was returned when the submenu was created with |NERDTreeAddSubmenu()|. | ||
1412 | |||
1413 | See below for an example. | ||
1414 | |||
1415 | NERDTreeAddMenuSeparator([{options}]) *NERDTreeAddMenuSeparator()* | ||
1416 | Adds a menu separator (a row of dashes). | ||
1417 | |||
1418 | {options} is an optional dictionary that may contain the following keys: | ||
1419 | "isActiveCallback" - see description in |NERDTreeAddMenuItem()|. | ||
1420 | |||
1421 | Below is an example of the menu API in action. > | ||
1422 | call NERDTreeAddMenuSeparator() | ||
1423 | |||
1424 | call NERDTreeAddMenuItem({ | ||
1425 | \ 'text': 'a (t)op level menu item', | ||
1426 | \ 'shortcut': 't', | ||
1427 | \ 'callback': 'SomeFunction' }) | ||
1428 | |||
1429 | let submenu = NERDTreeAddSubmenu({ | ||
1430 | \ 'text': 'a (s)ub menu', | ||
1431 | \ 'shortcut': 's' }) | ||
1432 | |||
1433 | call NERDTreeAddMenuItem({ | ||
1434 | \ 'text': '(n)ested item 1', | ||
1435 | \ 'shortcut': 'n', | ||
1436 | \ 'callback': 'SomeFunction', | ||
1437 | \ 'parent': submenu }) | ||
1438 | |||
1439 | call NERDTreeAddMenuItem({ | ||
1440 | \ 'text': '(n)ested item 2', | ||
1441 | \ 'shortcut': 'n', | ||
1442 | \ 'callback': 'SomeFunction', | ||
1443 | \ 'parent': submenu }) | ||
1444 | < | ||
1445 | This will create the following menu: > | ||
1446 | -------------------- | ||
1447 | a (t)op level menu item | ||
1448 | a (s)ub menu | ||
1449 | < | ||
1450 | Where selecting "a (s)ub menu" will lead to a second menu: > | ||
1451 | (n)ested item 1 | ||
1452 | (n)ested item 2 | ||
1453 | < | ||
1454 | When any of the 3 concrete menu items are selected the function "SomeFunction" | ||
1455 | will be called. | ||
1456 | |||
1457 | ------------------------------------------------------------------------------ | ||
1458 | 4.3 NERDTreeAddPathFilter(callback) *NERDTreeAddPathFilter()* | ||
1459 | |||
1460 | Path filters are essentially a more powerful version of |NERDTreeIgnore|. | ||
1461 | If the simple regex matching in |NERDTreeIgnore| is not enough then use | ||
1462 | |NERDTreeAddPathFilter()| to add a callback function that paths will be | ||
1463 | checked against when the decision to ignore them is made. Example > | ||
1464 | |||
1465 | call NERDTreeAddPathFilter('MyFilter') | ||
1466 | |||
1467 | function! MyFilter(params) | ||
1468 | "params is a dict containing keys: 'nerdtree' and 'path' which are | ||
1469 | "g:NERDTree and g:NERDTreePath objects | ||
1470 | |||
1471 | "return 1 to ignore params['path'] or 0 otherwise | ||
1472 | endfunction | ||
1473 | < | ||
1474 | ------------------------------------------------------------------------------ | ||
1475 | 4.4 Path Listener API *NERDTreePathListenerAPI* | ||
1476 | |||
1477 | Use this API if you want to run a callback for events on Path objects. E.G > | ||
1478 | |||
1479 | call g:NERDTreePathNotifier.AddListener("init", "MyListener") | ||
1480 | |||
1481 | ".... | ||
1482 | |||
1483 | function! MyListener(event) | ||
1484 | "This function will be called whenever a Path object is created. | ||
1485 | |||
1486 | "a:event is an object that contains a bunch of relevant info - | ||
1487 | "including the affected path. See lib/nerdtree/event.vim for details. | ||
1488 | endfunction | ||
1489 | < | ||
1490 | Current events supported: | ||
1491 | init ~ | ||
1492 | refresh ~ | ||
1493 | refreshFlags ~ | ||
1494 | |||
1495 | ------------------------------------------------------------------------------ | ||
1496 | NERDTreeRender() *NERDTreeRender()* | ||
1497 | Re-renders the NERDTree buffer. Useful if you change the state of the | ||
1498 | tree and you want to it to be reflected in the UI. | ||
1499 | |||
1500 | ============================================================================== | ||
1501 | 5. About *NERDTreeAbout* | ||
1502 | |||
1503 | The author of the NERDTree is a terrible terrible monster called Martyzilla | ||
1504 | who gobbles up small children with milk and sugar for breakfast. | ||
1505 | |||
1506 | He can be reached at martin.grenfell at gmail dot com. He would love to hear | ||
1507 | from you, so feel free to send him suggestions and/or comments about this | ||
1508 | plugin. Don't be shy --- the worst he can do is slaughter you and stuff you | ||
1509 | in the fridge for later ;) | ||
1510 | |||
1511 | Martyzilla recruited two other unwitting accomplices to become his minions in | ||
1512 | his quest to conquer the Vim plugin world. While he may still love to receive | ||
1513 | your emails, the best way to send suggestions, bug reports, and questions is | ||
1514 | to submit an issue at http://github.com/preservim/nerdtree/issues. | ||
1515 | |||
1516 | The latest stable and development versions are on Github. | ||
1517 | Stable: http://github.com/preservim/nerdtree (master branch) | ||
1518 | Development: http://github.com/preservim/nerdtree/branches | ||
1519 | |||
1520 | Title Credit: | ||
1521 | * http://ascii.co.uk/art/tree | ||
1522 | |||
1523 | * Patrick Gillespie's Text ASCII Art Generator | ||
1524 | http://patorjk.com/software/taag | ||
1525 | http://patorjk.com/software/taag/#p=display&f=Rozzo&t=the%20NERD%20Tree | ||
1526 | |||
1527 | ============================================================================== | ||
1528 | 6. License *NERDTreeLicense* | ||
1529 | |||
1530 | The NERDTree is released under the wtfpl. | ||
1531 | See http://sam.zoy.org/wtfpl/COPYING. | ||
1532 | |||
1533 | ------------------------------------------------------------------------------ | ||
1534 | vim:tw=78:ts=8:ft=help:noet:nospell | ||
diff --git a/.vim/pack/vendor/start/nerdtree/doc/tags b/.vim/pack/vendor/start/nerdtree/doc/tags new file mode 100644 index 0000000..c1135b2 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/doc/tags | |||
@@ -0,0 +1,143 @@ | |||
1 | :NERDTree NERDTree.txt /*:NERDTree* | ||
2 | :NERDTreeCWD NERDTree.txt /*:NERDTreeCWD* | ||
3 | :NERDTreeClose NERDTree.txt /*:NERDTreeClose* | ||
4 | :NERDTreeFind NERDTree.txt /*:NERDTreeFind* | ||
5 | :NERDTreeFocus NERDTree.txt /*:NERDTreeFocus* | ||
6 | :NERDTreeFromBookmark NERDTree.txt /*:NERDTreeFromBookmark* | ||
7 | :NERDTreeMirror NERDTree.txt /*:NERDTreeMirror* | ||
8 | :NERDTreeRefreshRoot NERDTree.txt /*:NERDTreeRefreshRoot* | ||
9 | :NERDTreeToggle NERDTree.txt /*:NERDTreeToggle* | ||
10 | :NERDTreeToggleVCS NERDTree.txt /*:NERDTreeToggleVCS* | ||
11 | :NERDTreeVCS NERDTree.txt /*:NERDTreeVCS* | ||
12 | NERDTree NERDTree.txt /*NERDTree* | ||
13 | NERDTree-<CR> NERDTree.txt /*NERDTree-<CR>* | ||
14 | NERDTree-? NERDTree.txt /*NERDTree-?* | ||
15 | NERDTree-A NERDTree.txt /*NERDTree-A* | ||
16 | NERDTree-B NERDTree.txt /*NERDTree-B* | ||
17 | NERDTree-C NERDTree.txt /*NERDTree-C* | ||
18 | NERDTree-C-J NERDTree.txt /*NERDTree-C-J* | ||
19 | NERDTree-C-K NERDTree.txt /*NERDTree-C-K* | ||
20 | NERDTree-CD NERDTree.txt /*NERDTree-CD* | ||
21 | NERDTree-D NERDTree.txt /*NERDTree-D* | ||
22 | NERDTree-F NERDTree.txt /*NERDTree-F* | ||
23 | NERDTree-I NERDTree.txt /*NERDTree-I* | ||
24 | NERDTree-J NERDTree.txt /*NERDTree-J* | ||
25 | NERDTree-K NERDTree.txt /*NERDTree-K* | ||
26 | NERDTree-O NERDTree.txt /*NERDTree-O* | ||
27 | NERDTree-P NERDTree.txt /*NERDTree-P* | ||
28 | NERDTree-R NERDTree.txt /*NERDTree-R* | ||
29 | NERDTree-T NERDTree.txt /*NERDTree-T* | ||
30 | NERDTree-U NERDTree.txt /*NERDTree-U* | ||
31 | NERDTree-X NERDTree.txt /*NERDTree-X* | ||
32 | NERDTree-cd NERDTree.txt /*NERDTree-cd* | ||
33 | NERDTree-contents NERDTree.txt /*NERDTree-contents* | ||
34 | NERDTree-e NERDTree.txt /*NERDTree-e* | ||
35 | NERDTree-f NERDTree.txt /*NERDTree-f* | ||
36 | NERDTree-gi NERDTree.txt /*NERDTree-gi* | ||
37 | NERDTree-go NERDTree.txt /*NERDTree-go* | ||
38 | NERDTree-gs NERDTree.txt /*NERDTree-gs* | ||
39 | NERDTree-i NERDTree.txt /*NERDTree-i* | ||
40 | NERDTree-m NERDTree.txt /*NERDTree-m* | ||
41 | NERDTree-o NERDTree.txt /*NERDTree-o* | ||
42 | NERDTree-p NERDTree.txt /*NERDTree-p* | ||
43 | NERDTree-q NERDTree.txt /*NERDTree-q* | ||
44 | NERDTree-r NERDTree.txt /*NERDTree-r* | ||
45 | NERDTree-s NERDTree.txt /*NERDTree-s* | ||
46 | NERDTree-t NERDTree.txt /*NERDTree-t* | ||
47 | NERDTree-u NERDTree.txt /*NERDTree-u* | ||
48 | NERDTree-x NERDTree.txt /*NERDTree-x* | ||
49 | NERDTree.txt NERDTree.txt /*NERDTree.txt* | ||
50 | NERDTreeAPI NERDTree.txt /*NERDTreeAPI* | ||
51 | NERDTreeAbout NERDTree.txt /*NERDTreeAbout* | ||
52 | NERDTreeAddKeyMap() NERDTree.txt /*NERDTreeAddKeyMap()* | ||
53 | NERDTreeAddMenuItem() NERDTree.txt /*NERDTreeAddMenuItem()* | ||
54 | NERDTreeAddMenuSeparator() NERDTree.txt /*NERDTreeAddMenuSeparator()* | ||
55 | NERDTreeAddPathFilter() NERDTree.txt /*NERDTreeAddPathFilter()* | ||
56 | NERDTreeAddSubmenu() NERDTree.txt /*NERDTreeAddSubmenu()* | ||
57 | NERDTreeAutoCenter NERDTree.txt /*NERDTreeAutoCenter* | ||
58 | NERDTreeAutoCenterThreshold NERDTree.txt /*NERDTreeAutoCenterThreshold* | ||
59 | NERDTreeAutoDeleteBuffer NERDTree.txt /*NERDTreeAutoDeleteBuffer* | ||
60 | NERDTreeBookmarkCommands NERDTree.txt /*NERDTreeBookmarkCommands* | ||
61 | NERDTreeBookmarkTable NERDTree.txt /*NERDTreeBookmarkTable* | ||
62 | NERDTreeBookmarks NERDTree.txt /*NERDTreeBookmarks* | ||
63 | NERDTreeBookmarksFile NERDTree.txt /*NERDTreeBookmarksFile* | ||
64 | NERDTreeBookmarksSort NERDTree.txt /*NERDTreeBookmarksSort* | ||
65 | NERDTreeCascadeOpenSingleChildDir NERDTree.txt /*NERDTreeCascadeOpenSingleChildDir* | ||
66 | NERDTreeCascadeSingleChildDir NERDTree.txt /*NERDTreeCascadeSingleChildDir* | ||
67 | NERDTreeCaseSensitiveSort NERDTree.txt /*NERDTreeCaseSensitiveSort* | ||
68 | NERDTreeChDirMode NERDTree.txt /*NERDTreeChDirMode* | ||
69 | NERDTreeCreatePrefix NERDTree.txt /*NERDTreeCreatePrefix* | ||
70 | NERDTreeCustomOpenArgs NERDTree.txt /*NERDTreeCustomOpenArgs* | ||
71 | NERDTreeDirArrowCollapsible NERDTree.txt /*NERDTreeDirArrowCollapsible* | ||
72 | NERDTreeDirArrowExpandable NERDTree.txt /*NERDTreeDirArrowExpandable* | ||
73 | NERDTreeFunctionality NERDTree.txt /*NERDTreeFunctionality* | ||
74 | NERDTreeGlobalCommands NERDTree.txt /*NERDTreeGlobalCommands* | ||
75 | NERDTreeHighlightCursorline NERDTree.txt /*NERDTreeHighlightCursorline* | ||
76 | NERDTreeHijackNetrw NERDTree.txt /*NERDTreeHijackNetrw* | ||
77 | NERDTreeIgnore NERDTree.txt /*NERDTreeIgnore* | ||
78 | NERDTreeInvalidBookmarks NERDTree.txt /*NERDTreeInvalidBookmarks* | ||
79 | NERDTreeKeymapAPI NERDTree.txt /*NERDTreeKeymapAPI* | ||
80 | NERDTreeLicense NERDTree.txt /*NERDTreeLicense* | ||
81 | NERDTreeMapCWD NERDTree.txt /*NERDTreeMapCWD* | ||
82 | NERDTreeMapChangeRoot NERDTree.txt /*NERDTreeMapChangeRoot* | ||
83 | NERDTreeMapChdir NERDTree.txt /*NERDTreeMapChdir* | ||
84 | NERDTreeMapCloseChildren NERDTree.txt /*NERDTreeMapCloseChildren* | ||
85 | NERDTreeMapCloseDir NERDTree.txt /*NERDTreeMapCloseDir* | ||
86 | NERDTreeMapCustomOpen NERDTree.txt /*NERDTreeMapCustomOpen* | ||
87 | NERDTreeMapDeleteBookmark NERDTree.txt /*NERDTreeMapDeleteBookmark* | ||
88 | NERDTreeMapHelp NERDTree.txt /*NERDTreeMapHelp* | ||
89 | NERDTreeMapJumpFirstChild NERDTree.txt /*NERDTreeMapJumpFirstChild* | ||
90 | NERDTreeMapJumpLastChild NERDTree.txt /*NERDTreeMapJumpLastChild* | ||
91 | NERDTreeMapJumpNextSibling NERDTree.txt /*NERDTreeMapJumpNextSibling* | ||
92 | NERDTreeMapJumpParent NERDTree.txt /*NERDTreeMapJumpParent* | ||
93 | NERDTreeMapJumpPrevSibling NERDTree.txt /*NERDTreeMapJumpPrevSibling* | ||
94 | NERDTreeMapJumpRoot NERDTree.txt /*NERDTreeMapJumpRoot* | ||
95 | NERDTreeMapMenu NERDTree.txt /*NERDTreeMapMenu* | ||
96 | NERDTreeMapOpenExpl NERDTree.txt /*NERDTreeMapOpenExpl* | ||
97 | NERDTreeMapOpenInTab NERDTree.txt /*NERDTreeMapOpenInTab* | ||
98 | NERDTreeMapOpenInTabSilent NERDTree.txt /*NERDTreeMapOpenInTabSilent* | ||
99 | NERDTreeMapOpenRecursively NERDTree.txt /*NERDTreeMapOpenRecursively* | ||
100 | NERDTreeMapOpenSplit NERDTree.txt /*NERDTreeMapOpenSplit* | ||
101 | NERDTreeMapOpenVSplit NERDTree.txt /*NERDTreeMapOpenVSplit* | ||
102 | NERDTreeMapPreviewSplit NERDTree.txt /*NERDTreeMapPreviewSplit* | ||
103 | NERDTreeMapPreviewVSplit NERDTree.txt /*NERDTreeMapPreviewVSplit* | ||
104 | NERDTreeMapQuit NERDTree.txt /*NERDTreeMapQuit* | ||
105 | NERDTreeMapRefresh NERDTree.txt /*NERDTreeMapRefresh* | ||
106 | NERDTreeMapRefreshRoot NERDTree.txt /*NERDTreeMapRefreshRoot* | ||
107 | NERDTreeMapToggleBookmarks NERDTree.txt /*NERDTreeMapToggleBookmarks* | ||
108 | NERDTreeMapToggleFiles NERDTree.txt /*NERDTreeMapToggleFiles* | ||
109 | NERDTreeMapToggleFilters NERDTree.txt /*NERDTreeMapToggleFilters* | ||
110 | NERDTreeMapToggleHidden NERDTree.txt /*NERDTreeMapToggleHidden* | ||
111 | NERDTreeMapToggleZoom NERDTree.txt /*NERDTreeMapToggleZoom* | ||
112 | NERDTreeMapUpdir NERDTree.txt /*NERDTreeMapUpdir* | ||
113 | NERDTreeMapUpdirKeepOpen NERDTree.txt /*NERDTreeMapUpdirKeepOpen* | ||
114 | NERDTreeMappings NERDTree.txt /*NERDTreeMappings* | ||
115 | NERDTreeMarkBookmarks NERDTree.txt /*NERDTreeMarkBookmarks* | ||
116 | NERDTreeMenu NERDTree.txt /*NERDTreeMenu* | ||
117 | NERDTreeMenu-j NERDTree.txt /*NERDTreeMenu-j* | ||
118 | NERDTreeMenu-k NERDTree.txt /*NERDTreeMenu-k* | ||
119 | NERDTreeMenuAPI NERDTree.txt /*NERDTreeMenuAPI* | ||
120 | NERDTreeMenuDown NERDTree.txt /*NERDTreeMenuDown* | ||
121 | NERDTreeMenuUp NERDTree.txt /*NERDTreeMenuUp* | ||
122 | NERDTreeMinimalMenu NERDTree.txt /*NERDTreeMinimalMenu* | ||
123 | NERDTreeMinimalUI NERDTree.txt /*NERDTreeMinimalUI* | ||
124 | NERDTreeMouseMode NERDTree.txt /*NERDTreeMouseMode* | ||
125 | NERDTreeNaturalSort NERDTree.txt /*NERDTreeNaturalSort* | ||
126 | NERDTreeNodeDelimiter NERDTree.txt /*NERDTreeNodeDelimiter* | ||
127 | NERDTreePathListenerAPI NERDTree.txt /*NERDTreePathListenerAPI* | ||
128 | NERDTreeQuitOnOpen NERDTree.txt /*NERDTreeQuitOnOpen* | ||
129 | NERDTreeRender() NERDTree.txt /*NERDTreeRender()* | ||
130 | NERDTreeRespectWildIgnore NERDTree.txt /*NERDTreeRespectWildIgnore* | ||
131 | NERDTreeSettings NERDTree.txt /*NERDTreeSettings* | ||
132 | NERDTreeSettingsDetails NERDTree.txt /*NERDTreeSettingsDetails* | ||
133 | NERDTreeSettingsSummary NERDTree.txt /*NERDTreeSettingsSummary* | ||
134 | NERDTreeShowBookmarks NERDTree.txt /*NERDTreeShowBookmarks* | ||
135 | NERDTreeShowFiles NERDTree.txt /*NERDTreeShowFiles* | ||
136 | NERDTreeShowHidden NERDTree.txt /*NERDTreeShowHidden* | ||
137 | NERDTreeShowLineNumbers NERDTree.txt /*NERDTreeShowLineNumbers* | ||
138 | NERDTreeSortOrder NERDTree.txt /*NERDTreeSortOrder* | ||
139 | NERDTreeStatusline NERDTree.txt /*NERDTreeStatusline* | ||
140 | NERDTreeUseTCD NERDTree.txt /*NERDTreeUseTCD* | ||
141 | NERDTreeWinPos NERDTree.txt /*NERDTreeWinPos* | ||
142 | NERDTreeWinSize NERDTree.txt /*NERDTreeWinSize* | ||
143 | loaded_nerd_tree NERDTree.txt /*loaded_nerd_tree* | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/bookmark.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/bookmark.vim new file mode 100644 index 0000000..37be451 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/bookmark.vim | |||
@@ -0,0 +1,365 @@ | |||
1 | " ============================================================================ | ||
2 | " CLASS: Bookmark | ||
3 | " | ||
4 | " The Bookmark class serves two purposes: | ||
5 | " (1) It is the top-level prototype for new, concrete Bookmark objects. | ||
6 | " (2) It provides an interface for client code to query and manipulate the | ||
7 | " global list of Bookmark objects within the current Vim session. | ||
8 | " ============================================================================ | ||
9 | |||
10 | |||
11 | let s:Bookmark = {} | ||
12 | let g:NERDTreeBookmark = s:Bookmark | ||
13 | |||
14 | " FUNCTION: Bookmark.activate(nerdtree) {{{1 | ||
15 | function! s:Bookmark.activate(nerdtree, ...) | ||
16 | call self.open(a:nerdtree, a:0 ? a:1 : {}) | ||
17 | endfunction | ||
18 | |||
19 | " FUNCTION: Bookmark.AddBookmark(name, path) {{{1 | ||
20 | " Class method to add a new bookmark to the list, if a previous bookmark exists | ||
21 | " with the same name, just update the path for that bookmark | ||
22 | function! s:Bookmark.AddBookmark(name, path) | ||
23 | for i in s:Bookmark.Bookmarks() | ||
24 | if i.name ==# a:name | ||
25 | let i.path = a:path | ||
26 | return | ||
27 | endif | ||
28 | endfor | ||
29 | call add(s:Bookmark.Bookmarks(), s:Bookmark.New(a:name, a:path)) | ||
30 | endfunction | ||
31 | |||
32 | " FUNCTION: Bookmark.Bookmarks() {{{1 | ||
33 | " Class method to get all bookmarks. Lazily initializes the bookmarks global | ||
34 | " variable | ||
35 | function! s:Bookmark.Bookmarks() | ||
36 | if !exists('g:NERDTreeBookmarks') | ||
37 | let g:NERDTreeBookmarks = [] | ||
38 | endif | ||
39 | return g:NERDTreeBookmarks | ||
40 | endfunction | ||
41 | |||
42 | " FUNCTION: Bookmark.BookmarkExistsFor(name) {{{1 | ||
43 | " class method that returns 1 if a bookmark with the given name is found, 0 | ||
44 | " otherwise | ||
45 | function! s:Bookmark.BookmarkExistsFor(name) | ||
46 | try | ||
47 | call s:Bookmark.BookmarkFor(a:name) | ||
48 | return 1 | ||
49 | catch /^NERDTree.BookmarkNotFoundError/ | ||
50 | return 0 | ||
51 | endtry | ||
52 | endfunction | ||
53 | |||
54 | " FUNCTION: Bookmark.BookmarkFor(name) {{{1 | ||
55 | " Class method that returns the Bookmark object having the specified name. | ||
56 | " Throws NERDTree.BookmarkNotFoundError if no Bookmark is found. | ||
57 | function! s:Bookmark.BookmarkFor(name) | ||
58 | let l:result = {} | ||
59 | for l:bookmark in s:Bookmark.Bookmarks() | ||
60 | if l:bookmark.name ==# a:name | ||
61 | let l:result = l:bookmark | ||
62 | break | ||
63 | endif | ||
64 | endfor | ||
65 | if empty(l:result) | ||
66 | throw 'NERDTree.BookmarkNotFoundError: "' . a:name . '" not found' | ||
67 | endif | ||
68 | return l:result | ||
69 | endfunction | ||
70 | |||
71 | " FUNCTION: Bookmark.BookmarkNames() {{{1 | ||
72 | " Class method to return an array of all bookmark names | ||
73 | function! s:Bookmark.BookmarkNames() | ||
74 | let names = [] | ||
75 | for i in s:Bookmark.Bookmarks() | ||
76 | call add(names, i.name) | ||
77 | endfor | ||
78 | return names | ||
79 | endfunction | ||
80 | |||
81 | " FUNCTION: Bookmark.CacheBookmarks(silent) {{{1 | ||
82 | " Class method to read all bookmarks from the bookmarks file initialize | ||
83 | " bookmark objects for each one. | ||
84 | " | ||
85 | " Args: | ||
86 | " silent - dont echo an error msg if invalid bookmarks are found | ||
87 | function! s:Bookmark.CacheBookmarks(silent) | ||
88 | if filereadable(g:NERDTreeBookmarksFile) | ||
89 | let g:NERDTreeBookmarks = [] | ||
90 | let g:NERDTreeInvalidBookmarks = [] | ||
91 | let bookmarkStrings = readfile(g:NERDTreeBookmarksFile) | ||
92 | let invalidBookmarksFound = 0 | ||
93 | for i in bookmarkStrings | ||
94 | |||
95 | "ignore blank lines | ||
96 | if i !=# '' | ||
97 | |||
98 | let name = substitute(i, '^\(.\{-}\) .*$', '\1', '') | ||
99 | let path = substitute(i, '^.\{-} \(.*\)$', '\1', '') | ||
100 | let path = fnamemodify(path, ':p') | ||
101 | |||
102 | try | ||
103 | let bookmark = s:Bookmark.New(name, g:NERDTreePath.New(path)) | ||
104 | call add(g:NERDTreeBookmarks, bookmark) | ||
105 | catch /^NERDTree.InvalidArgumentsError/ | ||
106 | call add(g:NERDTreeInvalidBookmarks, i) | ||
107 | let invalidBookmarksFound += 1 | ||
108 | endtry | ||
109 | endif | ||
110 | endfor | ||
111 | if invalidBookmarksFound | ||
112 | call s:Bookmark.Write() | ||
113 | if !a:silent | ||
114 | call nerdtree#echo(invalidBookmarksFound . ' invalid bookmarks were read. See :help NERDTreeInvalidBookmarks for info.') | ||
115 | endif | ||
116 | endif | ||
117 | endif | ||
118 | endfunction | ||
119 | |||
120 | " FUNCTION: Bookmark.CompareBookmarksByName(firstBookmark, secondBookmark) {{{1 | ||
121 | " Class method that indicates the relative position of two bookmarks when | ||
122 | " placed in alphabetical order by name. Case-sensitivity is determined by an | ||
123 | " option. Supports the s:Bookmark.SortBookmarksList() method. | ||
124 | function! s:Bookmark.CompareBookmarksByName(firstBookmark, secondBookmark) | ||
125 | let l:result = 0 | ||
126 | if g:NERDTreeBookmarksSort ==# 1 | ||
127 | if a:firstBookmark.name <? a:secondBookmark.name | ||
128 | let l:result = -1 | ||
129 | elseif a:firstBookmark.name >? a:secondBookmark.name | ||
130 | let l:result = 1 | ||
131 | endif | ||
132 | elseif g:NERDTreeBookmarksSort ==# 2 | ||
133 | if a:firstBookmark.name <# a:secondBookmark.name | ||
134 | let l:result = -1 | ||
135 | elseif a:firstBookmark.name ># a:secondBookmark.name | ||
136 | let l:result = 1 | ||
137 | endif | ||
138 | endif | ||
139 | return l:result | ||
140 | endfunction | ||
141 | |||
142 | " FUNCTION: Bookmark.ClearAll() {{{1 | ||
143 | " Class method to delete all bookmarks. | ||
144 | function! s:Bookmark.ClearAll() | ||
145 | for i in s:Bookmark.Bookmarks() | ||
146 | call i.delete() | ||
147 | endfor | ||
148 | call s:Bookmark.Write() | ||
149 | endfunction | ||
150 | |||
151 | " FUNCTION: Bookmark.delete() {{{1 | ||
152 | " Delete this bookmark. If the node for this bookmark is under the current | ||
153 | " root, then recache bookmarks for its Path object | ||
154 | function! s:Bookmark.delete() | ||
155 | call remove(s:Bookmark.Bookmarks(), index(s:Bookmark.Bookmarks(), self)) | ||
156 | call s:Bookmark.Write() | ||
157 | endfunction | ||
158 | |||
159 | " FUNCTION: s:Edit() {{{1 | ||
160 | " opens the NERDTreeBookmarks file for manual editing | ||
161 | function! s:Bookmark.Edit() | ||
162 | call nerdtree#exec('wincmd w', 1) | ||
163 | call nerdtree#exec('edit '.g:NERDTreeBookmarksFile, 1) | ||
164 | endfunction | ||
165 | |||
166 | " FUNCTION: Bookmark.getNode(nerdtree, searchFromAbsoluteRoot) {{{1 | ||
167 | " Returns the tree node object associated with this Bookmark. | ||
168 | " Throws NERDTree.BookmarkedNodeNotFoundError if the node is not found. | ||
169 | " | ||
170 | " Args: | ||
171 | " searchFromAbsoluteRoot: boolean flag, search from the highest cached node | ||
172 | " if true and from the current tree root if false | ||
173 | function! s:Bookmark.getNode(nerdtree, searchFromAbsoluteRoot) | ||
174 | if a:searchFromAbsoluteRoot | ||
175 | let l:searchRoot = a:nerdtree.root.AbsoluteTreeRoot() | ||
176 | else | ||
177 | let l:searchRoot = a:nerdtree.root | ||
178 | endif | ||
179 | let l:targetNode = l:searchRoot.findNode(self.path) | ||
180 | if empty(l:targetNode) | ||
181 | throw 'NERDTree.BookmarkedNodeNotFoundError: node for bookmark "' . self.name . '" not found' | ||
182 | endif | ||
183 | return l:targetNode | ||
184 | endfunction | ||
185 | |||
186 | " FUNCTION: Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree) {{{1 | ||
187 | " Class method that returns the tree node object for the Bookmark with the | ||
188 | " given name. Throws NERDTree.BookmarkNotFoundError if a Bookmark with the | ||
189 | " name does not exist. Throws NERDTree.BookmarkedNodeNotFoundError if a | ||
190 | " tree node for the named Bookmark could not be found. | ||
191 | function! s:Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree) | ||
192 | let l:bookmark = s:Bookmark.BookmarkFor(a:name) | ||
193 | return l:bookmark.getNode(a:nerdtree, a:searchFromAbsoluteRoot) | ||
194 | endfunction | ||
195 | |||
196 | " FUNCTION: Bookmark.GetSelected() {{{1 | ||
197 | " returns the Bookmark the cursor is over, or {} | ||
198 | function! s:Bookmark.GetSelected() | ||
199 | let line = getline('.') | ||
200 | let name = substitute(line, '^>\(.\{-}\) .\+$', '\1', '') | ||
201 | if name !=# line | ||
202 | try | ||
203 | return s:Bookmark.BookmarkFor(name) | ||
204 | catch /^NERDTree.BookmarkNotFoundError/ | ||
205 | return {} | ||
206 | endtry | ||
207 | endif | ||
208 | return {} | ||
209 | endfunction | ||
210 | |||
211 | " FUNCTION: Bookmark.InvalidBookmarks() {{{1 | ||
212 | " Class method to get all invalid bookmark strings read from the bookmarks | ||
213 | " file | ||
214 | function! s:Bookmark.InvalidBookmarks() | ||
215 | if !exists('g:NERDTreeInvalidBookmarks') | ||
216 | let g:NERDTreeInvalidBookmarks = [] | ||
217 | endif | ||
218 | return g:NERDTreeInvalidBookmarks | ||
219 | endfunction | ||
220 | |||
221 | " FUNCTION: Bookmark.mustExist() {{{1 | ||
222 | function! s:Bookmark.mustExist() | ||
223 | if !self.path.exists() | ||
224 | call s:Bookmark.CacheBookmarks(1) | ||
225 | throw 'NERDTree.BookmarkPointsToInvalidLocationError: the bookmark "'. | ||
226 | \ self.name .'" points to a non existing location: "'. self.path.str() | ||
227 | endif | ||
228 | endfunction | ||
229 | |||
230 | " FUNCTION: Bookmark.New(name, path) {{{1 | ||
231 | " Create a new bookmark object with the given name and path object | ||
232 | function! s:Bookmark.New(name, path) | ||
233 | if a:name =~# ' ' | ||
234 | throw 'NERDTree.IllegalBookmarkNameError: illegal name:' . a:name | ||
235 | endif | ||
236 | |||
237 | let newBookmark = copy(self) | ||
238 | let newBookmark.name = a:name | ||
239 | let newBookmark.path = a:path | ||
240 | return newBookmark | ||
241 | endfunction | ||
242 | |||
243 | " FUNCTION: Bookmark.open(nerdtree, [options]) {{{1 | ||
244 | "Args: | ||
245 | " | ||
246 | "nerdtree: the tree to load open the bookmark in | ||
247 | " | ||
248 | "A dictionary containing the following keys (all optional): | ||
249 | " 'where': Specifies whether the node should be opened in new split/tab or in | ||
250 | " the previous window. Can be either 'v' (vertical split), 'h' | ||
251 | " (horizontal split), 't' (new tab) or 'p' (previous window). | ||
252 | " 'reuse': if a window is displaying the file then jump the cursor there | ||
253 | " 'keepopen': dont close the tree window | ||
254 | " 'stay': open the file, but keep the cursor in the tree win | ||
255 | " | ||
256 | function! s:Bookmark.open(nerdtree, ...) | ||
257 | let opts = a:0 ? a:1 : {} | ||
258 | |||
259 | if nerdtree#closeBookmarksOnOpen() | ||
260 | call a:nerdtree.ui.toggleShowBookmarks() | ||
261 | endif | ||
262 | |||
263 | if self.path.isDirectory && !has_key(opts, 'where') | ||
264 | call self.toRoot(a:nerdtree) | ||
265 | else | ||
266 | let opener = g:NERDTreeOpener.New(self.path, opts) | ||
267 | call opener.open(self) | ||
268 | endif | ||
269 | endfunction | ||
270 | |||
271 | " FUNCTION: Bookmark.openInNewTab(options) {{{1 | ||
272 | " Create a new bookmark object with the given name and path object | ||
273 | function! s:Bookmark.openInNewTab(options) | ||
274 | call nerdtree#deprecated('Bookmark.openInNewTab', 'is deprecated, use open() instead') | ||
275 | call self.open(a:options) | ||
276 | endfunction | ||
277 | |||
278 | " FUNCTION: Bookmark.setPath(path) {{{1 | ||
279 | " makes this bookmark point to the given path | ||
280 | function! s:Bookmark.setPath(path) | ||
281 | let self.path = a:path | ||
282 | endfunction | ||
283 | |||
284 | " FUNCTION: Bookmark.SortBookmarksList() {{{1 | ||
285 | " Class method that sorts the global list of bookmarks alphabetically by name. | ||
286 | " Note that case-sensitivity is determined by a user option. | ||
287 | function! s:Bookmark.SortBookmarksList() | ||
288 | call sort(s:Bookmark.Bookmarks(), s:Bookmark.CompareBookmarksByName, s:Bookmark) | ||
289 | endfunction | ||
290 | |||
291 | " FUNCTION: Bookmark.str() {{{1 | ||
292 | " Get the string that should be rendered in the view for this bookmark | ||
293 | function! s:Bookmark.str() | ||
294 | let pathStrMaxLen = winwidth(g:NERDTree.GetWinNum()) - 4 - strdisplaywidth(self.name) | ||
295 | if &number | ||
296 | let pathStrMaxLen = pathStrMaxLen - &numberwidth | ||
297 | endif | ||
298 | |||
299 | let pathStr = self.path.str({'format': 'UI'}) | ||
300 | if strdisplaywidth(pathStr) > pathStrMaxLen | ||
301 | while strdisplaywidth(pathStr) > pathStrMaxLen && strchars(pathStr) > 0 | ||
302 | let pathStr = substitute(pathStr, '^.', '', '') | ||
303 | endwhile | ||
304 | let pathStr = '<' . pathStr | ||
305 | endif | ||
306 | return '>' . self.name . ' ' . pathStr | ||
307 | endfunction | ||
308 | |||
309 | " FUNCTION: Bookmark.toRoot(nerdtree) {{{1 | ||
310 | " Set the root of the given NERDTree to the node for this Bookmark. If a node | ||
311 | " for this Bookmark does not exist, a new one is initialized. | ||
312 | function! s:Bookmark.toRoot(nerdtree) | ||
313 | if self.validate() | ||
314 | try | ||
315 | let l:targetNode = self.getNode(a:nerdtree, 1) | ||
316 | call l:targetNode.closeChildren() | ||
317 | catch /^NERDTree.BookmarkedNodeNotFoundError/ | ||
318 | let l:targetNode = g:NERDTreeFileNode.New(s:Bookmark.BookmarkFor(self.name).path, a:nerdtree) | ||
319 | endtry | ||
320 | call a:nerdtree.changeRoot(l:targetNode) | ||
321 | endif | ||
322 | endfunction | ||
323 | |||
324 | " FUNCTION: Bookmark.ToRoot(name, nerdtree) {{{1 | ||
325 | " Class method that makes the Bookmark with the given name the root of | ||
326 | " specified NERDTree. | ||
327 | function! s:Bookmark.ToRoot(name, nerdtree) | ||
328 | let l:bookmark = s:Bookmark.BookmarkFor(a:name) | ||
329 | call l:bookmark.toRoot(a:nerdtree) | ||
330 | endfunction | ||
331 | |||
332 | " FUNCTION: Bookmark.validate() {{{1 | ||
333 | function! s:Bookmark.validate() | ||
334 | if self.path.exists() | ||
335 | return 1 | ||
336 | else | ||
337 | call s:Bookmark.CacheBookmarks(1) | ||
338 | call nerdtree#echo(self.name . 'now points to an invalid location. See :help NERDTreeInvalidBookmarks for info.') | ||
339 | return 0 | ||
340 | endif | ||
341 | endfunction | ||
342 | |||
343 | " FUNCTION: Bookmark.Write() {{{1 | ||
344 | " Class method to write all bookmarks to the bookmarks file | ||
345 | function! s:Bookmark.Write() | ||
346 | let bookmarkStrings = [] | ||
347 | for i in s:Bookmark.Bookmarks() | ||
348 | call add(bookmarkStrings, i.name . ' ' . fnamemodify(i.path.str(), ':~')) | ||
349 | endfor | ||
350 | |||
351 | "add a blank line before the invalid ones | ||
352 | call add(bookmarkStrings, '') | ||
353 | |||
354 | for j in s:Bookmark.InvalidBookmarks() | ||
355 | call add(bookmarkStrings, j) | ||
356 | endfor | ||
357 | |||
358 | try | ||
359 | call writefile(bookmarkStrings, g:NERDTreeBookmarksFile) | ||
360 | catch | ||
361 | call nerdtree#echoError('Failed to write bookmarks file. Make sure g:NERDTreeBookmarksFile points to a valid location.') | ||
362 | endtry | ||
363 | endfunction | ||
364 | |||
365 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/creator.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/creator.vim new file mode 100644 index 0000000..b9d45dc --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/creator.vim | |||
@@ -0,0 +1,402 @@ | |||
1 | " ============================================================================ | ||
2 | " CLASS: Creator | ||
3 | " | ||
4 | " This class is responsible for creating NERDTree instances. The new NERDTree | ||
5 | " may be a tab tree, a window tree, or a mirrored tree. In the process of | ||
6 | " creating a NERDTree, it sets up all of the window and buffer options and key | ||
7 | " mappings etc. | ||
8 | " ============================================================================ | ||
9 | |||
10 | |||
11 | let s:Creator = {} | ||
12 | let g:NERDTreeCreator = s:Creator | ||
13 | |||
14 | " FUNCTION: s:Creator._bindMappings() {{{1 | ||
15 | function! s:Creator._bindMappings() | ||
16 | call g:NERDTreeKeyMap.BindAll() | ||
17 | |||
18 | command! -buffer -nargs=? Bookmark :call nerdtree#ui_glue#bookmarkNode('<args>') | ||
19 | command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=1 RevealBookmark :call nerdtree#ui_glue#revealBookmark('<args>') | ||
20 | command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=1 OpenBookmark call nerdtree#ui_glue#openBookmark('<args>') | ||
21 | command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=* ClearBookmarks call nerdtree#ui_glue#clearBookmarks('<args>') | ||
22 | command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=+ BookmarkToRoot call g:NERDTreeBookmark.ToRoot('<args>', b:NERDTree) | ||
23 | command! -buffer -nargs=0 ClearAllBookmarks call g:NERDTreeBookmark.ClearAll() <bar> call b:NERDTree.render() | ||
24 | command! -buffer -nargs=0 ReadBookmarks call g:NERDTreeBookmark.CacheBookmarks(0) <bar> call b:NERDTree.render() | ||
25 | command! -buffer -nargs=0 WriteBookmarks call g:NERDTreeBookmark.Write() | ||
26 | command! -buffer -nargs=0 EditBookmarks call g:NERDTreeBookmark.Edit() | ||
27 | endfunction | ||
28 | |||
29 | " FUNCTION: s:Creator._broadcastInitEvent() {{{1 | ||
30 | function! s:Creator._broadcastInitEvent() | ||
31 | if exists('#User#NERDTreeInit') | ||
32 | doautocmd User NERDTreeInit | ||
33 | endif | ||
34 | endfunction | ||
35 | |||
36 | " FUNCTION: s:Creator.BufNamePrefix() {{{1 | ||
37 | function! s:Creator.BufNamePrefix() | ||
38 | return 'NERD_tree_' | ||
39 | endfunction | ||
40 | |||
41 | " FUNCTION: s:Creator.CreateTabTree(a:name) {{{1 | ||
42 | function! s:Creator.CreateTabTree(name) | ||
43 | let creator = s:Creator.New() | ||
44 | call creator.createTabTree(a:name) | ||
45 | endfunction | ||
46 | |||
47 | " FUNCTION: s:Creator.createTabTree(a:name) {{{1 | ||
48 | " name: the name of a bookmark or a directory | ||
49 | function! s:Creator.createTabTree(name) | ||
50 | let l:path = self._pathForString(a:name) | ||
51 | |||
52 | " Abort if an exception was thrown (i.e., if the bookmark or directory | ||
53 | " does not exist). | ||
54 | if empty(l:path) | ||
55 | return | ||
56 | endif | ||
57 | |||
58 | " Obey the user's preferences for changing the working directory. | ||
59 | if g:NERDTreeChDirMode != 0 | ||
60 | call l:path.changeToDir() | ||
61 | endif | ||
62 | |||
63 | if g:NERDTree.ExistsForTab() | ||
64 | call g:NERDTree.Close() | ||
65 | call self._removeTreeBufForTab() | ||
66 | endif | ||
67 | |||
68 | call self._createTreeWin() | ||
69 | call self._createNERDTree(l:path, 'tab') | ||
70 | call b:NERDTree.render() | ||
71 | call b:NERDTree.root.putCursorHere(0, 0) | ||
72 | |||
73 | call self._broadcastInitEvent() | ||
74 | endfunction | ||
75 | |||
76 | " FUNCTION: s:Creator.CreateWindowTree(dir) {{{1 | ||
77 | function! s:Creator.CreateWindowTree(dir) | ||
78 | let creator = s:Creator.New() | ||
79 | call creator.createWindowTree(a:dir) | ||
80 | endfunction | ||
81 | |||
82 | " FUNCTION: s:Creator.createWindowTree(dir) {{{1 | ||
83 | function! s:Creator.createWindowTree(dir) | ||
84 | try | ||
85 | let path = g:NERDTreePath.New(a:dir) | ||
86 | catch /^NERDTree.InvalidArgumentsError/ | ||
87 | call nerdtree#echo('Invalid directory name:' . a:dir) | ||
88 | return | ||
89 | endtry | ||
90 | |||
91 | "we want the directory buffer to disappear when we do the :edit below | ||
92 | setlocal bufhidden=wipe | ||
93 | |||
94 | let previousBuf = expand('#') | ||
95 | |||
96 | "we need a unique name for each window tree buffer to ensure they are | ||
97 | "all independent | ||
98 | exec g:NERDTreeCreatePrefix . ' edit ' . self._nextBufferName() | ||
99 | |||
100 | call self._createNERDTree(path, 'window') | ||
101 | let b:NERDTree._previousBuf = bufnr(previousBuf) | ||
102 | call self._setCommonBufOptions() | ||
103 | |||
104 | call b:NERDTree.render() | ||
105 | |||
106 | call self._broadcastInitEvent() | ||
107 | endfunction | ||
108 | |||
109 | " FUNCTION: s:Creator._createNERDTree(path) {{{1 | ||
110 | function! s:Creator._createNERDTree(path, type) | ||
111 | let b:NERDTree = g:NERDTree.New(a:path, a:type) | ||
112 | |||
113 | " TODO: This assignment is kept for compatibility reasons. Many other | ||
114 | " plugins use b:NERDTreeRoot instead of b:NERDTree.root. Remove this | ||
115 | " assignment in the future. | ||
116 | let b:NERDTreeRoot = b:NERDTree.root | ||
117 | |||
118 | call b:NERDTree.root.open() | ||
119 | endfunction | ||
120 | |||
121 | " FUNCTION: s:Creator.CreateMirror() {{{1 | ||
122 | function! s:Creator.CreateMirror() | ||
123 | let creator = s:Creator.New() | ||
124 | call creator.createMirror() | ||
125 | endfunction | ||
126 | |||
127 | " FUNCTION: s:Creator.createMirror() {{{1 | ||
128 | function! s:Creator.createMirror() | ||
129 | "get the names off all the nerd tree buffers | ||
130 | let treeBufNames = [] | ||
131 | for i in range(1, tabpagenr('$')) | ||
132 | let nextName = self._tabpagevar(i, 'NERDTreeBufName') | ||
133 | if nextName != -1 && (!exists('t:NERDTreeBufName') || nextName != t:NERDTreeBufName) | ||
134 | call add(treeBufNames, nextName) | ||
135 | endif | ||
136 | endfor | ||
137 | let treeBufNames = self._uniq(treeBufNames) | ||
138 | |||
139 | "map the option names (that the user will be prompted with) to the nerd | ||
140 | "tree buffer names | ||
141 | let options = {} | ||
142 | let i = 0 | ||
143 | while i < len(treeBufNames) | ||
144 | let bufName = treeBufNames[i] | ||
145 | let treeRoot = getbufvar(bufName, 'NERDTree').root | ||
146 | let options[i+1 . '. ' . treeRoot.path.str() . ' (buf name: ' . bufName . ')'] = bufName | ||
147 | let i = i + 1 | ||
148 | endwhile | ||
149 | |||
150 | "work out which tree to mirror, if there is more than 1 then ask the user | ||
151 | let bufferName = '' | ||
152 | if len(keys(options)) > 1 | ||
153 | let choices = ['Choose a tree to mirror'] | ||
154 | let choices = extend(choices, sort(keys(options))) | ||
155 | let choice = inputlist(choices) | ||
156 | if choice < 1 || choice > len(options) || choice ==# '' | ||
157 | return | ||
158 | endif | ||
159 | |||
160 | let bufferName = options[sort(keys(options))[choice-1]] | ||
161 | elseif len(keys(options)) ==# 1 | ||
162 | let bufferName = values(options)[0] | ||
163 | else | ||
164 | call nerdtree#echo('No trees to mirror') | ||
165 | return | ||
166 | endif | ||
167 | |||
168 | if g:NERDTree.ExistsForTab() && g:NERDTree.IsOpen() | ||
169 | call g:NERDTree.Close() | ||
170 | endif | ||
171 | |||
172 | let t:NERDTreeBufName = bufferName | ||
173 | call self._createTreeWin() | ||
174 | exec 'buffer ' . bufferName | ||
175 | call b:NERDTree.ui.restoreScreenState() | ||
176 | if !&hidden | ||
177 | call b:NERDTree.render() | ||
178 | endif | ||
179 | endfunction | ||
180 | |||
181 | " FUNCTION: s:Creator._createTreeWin() {{{1 | ||
182 | " Initialize the NERDTree window. Open the window, size it properly, set all | ||
183 | " local options, etc. | ||
184 | function! s:Creator._createTreeWin() | ||
185 | let l:splitLocation = g:NERDTreeWinPos ==# 'left' ? 'topleft ' : 'botright ' | ||
186 | let l:splitSize = g:NERDTreeWinSize | ||
187 | |||
188 | if !g:NERDTree.ExistsForTab() | ||
189 | let t:NERDTreeBufName = self._nextBufferName() | ||
190 | silent! execute l:splitLocation . 'vertical ' . l:splitSize . ' new' | ||
191 | silent! execute 'edit ' . t:NERDTreeBufName | ||
192 | silent! execute 'vertical resize '. l:splitSize | ||
193 | else | ||
194 | silent! execute l:splitLocation . 'vertical ' . l:splitSize . ' split' | ||
195 | silent! execute 'buffer ' . t:NERDTreeBufName | ||
196 | endif | ||
197 | |||
198 | setlocal winfixwidth | ||
199 | |||
200 | call self._setCommonBufOptions() | ||
201 | |||
202 | if has('patch-7.4.1925') | ||
203 | clearjumps | ||
204 | endif | ||
205 | |||
206 | endfunction | ||
207 | |||
208 | " FUNCTION: s:Creator._isBufHidden(nr) {{{1 | ||
209 | function! s:Creator._isBufHidden(nr) | ||
210 | redir => bufs | ||
211 | silent ls! | ||
212 | redir END | ||
213 | |||
214 | return bufs =~ a:nr . '..h' | ||
215 | endfunction | ||
216 | |||
217 | " FUNCTION: s:Creator.New() {{{1 | ||
218 | function! s:Creator.New() | ||
219 | let newCreator = copy(self) | ||
220 | return newCreator | ||
221 | endfunction | ||
222 | |||
223 | " FUNCTION: s:Creator._nextBufferName() {{{1 | ||
224 | " returns the buffer name for the next nerd tree | ||
225 | function! s:Creator._nextBufferName() | ||
226 | let name = s:Creator.BufNamePrefix() . self._nextBufferNumber() | ||
227 | return name | ||
228 | endfunction | ||
229 | |||
230 | " FUNCTION: s:Creator._nextBufferNumber() {{{1 | ||
231 | " the number to add to the nerd tree buffer name to make the buf name unique | ||
232 | function! s:Creator._nextBufferNumber() | ||
233 | if !exists('s:Creator._NextBufNum') | ||
234 | let s:Creator._NextBufNum = 1 | ||
235 | else | ||
236 | let s:Creator._NextBufNum += 1 | ||
237 | endif | ||
238 | |||
239 | return s:Creator._NextBufNum | ||
240 | endfunction | ||
241 | |||
242 | " FUNCTION: s:Creator._pathForString(str) {{{1 | ||
243 | " find a bookmark or adirectory for the given string | ||
244 | function! s:Creator._pathForString(str) | ||
245 | let path = {} | ||
246 | if g:NERDTreeBookmark.BookmarkExistsFor(a:str) | ||
247 | let path = g:NERDTreeBookmark.BookmarkFor(a:str).path | ||
248 | else | ||
249 | let dir = a:str ==# '' ? getcwd() : a:str | ||
250 | |||
251 | "hack to get an absolute path if a relative path is given | ||
252 | if dir =~# '^\.' | ||
253 | let dir = getcwd() . nerdtree#slash() . dir | ||
254 | endif | ||
255 | |||
256 | "hack to prevent removing slash if dir is the root of the file system. | ||
257 | if dir !=# '/' | ||
258 | let dir = g:NERDTreePath.Resolve(dir) | ||
259 | endif | ||
260 | |||
261 | try | ||
262 | let path = g:NERDTreePath.New(dir) | ||
263 | catch /^NERDTree.InvalidArgumentsError/ | ||
264 | call nerdtree#echo('No bookmark or directory found for: ' . a:str) | ||
265 | return {} | ||
266 | endtry | ||
267 | endif | ||
268 | if !path.isDirectory | ||
269 | let path = path.getParent() | ||
270 | endif | ||
271 | |||
272 | return path | ||
273 | endfunction | ||
274 | |||
275 | " Function: s:Creator._removeTreeBufForTab() {{{1 | ||
276 | function! s:Creator._removeTreeBufForTab() | ||
277 | let buf = bufnr(t:NERDTreeBufName) | ||
278 | |||
279 | "if &hidden is not set then it will already be gone | ||
280 | if buf != -1 | ||
281 | |||
282 | "nerdtree buf may be mirrored/displayed elsewhere | ||
283 | if self._isBufHidden(buf) | ||
284 | exec 'bwipeout ' . buf | ||
285 | endif | ||
286 | |||
287 | endif | ||
288 | |||
289 | unlet t:NERDTreeBufName | ||
290 | endfunction | ||
291 | |||
292 | " FUNCTION: s:Creator._setCommonBufOptions() {{{1 | ||
293 | function! s:Creator._setCommonBufOptions() | ||
294 | |||
295 | " Options for a non-file/control buffer. | ||
296 | setlocal bufhidden=hide | ||
297 | setlocal buftype=nofile | ||
298 | setlocal noswapfile | ||
299 | |||
300 | " Options for controlling buffer/window appearance. | ||
301 | setlocal foldcolumn=0 | ||
302 | setlocal foldmethod=manual | ||
303 | setlocal nobuflisted | ||
304 | setlocal nofoldenable | ||
305 | setlocal nolist | ||
306 | setlocal nospell | ||
307 | setlocal nowrap | ||
308 | |||
309 | if g:NERDTreeShowLineNumbers | ||
310 | setlocal number | ||
311 | else | ||
312 | setlocal nonumber | ||
313 | if v:version >= 703 | ||
314 | setlocal norelativenumber | ||
315 | endif | ||
316 | endif | ||
317 | |||
318 | iabc <buffer> | ||
319 | |||
320 | if g:NERDTreeHighlightCursorline | ||
321 | setlocal cursorline | ||
322 | endif | ||
323 | |||
324 | call self._setupStatusline() | ||
325 | call self._bindMappings() | ||
326 | |||
327 | setlocal filetype=nerdtree | ||
328 | endfunction | ||
329 | |||
330 | " FUNCTION: s:Creator._setupStatusline() {{{1 | ||
331 | function! s:Creator._setupStatusline() | ||
332 | if g:NERDTreeStatusline != -1 | ||
333 | let &l:statusline = g:NERDTreeStatusline | ||
334 | endif | ||
335 | endfunction | ||
336 | |||
337 | " FUNCTION: s:Creator._tabpagevar(tabnr, var) {{{1 | ||
338 | function! s:Creator._tabpagevar(tabnr, var) | ||
339 | let currentTab = tabpagenr() | ||
340 | let old_ei = &eventignore | ||
341 | set eventignore=all | ||
342 | |||
343 | try | ||
344 | exec 'tabnext ' . a:tabnr | ||
345 | let v = -1 | ||
346 | if exists('t:' . a:var) | ||
347 | exec 'let v = t:' . a:var | ||
348 | endif | ||
349 | exec 'tabnext ' . currentTab | ||
350 | |||
351 | finally | ||
352 | let &eventignore = old_ei | ||
353 | endtry | ||
354 | |||
355 | return v | ||
356 | endfunction | ||
357 | |||
358 | " FUNCTION: s:Creator.ToggleTabTree(dir) {{{1 | ||
359 | function! s:Creator.ToggleTabTree(dir) | ||
360 | let creator = s:Creator.New() | ||
361 | call creator.toggleTabTree(a:dir) | ||
362 | endfunction | ||
363 | |||
364 | " FUNCTION: s:Creator.toggleTabTree(dir) {{{1 | ||
365 | " Toggles the NERD tree. I.e if the NERD tree is open, it is closed. If it is | ||
366 | " closed, it is restored or initialized. If dir is not empty, it will be set | ||
367 | " as the new root. | ||
368 | " | ||
369 | " Args: | ||
370 | " dir: the full path for the root node (is used if the NERD tree is being | ||
371 | " initialized, or to change the root to a new dir.) | ||
372 | function! s:Creator.toggleTabTree(dir) | ||
373 | if g:NERDTree.ExistsForTab() | ||
374 | if !g:NERDTree.IsOpen() | ||
375 | call self._createTreeWin() | ||
376 | if !empty(a:dir) && a:dir !=# b:NERDTree.root.path.str() | ||
377 | call self.createTabTree(a:dir) | ||
378 | elseif !&hidden | ||
379 | call b:NERDTree.render() | ||
380 | endif | ||
381 | call b:NERDTree.ui.restoreScreenState() | ||
382 | else | ||
383 | call g:NERDTree.Close() | ||
384 | endif | ||
385 | else | ||
386 | call self.createTabTree(a:dir) | ||
387 | endif | ||
388 | endfunction | ||
389 | |||
390 | " Function: s:Creator._uniq(list) {{{1 | ||
391 | " returns a:list without duplicates | ||
392 | function! s:Creator._uniq(list) | ||
393 | let uniqlist = [] | ||
394 | for elem in a:list | ||
395 | if index(uniqlist, elem) ==# -1 | ||
396 | let uniqlist += [elem] | ||
397 | endif | ||
398 | endfor | ||
399 | return uniqlist | ||
400 | endfunction | ||
401 | |||
402 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/event.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/event.vim new file mode 100644 index 0000000..964e8ff --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/event.vim | |||
@@ -0,0 +1,13 @@ | |||
1 | "CLASS: Event | ||
2 | "============================================================ | ||
3 | let s:Event = {} | ||
4 | let g:NERDTreeEvent = s:Event | ||
5 | |||
6 | function! s:Event.New(nerdtree, subject, action, params) abort | ||
7 | let newObj = copy(self) | ||
8 | let newObj.nerdtree = a:nerdtree | ||
9 | let newObj.subject = a:subject | ||
10 | let newObj.action = a:action | ||
11 | let newObj.params = a:params | ||
12 | return newObj | ||
13 | endfunction | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/flag_set.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/flag_set.vim new file mode 100644 index 0000000..7552867 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/flag_set.vim | |||
@@ -0,0 +1,58 @@ | |||
1 | "CLASS: FlagSet | ||
2 | "============================================================ | ||
3 | let s:FlagSet = {} | ||
4 | let g:NERDTreeFlagSet = s:FlagSet | ||
5 | |||
6 | "FUNCTION: FlagSet.addFlag(scope, flag) {{{1 | ||
7 | function! s:FlagSet.addFlag(scope, flag) | ||
8 | let flags = self._flagsForScope(a:scope) | ||
9 | if index(flags, a:flag) == -1 | ||
10 | call add(flags, a:flag) | ||
11 | end | ||
12 | endfunction | ||
13 | |||
14 | "FUNCTION: FlagSet.clearFlags(scope) {{{1 | ||
15 | function! s:FlagSet.clearFlags(scope) | ||
16 | let self._flags[a:scope] = [] | ||
17 | endfunction | ||
18 | |||
19 | "FUNCTION: FlagSet._flagsForScope(scope) {{{1 | ||
20 | function! s:FlagSet._flagsForScope(scope) | ||
21 | if !has_key(self._flags, a:scope) | ||
22 | let self._flags[a:scope] = [] | ||
23 | endif | ||
24 | return self._flags[a:scope] | ||
25 | endfunction | ||
26 | |||
27 | "FUNCTION: FlagSet.New() {{{1 | ||
28 | function! s:FlagSet.New() | ||
29 | let newObj = copy(self) | ||
30 | let newObj._flags = {} | ||
31 | return newObj | ||
32 | endfunction | ||
33 | |||
34 | "FUNCTION: FlagSet.removeFlag(scope, flag) {{{1 | ||
35 | function! s:FlagSet.removeFlag(scope, flag) | ||
36 | let flags = self._flagsForScope(a:scope) | ||
37 | |||
38 | let i = index(flags, a:flag) | ||
39 | if i >= 0 | ||
40 | call remove(flags, i) | ||
41 | endif | ||
42 | endfunction | ||
43 | |||
44 | "FUNCTION: FlagSet.renderToString() {{{1 | ||
45 | function! s:FlagSet.renderToString() | ||
46 | let flagstring = '' | ||
47 | for i in values(self._flags) | ||
48 | let flagstring .= join(i) | ||
49 | endfor | ||
50 | |||
51 | if len(flagstring) == 0 | ||
52 | return '' | ||
53 | endif | ||
54 | |||
55 | return '[' . flagstring . ']' | ||
56 | endfunction | ||
57 | |||
58 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/key_map.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/key_map.vim new file mode 100644 index 0000000..ed79167 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/key_map.vim | |||
@@ -0,0 +1,164 @@ | |||
1 | "CLASS: KeyMap | ||
2 | "============================================================ | ||
3 | let s:KeyMap = {} | ||
4 | let g:NERDTreeKeyMap = s:KeyMap | ||
5 | let s:keyMaps = {} | ||
6 | |||
7 | "FUNCTION: KeyMap.All() {{{1 | ||
8 | function! s:KeyMap.All() | ||
9 | let sortedKeyMaps = values(s:keyMaps) | ||
10 | call sort(sortedKeyMaps, s:KeyMap.Compare, s:KeyMap) | ||
11 | |||
12 | return sortedKeyMaps | ||
13 | endfunction | ||
14 | |||
15 | "FUNCTION: KeyMap.Compare(keyMap1, keyMap2) {{{1 | ||
16 | function! s:KeyMap.Compare(keyMap1, keyMap2) | ||
17 | |||
18 | if a:keyMap1.key >? a:keyMap2.key | ||
19 | return 1 | ||
20 | endif | ||
21 | |||
22 | if a:keyMap1.key <? a:keyMap2.key | ||
23 | return -1 | ||
24 | endif | ||
25 | |||
26 | return 0 | ||
27 | endfunction | ||
28 | |||
29 | "FUNCTION: KeyMap.FindFor(key, scope) {{{1 | ||
30 | function! s:KeyMap.FindFor(key, scope) | ||
31 | return get(s:keyMaps, a:key . a:scope, {}) | ||
32 | endfunction | ||
33 | |||
34 | "FUNCTION: KeyMap.BindAll() {{{1 | ||
35 | function! s:KeyMap.BindAll() | ||
36 | for i in values(s:keyMaps) | ||
37 | call i.bind() | ||
38 | endfor | ||
39 | endfunction | ||
40 | |||
41 | "FUNCTION: KeyMap.bind() {{{1 | ||
42 | function! s:KeyMap.bind() | ||
43 | " If the key sequence we're trying to map contains any '<>' notation, we | ||
44 | " must replace each of the '<' characters with '<lt>' to ensure the string | ||
45 | " is not translated into its corresponding keycode during the later part | ||
46 | " of the map command below | ||
47 | " :he <> | ||
48 | let specialNotationRegex = '\m<\([[:alnum:]_-]\+>\)' | ||
49 | if self.key =~# specialNotationRegex | ||
50 | let keymapInvokeString = substitute(self.key, specialNotationRegex, '<lt>\1', 'g') | ||
51 | else | ||
52 | let keymapInvokeString = self.key | ||
53 | endif | ||
54 | let keymapInvokeString = escape(keymapInvokeString, '\"') | ||
55 | |||
56 | let premap = self.key ==# '<LeftRelease>' ? ' <LeftRelease>' : ' ' | ||
57 | |||
58 | exec 'nnoremap <buffer> <silent> '. self.key . premap . ':call nerdtree#ui_glue#invokeKeyMap("'. keymapInvokeString .'")<cr>' | ||
59 | endfunction | ||
60 | |||
61 | "FUNCTION: KeyMap.Remove(key, scope) {{{1 | ||
62 | function! s:KeyMap.Remove(key, scope) | ||
63 | return remove(s:keyMaps, a:key . a:scope) | ||
64 | endfunction | ||
65 | |||
66 | "FUNCTION: KeyMap.invoke() {{{1 | ||
67 | "Call the KeyMaps callback function | ||
68 | function! s:KeyMap.invoke(...) | ||
69 | let l:Callback = type(self.callback) ==# type(function('tr')) ? self.callback : function(self.callback) | ||
70 | if a:0 | ||
71 | call l:Callback(a:1) | ||
72 | else | ||
73 | call l:Callback() | ||
74 | endif | ||
75 | endfunction | ||
76 | |||
77 | "FUNCTION: KeyMap.Invoke() {{{1 | ||
78 | "Find a keymapping for a:key and the current scope invoke it. | ||
79 | " | ||
80 | "Scope is determined as follows: | ||
81 | " * if the cursor is on a dir node then DirNode | ||
82 | " * if the cursor is on a file node then FileNode | ||
83 | " * if the cursor is on a bookmark then Bookmark | ||
84 | " | ||
85 | "If a keymap has the scope of 'all' then it will be called if no other keymap | ||
86 | "is found for a:key and the scope. | ||
87 | function! s:KeyMap.Invoke(key) | ||
88 | |||
89 | "required because clicking the command window below another window still | ||
90 | "invokes the <LeftRelease> mapping - but changes the window cursor | ||
91 | "is in first | ||
92 | " | ||
93 | "TODO: remove this check when the vim bug is fixed | ||
94 | if !g:NERDTree.ExistsForBuf() | ||
95 | return {} | ||
96 | endif | ||
97 | |||
98 | let node = g:NERDTreeFileNode.GetSelected() | ||
99 | if !empty(node) | ||
100 | |||
101 | "try file node | ||
102 | if !node.path.isDirectory | ||
103 | let km = s:KeyMap.FindFor(a:key, 'FileNode') | ||
104 | if !empty(km) | ||
105 | return km.invoke(node) | ||
106 | endif | ||
107 | endif | ||
108 | |||
109 | "try dir node | ||
110 | if node.path.isDirectory | ||
111 | let km = s:KeyMap.FindFor(a:key, 'DirNode') | ||
112 | if !empty(km) | ||
113 | return km.invoke(node) | ||
114 | endif | ||
115 | endif | ||
116 | |||
117 | "try generic node | ||
118 | let km = s:KeyMap.FindFor(a:key, 'Node') | ||
119 | if !empty(km) | ||
120 | return km.invoke(node) | ||
121 | endif | ||
122 | |||
123 | endif | ||
124 | |||
125 | "try bookmark | ||
126 | let bm = g:NERDTreeBookmark.GetSelected() | ||
127 | if !empty(bm) | ||
128 | let km = s:KeyMap.FindFor(a:key, 'Bookmark') | ||
129 | if !empty(km) | ||
130 | return km.invoke(bm) | ||
131 | endif | ||
132 | endif | ||
133 | |||
134 | "try all | ||
135 | let km = s:KeyMap.FindFor(a:key, 'all') | ||
136 | if !empty(km) | ||
137 | return km.invoke() | ||
138 | endif | ||
139 | endfunction | ||
140 | |||
141 | "FUNCTION: KeyMap.Create(options) {{{1 | ||
142 | function! s:KeyMap.Create(options) | ||
143 | let opts = extend({'scope': 'all', 'quickhelpText': ''}, copy(a:options)) | ||
144 | |||
145 | "dont override other mappings unless the 'override' option is given | ||
146 | if get(opts, 'override', 0) ==# 0 && !empty(s:KeyMap.FindFor(opts['key'], opts['scope'])) | ||
147 | return | ||
148 | end | ||
149 | |||
150 | let newKeyMap = copy(self) | ||
151 | let newKeyMap.key = opts['key'] | ||
152 | let newKeyMap.quickhelpText = opts['quickhelpText'] | ||
153 | let newKeyMap.callback = opts['callback'] | ||
154 | let newKeyMap.scope = opts['scope'] | ||
155 | |||
156 | call s:KeyMap.Add(newKeyMap) | ||
157 | endfunction | ||
158 | |||
159 | "FUNCTION: KeyMap.Add(keymap) {{{1 | ||
160 | function! s:KeyMap.Add(keymap) | ||
161 | let s:keyMaps[a:keymap.key . a:keymap.scope] = a:keymap | ||
162 | endfunction | ||
163 | |||
164 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_controller.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_controller.vim new file mode 100644 index 0000000..952c67b --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_controller.vim | |||
@@ -0,0 +1,211 @@ | |||
1 | "CLASS: MenuController | ||
2 | "============================================================ | ||
3 | let s:MenuController = {} | ||
4 | let g:NERDTreeMenuController = s:MenuController | ||
5 | |||
6 | "FUNCTION: MenuController.New(menuItems) {{{1 | ||
7 | "create a new menu controller that operates on the given menu items | ||
8 | function! s:MenuController.New(menuItems) | ||
9 | let newMenuController = copy(self) | ||
10 | if a:menuItems[0].isSeparator() | ||
11 | let newMenuController.menuItems = a:menuItems[1:-1] | ||
12 | else | ||
13 | let newMenuController.menuItems = a:menuItems | ||
14 | endif | ||
15 | return newMenuController | ||
16 | endfunction | ||
17 | |||
18 | " FUNCTION: s:MenuController.isMinimal() {{{1 | ||
19 | function! s:MenuController.isMinimal() | ||
20 | return g:NERDTreeMinimalMenu | ||
21 | endfunction | ||
22 | |||
23 | " FUNCTION: MenuController.showMenu() {{{1 | ||
24 | " Enter the main loop of the NERDTree menu, prompting the user to select | ||
25 | " a menu item. | ||
26 | function! s:MenuController.showMenu() | ||
27 | call self._saveOptions() | ||
28 | |||
29 | try | ||
30 | let self.selection = 0 | ||
31 | let l:done = 0 | ||
32 | |||
33 | while !l:done | ||
34 | if has('nvim') | ||
35 | mode | ||
36 | else | ||
37 | redraw! | ||
38 | endif | ||
39 | call self._echoPrompt() | ||
40 | |||
41 | let l:key = nr2char(getchar()) | ||
42 | let l:done = self._handleKeypress(l:key) | ||
43 | endwhile | ||
44 | finally | ||
45 | call self._restoreOptions() | ||
46 | |||
47 | " Redraw when Ctrl-C or Esc is received. | ||
48 | if !l:done || self.selection ==# -1 | ||
49 | redraw! | ||
50 | endif | ||
51 | endtry | ||
52 | |||
53 | if self.selection !=# -1 | ||
54 | let l:m = self._current() | ||
55 | call l:m.execute() | ||
56 | endif | ||
57 | endfunction | ||
58 | |||
59 | "FUNCTION: MenuController._echoPrompt() {{{1 | ||
60 | function! s:MenuController._echoPrompt() | ||
61 | let navHelp = 'Use ' . g:NERDTreeMenuDown . '/' . g:NERDTreeMenuUp . '/enter' | ||
62 | |||
63 | if self.isMinimal() | ||
64 | let selection = self.menuItems[self.selection].text | ||
65 | let keyword = matchstr(selection, '[^ ]*([^ ]*') | ||
66 | |||
67 | let shortcuts = map(copy(self.menuItems), "v:val['shortcut']") | ||
68 | let shortcuts[self.selection] = ' ' . keyword . ' ' | ||
69 | |||
70 | echo 'Menu: [' . join(shortcuts, ',') . '] (' . navHelp . ' or shortcut): ' | ||
71 | else | ||
72 | echo 'NERDTree Menu. ' . navHelp . ', or the shortcuts indicated' | ||
73 | echo '=========================================================' | ||
74 | |||
75 | for i in range(0, len(self.menuItems)-1) | ||
76 | if self.selection ==# i | ||
77 | echo '> ' . self.menuItems[i].text | ||
78 | else | ||
79 | echo ' ' . self.menuItems[i].text | ||
80 | endif | ||
81 | endfor | ||
82 | endif | ||
83 | endfunction | ||
84 | |||
85 | "FUNCTION: MenuController._current(key) {{{1 | ||
86 | "get the MenuItem that is currently selected | ||
87 | function! s:MenuController._current() | ||
88 | return self.menuItems[self.selection] | ||
89 | endfunction | ||
90 | |||
91 | "FUNCTION: MenuController._handleKeypress(key) {{{1 | ||
92 | "change the selection (if appropriate) and return 1 if the user has made | ||
93 | "their choice, 0 otherwise | ||
94 | function! s:MenuController._handleKeypress(key) | ||
95 | if a:key ==# g:NERDTreeMenuDown | ||
96 | call self._cursorDown() | ||
97 | elseif a:key ==# g:NERDTreeMenuUp | ||
98 | call self._cursorUp() | ||
99 | elseif a:key ==# nr2char(27) "escape | ||
100 | let self.selection = -1 | ||
101 | return 1 | ||
102 | elseif a:key ==# "\r" || a:key ==# "\n" "enter and ctrl-j | ||
103 | return 1 | ||
104 | else | ||
105 | let index = self._nextIndexFor(a:key) | ||
106 | if index !=# -1 | ||
107 | let self.selection = index | ||
108 | if len(self._allIndexesFor(a:key)) ==# 1 | ||
109 | return 1 | ||
110 | endif | ||
111 | endif | ||
112 | endif | ||
113 | |||
114 | return 0 | ||
115 | endfunction | ||
116 | |||
117 | "FUNCTION: MenuController._allIndexesFor(shortcut) {{{1 | ||
118 | "get indexes to all menu items with the given shortcut | ||
119 | function! s:MenuController._allIndexesFor(shortcut) | ||
120 | let toReturn = [] | ||
121 | |||
122 | for i in range(0, len(self.menuItems)-1) | ||
123 | if self.menuItems[i].shortcut ==# a:shortcut | ||
124 | call add(toReturn, i) | ||
125 | endif | ||
126 | endfor | ||
127 | |||
128 | return toReturn | ||
129 | endfunction | ||
130 | |||
131 | "FUNCTION: MenuController._nextIndexFor(shortcut) {{{1 | ||
132 | "get the index to the next menu item with the given shortcut, starts from the | ||
133 | "current cursor location and wraps around to the top again if need be | ||
134 | function! s:MenuController._nextIndexFor(shortcut) | ||
135 | for i in range(self.selection+1, len(self.menuItems)-1) | ||
136 | if self.menuItems[i].shortcut ==# a:shortcut | ||
137 | return i | ||
138 | endif | ||
139 | endfor | ||
140 | |||
141 | for i in range(0, self.selection) | ||
142 | if self.menuItems[i].shortcut ==# a:shortcut | ||
143 | return i | ||
144 | endif | ||
145 | endfor | ||
146 | |||
147 | return -1 | ||
148 | endfunction | ||
149 | |||
150 | "FUNCTION: MenuController._setCmdheight() {{{1 | ||
151 | "sets &cmdheight to whatever is needed to display the menu | ||
152 | function! s:MenuController._setCmdheight() | ||
153 | if self.isMinimal() | ||
154 | let &cmdheight = 1 | ||
155 | else | ||
156 | let &cmdheight = len(self.menuItems) + 3 | ||
157 | endif | ||
158 | endfunction | ||
159 | |||
160 | "FUNCTION: MenuController._saveOptions() {{{1 | ||
161 | "set any vim options that are required to make the menu work (saving their old | ||
162 | "values) | ||
163 | function! s:MenuController._saveOptions() | ||
164 | let self._oldLazyredraw = &lazyredraw | ||
165 | let self._oldCmdheight = &cmdheight | ||
166 | set nolazyredraw | ||
167 | call self._setCmdheight() | ||
168 | endfunction | ||
169 | |||
170 | "FUNCTION: MenuController._restoreOptions() {{{1 | ||
171 | "restore the options we saved in _saveOptions() | ||
172 | function! s:MenuController._restoreOptions() | ||
173 | let &cmdheight = self._oldCmdheight | ||
174 | let &lazyredraw = self._oldLazyredraw | ||
175 | endfunction | ||
176 | |||
177 | "FUNCTION: MenuController._cursorDown() {{{1 | ||
178 | "move the cursor to the next menu item, skipping separators | ||
179 | function! s:MenuController._cursorDown() | ||
180 | let done = 0 | ||
181 | while !done | ||
182 | if self.selection < len(self.menuItems)-1 | ||
183 | let self.selection += 1 | ||
184 | else | ||
185 | let self.selection = 0 | ||
186 | endif | ||
187 | |||
188 | if !self._current().isSeparator() | ||
189 | let done = 1 | ||
190 | endif | ||
191 | endwhile | ||
192 | endfunction | ||
193 | |||
194 | "FUNCTION: MenuController._cursorUp() {{{1 | ||
195 | "move the cursor to the previous menu item, skipping separators | ||
196 | function! s:MenuController._cursorUp() | ||
197 | let done = 0 | ||
198 | while !done | ||
199 | if self.selection > 0 | ||
200 | let self.selection -= 1 | ||
201 | else | ||
202 | let self.selection = len(self.menuItems)-1 | ||
203 | endif | ||
204 | |||
205 | if !self._current().isSeparator() | ||
206 | let done = 1 | ||
207 | endif | ||
208 | endwhile | ||
209 | endfunction | ||
210 | |||
211 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_item.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_item.vim new file mode 100644 index 0000000..7f25917 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_item.vim | |||
@@ -0,0 +1,118 @@ | |||
1 | "CLASS: MenuItem | ||
2 | "============================================================ | ||
3 | let s:MenuItem = {} | ||
4 | let g:NERDTreeMenuItem = s:MenuItem | ||
5 | |||
6 | "FUNCTION: MenuItem.All() {{{1 | ||
7 | "get all top level menu items | ||
8 | function! s:MenuItem.All() | ||
9 | if !exists('s:menuItems') | ||
10 | let s:menuItems = [] | ||
11 | endif | ||
12 | return s:menuItems | ||
13 | endfunction | ||
14 | |||
15 | "FUNCTION: MenuItem.AllEnabled() {{{1 | ||
16 | "get all top level menu items that are currently enabled | ||
17 | function! s:MenuItem.AllEnabled() | ||
18 | let toReturn = [] | ||
19 | for i in s:MenuItem.All() | ||
20 | if i.enabled() | ||
21 | call add(toReturn, i) | ||
22 | endif | ||
23 | endfor | ||
24 | return toReturn | ||
25 | endfunction | ||
26 | |||
27 | "FUNCTION: MenuItem.Create(options) {{{1 | ||
28 | "make a new menu item and add it to the global list | ||
29 | function! s:MenuItem.Create(options) | ||
30 | let newMenuItem = copy(self) | ||
31 | |||
32 | let newMenuItem.text = a:options['text'] | ||
33 | let newMenuItem.shortcut = a:options['shortcut'] | ||
34 | let newMenuItem.children = [] | ||
35 | |||
36 | let newMenuItem.isActiveCallback = -1 | ||
37 | if has_key(a:options, 'isActiveCallback') | ||
38 | let newMenuItem.isActiveCallback = a:options['isActiveCallback'] | ||
39 | endif | ||
40 | |||
41 | let newMenuItem.callback = -1 | ||
42 | if has_key(a:options, 'callback') | ||
43 | let newMenuItem.callback = a:options['callback'] | ||
44 | endif | ||
45 | |||
46 | if has_key(a:options, 'parent') | ||
47 | call add(a:options['parent'].children, newMenuItem) | ||
48 | else | ||
49 | call add(s:MenuItem.All(), newMenuItem) | ||
50 | endif | ||
51 | |||
52 | return newMenuItem | ||
53 | endfunction | ||
54 | |||
55 | "FUNCTION: MenuItem.CreateSeparator(options) {{{1 | ||
56 | "make a new separator menu item and add it to the global list | ||
57 | function! s:MenuItem.CreateSeparator(options) | ||
58 | let standard_options = { 'text': '--------------------', | ||
59 | \ 'shortcut': -1, | ||
60 | \ 'callback': -1 } | ||
61 | let options = extend(a:options, standard_options, 'force') | ||
62 | |||
63 | return s:MenuItem.Create(options) | ||
64 | endfunction | ||
65 | |||
66 | "FUNCTION: MenuItem.CreateSubmenu(options) {{{1 | ||
67 | "make a new submenu and add it to global list | ||
68 | function! s:MenuItem.CreateSubmenu(options) | ||
69 | let standard_options = { 'callback': -1 } | ||
70 | let options = extend(a:options, standard_options, 'force') | ||
71 | |||
72 | return s:MenuItem.Create(options) | ||
73 | endfunction | ||
74 | |||
75 | "FUNCTION: MenuItem.enabled() {{{1 | ||
76 | "return 1 if this menu item should be displayed | ||
77 | " | ||
78 | "delegates off to the isActiveCallback, and defaults to 1 if no callback was | ||
79 | "specified | ||
80 | function! s:MenuItem.enabled() | ||
81 | if self.isActiveCallback != -1 | ||
82 | return type(self.isActiveCallback) == type(function('tr')) ? self.isActiveCallback() : {self.isActiveCallback}() | ||
83 | endif | ||
84 | return 1 | ||
85 | endfunction | ||
86 | |||
87 | "FUNCTION: MenuItem.execute() {{{1 | ||
88 | "perform the action behind this menu item, if this menuitem has children then | ||
89 | "display a new menu for them, otherwise deletegate off to the menuitem's | ||
90 | "callback | ||
91 | function! s:MenuItem.execute() | ||
92 | if len(self.children) | ||
93 | let mc = g:NERDTreeMenuController.New(self.children) | ||
94 | call mc.showMenu() | ||
95 | else | ||
96 | if self.callback != -1 | ||
97 | if type(self.callback) == type(function('tr')) | ||
98 | call self.callback() | ||
99 | else | ||
100 | call {self.callback}() | ||
101 | endif | ||
102 | endif | ||
103 | endif | ||
104 | endfunction | ||
105 | |||
106 | "FUNCTION: MenuItem.isSeparator() {{{1 | ||
107 | "return 1 if this menuitem is a separator | ||
108 | function! s:MenuItem.isSeparator() | ||
109 | return self.callback == -1 && self.children == [] | ||
110 | endfunction | ||
111 | |||
112 | "FUNCTION: MenuItem.isSubmenu() {{{1 | ||
113 | "return 1 if this menuitem is a submenu | ||
114 | function! s:MenuItem.isSubmenu() | ||
115 | return self.callback == -1 && !empty(self.children) | ||
116 | endfunction | ||
117 | |||
118 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/nerdtree.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/nerdtree.vim new file mode 100644 index 0000000..61a11a9 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/nerdtree.vim | |||
@@ -0,0 +1,209 @@ | |||
1 | "CLASS: NERDTree | ||
2 | "============================================================ | ||
3 | let s:NERDTree = {} | ||
4 | let g:NERDTree = s:NERDTree | ||
5 | |||
6 | "FUNCTION: s:NERDTree.AddPathFilter() {{{1 | ||
7 | function! s:NERDTree.AddPathFilter(callback) | ||
8 | call add(s:NERDTree.PathFilters(), a:callback) | ||
9 | endfunction | ||
10 | |||
11 | "FUNCTION: s:NERDTree.changeRoot(node) {{{1 | ||
12 | function! s:NERDTree.changeRoot(node) | ||
13 | if a:node.path.isDirectory | ||
14 | let self.root = a:node | ||
15 | else | ||
16 | call a:node.cacheParent() | ||
17 | let self.root = a:node.parent | ||
18 | endif | ||
19 | |||
20 | call self.root.open() | ||
21 | |||
22 | "change dir to the dir of the new root if instructed to | ||
23 | if g:NERDTreeChDirMode >= 2 | ||
24 | call self.root.path.changeToDir() | ||
25 | endif | ||
26 | |||
27 | call self.render() | ||
28 | call self.root.putCursorHere(0, 0) | ||
29 | |||
30 | if exists('#User#NERDTreeNewRoot') | ||
31 | doautocmd User NERDTreeNewRoot | ||
32 | endif | ||
33 | endfunction | ||
34 | |||
35 | "FUNCTION: s:NERDTree.Close() {{{1 | ||
36 | "Closes the tab tree window for this tab | ||
37 | function! s:NERDTree.Close() | ||
38 | if !s:NERDTree.IsOpen() | ||
39 | return | ||
40 | endif | ||
41 | |||
42 | if winnr('$') !=# 1 | ||
43 | " Use the window ID to identify the currently active window or fall | ||
44 | " back on the buffer ID if win_getid/win_gotoid are not available, in | ||
45 | " which case we'll focus an arbitrary window showing the buffer. | ||
46 | let l:useWinId = exists('*win_getid') && exists('*win_gotoid') | ||
47 | |||
48 | if winnr() ==# s:NERDTree.GetWinNum() | ||
49 | call nerdtree#exec('wincmd p', 1) | ||
50 | let l:activeBufOrWin = l:useWinId ? win_getid() : bufnr('') | ||
51 | call nerdtree#exec('wincmd p', 1) | ||
52 | else | ||
53 | let l:activeBufOrWin = l:useWinId ? win_getid() : bufnr('') | ||
54 | endif | ||
55 | |||
56 | call nerdtree#exec(s:NERDTree.GetWinNum() . ' wincmd w', 1) | ||
57 | call nerdtree#exec('close', 0) | ||
58 | if l:useWinId | ||
59 | call nerdtree#exec('call win_gotoid(' . l:activeBufOrWin . ')', 0) | ||
60 | else | ||
61 | call nerdtree#exec(bufwinnr(l:activeBufOrWin) . ' wincmd w', 0) | ||
62 | endif | ||
63 | else | ||
64 | close | ||
65 | endif | ||
66 | endfunction | ||
67 | |||
68 | "FUNCTION: s:NERDTree.CursorToBookmarkTable(){{{1 | ||
69 | "Places the cursor at the top of the bookmarks table | ||
70 | function! s:NERDTree.CursorToBookmarkTable() | ||
71 | if !b:NERDTree.ui.getShowBookmarks() | ||
72 | throw 'NERDTree.IllegalOperationError: cant find bookmark table, bookmarks arent active' | ||
73 | endif | ||
74 | |||
75 | if g:NERDTreeMinimalUI | ||
76 | return cursor(1, 2) | ||
77 | endif | ||
78 | |||
79 | let rootNodeLine = b:NERDTree.ui.getRootLineNum() | ||
80 | |||
81 | let line = 1 | ||
82 | while getline(line) !~# '^>-\+Bookmarks-\+$' | ||
83 | let line = line + 1 | ||
84 | if line >= rootNodeLine | ||
85 | throw 'NERDTree.BookmarkTableNotFoundError: didnt find the bookmarks table' | ||
86 | endif | ||
87 | endwhile | ||
88 | call cursor(line, 2) | ||
89 | endfunction | ||
90 | |||
91 | "FUNCTION: s:NERDTree.CursorToTreeWin(){{{1 | ||
92 | "Places the cursor in the nerd tree window | ||
93 | function! s:NERDTree.CursorToTreeWin(...) | ||
94 | call g:NERDTree.MustBeOpen() | ||
95 | call nerdtree#exec(g:NERDTree.GetWinNum() . 'wincmd w', a:0 >0 ? a:1 : 1) | ||
96 | endfunction | ||
97 | |||
98 | " Function: s:NERDTree.ExistsForBuffer() {{{1 | ||
99 | " Returns 1 if a nerd tree root exists in the current buffer | ||
100 | function! s:NERDTree.ExistsForBuf() | ||
101 | return exists('b:NERDTree') | ||
102 | endfunction | ||
103 | |||
104 | " Function: s:NERDTree.ExistsForTab() {{{1 | ||
105 | " Returns 1 if a nerd tree root exists in the current tab | ||
106 | function! s:NERDTree.ExistsForTab() | ||
107 | if !exists('t:NERDTreeBufName') | ||
108 | return | ||
109 | end | ||
110 | |||
111 | "check b:NERDTree is still there and hasn't been e.g. :bdeleted | ||
112 | return !empty(getbufvar(bufnr(t:NERDTreeBufName), 'NERDTree')) | ||
113 | endfunction | ||
114 | |||
115 | function! s:NERDTree.ForCurrentBuf() | ||
116 | if s:NERDTree.ExistsForBuf() | ||
117 | return b:NERDTree | ||
118 | else | ||
119 | return {} | ||
120 | endif | ||
121 | endfunction | ||
122 | |||
123 | "FUNCTION: s:NERDTree.ForCurrentTab() {{{1 | ||
124 | function! s:NERDTree.ForCurrentTab() | ||
125 | if !s:NERDTree.ExistsForTab() | ||
126 | return | ||
127 | endif | ||
128 | |||
129 | let bufnr = bufnr(t:NERDTreeBufName) | ||
130 | return getbufvar(bufnr, 'NERDTree') | ||
131 | endfunction | ||
132 | |||
133 | "FUNCTION: s:NERDTree.getRoot() {{{1 | ||
134 | function! s:NERDTree.getRoot() | ||
135 | return self.root | ||
136 | endfunction | ||
137 | |||
138 | "FUNCTION: s:NERDTree.GetWinNum() {{{1 | ||
139 | "gets the nerd tree window number for this tab | ||
140 | function! s:NERDTree.GetWinNum() | ||
141 | if exists('t:NERDTreeBufName') | ||
142 | return bufwinnr(t:NERDTreeBufName) | ||
143 | endif | ||
144 | |||
145 | " If WindowTree, there is no t:NERDTreeBufName variable. Search all windows. | ||
146 | for w in range(1,winnr('$')) | ||
147 | if bufname(winbufnr(w)) =~# '^' . g:NERDTreeCreator.BufNamePrefix() . '\d\+$' | ||
148 | return w | ||
149 | endif | ||
150 | endfor | ||
151 | |||
152 | return -1 | ||
153 | endfunction | ||
154 | |||
155 | "FUNCTION: s:NERDTree.IsOpen() {{{1 | ||
156 | function! s:NERDTree.IsOpen() | ||
157 | return s:NERDTree.GetWinNum() !=# -1 | ||
158 | endfunction | ||
159 | |||
160 | "FUNCTION: s:NERDTree.isTabTree() {{{1 | ||
161 | function! s:NERDTree.isTabTree() | ||
162 | return self._type ==# 'tab' | ||
163 | endfunction | ||
164 | |||
165 | "FUNCTION: s:NERDTree.isWinTree() {{{1 | ||
166 | function! s:NERDTree.isWinTree() | ||
167 | return self._type ==# 'window' | ||
168 | endfunction | ||
169 | |||
170 | "FUNCTION: s:NERDTree.MustBeOpen() {{{1 | ||
171 | function! s:NERDTree.MustBeOpen() | ||
172 | if !s:NERDTree.IsOpen() | ||
173 | throw 'NERDTree.TreeNotOpen' | ||
174 | endif | ||
175 | endfunction | ||
176 | |||
177 | "FUNCTION: s:NERDTree.New() {{{1 | ||
178 | function! s:NERDTree.New(path, type) | ||
179 | let newObj = copy(self) | ||
180 | let newObj.ui = g:NERDTreeUI.New(newObj) | ||
181 | let newObj.root = g:NERDTreeDirNode.New(a:path, newObj) | ||
182 | let newObj._type = a:type | ||
183 | return newObj | ||
184 | endfunction | ||
185 | |||
186 | "FUNCTION: s:NERDTree.PathFilters() {{{1 | ||
187 | function! s:NERDTree.PathFilters() | ||
188 | if !exists('s:NERDTree._PathFilters') | ||
189 | let s:NERDTree._PathFilters = [] | ||
190 | endif | ||
191 | return s:NERDTree._PathFilters | ||
192 | endfunction | ||
193 | |||
194 | "FUNCTION: s:NERDTree.previousBuf() {{{1 | ||
195 | function! s:NERDTree.previousBuf() | ||
196 | return self._previousBuf | ||
197 | endfunction | ||
198 | |||
199 | function! s:NERDTree.setPreviousBuf(bnum) | ||
200 | let self._previousBuf = a:bnum | ||
201 | endfunction | ||
202 | |||
203 | "FUNCTION: s:NERDTree.render() {{{1 | ||
204 | "A convenience function - since this is called often | ||
205 | function! s:NERDTree.render() | ||
206 | call self.ui.render() | ||
207 | endfunction | ||
208 | |||
209 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/notifier.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/notifier.vim new file mode 100644 index 0000000..ffa2853 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/notifier.vim | |||
@@ -0,0 +1,35 @@ | |||
1 | "CLASS: Notifier | ||
2 | "============================================================ | ||
3 | let s:Notifier = {} | ||
4 | |||
5 | function! s:Notifier.AddListener(event, funcname) | ||
6 | let listeners = s:Notifier.GetListenersForEvent(a:event) | ||
7 | if listeners == [] | ||
8 | let listenersMap = s:Notifier.GetListenersMap() | ||
9 | let listenersMap[a:event] = listeners | ||
10 | endif | ||
11 | call add(listeners, a:funcname) | ||
12 | endfunction | ||
13 | |||
14 | function! s:Notifier.NotifyListeners(event, path, nerdtree, params) | ||
15 | let event = g:NERDTreeEvent.New(a:nerdtree, a:path, a:event, a:params) | ||
16 | |||
17 | for Listener in s:Notifier.GetListenersForEvent(a:event) | ||
18 | let l:Callback = type(Listener) == type(function('tr')) ? Listener : function(Listener) | ||
19 | call l:Callback(event) | ||
20 | endfor | ||
21 | endfunction | ||
22 | |||
23 | function! s:Notifier.GetListenersMap() | ||
24 | if !exists('s:refreshListenersMap') | ||
25 | let s:refreshListenersMap = {} | ||
26 | endif | ||
27 | return s:refreshListenersMap | ||
28 | endfunction | ||
29 | |||
30 | function! s:Notifier.GetListenersForEvent(name) | ||
31 | let listenersMap = s:Notifier.GetListenersMap() | ||
32 | return get(listenersMap, a:name, []) | ||
33 | endfunction | ||
34 | |||
35 | let g:NERDTreePathNotifier = deepcopy(s:Notifier) | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/opener.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/opener.vim new file mode 100644 index 0000000..27993ac --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/opener.vim | |||
@@ -0,0 +1,326 @@ | |||
1 | " ============================================================================ | ||
2 | " CLASS: Opener | ||
3 | " | ||
4 | " The Opener class defines an API for 'opening' operations. | ||
5 | " ============================================================================ | ||
6 | |||
7 | |||
8 | let s:Opener = {} | ||
9 | let g:NERDTreeOpener = s:Opener | ||
10 | |||
11 | " FUNCTION: s:Opener._bufInWindows(bnum) {{{1 | ||
12 | " [[STOLEN FROM VTREEEXPLORER.VIM]] | ||
13 | " Determine the number of windows open to this buffer number. | ||
14 | " Care of Yegappan Lakshman. Thanks! | ||
15 | " | ||
16 | " Args: | ||
17 | " bnum: the subject buffers buffer number | ||
18 | function! s:Opener._bufInWindows(bnum) | ||
19 | let cnt = 0 | ||
20 | let winnum = 1 | ||
21 | while 1 | ||
22 | let bufnum = winbufnr(winnum) | ||
23 | if bufnum < 0 | ||
24 | break | ||
25 | endif | ||
26 | if bufnum ==# a:bnum | ||
27 | let cnt = cnt + 1 | ||
28 | endif | ||
29 | let winnum = winnum + 1 | ||
30 | endwhile | ||
31 | |||
32 | return cnt | ||
33 | endfunction | ||
34 | |||
35 | " FUNCTION: Opener._checkToCloseTree(newtab) {{{1 | ||
36 | " Check the class options to see if the tree should be closed now. | ||
37 | " | ||
38 | " Args: | ||
39 | " a:newtab - boolean. If set, only close the tree now if we are opening the | ||
40 | " target in a new tab. This is needed because we have to close tree before we | ||
41 | " leave the tab | ||
42 | function! s:Opener._checkToCloseTree(newtab) | ||
43 | if self._keepopen | ||
44 | return | ||
45 | endif | ||
46 | |||
47 | if (a:newtab && self._where ==# 't') || !a:newtab | ||
48 | call g:NERDTree.Close() | ||
49 | endif | ||
50 | endfunction | ||
51 | |||
52 | " FUNCTION: s:Opener._firstUsableWindow() {{{1 | ||
53 | " find the window number of the first normal window | ||
54 | function! s:Opener._firstUsableWindow() | ||
55 | let i = 1 | ||
56 | while i <= winnr('$') | ||
57 | let bnum = winbufnr(i) | ||
58 | if bnum !=# -1 && getbufvar(bnum, '&buftype') ==# '' | ||
59 | \ && !getwinvar(i, '&previewwindow') | ||
60 | \ && (!getbufvar(bnum, '&modified') || &hidden) | ||
61 | return i | ||
62 | endif | ||
63 | |||
64 | let i += 1 | ||
65 | endwhile | ||
66 | return -1 | ||
67 | endfunction | ||
68 | |||
69 | " FUNCTION: Opener._gotoTargetWin() {{{1 | ||
70 | function! s:Opener._gotoTargetWin() | ||
71 | if b:NERDTree.isWinTree() | ||
72 | if self._where ==# 'v' | ||
73 | call self._newVSplit() | ||
74 | elseif self._where ==# 'h' | ||
75 | call self._newSplit() | ||
76 | elseif self._where ==# 't' | ||
77 | tabnew | ||
78 | endif | ||
79 | else | ||
80 | call self._checkToCloseTree(1) | ||
81 | |||
82 | if self._where ==# 'v' | ||
83 | call self._newVSplit() | ||
84 | elseif self._where ==# 'h' | ||
85 | call self._newSplit() | ||
86 | elseif self._where ==# 't' | ||
87 | tabnew | ||
88 | elseif self._where ==# 'p' | ||
89 | call self._previousWindow() | ||
90 | endif | ||
91 | |||
92 | call self._checkToCloseTree(0) | ||
93 | endif | ||
94 | endfunction | ||
95 | |||
96 | " FUNCTION: s:Opener._isWindowUsable(winnumber) {{{1 | ||
97 | " Returns 0 if opening a file from the tree in the given window requires it to | ||
98 | " be split, 1 otherwise | ||
99 | " | ||
100 | " Args: | ||
101 | " winnumber: the number of the window in question | ||
102 | function! s:Opener._isWindowUsable(winnumber) | ||
103 | "gotta split if theres only one window (i.e. the NERD tree) | ||
104 | if winnr('$') ==# 1 | ||
105 | return 0 | ||
106 | endif | ||
107 | |||
108 | let oldwinnr = winnr() | ||
109 | call nerdtree#exec(a:winnumber . 'wincmd p', 1) | ||
110 | let specialWindow = getbufvar('%', '&buftype') !=# '' || getwinvar('%', '&previewwindow') | ||
111 | let modified = &modified | ||
112 | call nerdtree#exec(oldwinnr . 'wincmd p', 1) | ||
113 | |||
114 | "if its a special window e.g. quickfix or another explorer plugin then we | ||
115 | "have to split | ||
116 | if specialWindow | ||
117 | return 0 | ||
118 | endif | ||
119 | |||
120 | if &hidden | ||
121 | return 1 | ||
122 | endif | ||
123 | |||
124 | return !modified || self._bufInWindows(winbufnr(a:winnumber)) >= 2 | ||
125 | endfunction | ||
126 | |||
127 | " FUNCTION: Opener.New(path, opts) {{{1 | ||
128 | " Instantiate a new NERDTreeOpener object. | ||
129 | " Args: | ||
130 | " a:path: the path object that is to be opened | ||
131 | " a:opts: a dictionary containing the following optional keys... | ||
132 | " 'where': specifies whether the node should be opened in new split, in | ||
133 | " a new tab or, in the last window; takes values 'v', 'h', or 't' | ||
134 | " 'reuse': if file is already shown in a window, jump there; takes values | ||
135 | " 'all', 'currenttab', or empty | ||
136 | " 'keepopen': boolean (0 or 1); if true, the tree window will not be closed | ||
137 | " 'stay': boolean (0 or 1); if true, remain in tree window after opening | ||
138 | function! s:Opener.New(path, opts) | ||
139 | let l:newOpener = copy(self) | ||
140 | |||
141 | let l:newOpener._keepopen = nerdtree#has_opt(a:opts, 'keepopen') | ||
142 | let l:newOpener._nerdtree = b:NERDTree | ||
143 | let l:newOpener._path = a:path | ||
144 | let l:newOpener._reuse = has_key(a:opts, 'reuse') ? a:opts['reuse'] : '' | ||
145 | let l:newOpener._stay = nerdtree#has_opt(a:opts, 'stay') | ||
146 | let l:newOpener._where = has_key(a:opts, 'where') ? a:opts['where'] : '' | ||
147 | |||
148 | call l:newOpener._saveCursorPos() | ||
149 | |||
150 | return l:newOpener | ||
151 | endfunction | ||
152 | |||
153 | " FUNCTION: Opener._newSplit() {{{1 | ||
154 | function! s:Opener._newSplit() | ||
155 | let onlyOneWin = (winnr('$') ==# 1) | ||
156 | let savesplitright = &splitright | ||
157 | if onlyOneWin | ||
158 | let &splitright = (g:NERDTreeWinPos ==# 'left') | ||
159 | endif | ||
160 | " If only one window (ie. NERDTree), split vertically instead. | ||
161 | let splitMode = onlyOneWin ? 'vertical' : '' | ||
162 | |||
163 | " Open the new window | ||
164 | try | ||
165 | call nerdtree#exec('wincmd p', 1) | ||
166 | call nerdtree#exec(splitMode . ' split',1) | ||
167 | catch /^Vim\%((\a\+)\)\=:E37/ | ||
168 | call g:NERDTree.CursorToTreeWin() | ||
169 | throw 'NERDTree.FileAlreadyOpenAndModifiedError: '. self._path.str() .' is already open and modified.' | ||
170 | catch /^Vim\%((\a\+)\)\=:/ | ||
171 | "do nothing | ||
172 | endtry | ||
173 | |||
174 | "resize the tree window if no other window was open before | ||
175 | if onlyOneWin | ||
176 | call nerdtree#exec('wincmd p', 1) | ||
177 | call nerdtree#exec('silent '. splitMode .' resize '. g:NERDTreeWinSize, 1) | ||
178 | call nerdtree#exec('wincmd p', 0) | ||
179 | endif | ||
180 | |||
181 | let &splitright=savesplitright | ||
182 | endfunction | ||
183 | |||
184 | " FUNCTION: Opener._newVSplit() {{{1 | ||
185 | function! s:Opener._newVSplit() | ||
186 | let l:winwidth = winwidth('.') | ||
187 | |||
188 | let onlyOneWin = (winnr('$') ==# 1) | ||
189 | let savesplitright = &splitright | ||
190 | if onlyOneWin | ||
191 | let &splitright = (g:NERDTreeWinPos ==# 'left') | ||
192 | let l:winwidth = g:NERDTreeWinSize | ||
193 | endif | ||
194 | |||
195 | call nerdtree#exec('wincmd p', 1) | ||
196 | call nerdtree#exec('vsplit', 1) | ||
197 | |||
198 | let l:currentWindowNumber = winnr() | ||
199 | |||
200 | " Restore the NERDTree to its original width. | ||
201 | call g:NERDTree.CursorToTreeWin() | ||
202 | execute 'silent vertical resize ' . l:winwidth | ||
203 | |||
204 | call nerdtree#exec(l:currentWindowNumber . 'wincmd w', 0) | ||
205 | let &splitright=savesplitright | ||
206 | endfunction | ||
207 | |||
208 | " FUNCTION: Opener.open(target) {{{1 | ||
209 | function! s:Opener.open(target) | ||
210 | if self._path.isDirectory | ||
211 | call self._openDirectory(a:target) | ||
212 | return | ||
213 | endif | ||
214 | |||
215 | call self._openFile() | ||
216 | endfunction | ||
217 | |||
218 | " FUNCTION: Opener._openFile() {{{1 | ||
219 | function! s:Opener._openFile() | ||
220 | if !self._stay && self._keepopen && get(b:, 'NERDTreeZoomed', 0) | ||
221 | call b:NERDTree.ui.toggleZoom() | ||
222 | endif | ||
223 | |||
224 | if self._reuseWindow() | ||
225 | return | ||
226 | endif | ||
227 | |||
228 | call self._gotoTargetWin() | ||
229 | |||
230 | if self._stay | ||
231 | silent call self._path.edit() | ||
232 | call self._restoreCursorPos() | ||
233 | return | ||
234 | endif | ||
235 | |||
236 | call self._path.edit() | ||
237 | endfunction | ||
238 | |||
239 | " FUNCTION: Opener._openDirectory(node) {{{1 | ||
240 | function! s:Opener._openDirectory(node) | ||
241 | call self._gotoTargetWin() | ||
242 | |||
243 | if self._nerdtree.isWinTree() | ||
244 | call g:NERDTreeCreator.CreateWindowTree(a:node.path.str()) | ||
245 | else | ||
246 | if empty(self._where) | ||
247 | call b:NERDTree.changeRoot(a:node) | ||
248 | elseif self._where ==# 't' | ||
249 | call g:NERDTreeCreator.CreateTabTree(a:node.path.str()) | ||
250 | else | ||
251 | call g:NERDTreeCreator.CreateWindowTree(a:node.path.str()) | ||
252 | endif | ||
253 | endif | ||
254 | |||
255 | if self._stay | ||
256 | call self._restoreCursorPos() | ||
257 | endif | ||
258 | endfunction | ||
259 | |||
260 | " FUNCTION: Opener._previousWindow() {{{1 | ||
261 | function! s:Opener._previousWindow() | ||
262 | if !self._isWindowUsable(winnr('#')) && self._firstUsableWindow() ==# -1 | ||
263 | call self._newSplit() | ||
264 | else | ||
265 | try | ||
266 | if !self._isWindowUsable(winnr('#')) | ||
267 | call nerdtree#exec(self._firstUsableWindow() . 'wincmd w', 1) | ||
268 | else | ||
269 | call nerdtree#exec('wincmd p', 1) | ||
270 | endif | ||
271 | catch /^Vim\%((\a\+)\)\=:E37/ | ||
272 | call g:NERDTree.CursorToTreeWin() | ||
273 | throw 'NERDTree.FileAlreadyOpenAndModifiedError: '. self._path.str() .' is already open and modified.' | ||
274 | catch /^Vim\%((\a\+)\)\=:/ | ||
275 | echo v:exception | ||
276 | endtry | ||
277 | endif | ||
278 | endfunction | ||
279 | |||
280 | " FUNCTION: Opener._restoreCursorPos() {{{1 | ||
281 | function! s:Opener._restoreCursorPos() | ||
282 | call nerdtree#exec(self._tabnr . 'tabnext', 1) | ||
283 | call nerdtree#exec(bufwinnr(self._bufnr) . 'wincmd w', 1) | ||
284 | endfunction | ||
285 | |||
286 | " FUNCTION: Opener._reuseWindow() {{{1 | ||
287 | " put the cursor in the first window we find for this file | ||
288 | " | ||
289 | " return 1 if we were successful | ||
290 | function! s:Opener._reuseWindow() | ||
291 | if empty(self._reuse) | ||
292 | return 0 | ||
293 | endif | ||
294 | |||
295 | "check the current tab for the window | ||
296 | let winnr = bufwinnr('^' . self._path.str() . '$') | ||
297 | if winnr !=# -1 | ||
298 | call nerdtree#exec(winnr . 'wincmd w', 0) | ||
299 | call self._checkToCloseTree(0) | ||
300 | return 1 | ||
301 | endif | ||
302 | |||
303 | if self._reuse ==# 'currenttab' | ||
304 | return 0 | ||
305 | endif | ||
306 | |||
307 | "check other tabs | ||
308 | let tabnr = self._path.tabnr() | ||
309 | if tabnr | ||
310 | call self._checkToCloseTree(1) | ||
311 | call nerdtree#exec(tabnr . 'tabnext', 1) | ||
312 | let winnr = bufwinnr('^' . self._path.str() . '$') | ||
313 | call nerdtree#exec(winnr . 'wincmd w', 0) | ||
314 | return 1 | ||
315 | endif | ||
316 | |||
317 | return 0 | ||
318 | endfunction | ||
319 | |||
320 | " FUNCTION: Opener._saveCursorPos() {{{1 | ||
321 | function! s:Opener._saveCursorPos() | ||
322 | let self._bufnr = bufnr('') | ||
323 | let self._tabnr = tabpagenr() | ||
324 | endfunction | ||
325 | |||
326 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/path.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/path.vim new file mode 100644 index 0000000..997abf3 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/path.vim | |||
@@ -0,0 +1,852 @@ | |||
1 | " ============================================================================ | ||
2 | " CLASS: Path | ||
3 | " | ||
4 | " The Path class provides an abstracted representation of a file system | ||
5 | " pathname. Various operations on pathnames are provided and a number of | ||
6 | " representations of a given path name can be accessed here. | ||
7 | " ============================================================================ | ||
8 | |||
9 | |||
10 | let s:Path = {} | ||
11 | let g:NERDTreePath = s:Path | ||
12 | |||
13 | " FUNCTION: Path.AbsolutePathFor(pathStr) {{{1 | ||
14 | function! s:Path.AbsolutePathFor(pathStr) | ||
15 | let l:prependWorkingDir = 0 | ||
16 | |||
17 | if nerdtree#runningWindows() | ||
18 | let l:prependWorkingDir = a:pathStr !~# '^.:\(\\\|\/\)\?' && a:pathStr !~# '^\(\\\\\|\/\/\)' | ||
19 | else | ||
20 | let l:prependWorkingDir = a:pathStr !~# '^/' | ||
21 | endif | ||
22 | |||
23 | let l:result = a:pathStr | ||
24 | |||
25 | if l:prependWorkingDir | ||
26 | let l:result = getcwd() | ||
27 | |||
28 | if l:result[-1:] == nerdtree#slash() | ||
29 | let l:result = l:result . a:pathStr | ||
30 | else | ||
31 | let l:result = l:result . nerdtree#slash() . a:pathStr | ||
32 | endif | ||
33 | endif | ||
34 | |||
35 | return l:result | ||
36 | endfunction | ||
37 | |||
38 | " FUNCTION: Path.bookmarkNames() {{{1 | ||
39 | function! s:Path.bookmarkNames() | ||
40 | if !exists('self._bookmarkNames') | ||
41 | call self.cacheDisplayString() | ||
42 | endif | ||
43 | return self._bookmarkNames | ||
44 | endfunction | ||
45 | |||
46 | " FUNCTION: Path.cacheDisplayString() {{{1 | ||
47 | function! s:Path.cacheDisplayString() abort | ||
48 | let self.cachedDisplayString = g:NERDTreeNodeDelimiter . self.getLastPathComponent(1) | ||
49 | |||
50 | if self.isExecutable | ||
51 | let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . '*' | ||
52 | endif | ||
53 | |||
54 | let self._bookmarkNames = [] | ||
55 | for i in g:NERDTreeBookmark.Bookmarks() | ||
56 | if i.path.equals(self) | ||
57 | call add(self._bookmarkNames, i.name) | ||
58 | endif | ||
59 | endfor | ||
60 | if !empty(self._bookmarkNames) && g:NERDTreeMarkBookmarks ==# 1 | ||
61 | let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . ' {' . join(self._bookmarkNames) . '}' | ||
62 | endif | ||
63 | |||
64 | if self.isSymLink | ||
65 | let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . ' -> ' . self.symLinkDest | ||
66 | endif | ||
67 | |||
68 | if self.isReadOnly | ||
69 | let self.cachedDisplayString = self.addDelimiter(self.cachedDisplayString) . ' ['.g:NERDTreeGlyphReadOnly.']' | ||
70 | endif | ||
71 | endfunction | ||
72 | |||
73 | " FUNCTION: Path.addDelimiter() {{{1 | ||
74 | function! s:Path.addDelimiter(line) | ||
75 | if a:line =~# '\(.*' . g:NERDTreeNodeDelimiter . '\)\{2}' | ||
76 | return a:line | ||
77 | else | ||
78 | return a:line . g:NERDTreeNodeDelimiter | ||
79 | endif | ||
80 | endfunction | ||
81 | |||
82 | " FUNCTION: Path.changeToDir() {{{1 | ||
83 | function! s:Path.changeToDir() | ||
84 | let dir = self.str({'format': 'Cd'}) | ||
85 | if self.isDirectory ==# 0 | ||
86 | let dir = self.getParent().str({'format': 'Cd'}) | ||
87 | endif | ||
88 | |||
89 | try | ||
90 | if g:NERDTreeUseTCD && exists(':tcd') ==# 2 | ||
91 | execute 'tcd ' . dir | ||
92 | call nerdtree#echo("Tab's CWD is now: " . getcwd()) | ||
93 | else | ||
94 | execute 'cd ' . dir | ||
95 | call nerdtree#echo('CWD is now: ' . getcwd()) | ||
96 | endif | ||
97 | catch | ||
98 | throw 'NERDTree.PathChangeError: cannot change CWD to ' . dir | ||
99 | endtry | ||
100 | endfunction | ||
101 | |||
102 | " FUNCTION: Path.Create(fullpath) {{{1 | ||
103 | " | ||
104 | " Factory method. | ||
105 | " | ||
106 | " Creates a path object with the given path. The path is also created on the | ||
107 | " filesystem. If the path already exists, a NERDTree.Path.Exists exception is | ||
108 | " thrown. If any other errors occur, a NERDTree.Path exception is thrown. | ||
109 | " | ||
110 | " Args: | ||
111 | " fullpath: the full filesystem path to the file/dir to create | ||
112 | function! s:Path.Create(fullpath) | ||
113 | "bail if the a:fullpath already exists | ||
114 | if isdirectory(a:fullpath) || filereadable(a:fullpath) | ||
115 | throw "NERDTree.CreatePathError: Directory Exists: '" . a:fullpath . "'" | ||
116 | endif | ||
117 | |||
118 | try | ||
119 | |||
120 | "if it ends with a slash, assume its a dir create it | ||
121 | if a:fullpath =~# '\(\\\|\/\)$' | ||
122 | "whack the trailing slash off the end if it exists | ||
123 | let fullpath = substitute(a:fullpath, '\(\\\|\/\)$', '', '') | ||
124 | |||
125 | call mkdir(fullpath, 'p') | ||
126 | |||
127 | "assume its a file and create | ||
128 | else | ||
129 | call s:Path.createParentDirectories(a:fullpath) | ||
130 | call writefile([], a:fullpath) | ||
131 | endif | ||
132 | catch | ||
133 | throw "NERDTree.CreatePathError: Could not create path: '" . a:fullpath . "'" | ||
134 | endtry | ||
135 | |||
136 | return s:Path.New(a:fullpath) | ||
137 | endfunction | ||
138 | |||
139 | " FUNCTION: Path.copy(dest) {{{1 | ||
140 | " | ||
141 | " Copies the file/dir represented by this Path to the given location | ||
142 | " | ||
143 | " Args: | ||
144 | " dest: the location to copy this dir/file to | ||
145 | function! s:Path.copy(dest) | ||
146 | if !s:Path.CopyingSupported() | ||
147 | throw 'NERDTree.CopyingNotSupportedError: Copying is not supported on this OS' | ||
148 | endif | ||
149 | |||
150 | call s:Path.createParentDirectories(a:dest) | ||
151 | |||
152 | if exists('g:NERDTreeCopyCmd') | ||
153 | let cmd_prefix = g:NERDTreeCopyCmd | ||
154 | else | ||
155 | let cmd_prefix = (self.isDirectory ? g:NERDTreeCopyDirCmd : g:NERDTreeCopyFileCmd) | ||
156 | endif | ||
157 | |||
158 | let cmd = cmd_prefix . ' ' . shellescape(self.str()) . ' ' . shellescape(a:dest) | ||
159 | let success = system(cmd) | ||
160 | if v:shell_error !=# 0 | ||
161 | throw "NERDTree.CopyError: Could not copy '". self.str() ."' to: '" . a:dest . "'" | ||
162 | endif | ||
163 | endfunction | ||
164 | |||
165 | " FUNCTION: Path.CopyingSupported() {{{1 | ||
166 | " | ||
167 | " returns 1 if copying is supported for this OS | ||
168 | function! s:Path.CopyingSupported() | ||
169 | return exists('g:NERDTreeCopyCmd') || (exists('g:NERDTreeCopyDirCmd') && exists('g:NERDTreeCopyFileCmd')) | ||
170 | endfunction | ||
171 | |||
172 | " FUNCTION: Path.copyingWillOverwrite(dest) {{{1 | ||
173 | " | ||
174 | " returns 1 if copy this path to the given location will cause files to | ||
175 | " overwritten | ||
176 | " | ||
177 | " Args: | ||
178 | " dest: the location this path will be copied to | ||
179 | function! s:Path.copyingWillOverwrite(dest) | ||
180 | if filereadable(a:dest) | ||
181 | return 1 | ||
182 | endif | ||
183 | |||
184 | if isdirectory(a:dest) | ||
185 | let path = s:Path.JoinPathStrings(a:dest, self.getLastPathComponent(0)) | ||
186 | if filereadable(path) | ||
187 | return 1 | ||
188 | endif | ||
189 | endif | ||
190 | endfunction | ||
191 | |||
192 | " FUNCTION: Path.createParentDirectories(path) {{{1 | ||
193 | " | ||
194 | " create parent directories for this path if needed | ||
195 | " without throwing any errors if those directories already exist | ||
196 | " | ||
197 | " Args: | ||
198 | " path: full path of the node whose parent directories may need to be created | ||
199 | function! s:Path.createParentDirectories(path) | ||
200 | let dir_path = fnamemodify(a:path, ':h') | ||
201 | if !isdirectory(dir_path) | ||
202 | call mkdir(dir_path, 'p') | ||
203 | endif | ||
204 | endfunction | ||
205 | |||
206 | " FUNCTION: Path.delete() {{{1 | ||
207 | " | ||
208 | " Deletes the file or directory represented by this path. | ||
209 | " | ||
210 | " Throws NERDTree.Path.Deletion exceptions | ||
211 | function! s:Path.delete() | ||
212 | if self.isDirectory | ||
213 | |||
214 | let cmd = g:NERDTreeRemoveDirCmd . self.str({'escape': 1}) | ||
215 | let success = system(cmd) | ||
216 | |||
217 | if v:shell_error !=# 0 | ||
218 | throw "NERDTree.PathDeletionError: Could not delete directory: '" . self.str() . "'" | ||
219 | endif | ||
220 | else | ||
221 | if exists('g:NERDTreeRemoveFileCmd') | ||
222 | let cmd = g:NERDTreeRemoveFileCmd . self.str({'escape': 1}) | ||
223 | let success = system(cmd) | ||
224 | else | ||
225 | let success = delete(self.str()) | ||
226 | endif | ||
227 | |||
228 | if success !=# 0 | ||
229 | throw "NERDTree.PathDeletionError: Could not delete file: '" . self.str() . "'" | ||
230 | endif | ||
231 | endif | ||
232 | |||
233 | "delete all bookmarks for this path | ||
234 | for i in self.bookmarkNames() | ||
235 | let bookmark = g:NERDTreeBookmark.BookmarkFor(i) | ||
236 | call bookmark.delete() | ||
237 | endfor | ||
238 | endfunction | ||
239 | |||
240 | " FUNCTION: Path.displayString() {{{1 | ||
241 | " | ||
242 | " Returns a string that specifies how the path should be represented as a | ||
243 | " string | ||
244 | function! s:Path.displayString() | ||
245 | if self.cachedDisplayString ==# '' | ||
246 | call self.cacheDisplayString() | ||
247 | endif | ||
248 | |||
249 | return self.cachedDisplayString | ||
250 | endfunction | ||
251 | |||
252 | " FUNCTION: Path.edit() {{{1 | ||
253 | function! s:Path.edit() | ||
254 | let l:bufname = self.str({'format': 'Edit'}) | ||
255 | if bufname('%') !=# l:bufname | ||
256 | exec 'edit ' . l:bufname | ||
257 | endif | ||
258 | endfunction | ||
259 | |||
260 | " FUNCTION: Path.extractDriveLetter(fullpath) {{{1 | ||
261 | " | ||
262 | " If running windows, cache the drive letter for this path | ||
263 | function! s:Path.extractDriveLetter(fullpath) | ||
264 | if nerdtree#runningWindows() | ||
265 | if a:fullpath =~# '^\(\\\\\|\/\/\)' | ||
266 | "For network shares, the 'drive' consists of the first two parts of the path, i.e. \\boxname\share | ||
267 | let self.drive = substitute(a:fullpath, '^\(\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\).*', '\1', '') | ||
268 | let self.drive = substitute(self.drive, '/', '\', 'g') | ||
269 | else | ||
270 | let self.drive = substitute(a:fullpath, '\(^[a-zA-Z]:\).*', '\1', '') | ||
271 | endif | ||
272 | else | ||
273 | let self.drive = '' | ||
274 | endif | ||
275 | |||
276 | endfunction | ||
277 | |||
278 | " FUNCTION: Path.exists() {{{1 | ||
279 | " return 1 if this path points to a location that is readable or is a directory | ||
280 | function! s:Path.exists() | ||
281 | let p = self.str() | ||
282 | return filereadable(p) || isdirectory(p) | ||
283 | endfunction | ||
284 | |||
285 | " FUNCTION: Path._escChars() {{{1 | ||
286 | function! s:Path._escChars() | ||
287 | if nerdtree#runningWindows() | ||
288 | return " `\|\"#%&,?()\*^<>$" | ||
289 | endif | ||
290 | |||
291 | return " \\`\|\"#%&,?()\*^<>[]{}$" | ||
292 | endfunction | ||
293 | |||
294 | " FUNCTION: Path.getDir() {{{1 | ||
295 | " | ||
296 | " Returns this path if it is a directory, else this paths parent. | ||
297 | " | ||
298 | " Return: | ||
299 | " a Path object | ||
300 | function! s:Path.getDir() | ||
301 | if self.isDirectory | ||
302 | return self | ||
303 | else | ||
304 | return self.getParent() | ||
305 | endif | ||
306 | endfunction | ||
307 | |||
308 | " FUNCTION: Path.getParent() {{{1 | ||
309 | " | ||
310 | " Returns a new path object for this paths parent | ||
311 | " | ||
312 | " Return: | ||
313 | " a new Path object | ||
314 | function! s:Path.getParent() | ||
315 | if nerdtree#runningWindows() | ||
316 | let path = self.drive . '\' . join(self.pathSegments[0:-2], '\') | ||
317 | else | ||
318 | let path = '/'. join(self.pathSegments[0:-2], '/') | ||
319 | endif | ||
320 | |||
321 | return s:Path.New(path) | ||
322 | endfunction | ||
323 | |||
324 | " FUNCTION: Path.getLastPathComponent(dirSlash) {{{1 | ||
325 | " | ||
326 | " Gets the last part of this path. | ||
327 | " | ||
328 | " Args: | ||
329 | " dirSlash: if 1 then a trailing slash will be added to the returned value for | ||
330 | " directory nodes. | ||
331 | function! s:Path.getLastPathComponent(dirSlash) | ||
332 | if empty(self.pathSegments) | ||
333 | return '' | ||
334 | endif | ||
335 | let toReturn = self.pathSegments[-1] | ||
336 | if a:dirSlash && self.isDirectory | ||
337 | let toReturn = toReturn . '/' | ||
338 | endif | ||
339 | return toReturn | ||
340 | endfunction | ||
341 | |||
342 | " FUNCTION: Path.getSortOrderIndex() {{{1 | ||
343 | " returns the index of the pattern in g:NERDTreeSortOrder that this path matches | ||
344 | function! s:Path.getSortOrderIndex() | ||
345 | let i = 0 | ||
346 | while i < len(g:NERDTreeSortOrder) | ||
347 | if g:NERDTreeSortOrder[i] !~? '\[\[-\?\(timestamp\|size\|extension\)\]\]' && | ||
348 | \ self.getLastPathComponent(1) =~# g:NERDTreeSortOrder[i] | ||
349 | return i | ||
350 | endif | ||
351 | let i = i + 1 | ||
352 | endwhile | ||
353 | |||
354 | return index(g:NERDTreeSortOrder, '*') | ||
355 | endfunction | ||
356 | |||
357 | " FUNCTION: Path._splitChunks(path) {{{1 | ||
358 | " returns a list of path chunks | ||
359 | function! s:Path._splitChunks(path) | ||
360 | let chunks = split(a:path, '\(\D\+\|\d\+\)\zs') | ||
361 | let i = 0 | ||
362 | while i < len(chunks) | ||
363 | "convert number literals to numbers | ||
364 | if match(chunks[i], '^\d\+$') ==# 0 | ||
365 | let chunks[i] = str2nr(chunks[i]) | ||
366 | endif | ||
367 | let i = i + 1 | ||
368 | endwhile | ||
369 | return chunks | ||
370 | endfunction | ||
371 | |||
372 | " FUNCTION: Path.getSortKey() {{{1 | ||
373 | " returns a key used in compare function for sorting | ||
374 | function! s:Path.getSortKey() | ||
375 | if !exists('self._sortKey') || g:NERDTreeSortOrder !=# g:NERDTreeOldSortOrder | ||
376 | " Look for file metadata tags: [[timestamp]], [[extension]], [[size]] | ||
377 | let metadata = [] | ||
378 | for tag in g:NERDTreeSortOrder | ||
379 | if tag =~? '\[\[-\?timestamp\]\]' | ||
380 | let metadata += [self.isDirectory ? 0 : getftime(self.str()) * (tag =~# '-' ? -1 : 1)] | ||
381 | elseif tag =~? '\[\[-\?size\]\]' | ||
382 | let metadata += [self.isDirectory ? 0 : getfsize(self.str()) * (tag =~# '-' ? -1 : 1)] | ||
383 | elseif tag =~? '\[\[extension\]\]' | ||
384 | let extension = matchstr(self.getLastPathComponent(0), '[^.]\+\.\zs[^.]\+$') | ||
385 | let metadata += [self.isDirectory ? '' : (extension ==# '' ? nr2char(str2nr('0x10ffff',16)) : extension)] | ||
386 | endif | ||
387 | endfor | ||
388 | |||
389 | if g:NERDTreeSortOrder[0] =~# '\[\[.*\]\]' | ||
390 | " Apply tags' sorting first if specified first. | ||
391 | let self._sortKey = metadata + [self.getSortOrderIndex()] | ||
392 | else | ||
393 | " Otherwise, do regex grouping first. | ||
394 | let self._sortKey = [self.getSortOrderIndex()] + metadata | ||
395 | endif | ||
396 | |||
397 | let path = self.getLastPathComponent(0) | ||
398 | if !g:NERDTreeSortHiddenFirst | ||
399 | let path = substitute(path, '^[._]', '', '') | ||
400 | endif | ||
401 | if !g:NERDTreeCaseSensitiveSort | ||
402 | let path = tolower(path) | ||
403 | endif | ||
404 | |||
405 | call extend(self._sortKey, (g:NERDTreeNaturalSort ? self._splitChunks(path) : [path])) | ||
406 | endif | ||
407 | return self._sortKey | ||
408 | endfunction | ||
409 | |||
410 | " FUNCTION: Path.isHiddenUnder(path) {{{1 | ||
411 | function! s:Path.isHiddenUnder(path) | ||
412 | |||
413 | if !self.isUnder(a:path) | ||
414 | return 0 | ||
415 | endif | ||
416 | |||
417 | let l:startIndex = len(a:path.pathSegments) | ||
418 | let l:segments = self.pathSegments[l:startIndex : ] | ||
419 | |||
420 | for l:segment in l:segments | ||
421 | |||
422 | if l:segment =~# '^\.' | ||
423 | return 1 | ||
424 | endif | ||
425 | endfor | ||
426 | |||
427 | return 0 | ||
428 | endfunction | ||
429 | |||
430 | " FUNCTION: Path.isUnixHiddenFile() {{{1 | ||
431 | " check for unix hidden files | ||
432 | function! s:Path.isUnixHiddenFile() | ||
433 | return self.getLastPathComponent(0) =~# '^\.' | ||
434 | endfunction | ||
435 | |||
436 | " FUNCTION: Path.isUnixHiddenPath() {{{1 | ||
437 | " check for unix path with hidden components | ||
438 | function! s:Path.isUnixHiddenPath() | ||
439 | if self.getLastPathComponent(0) =~# '^\.' | ||
440 | return 1 | ||
441 | else | ||
442 | for segment in self.pathSegments | ||
443 | if segment =~# '^\.' | ||
444 | return 1 | ||
445 | endif | ||
446 | endfor | ||
447 | return 0 | ||
448 | endif | ||
449 | endfunction | ||
450 | |||
451 | " FUNCTION: Path.ignore(nerdtree) {{{1 | ||
452 | " returns true if this path should be ignored | ||
453 | function! s:Path.ignore(nerdtree) | ||
454 | "filter out the user specified paths to ignore | ||
455 | if a:nerdtree.ui.isIgnoreFilterEnabled() | ||
456 | for i in g:NERDTreeIgnore | ||
457 | if self._ignorePatternMatches(i) | ||
458 | return 1 | ||
459 | endif | ||
460 | endfor | ||
461 | |||
462 | for l:Callback in g:NERDTree.PathFilters() | ||
463 | let l:Callback = type(l:Callback) ==# type(function('tr')) ? l:Callback : function(l:Callback) | ||
464 | if l:Callback({'path': self, 'nerdtree': a:nerdtree}) | ||
465 | return 1 | ||
466 | endif | ||
467 | endfor | ||
468 | endif | ||
469 | |||
470 | "dont show hidden files unless instructed to | ||
471 | if !a:nerdtree.ui.getShowHidden() && self.isUnixHiddenFile() | ||
472 | return 1 | ||
473 | endif | ||
474 | |||
475 | if a:nerdtree.ui.getShowFiles() ==# 0 && self.isDirectory ==# 0 | ||
476 | return 1 | ||
477 | endif | ||
478 | |||
479 | return 0 | ||
480 | endfunction | ||
481 | |||
482 | " FUNCTION: Path._ignorePatternMatches(pattern) {{{1 | ||
483 | " returns true if this path matches the given ignore pattern | ||
484 | function! s:Path._ignorePatternMatches(pattern) | ||
485 | let pat = a:pattern | ||
486 | if strpart(pat,len(pat)-8) ==# '[[path]]' | ||
487 | let pat = strpart(pat,0, len(pat)-8) | ||
488 | return self.str() =~# pat | ||
489 | elseif strpart(pat,len(pat)-7) ==# '[[dir]]' | ||
490 | if !self.isDirectory | ||
491 | return 0 | ||
492 | endif | ||
493 | let pat = strpart(pat,0, len(pat)-7) | ||
494 | elseif strpart(pat,len(pat)-8) ==# '[[file]]' | ||
495 | if self.isDirectory | ||
496 | return 0 | ||
497 | endif | ||
498 | let pat = strpart(pat,0, len(pat)-8) | ||
499 | endif | ||
500 | |||
501 | return self.getLastPathComponent(0) =~# pat | ||
502 | endfunction | ||
503 | |||
504 | " FUNCTION: Path.isAncestor(path) {{{1 | ||
505 | " return 1 if this path is somewhere above the given path in the filesystem. | ||
506 | " | ||
507 | " a:path should be a dir | ||
508 | function! s:Path.isAncestor(child) | ||
509 | return a:child.isUnder(self) | ||
510 | endfunction | ||
511 | |||
512 | " FUNCTION: Path.isUnder(path) {{{1 | ||
513 | " return 1 if this path is somewhere under the given path in the filesystem. | ||
514 | function! s:Path.isUnder(parent) | ||
515 | if a:parent.isDirectory ==# 0 | ||
516 | return 0 | ||
517 | endif | ||
518 | if nerdtree#runningWindows() && a:parent.drive !=# self.drive | ||
519 | return 0 | ||
520 | endif | ||
521 | let l:this_count = len(self.pathSegments) | ||
522 | if l:this_count ==# 0 | ||
523 | return 0 | ||
524 | endif | ||
525 | let l:that_count = len(a:parent.pathSegments) | ||
526 | if l:that_count ==# 0 | ||
527 | return 1 | ||
528 | endif | ||
529 | if l:that_count >= l:this_count | ||
530 | return 0 | ||
531 | endif | ||
532 | for i in range(0, l:that_count-1) | ||
533 | if self.pathSegments[i] !=# a:parent.pathSegments[i] | ||
534 | return 0 | ||
535 | endif | ||
536 | endfor | ||
537 | return 1 | ||
538 | endfunction | ||
539 | |||
540 | " FUNCTION: Path.JoinPathStrings(...) {{{1 | ||
541 | function! s:Path.JoinPathStrings(...) | ||
542 | let components = [] | ||
543 | for i in a:000 | ||
544 | let components = extend(components, split(i, '/')) | ||
545 | endfor | ||
546 | return '/' . join(components, '/') | ||
547 | endfunction | ||
548 | |||
549 | " FUNCTION: Path.equals() {{{1 | ||
550 | " | ||
551 | " Determines whether 2 path objects are "equal". | ||
552 | " They are equal if the paths they represent are the same | ||
553 | " | ||
554 | " Args: | ||
555 | " path: the other path obj to compare this with | ||
556 | function! s:Path.equals(path) | ||
557 | if nerdtree#runningWindows() | ||
558 | return self.str() ==? a:path.str() | ||
559 | else | ||
560 | return self.str() ==# a:path.str() | ||
561 | endif | ||
562 | endfunction | ||
563 | |||
564 | " FUNCTION: Path.New(pathStr) {{{1 | ||
565 | function! s:Path.New(pathStr) | ||
566 | let l:newPath = copy(self) | ||
567 | |||
568 | call l:newPath.readInfoFromDisk(s:Path.AbsolutePathFor(a:pathStr)) | ||
569 | |||
570 | let l:newPath.cachedDisplayString = '' | ||
571 | let l:newPath.flagSet = g:NERDTreeFlagSet.New() | ||
572 | |||
573 | return l:newPath | ||
574 | endfunction | ||
575 | |||
576 | " FUNCTION: Path.Resolve() {{{1 | ||
577 | " Invoke the vim resolve() function and return the result | ||
578 | " This is necessary because in some versions of vim resolve() removes trailing | ||
579 | " slashes while in other versions it doesn't. This always removes the trailing | ||
580 | " slash | ||
581 | function! s:Path.Resolve(path) | ||
582 | let tmp = resolve(a:path) | ||
583 | return tmp =~# '.\+/$' ? substitute(tmp, '/$', '', '') : tmp | ||
584 | endfunction | ||
585 | |||
586 | " FUNCTION: Path.readInfoFromDisk(fullpath) {{{1 | ||
587 | " | ||
588 | " | ||
589 | " Throws NERDTree.Path.InvalidArguments exception. | ||
590 | function! s:Path.readInfoFromDisk(fullpath) | ||
591 | call self.extractDriveLetter(a:fullpath) | ||
592 | |||
593 | let fullpath = s:Path.WinToUnixPath(a:fullpath) | ||
594 | |||
595 | if getftype(fullpath) ==# 'fifo' | ||
596 | throw 'NERDTree.InvalidFiletypeError: Cant handle FIFO files: ' . a:fullpath | ||
597 | endif | ||
598 | |||
599 | let self.pathSegments = filter(split(fullpath, '/'), '!empty(v:val)') | ||
600 | |||
601 | let self.isReadOnly = 0 | ||
602 | if isdirectory(a:fullpath) | ||
603 | let self.isDirectory = 1 | ||
604 | elseif filereadable(a:fullpath) | ||
605 | let self.isDirectory = 0 | ||
606 | let self.isReadOnly = filewritable(a:fullpath) ==# 0 | ||
607 | else | ||
608 | throw 'NERDTree.InvalidArgumentsError: Invalid path = ' . a:fullpath | ||
609 | endif | ||
610 | |||
611 | let self.isExecutable = 0 | ||
612 | if !self.isDirectory | ||
613 | let self.isExecutable = getfperm(a:fullpath) =~# 'x' | ||
614 | endif | ||
615 | |||
616 | "grab the last part of the path (minus the trailing slash) | ||
617 | let lastPathComponent = self.getLastPathComponent(0) | ||
618 | |||
619 | "get the path to the new node with the parent dir fully resolved | ||
620 | let hardPath = s:Path.Resolve(self.strTrunk()) . '/' . lastPathComponent | ||
621 | |||
622 | "if the last part of the path is a symlink then flag it as such | ||
623 | let self.isSymLink = (s:Path.Resolve(hardPath) !=# hardPath) | ||
624 | if self.isSymLink | ||
625 | let self.symLinkDest = s:Path.Resolve(fullpath) | ||
626 | |||
627 | "if the link is a dir then slap a / on the end of its dest | ||
628 | if isdirectory(self.symLinkDest) | ||
629 | |||
630 | "we always wanna treat MS windows shortcuts as files for | ||
631 | "simplicity | ||
632 | if hardPath !~# '\.lnk$' | ||
633 | |||
634 | let self.symLinkDest = self.symLinkDest . '/' | ||
635 | endif | ||
636 | endif | ||
637 | endif | ||
638 | endfunction | ||
639 | |||
640 | " FUNCTION: Path.refresh(nerdtree) {{{1 | ||
641 | function! s:Path.refresh(nerdtree) | ||
642 | call self.readInfoFromDisk(self.str()) | ||
643 | call g:NERDTreePathNotifier.NotifyListeners('refresh', self, a:nerdtree, {}) | ||
644 | call self.cacheDisplayString() | ||
645 | endfunction | ||
646 | |||
647 | " FUNCTION: Path.refreshFlags(nerdtree) {{{1 | ||
648 | function! s:Path.refreshFlags(nerdtree) | ||
649 | call g:NERDTreePathNotifier.NotifyListeners('refreshFlags', self, a:nerdtree, {}) | ||
650 | call self.cacheDisplayString() | ||
651 | endfunction | ||
652 | |||
653 | " FUNCTION: Path.rename() {{{1 | ||
654 | " | ||
655 | " Renames this node on the filesystem | ||
656 | function! s:Path.rename(newPath) | ||
657 | if a:newPath ==# '' | ||
658 | throw 'NERDTree.InvalidArgumentsError: Invalid newPath for renaming = '. a:newPath | ||
659 | endif | ||
660 | |||
661 | call s:Path.createParentDirectories(a:newPath) | ||
662 | |||
663 | let success = rename(self.str(), a:newPath) | ||
664 | if success !=# 0 | ||
665 | throw "NERDTree.PathRenameError: Could not rename: '" . self.str() . "'" . 'to:' . a:newPath | ||
666 | endif | ||
667 | call self.readInfoFromDisk(a:newPath) | ||
668 | |||
669 | for i in self.bookmarkNames() | ||
670 | let b = g:NERDTreeBookmark.BookmarkFor(i) | ||
671 | call b.setPath(copy(self)) | ||
672 | endfor | ||
673 | call g:NERDTreeBookmark.Write() | ||
674 | endfunction | ||
675 | |||
676 | " FUNCTION: Path.str() {{{1 | ||
677 | " Return a string representation of this Path object. | ||
678 | " | ||
679 | " Args: | ||
680 | " This function takes a single dictionary (optional) with keys and values that | ||
681 | " specify how the returned pathname should be formatted. | ||
682 | " | ||
683 | " The dictionary may have the following keys: | ||
684 | " 'format' | ||
685 | " 'escape' | ||
686 | " 'truncateTo' | ||
687 | " | ||
688 | " The 'format' key may have a value of: | ||
689 | " 'Cd' - a string to be used with ":cd" and similar commands | ||
690 | " 'Edit' - a string to be used with ":edit" and similar commands | ||
691 | " 'UI' - a string to be displayed in the NERDTree user interface | ||
692 | " | ||
693 | " The 'escape' key, if specified, will cause the output to be escaped with | ||
694 | " Vim's internal "shellescape()" function. | ||
695 | " | ||
696 | " The 'truncateTo' key shortens the length of the path to that given by the | ||
697 | " value associated with 'truncateTo'. A '<' is prepended. | ||
698 | function! s:Path.str(...) | ||
699 | let options = a:0 ? a:1 : {} | ||
700 | let toReturn = '' | ||
701 | |||
702 | if has_key(options, 'format') | ||
703 | let format = options['format'] | ||
704 | if has_key(self, '_strFor' . format) | ||
705 | exec 'let toReturn = self._strFor' . format . '()' | ||
706 | else | ||
707 | throw 'NERDTree.UnknownFormatError: unknown format "'. format .'"' | ||
708 | endif | ||
709 | else | ||
710 | let toReturn = self._str() | ||
711 | endif | ||
712 | |||
713 | if nerdtree#has_opt(options, 'escape') | ||
714 | let toReturn = shellescape(toReturn) | ||
715 | endif | ||
716 | |||
717 | if has_key(options, 'truncateTo') | ||
718 | let limit = options['truncateTo'] | ||
719 | if strdisplaywidth(toReturn) > limit-1 | ||
720 | while strdisplaywidth(toReturn) > limit-1 && strchars(toReturn) > 0 | ||
721 | let toReturn = substitute(toReturn, '^.', '', '') | ||
722 | endwhile | ||
723 | if len(split(toReturn, '/')) > 1 | ||
724 | let toReturn = '</' . join(split(toReturn, '/')[1:], '/') . '/' | ||
725 | else | ||
726 | let toReturn = '<' . toReturn | ||
727 | endif | ||
728 | endif | ||
729 | endif | ||
730 | |||
731 | return toReturn | ||
732 | endfunction | ||
733 | |||
734 | " FUNCTION: Path._strForUI() {{{1 | ||
735 | function! s:Path._strForUI() | ||
736 | let toReturn = '/' . join(self.pathSegments, '/') | ||
737 | if self.isDirectory && toReturn !=# '/' | ||
738 | let toReturn = toReturn . '/' | ||
739 | endif | ||
740 | return toReturn | ||
741 | endfunction | ||
742 | |||
743 | " FUNCTION: Path._strForCd() {{{1 | ||
744 | " Return a string representation of this Path that is suitable for use as an | ||
745 | " argument to Vim's internal ":cd" command. | ||
746 | function! s:Path._strForCd() | ||
747 | return fnameescape(self.str()) | ||
748 | endfunction | ||
749 | |||
750 | " FUNCTION: Path._strForEdit() {{{1 | ||
751 | " Return a string representation of this Path that is suitable for use as an | ||
752 | " argument to Vim's internal ":edit" command. | ||
753 | function! s:Path._strForEdit() | ||
754 | |||
755 | " Make the path relative to the current working directory, if possible. | ||
756 | let l:result = fnamemodify(self.str(), ':.') | ||
757 | |||
758 | " On Windows, the drive letter may be removed by "fnamemodify()". Add it | ||
759 | " back, if necessary. | ||
760 | if nerdtree#runningWindows() && l:result[0] == nerdtree#slash() | ||
761 | let l:result = self.drive . l:result | ||
762 | endif | ||
763 | |||
764 | let l:result = fnameescape(l:result) | ||
765 | |||
766 | if empty(l:result) | ||
767 | let l:result = '.' | ||
768 | endif | ||
769 | |||
770 | return l:result | ||
771 | endfunction | ||
772 | |||
773 | " FUNCTION: Path._strForGlob() {{{1 | ||
774 | function! s:Path._strForGlob() | ||
775 | let lead = nerdtree#slash() | ||
776 | |||
777 | "if we are running windows then slap a drive letter on the front | ||
778 | if nerdtree#runningWindows() | ||
779 | let lead = self.drive . '\' | ||
780 | endif | ||
781 | |||
782 | let toReturn = lead . join(self.pathSegments, nerdtree#slash()) | ||
783 | |||
784 | if !nerdtree#runningWindows() | ||
785 | let toReturn = escape(toReturn, self._escChars()) | ||
786 | endif | ||
787 | return toReturn | ||
788 | endfunction | ||
789 | |||
790 | " FUNCTION: Path._str() {{{1 | ||
791 | " Return the absolute pathname associated with this Path object. The pathname | ||
792 | " returned is appropriate for the underlying file system. | ||
793 | function! s:Path._str() | ||
794 | let l:separator = nerdtree#slash() | ||
795 | let l:leader = l:separator | ||
796 | |||
797 | if nerdtree#runningWindows() | ||
798 | let l:leader = self.drive . l:separator | ||
799 | endif | ||
800 | |||
801 | return l:leader . join(self.pathSegments, l:separator) | ||
802 | endfunction | ||
803 | |||
804 | " FUNCTION: Path.strTrunk() {{{1 | ||
805 | " Gets the path without the last segment on the end. | ||
806 | function! s:Path.strTrunk() | ||
807 | return self.drive . '/' . join(self.pathSegments[0:-2], '/') | ||
808 | endfunction | ||
809 | |||
810 | " FUNCTION: Path.tabnr() {{{1 | ||
811 | " return the number of the first tab that is displaying this file | ||
812 | " | ||
813 | " return 0 if no tab was found | ||
814 | function! s:Path.tabnr() | ||
815 | let str = self.str() | ||
816 | for t in range(tabpagenr('$')) | ||
817 | for b in tabpagebuflist(t+1) | ||
818 | if str ==# expand('#' . b . ':p') | ||
819 | return t+1 | ||
820 | endif | ||
821 | endfor | ||
822 | endfor | ||
823 | return 0 | ||
824 | endfunction | ||
825 | |||
826 | " FUNCTION: Path.WinToUnixPath(pathstr){{{1 | ||
827 | " Takes in a windows path and returns the unix equiv | ||
828 | " | ||
829 | " A class level method | ||
830 | " | ||
831 | " Args: | ||
832 | " pathstr: the windows path to convert | ||
833 | function! s:Path.WinToUnixPath(pathstr) | ||
834 | if !nerdtree#runningWindows() | ||
835 | return a:pathstr | ||
836 | endif | ||
837 | |||
838 | let toReturn = a:pathstr | ||
839 | |||
840 | "remove the x:\ of the front | ||
841 | let toReturn = substitute(toReturn, '^.*:\(\\\|/\)\?', '/', '') | ||
842 | |||
843 | "remove the \\ network share from the front | ||
844 | let toReturn = substitute(toReturn, '^\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\(\\\|\/\)\?', '/', '') | ||
845 | |||
846 | "convert all \ chars to / | ||
847 | let toReturn = substitute(toReturn, '\', '/', 'g') | ||
848 | |||
849 | return toReturn | ||
850 | endfunction | ||
851 | |||
852 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_dir_node.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_dir_node.vim new file mode 100644 index 0000000..f5f7682 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_dir_node.vim | |||
@@ -0,0 +1,706 @@ | |||
1 | " ============================================================================ | ||
2 | " CLASS: TreeDirNode | ||
3 | " | ||
4 | " A subclass of NERDTreeFileNode. | ||
5 | " | ||
6 | " The 'composite' part of the file/dir composite. | ||
7 | " ============================================================================ | ||
8 | |||
9 | |||
10 | let s:TreeDirNode = copy(g:NERDTreeFileNode) | ||
11 | let g:NERDTreeDirNode = s:TreeDirNode | ||
12 | |||
13 | " FUNCTION: TreeDirNode.AbsoluteTreeRoot(){{{1 | ||
14 | " Class method that returns the highest cached ancestor of the current root. | ||
15 | function! s:TreeDirNode.AbsoluteTreeRoot() | ||
16 | let currentNode = b:NERDTree.root | ||
17 | while currentNode.parent !=# {} | ||
18 | let currentNode = currentNode.parent | ||
19 | endwhile | ||
20 | return currentNode | ||
21 | endfunction | ||
22 | |||
23 | " FUNCTION: TreeDirNode.activate([options]) {{{1 | ||
24 | function! s:TreeDirNode.activate(...) | ||
25 | let l:options = (a:0 > 0) ? a:1 : {} | ||
26 | |||
27 | call self.toggleOpen(l:options) | ||
28 | |||
29 | " Note that we only re-render the NERDTree for this node if we did NOT | ||
30 | " create a new node and render it in a new window or tab. In the latter | ||
31 | " case, rendering the NERDTree for this node could overwrite the text of | ||
32 | " the new NERDTree! | ||
33 | if !has_key(l:options, 'where') || empty(l:options['where']) | ||
34 | call self.getNerdtree().render() | ||
35 | call self.putCursorHere(0, 0) | ||
36 | endif | ||
37 | endfunction | ||
38 | |||
39 | " FUNCTION: TreeDirNode.addChild(treenode, inOrder) {{{1 | ||
40 | " Adds the given treenode to the list of children for this node | ||
41 | " | ||
42 | " Args: | ||
43 | " -treenode: the node to add | ||
44 | " -inOrder: 1 if the new node should be inserted in sorted order | ||
45 | function! s:TreeDirNode.addChild(treenode, inOrder) | ||
46 | call add(self.children, a:treenode) | ||
47 | let a:treenode.parent = self | ||
48 | |||
49 | if a:inOrder | ||
50 | call self.sortChildren() | ||
51 | endif | ||
52 | endfunction | ||
53 | |||
54 | " FUNCTION: TreeDirNode.close() {{{1 | ||
55 | " Mark this TreeDirNode as closed. | ||
56 | function! s:TreeDirNode.close() | ||
57 | |||
58 | " Close all directories in this directory node's cascade. This is | ||
59 | " necessary to ensure consistency when cascades are rendered. | ||
60 | for l:dirNode in self.getCascade() | ||
61 | let l:dirNode.isOpen = 0 | ||
62 | endfor | ||
63 | endfunction | ||
64 | |||
65 | " FUNCTION: TreeDirNode.closeChildren() {{{1 | ||
66 | " Recursively close any directory nodes that are descendants of this node. | ||
67 | function! s:TreeDirNode.closeChildren() | ||
68 | for l:child in self.children | ||
69 | if l:child.path.isDirectory | ||
70 | call l:child.close() | ||
71 | call l:child.closeChildren() | ||
72 | endif | ||
73 | endfor | ||
74 | endfunction | ||
75 | |||
76 | " FUNCTION: TreeDirNode.createChild(path, inOrder) {{{1 | ||
77 | " Instantiates a new child node for this node with the given path. The new | ||
78 | " nodes parent is set to this node. | ||
79 | " | ||
80 | " Args: | ||
81 | " path: a Path object that this node will represent/contain | ||
82 | " inOrder: 1 if the new node should be inserted in sorted order | ||
83 | " | ||
84 | " Returns: | ||
85 | " the newly created node | ||
86 | function! s:TreeDirNode.createChild(path, inOrder) | ||
87 | let newTreeNode = g:NERDTreeFileNode.New(a:path, self.getNerdtree()) | ||
88 | call self.addChild(newTreeNode, a:inOrder) | ||
89 | return newTreeNode | ||
90 | endfunction | ||
91 | |||
92 | " FUNCTION: TreeDirNode.displayString() {{{1 | ||
93 | " Assemble and return a string that can represent this TreeDirNode object in | ||
94 | " the NERDTree window. | ||
95 | function! s:TreeDirNode.displayString() | ||
96 | let l:result = '' | ||
97 | |||
98 | " Build a label that identifies this TreeDirNode. | ||
99 | let l:label = '' | ||
100 | let l:cascade = self.getCascade() | ||
101 | for l:dirNode in l:cascade | ||
102 | let l:next = l:dirNode.path.displayString() | ||
103 | let l:label .= l:label ==# '' ? l:next : substitute(l:next,'^.','','') | ||
104 | endfor | ||
105 | |||
106 | " Select the appropriate open/closed status indicator symbol. | ||
107 | let l:symbol = (l:cascade[-1].isOpen ? g:NERDTreeDirArrowCollapsible : g:NERDTreeDirArrowExpandable ) | ||
108 | let l:symbol .= (g:NERDTreeDirArrowExpandable ==# '' ? '' : ' ') | ||
109 | let l:flags = l:cascade[-1].path.flagSet.renderToString() | ||
110 | |||
111 | return l:symbol . l:flags . l:label | ||
112 | endfunction | ||
113 | |||
114 | " FUNCTION: TreeDirNode.findNode(path) {{{1 | ||
115 | " Will find one of the children (recursively) that has the given path | ||
116 | " | ||
117 | " Args: | ||
118 | " path: a path object | ||
119 | unlet s:TreeDirNode.findNode | ||
120 | function! s:TreeDirNode.findNode(path) | ||
121 | if a:path.equals(self.path) | ||
122 | return self | ||
123 | endif | ||
124 | if stridx(a:path.str(), self.path.str(), 0) ==# -1 | ||
125 | return {} | ||
126 | endif | ||
127 | |||
128 | if self.path.isDirectory | ||
129 | for i in self.children | ||
130 | let retVal = i.findNode(a:path) | ||
131 | if retVal !=# {} | ||
132 | return retVal | ||
133 | endif | ||
134 | endfor | ||
135 | endif | ||
136 | return {} | ||
137 | endfunction | ||
138 | |||
139 | " FUNCTION: TreeDirNode.getCascade() {{{1 | ||
140 | " Return an array of dir nodes (starting from self) that can be cascade opened. | ||
141 | function! s:TreeDirNode.getCascade() | ||
142 | if !self.isCascadable() | ||
143 | return [self] | ||
144 | endif | ||
145 | |||
146 | let vc = self.getVisibleChildren() | ||
147 | let visChild = vc[0] | ||
148 | |||
149 | return [self] + visChild.getCascade() | ||
150 | endfunction | ||
151 | |||
152 | " FUNCTION: TreeDirNode.getCascadeRoot() {{{1 | ||
153 | " Return the first directory node in the cascade in which this directory node | ||
154 | " is rendered. | ||
155 | function! s:TreeDirNode.getCascadeRoot() | ||
156 | |||
157 | " Don't search above the current NERDTree root node. | ||
158 | if self.isRoot() | ||
159 | return self | ||
160 | endif | ||
161 | |||
162 | let l:cascadeRoot = self | ||
163 | let l:parent = self.parent | ||
164 | |||
165 | while !empty(l:parent) && !l:parent.isRoot() | ||
166 | |||
167 | if index(l:parent.getCascade(), self) ==# -1 | ||
168 | break | ||
169 | endif | ||
170 | |||
171 | let l:cascadeRoot = l:parent | ||
172 | let l:parent = l:parent.parent | ||
173 | endwhile | ||
174 | |||
175 | return l:cascadeRoot | ||
176 | endfunction | ||
177 | |||
178 | " FUNCTION: TreeDirNode.getChildCount() {{{1 | ||
179 | " Returns the number of children this node has | ||
180 | function! s:TreeDirNode.getChildCount() | ||
181 | return len(self.children) | ||
182 | endfunction | ||
183 | |||
184 | " FUNCTION: TreeDirNode.getChild(path) {{{1 | ||
185 | " Returns child node of this node that has the given path or {} if no such node | ||
186 | " exists. | ||
187 | " | ||
188 | " This function doesnt not recurse into child dir nodes | ||
189 | " | ||
190 | " Args: | ||
191 | " path: a path object | ||
192 | function! s:TreeDirNode.getChild(path) | ||
193 | if stridx(a:path.str(), self.path.str(), 0) ==# -1 | ||
194 | return {} | ||
195 | endif | ||
196 | |||
197 | let index = self.getChildIndex(a:path) | ||
198 | if index ==# -1 | ||
199 | return {} | ||
200 | else | ||
201 | return self.children[index] | ||
202 | endif | ||
203 | |||
204 | endfunction | ||
205 | |||
206 | " FUNCTION: TreeDirNode.getChildByIndex(indx, visible) {{{1 | ||
207 | " returns the child at the given index | ||
208 | " | ||
209 | " Args: | ||
210 | " indx: the index to get the child from | ||
211 | " visible: 1 if only the visible children array should be used, 0 if all the | ||
212 | " children should be searched. | ||
213 | function! s:TreeDirNode.getChildByIndex(indx, visible) | ||
214 | let array_to_search = a:visible? self.getVisibleChildren() : self.children | ||
215 | if a:indx > len(array_to_search) | ||
216 | throw 'NERDTree.InvalidArgumentsError: Index is out of bounds.' | ||
217 | endif | ||
218 | return array_to_search[a:indx] | ||
219 | endfunction | ||
220 | |||
221 | " FUNCTION: TreeDirNode.getChildIndex(path) {{{1 | ||
222 | " Returns the index of the child node of this node that has the given path or | ||
223 | " -1 if no such node exists. | ||
224 | " | ||
225 | " This function doesnt not recurse into child dir nodes | ||
226 | " | ||
227 | " Args: | ||
228 | " path: a path object | ||
229 | function! s:TreeDirNode.getChildIndex(path) | ||
230 | if stridx(a:path.str(), self.path.str(), 0) ==# -1 | ||
231 | return -1 | ||
232 | endif | ||
233 | |||
234 | "do a binary search for the child | ||
235 | let a = 0 | ||
236 | let z = self.getChildCount() | ||
237 | while a < z | ||
238 | let mid = (a+z)/2 | ||
239 | let diff = nerdtree#compareNodePaths(a:path, self.children[mid].path) | ||
240 | |||
241 | if diff ==# -1 | ||
242 | let z = mid | ||
243 | elseif diff ==# 1 | ||
244 | let a = mid+1 | ||
245 | else | ||
246 | return mid | ||
247 | endif | ||
248 | endwhile | ||
249 | return -1 | ||
250 | endfunction | ||
251 | |||
252 | " FUNCTION: TreeDirNode.getDirChildren() {{{1 | ||
253 | " Return a list of all child nodes from 'self.children' that are of type | ||
254 | " TreeDirNode. This function supports http://github.com/scrooloose/nerdtree-project-plugin.git. | ||
255 | function! s:TreeDirNode.getDirChildren() | ||
256 | return filter(copy(self.children), 'v:val.path.isDirectory ==# 1') | ||
257 | endfunction | ||
258 | |||
259 | " FUNCTION: TreeDirNode._glob(pattern, all) {{{1 | ||
260 | " Return a list of strings naming the descendants of the directory in this | ||
261 | " TreeDirNode object that match the specified glob pattern. | ||
262 | " | ||
263 | " Args: | ||
264 | " pattern: (string) the glob pattern to apply | ||
265 | " all: (0 or 1) if 1, include '.' and '..' if they match 'pattern'; if 0, | ||
266 | " always exclude them | ||
267 | " | ||
268 | " Note: If the pathnames in the result list are below the working directory, | ||
269 | " they are returned as pathnames relative to that directory. This is because | ||
270 | " this function, internally, attempts to obey 'wildignore' rules that use | ||
271 | " relative paths. | ||
272 | function! s:TreeDirNode._glob(pattern, all) | ||
273 | |||
274 | " Construct a path specification such that globpath() will return | ||
275 | " relative pathnames, if possible. | ||
276 | if self.path.str() ==# getcwd() | ||
277 | let l:pathSpec = ',' | ||
278 | else | ||
279 | let l:pathSpec = escape(fnamemodify(self.path.str({'format': 'Glob'}), ':.'), ',') | ||
280 | |||
281 | " On Windows, the drive letter may be removed by "fnamemodify()". | ||
282 | if nerdtree#runningWindows() && l:pathSpec[0] == nerdtree#slash() | ||
283 | let l:pathSpec = self.path.drive . l:pathSpec | ||
284 | endif | ||
285 | endif | ||
286 | |||
287 | let l:globList = [] | ||
288 | |||
289 | " See ':h version7.txt' and ':h version8.txt' for details on the | ||
290 | " development of the glob() and globpath() functions. | ||
291 | if v:version > 704 || (v:version ==# 704 && has('patch654')) | ||
292 | let l:globList = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore, 1, 0) | ||
293 | elseif v:version ==# 704 && has('patch279') | ||
294 | let l:globList = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore, 1) | ||
295 | elseif v:version > 702 || (v:version ==# 702 && has('patch051')) | ||
296 | let l:globString = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore) | ||
297 | let l:globList = split(l:globString, "\n") | ||
298 | else | ||
299 | let l:globString = globpath(l:pathSpec, a:pattern) | ||
300 | let l:globList = split(l:globString, "\n") | ||
301 | endif | ||
302 | |||
303 | " If a:all is false, filter '.' and '..' from the output. | ||
304 | if !a:all | ||
305 | let l:toRemove = [] | ||
306 | |||
307 | for l:file in l:globList | ||
308 | let l:tail = fnamemodify(l:file, ':t') | ||
309 | |||
310 | " If l:file has a trailing slash, then its :tail will be ''. Use | ||
311 | " :h to drop the slash and the empty string after it; then use :t | ||
312 | " to get the directory name. | ||
313 | if l:tail ==# '' | ||
314 | let l:tail = fnamemodify(l:file, ':h:t') | ||
315 | endif | ||
316 | |||
317 | if l:tail ==# '.' || l:tail ==# '..' | ||
318 | call add(l:toRemove, l:file) | ||
319 | if len(l:toRemove) ==# 2 | ||
320 | break | ||
321 | endif | ||
322 | endif | ||
323 | endfor | ||
324 | |||
325 | for l:file in l:toRemove | ||
326 | call remove(l:globList, index(l:globList, l:file)) | ||
327 | endfor | ||
328 | endif | ||
329 | |||
330 | return l:globList | ||
331 | endfunction | ||
332 | |||
333 | " FUNCTION: TreeDirNode.GetSelected() {{{1 | ||
334 | " Returns the current node if it is a dir node, or else returns the current | ||
335 | " nodes parent | ||
336 | unlet s:TreeDirNode.GetSelected | ||
337 | function! s:TreeDirNode.GetSelected() | ||
338 | let currentDir = g:NERDTreeFileNode.GetSelected() | ||
339 | if currentDir !=# {} && !currentDir.isRoot() | ||
340 | if currentDir.path.isDirectory ==# 0 | ||
341 | let currentDir = currentDir.parent | ||
342 | endif | ||
343 | endif | ||
344 | return currentDir | ||
345 | endfunction | ||
346 | |||
347 | " FUNCTION: TreeDirNode.getVisibleChildCount() {{{1 | ||
348 | " Returns the number of visible children this node has | ||
349 | function! s:TreeDirNode.getVisibleChildCount() | ||
350 | return len(self.getVisibleChildren()) | ||
351 | endfunction | ||
352 | |||
353 | " FUNCTION: TreeDirNode.getVisibleChildren() {{{1 | ||
354 | " Returns a list of children to display for this node, in the correct order | ||
355 | " | ||
356 | " Return: | ||
357 | " an array of treenodes | ||
358 | function! s:TreeDirNode.getVisibleChildren() | ||
359 | let toReturn = [] | ||
360 | for i in self.children | ||
361 | if i.path.ignore(self.getNerdtree()) ==# 0 | ||
362 | call add(toReturn, i) | ||
363 | endif | ||
364 | endfor | ||
365 | return toReturn | ||
366 | endfunction | ||
367 | |||
368 | " FUNCTION: TreeDirNode.hasVisibleChildren() {{{1 | ||
369 | " returns 1 if this node has any childre, 0 otherwise.. | ||
370 | function! s:TreeDirNode.hasVisibleChildren() | ||
371 | return self.getVisibleChildCount() !=# 0 | ||
372 | endfunction | ||
373 | |||
374 | " FUNCTION: TreeDirNode.isCascadable() {{{1 | ||
375 | " true if this dir has only one visible child that is also a dir | ||
376 | " false if this dir is bookmarked or symlinked. Why? Two reasons: | ||
377 | " 1. If cascaded, we don't know which dir is bookmarked or is a symlink. | ||
378 | " 2. If the parent is a symlink or is bookmarked, you end up with unparsable | ||
379 | " text, and NERDTree cannot get the path of any child node. | ||
380 | " Also, return false if this directory is the tree root, which should never be | ||
381 | " part of a cascade. | ||
382 | function! s:TreeDirNode.isCascadable() | ||
383 | if g:NERDTreeCascadeSingleChildDir ==# 0 | ||
384 | return 0 | ||
385 | endif | ||
386 | |||
387 | if self.isRoot() | ||
388 | return 0 | ||
389 | endif | ||
390 | |||
391 | if self.path.isSymLink | ||
392 | return 0 | ||
393 | endif | ||
394 | |||
395 | for i in g:NERDTreeBookmark.Bookmarks() | ||
396 | if i.path.equals(self.path) | ||
397 | return 0 | ||
398 | endif | ||
399 | endfor | ||
400 | |||
401 | let c = self.getVisibleChildren() | ||
402 | return len(c) ==# 1 && c[0].path.isDirectory | ||
403 | endfunction | ||
404 | |||
405 | " FUNCTION: TreeDirNode._initChildren() {{{1 | ||
406 | " Removes all childen from this node and re-reads them | ||
407 | " | ||
408 | " Args: | ||
409 | " silent: 1 if the function should not echo any 'please wait' messages for | ||
410 | " large directories | ||
411 | " | ||
412 | " Return: the number of child nodes read | ||
413 | function! s:TreeDirNode._initChildren(silent) | ||
414 | "remove all the current child nodes | ||
415 | let self.children = [] | ||
416 | |||
417 | let files = self._glob('*', 1) + self._glob('.*', 0) | ||
418 | |||
419 | if !a:silent && len(files) > g:NERDTreeNotificationThreshold | ||
420 | call nerdtree#echo('Please wait, caching a large dir ...') | ||
421 | endif | ||
422 | |||
423 | let invalidFilesFound = 0 | ||
424 | for i in files | ||
425 | try | ||
426 | let path = g:NERDTreePath.New(i) | ||
427 | call self.createChild(path, 0) | ||
428 | call g:NERDTreePathNotifier.NotifyListeners('init', path, self.getNerdtree(), {}) | ||
429 | catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/ | ||
430 | let invalidFilesFound += 1 | ||
431 | endtry | ||
432 | endfor | ||
433 | |||
434 | let g:NERDTreeOldSortOrder = g:NERDTreeSortOrder | ||
435 | call self.sortChildren() | ||
436 | |||
437 | call nerdtree#echo('') | ||
438 | |||
439 | if invalidFilesFound | ||
440 | call nerdtree#echoWarning(invalidFilesFound . ' file(s) could not be loaded into the NERD tree') | ||
441 | endif | ||
442 | return self.getChildCount() | ||
443 | endfunction | ||
444 | |||
445 | " FUNCTION: TreeDirNode.New(path, nerdtree) {{{1 | ||
446 | " Return a new TreeDirNode object with the given path and parent. | ||
447 | " | ||
448 | " Args: | ||
449 | " path: dir that the node represents | ||
450 | " nerdtree: the tree the node belongs to | ||
451 | function! s:TreeDirNode.New(path, nerdtree) | ||
452 | if a:path.isDirectory !=# 1 | ||
453 | throw 'NERDTree.InvalidArgumentsError: A TreeDirNode object must be instantiated with a directory Path object.' | ||
454 | endif | ||
455 | |||
456 | let newTreeNode = copy(self) | ||
457 | let newTreeNode.path = a:path | ||
458 | |||
459 | let newTreeNode.isOpen = 0 | ||
460 | let newTreeNode.children = [] | ||
461 | |||
462 | let newTreeNode.parent = {} | ||
463 | let newTreeNode._nerdtree = a:nerdtree | ||
464 | |||
465 | return newTreeNode | ||
466 | endfunction | ||
467 | |||
468 | " FUNCTION: TreeDirNode.open([options]) {{{1 | ||
469 | " Open this directory node in the current tree or elsewhere if special options | ||
470 | " are provided. Return 0 if options were processed. Otherwise, return the | ||
471 | " number of new cached nodes. | ||
472 | function! s:TreeDirNode.open(...) | ||
473 | let l:options = a:0 ? a:1 : {} | ||
474 | |||
475 | " If special options were specified, process them and return. | ||
476 | if has_key(l:options, 'where') && !empty(l:options['where']) | ||
477 | let l:opener = g:NERDTreeOpener.New(self.path, l:options) | ||
478 | call l:opener.open(self) | ||
479 | return 0 | ||
480 | endif | ||
481 | |||
482 | " Open any ancestors of this node that render within the same cascade. | ||
483 | let l:parent = self.parent | ||
484 | while !empty(l:parent) && !l:parent.isRoot() | ||
485 | if index(l:parent.getCascade(), self) >= 0 | ||
486 | let l:parent.isOpen = 1 | ||
487 | let l:parent = l:parent.parent | ||
488 | else | ||
489 | break | ||
490 | endif | ||
491 | endwhile | ||
492 | |||
493 | let self.isOpen = 1 | ||
494 | |||
495 | let l:numChildrenCached = 0 | ||
496 | if empty(self.children) | ||
497 | let l:numChildrenCached = self._initChildren(0) | ||
498 | endif | ||
499 | |||
500 | return l:numChildrenCached | ||
501 | endfunction | ||
502 | |||
503 | " FUNCTION: TreeDirNode.openAlong([opts]) {{{1 | ||
504 | " recursive open the dir if it has only one directory child. | ||
505 | " | ||
506 | " return the level of opened directories. | ||
507 | function! s:TreeDirNode.openAlong(...) | ||
508 | let opts = a:0 ? a:1 : {} | ||
509 | let level = 0 | ||
510 | |||
511 | let node = self | ||
512 | while node.path.isDirectory | ||
513 | call node.open(opts) | ||
514 | let level += 1 | ||
515 | if node.getVisibleChildCount() ==# 1 | ||
516 | let node = node.getChildByIndex(0, 1) | ||
517 | else | ||
518 | break | ||
519 | endif | ||
520 | endwhile | ||
521 | return level | ||
522 | endfunction | ||
523 | |||
524 | " FUNCTION: TreeDirNode.openExplorer() {{{1 | ||
525 | " Open an explorer window for this node in the previous window. The explorer | ||
526 | " can be a NERDTree window or a netrw window. | ||
527 | function! s:TreeDirNode.openExplorer() | ||
528 | execute 'wincmd p' | ||
529 | execute 'edit '.self.path.str({'format':'Edit'}) | ||
530 | endfunction | ||
531 | |||
532 | " FUNCTION: TreeDirNode.openInNewTab(options) {{{1 | ||
533 | unlet s:TreeDirNode.openInNewTab | ||
534 | function! s:TreeDirNode.openInNewTab(options) | ||
535 | call nerdtree#deprecated('TreeDirNode.openInNewTab', 'is deprecated, use open() instead') | ||
536 | call self.open({'where': 't'}) | ||
537 | endfunction | ||
538 | |||
539 | " FUNCTION: TreeDirNode._openInNewTab() {{{1 | ||
540 | function! s:TreeDirNode._openInNewTab() | ||
541 | tabnew | ||
542 | call g:NERDTreeCreator.CreateTabTree(self.path.str()) | ||
543 | endfunction | ||
544 | |||
545 | " FUNCTION: TreeDirNode.openRecursively() {{{1 | ||
546 | " Open this directory node and any descendant directory nodes whose pathnames | ||
547 | " are not ignored. | ||
548 | function! s:TreeDirNode.openRecursively() | ||
549 | silent call self.open() | ||
550 | |||
551 | for l:child in self.children | ||
552 | if l:child.path.isDirectory && !l:child.path.ignore(l:child.getNerdtree()) | ||
553 | call l:child.openRecursively() | ||
554 | endif | ||
555 | endfor | ||
556 | endfunction | ||
557 | |||
558 | " FUNCTION: TreeDirNode.refresh() {{{1 | ||
559 | function! s:TreeDirNode.refresh() | ||
560 | call self.path.refresh(self.getNerdtree()) | ||
561 | |||
562 | "if this node was ever opened, refresh its children | ||
563 | if self.isOpen || !empty(self.children) | ||
564 | let files = self._glob('*', 1) + self._glob('.*', 0) | ||
565 | let newChildNodes = [] | ||
566 | let invalidFilesFound = 0 | ||
567 | for i in files | ||
568 | try | ||
569 | "create a new path and see if it exists in this nodes children | ||
570 | let path = g:NERDTreePath.New(i) | ||
571 | let newNode = self.getChild(path) | ||
572 | if newNode !=# {} | ||
573 | call newNode.refresh() | ||
574 | call add(newChildNodes, newNode) | ||
575 | |||
576 | "the node doesnt exist so create it | ||
577 | else | ||
578 | let newNode = g:NERDTreeFileNode.New(path, self.getNerdtree()) | ||
579 | let newNode.parent = self | ||
580 | call add(newChildNodes, newNode) | ||
581 | endif | ||
582 | catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/ | ||
583 | let invalidFilesFound = 1 | ||
584 | endtry | ||
585 | endfor | ||
586 | |||
587 | "swap this nodes children out for the children we just read/refreshed | ||
588 | let self.children = newChildNodes | ||
589 | call self.sortChildren() | ||
590 | |||
591 | if invalidFilesFound | ||
592 | call nerdtree#echoWarning('some files could not be loaded into the NERD tree') | ||
593 | endif | ||
594 | endif | ||
595 | endfunction | ||
596 | |||
597 | " FUNCTION: TreeDirNode.refreshFlags() {{{1 | ||
598 | unlet s:TreeDirNode.refreshFlags | ||
599 | function! s:TreeDirNode.refreshFlags() | ||
600 | call self.path.refreshFlags(self.getNerdtree()) | ||
601 | for i in self.children | ||
602 | call i.refreshFlags() | ||
603 | endfor | ||
604 | endfunction | ||
605 | |||
606 | " FUNCTION: TreeDirNode.refreshDirFlags() {{{1 | ||
607 | function! s:TreeDirNode.refreshDirFlags() | ||
608 | call self.path.refreshFlags(self.getNerdtree()) | ||
609 | endfunction | ||
610 | |||
611 | " FUNCTION: TreeDirNode.reveal(path) {{{1 | ||
612 | " reveal the given path, i.e. cache and open all treenodes needed to display it | ||
613 | " in the UI | ||
614 | " Returns the revealed node | ||
615 | function! s:TreeDirNode.reveal(path, ...) | ||
616 | let opts = a:0 ? a:1 : {} | ||
617 | |||
618 | if !a:path.isUnder(self.path) | ||
619 | throw 'NERDTree.InvalidArgumentsError: ' . a:path.str() . ' should be under ' . self.path.str() | ||
620 | endif | ||
621 | |||
622 | call self.open() | ||
623 | |||
624 | if self.path.equals(a:path.getParent()) | ||
625 | let n = self.findNode(a:path) | ||
626 | " We may be looking for a newly-saved file that isn't in the tree yet. | ||
627 | if n ==# {} | ||
628 | call self.refresh() | ||
629 | let n = self.findNode(a:path) | ||
630 | endif | ||
631 | if has_key(opts, 'open') | ||
632 | call n.open() | ||
633 | endif | ||
634 | return n | ||
635 | endif | ||
636 | |||
637 | let p = a:path | ||
638 | while !p.getParent().equals(self.path) | ||
639 | let p = p.getParent() | ||
640 | endwhile | ||
641 | |||
642 | let n = self.findNode(p) | ||
643 | return n.reveal(a:path, opts) | ||
644 | endfunction | ||
645 | |||
646 | " FUNCTION: TreeDirNode.removeChild(treenode) {{{1 | ||
647 | " Remove the given treenode from self.children. | ||
648 | " Throws NERDTree.ChildNotFoundError if the node is not found. | ||
649 | " | ||
650 | " Args: | ||
651 | " treenode: the node object to remove | ||
652 | function! s:TreeDirNode.removeChild(treenode) | ||
653 | for i in range(0, self.getChildCount()-1) | ||
654 | if self.children[i].equals(a:treenode) | ||
655 | call remove(self.children, i) | ||
656 | return | ||
657 | endif | ||
658 | endfor | ||
659 | |||
660 | throw 'NERDTree.ChildNotFoundError: child node was not found' | ||
661 | endfunction | ||
662 | |||
663 | " FUNCTION: TreeDirNode.sortChildren() {{{1 | ||
664 | " Sort self.children by alphabetical order and directory priority. | ||
665 | function! s:TreeDirNode.sortChildren() | ||
666 | if count(g:NERDTreeSortOrder, '*') < 1 | ||
667 | call add(g:NERDTreeSortOrder, '*') | ||
668 | endif | ||
669 | let CompareFunc = function('nerdtree#compareNodes') | ||
670 | call sort(self.children, CompareFunc) | ||
671 | let g:NERDTreeOldSortOrder = g:NERDTreeSortOrder | ||
672 | endfunction | ||
673 | |||
674 | " FUNCTION: TreeDirNode.toggleOpen([options]) {{{1 | ||
675 | " Opens this directory if it is closed and vice versa | ||
676 | function! s:TreeDirNode.toggleOpen(...) | ||
677 | let opts = a:0 ? a:1 : {} | ||
678 | if self.isOpen ==# 1 | ||
679 | call self.close() | ||
680 | else | ||
681 | if g:NERDTreeCascadeOpenSingleChildDir ==# 0 | ||
682 | call self.open(opts) | ||
683 | else | ||
684 | call self.openAlong(opts) | ||
685 | endif | ||
686 | endif | ||
687 | endfunction | ||
688 | |||
689 | " FUNCTION: TreeDirNode.transplantChild(newNode) {{{1 | ||
690 | " Replaces the child of this with the given node (where the child node's full | ||
691 | " path matches a:newNode's fullpath). The search for the matching node is | ||
692 | " non-recursive | ||
693 | " | ||
694 | " Arg: | ||
695 | " newNode: the node to graft into the tree | ||
696 | function! s:TreeDirNode.transplantChild(newNode) | ||
697 | for i in range(0, self.getChildCount()-1) | ||
698 | if self.children[i].equals(a:newNode) | ||
699 | let self.children[i] = a:newNode | ||
700 | let a:newNode.parent = self | ||
701 | break | ||
702 | endif | ||
703 | endfor | ||
704 | endfunction | ||
705 | |||
706 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_file_node.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_file_node.vim new file mode 100644 index 0000000..957b98a --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_file_node.vim | |||
@@ -0,0 +1,349 @@ | |||
1 | " ============================================================================ | ||
2 | " CLASS: TreeFileNode | ||
3 | " | ||
4 | " This class is the parent of the TreeDirNode class and is the 'Component' | ||
5 | " part of the composite design pattern between the NERDTree node classes. | ||
6 | " ============================================================================ | ||
7 | |||
8 | |||
9 | let s:TreeFileNode = {} | ||
10 | let g:NERDTreeFileNode = s:TreeFileNode | ||
11 | |||
12 | " FUNCTION: TreeFileNode.activate(...) {{{1 | ||
13 | function! s:TreeFileNode.activate(...) | ||
14 | call self.open(a:0 ? a:1 : {}) | ||
15 | endfunction | ||
16 | |||
17 | " FUNCTION: TreeFileNode.bookmark(name) {{{1 | ||
18 | " bookmark this node with a:name | ||
19 | function! s:TreeFileNode.bookmark(name) | ||
20 | |||
21 | " if a bookmark exists with the same name and the node is cached then save | ||
22 | " it so we can update its display string | ||
23 | let oldMarkedNode = {} | ||
24 | try | ||
25 | let oldMarkedNode = g:NERDTreeBookmark.GetNodeForName(a:name, 1, self.getNerdtree()) | ||
26 | catch /^NERDTree.BookmarkNotFoundError/ | ||
27 | catch /^NERDTree.BookmarkedNodeNotFoundError/ | ||
28 | endtry | ||
29 | |||
30 | call g:NERDTreeBookmark.AddBookmark(a:name, self.path) | ||
31 | call self.path.cacheDisplayString() | ||
32 | call g:NERDTreeBookmark.Write() | ||
33 | |||
34 | if !empty(oldMarkedNode) | ||
35 | call oldMarkedNode.path.cacheDisplayString() | ||
36 | endif | ||
37 | endfunction | ||
38 | |||
39 | " FUNCTION: TreeFileNode.cacheParent() {{{1 | ||
40 | " initializes self.parent if it isnt already | ||
41 | function! s:TreeFileNode.cacheParent() | ||
42 | if empty(self.parent) | ||
43 | let parentPath = self.path.getParent() | ||
44 | if parentPath.equals(self.path) | ||
45 | throw 'NERDTree.CannotCacheParentError: already at root' | ||
46 | endif | ||
47 | let self.parent = s:TreeFileNode.New(parentPath, self.getNerdtree()) | ||
48 | endif | ||
49 | endfunction | ||
50 | |||
51 | " FUNCTION: TreeFileNode.clearBookmarks() {{{1 | ||
52 | function! s:TreeFileNode.clearBookmarks() | ||
53 | for i in g:NERDTreeBookmark.Bookmarks() | ||
54 | if i.path.equals(self.path) | ||
55 | call i.delete() | ||
56 | end | ||
57 | endfor | ||
58 | call self.path.cacheDisplayString() | ||
59 | endfunction | ||
60 | |||
61 | " FUNCTION: TreeFileNode.copy(dest) {{{1 | ||
62 | function! s:TreeFileNode.copy(dest) | ||
63 | call self.path.copy(a:dest) | ||
64 | let newPath = g:NERDTreePath.New(a:dest) | ||
65 | let parent = self.getNerdtree().root.findNode(newPath.getParent()) | ||
66 | if !empty(parent) | ||
67 | call parent.refresh() | ||
68 | return parent.findNode(newPath) | ||
69 | else | ||
70 | return {} | ||
71 | endif | ||
72 | endfunction | ||
73 | |||
74 | " FUNCTION: TreeFileNode.delete {{{1 | ||
75 | " Removes this node from the tree and calls the Delete method for its path obj | ||
76 | function! s:TreeFileNode.delete() | ||
77 | call self.path.delete() | ||
78 | call self.parent.removeChild(self) | ||
79 | endfunction | ||
80 | |||
81 | " FUNCTION: TreeFileNode.displayString() {{{1 | ||
82 | " | ||
83 | " Returns a string that specifies how the node should be represented as a | ||
84 | " string | ||
85 | " | ||
86 | " Return: | ||
87 | " a string that can be used in the view to represent this node | ||
88 | function! s:TreeFileNode.displayString() | ||
89 | return self.path.flagSet.renderToString() . self.path.displayString() | ||
90 | endfunction | ||
91 | |||
92 | " FUNCTION: TreeFileNode.equals(treenode) {{{1 | ||
93 | " | ||
94 | " Compares this treenode to the input treenode and returns 1 if they are the | ||
95 | " same node. | ||
96 | " | ||
97 | " Use this method instead of == because sometimes when the treenodes contain | ||
98 | " many children, vim seg faults when doing == | ||
99 | " | ||
100 | " Args: | ||
101 | " treenode: the other treenode to compare to | ||
102 | function! s:TreeFileNode.equals(treenode) | ||
103 | return self.path.str() ==# a:treenode.path.str() | ||
104 | endfunction | ||
105 | |||
106 | " FUNCTION: TreeFileNode.findNode(path) {{{1 | ||
107 | " Returns self if this node.path.Equals the given path. | ||
108 | " Returns {} if not equal. | ||
109 | " | ||
110 | " Args: | ||
111 | " path: the path object to compare against | ||
112 | function! s:TreeFileNode.findNode(path) | ||
113 | if a:path.equals(self.path) | ||
114 | return self | ||
115 | endif | ||
116 | return {} | ||
117 | endfunction | ||
118 | |||
119 | " FUNCTION: TreeFileNode.findSibling(direction) {{{1 | ||
120 | " Find the next or previous sibling of this node. | ||
121 | " | ||
122 | " Args: | ||
123 | " direction: 0 for previous, 1 for next | ||
124 | " | ||
125 | " Return: | ||
126 | " The next/previous TreeFileNode object or an empty dictionary if not found. | ||
127 | function! s:TreeFileNode.findSibling(direction) | ||
128 | |||
129 | " There can be no siblings if there is no parent. | ||
130 | if empty(self.parent) | ||
131 | return {} | ||
132 | endif | ||
133 | |||
134 | let l:nodeIndex = self.parent.getChildIndex(self.path) | ||
135 | |||
136 | if l:nodeIndex == -1 | ||
137 | return {} | ||
138 | endif | ||
139 | |||
140 | " Get the next index to begin the search. | ||
141 | let l:nodeIndex += a:direction ? 1 : -1 | ||
142 | |||
143 | while 0 <= l:nodeIndex && l:nodeIndex < self.parent.getChildCount() | ||
144 | |||
145 | " Return the next node if it is not ignored. | ||
146 | if !self.parent.children[l:nodeIndex].path.ignore(self.getNerdtree()) | ||
147 | return self.parent.children[l:nodeIndex] | ||
148 | endif | ||
149 | |||
150 | let l:nodeIndex += a:direction ? 1 : -1 | ||
151 | endwhile | ||
152 | |||
153 | return {} | ||
154 | endfunction | ||
155 | |||
156 | " FUNCTION: TreeFileNode.getNerdtree(){{{1 | ||
157 | function! s:TreeFileNode.getNerdtree() | ||
158 | return self._nerdtree | ||
159 | endfunction | ||
160 | |||
161 | " FUNCTION: TreeFileNode.GetRootForTab(){{{1 | ||
162 | " get the root node for this tab | ||
163 | function! s:TreeFileNode.GetRootForTab() | ||
164 | if g:NERDTree.ExistsForTab() | ||
165 | return getbufvar(t:NERDTreeBufName, 'NERDTree').root | ||
166 | end | ||
167 | return {} | ||
168 | endfunction | ||
169 | |||
170 | " FUNCTION: TreeFileNode.GetSelected() {{{1 | ||
171 | " If the cursor is currently positioned on a tree node, return the node. | ||
172 | " Otherwise, return the empty dictionary. | ||
173 | function! s:TreeFileNode.GetSelected() | ||
174 | |||
175 | try | ||
176 | let l:path = b:NERDTree.ui.getPath(line('.')) | ||
177 | |||
178 | if empty(l:path) | ||
179 | return {} | ||
180 | endif | ||
181 | |||
182 | return b:NERDTree.root.findNode(l:path) | ||
183 | catch | ||
184 | return {} | ||
185 | endtry | ||
186 | endfunction | ||
187 | |||
188 | " FUNCTION: TreeFileNode.isVisible() {{{1 | ||
189 | " returns 1 if this node should be visible according to the tree filters and | ||
190 | " hidden file filters (and their on/off status) | ||
191 | function! s:TreeFileNode.isVisible() | ||
192 | return !self.path.ignore(self.getNerdtree()) | ||
193 | endfunction | ||
194 | |||
195 | " FUNCTION: TreeFileNode.isRoot() {{{1 | ||
196 | function! s:TreeFileNode.isRoot() | ||
197 | if !g:NERDTree.ExistsForBuf() | ||
198 | throw 'NERDTree.NoTreeError: No tree exists for the current buffer' | ||
199 | endif | ||
200 | |||
201 | return self.equals(self.getNerdtree().root) | ||
202 | endfunction | ||
203 | |||
204 | " FUNCTION: TreeFileNode.New(path, nerdtree) {{{1 | ||
205 | " Returns a new TreeNode object with the given path and parent | ||
206 | " | ||
207 | " Args: | ||
208 | " path: file/dir that the node represents | ||
209 | " nerdtree: the tree the node belongs to | ||
210 | function! s:TreeFileNode.New(path, nerdtree) | ||
211 | if a:path.isDirectory | ||
212 | return g:NERDTreeDirNode.New(a:path, a:nerdtree) | ||
213 | else | ||
214 | let newTreeNode = copy(self) | ||
215 | let newTreeNode.path = a:path | ||
216 | let newTreeNode.parent = {} | ||
217 | let newTreeNode._nerdtree = a:nerdtree | ||
218 | return newTreeNode | ||
219 | endif | ||
220 | endfunction | ||
221 | |||
222 | " FUNCTION: TreeFileNode.open() {{{1 | ||
223 | function! s:TreeFileNode.open(...) | ||
224 | let opts = a:0 ? a:1 : {} | ||
225 | let opener = g:NERDTreeOpener.New(self.path, opts) | ||
226 | call opener.open(self) | ||
227 | endfunction | ||
228 | |||
229 | " FUNCTION: TreeFileNode.openSplit() {{{1 | ||
230 | " Open this node in a new window | ||
231 | function! s:TreeFileNode.openSplit() | ||
232 | call nerdtree#deprecated('TreeFileNode.openSplit', 'is deprecated, use .open() instead.') | ||
233 | call self.open({'where': 'h'}) | ||
234 | endfunction | ||
235 | |||
236 | " FUNCTION: TreeFileNode.openVSplit() {{{1 | ||
237 | " Open this node in a new vertical window | ||
238 | function! s:TreeFileNode.openVSplit() | ||
239 | call nerdtree#deprecated('TreeFileNode.openVSplit', 'is deprecated, use .open() instead.') | ||
240 | call self.open({'where': 'v'}) | ||
241 | endfunction | ||
242 | |||
243 | " FUNCTION: TreeFileNode.openInNewTab(options) {{{1 | ||
244 | function! s:TreeFileNode.openInNewTab(options) | ||
245 | call nerdtree#deprecated('TreeFileNode.openinNewTab', 'is deprecated, use .open() instead.') | ||
246 | call self.open(extend({'where': 't'}, a:options)) | ||
247 | endfunction | ||
248 | |||
249 | " FUNCTION: TreeFileNode.openExplorer() | ||
250 | function! s:TreeFileNode.openExplorer() | ||
251 | execute 'wincmd p' | ||
252 | execute 'edit '.self.path.getParent().str({'format':'Edit'}) | ||
253 | endfunction | ||
254 | |||
255 | " FUNCTION: TreeFileNode.putCursorHere(isJump, recurseUpward){{{1 | ||
256 | " Places the cursor on the line number this node is rendered on | ||
257 | " | ||
258 | " Args: | ||
259 | " isJump: 1 if this cursor movement should be counted as a jump by vim | ||
260 | " recurseUpward: try to put the cursor on the parent if the this node isnt | ||
261 | " visible | ||
262 | function! s:TreeFileNode.putCursorHere(isJump, recurseUpward) | ||
263 | let ln = self.getNerdtree().ui.getLineNum(self) | ||
264 | if ln != -1 | ||
265 | if a:isJump | ||
266 | mark ' | ||
267 | endif | ||
268 | call cursor(ln, col('.')) | ||
269 | else | ||
270 | if a:recurseUpward | ||
271 | let node = self | ||
272 | while node != {} && self.getNerdtree().ui.getLineNum(node) ==# -1 | ||
273 | let node = node.parent | ||
274 | call node.open() | ||
275 | endwhile | ||
276 | call self._nerdtree.render() | ||
277 | call node.putCursorHere(a:isJump, 0) | ||
278 | endif | ||
279 | endif | ||
280 | endfunction | ||
281 | |||
282 | " FUNCTION: TreeFileNode.refresh() {{{1 | ||
283 | function! s:TreeFileNode.refresh() | ||
284 | call self.path.refresh(self.getNerdtree()) | ||
285 | endfunction | ||
286 | |||
287 | " FUNCTION: TreeFileNode.refreshFlags() {{{1 | ||
288 | function! s:TreeFileNode.refreshFlags() | ||
289 | call self.path.refreshFlags(self.getNerdtree()) | ||
290 | endfunction | ||
291 | |||
292 | " FUNCTION: TreeFileNode.rename() {{{1 | ||
293 | " Calls the rename method for this nodes path obj | ||
294 | function! s:TreeFileNode.rename(newName) | ||
295 | let newName = substitute(a:newName, '\(\\\|\/\)$', '', '') | ||
296 | call self.path.rename(newName) | ||
297 | call self.parent.removeChild(self) | ||
298 | |||
299 | let parentPath = self.path.getParent() | ||
300 | let newParent = self.getNerdtree().root.findNode(parentPath) | ||
301 | |||
302 | if newParent != {} | ||
303 | call newParent.createChild(self.path, 1) | ||
304 | call newParent.refresh() | ||
305 | endif | ||
306 | endfunction | ||
307 | |||
308 | " FUNCTION: TreeFileNode.renderToString {{{1 | ||
309 | " returns a string representation for this tree to be rendered in the view | ||
310 | function! s:TreeFileNode.renderToString() | ||
311 | return self._renderToString(0, 0) | ||
312 | endfunction | ||
313 | |||
314 | " Args: | ||
315 | " depth: the current depth in the tree for this call | ||
316 | " drawText: 1 if we should actually draw the line for this node (if 0 then the | ||
317 | " child nodes are rendered only) | ||
318 | " for each depth in the tree | ||
319 | function! s:TreeFileNode._renderToString(depth, drawText) | ||
320 | let output = '' | ||
321 | if a:drawText ==# 1 | ||
322 | |||
323 | let treeParts = repeat(' ', a:depth - 1) | ||
324 | let treeParts .= (self.path.isDirectory || g:NERDTreeDirArrowExpandable ==# '' ? '' : ' ') | ||
325 | |||
326 | let line = treeParts . self.displayString() | ||
327 | let output = output . line . "\n" | ||
328 | endif | ||
329 | |||
330 | " if the node is an open dir, draw its children | ||
331 | if self.path.isDirectory ==# 1 && self.isOpen ==# 1 | ||
332 | |||
333 | let childNodesToDraw = self.getVisibleChildren() | ||
334 | |||
335 | if self.isCascadable() && a:depth > 0 | ||
336 | |||
337 | let output = output . childNodesToDraw[0]._renderToString(a:depth, 0) | ||
338 | |||
339 | elseif len(childNodesToDraw) > 0 | ||
340 | for i in childNodesToDraw | ||
341 | let output = output . i._renderToString(a:depth + 1, 1) | ||
342 | endfor | ||
343 | endif | ||
344 | endif | ||
345 | |||
346 | return output | ||
347 | endfunction | ||
348 | |||
349 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/lib/nerdtree/ui.vim b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/ui.vim new file mode 100644 index 0000000..a481ba4 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/lib/nerdtree/ui.vim | |||
@@ -0,0 +1,532 @@ | |||
1 | " ============================================================================ | ||
2 | " CLASS: UI | ||
3 | " ============================================================================ | ||
4 | |||
5 | |||
6 | let s:UI = {} | ||
7 | let g:NERDTreeUI = s:UI | ||
8 | |||
9 | " FUNCTION: s:UI.centerView() {{{1 | ||
10 | " centers the nerd tree window around the cursor (provided the nerd tree | ||
11 | " options permit) | ||
12 | function! s:UI.centerView() | ||
13 | if g:NERDTreeAutoCenter | ||
14 | let current_line = winline() | ||
15 | let lines_to_top = current_line | ||
16 | let lines_to_bottom = winheight(g:NERDTree.GetWinNum()) - current_line | ||
17 | if lines_to_top < g:NERDTreeAutoCenterThreshold || lines_to_bottom < g:NERDTreeAutoCenterThreshold | ||
18 | normal! zz | ||
19 | endif | ||
20 | endif | ||
21 | endfunction | ||
22 | |||
23 | " FUNCTION: s:UI._dumpHelp {{{1 | ||
24 | " prints out the quick help | ||
25 | function! s:UI._dumpHelp() | ||
26 | if self.getShowHelp() | ||
27 | let help = "\" NERDTree (" . nerdtree#version() . ") quickhelp~\n" | ||
28 | let help .= "\" ============================\n" | ||
29 | let help .= "\" File node mappings~\n" | ||
30 | let help .= '" '. (g:NERDTreeMouseMode ==# 3 ? 'single' : 'double') ."-click,\n" | ||
31 | if self.nerdtree.isTabTree() | ||
32 | let help .= '" '. g:NERDTreeMapActivateNode .": open in prev window\n" | ||
33 | else | ||
34 | let help .= '" '. g:NERDTreeMapActivateNode .": open in current window\n" | ||
35 | endif | ||
36 | if self.nerdtree.isTabTree() | ||
37 | let help .= '" '. g:NERDTreeMapPreview .": preview\n" | ||
38 | endif | ||
39 | let help .= '" '. g:NERDTreeMapOpenInTab.": open in new tab\n" | ||
40 | let help .= '" '. g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" | ||
41 | let help .= "\" middle-click,\n" | ||
42 | let help .= '" '. g:NERDTreeMapOpenSplit .": open split\n" | ||
43 | let help .= '" '. g:NERDTreeMapPreviewSplit .": preview split\n" | ||
44 | let help .= '" '. g:NERDTreeMapOpenVSplit .": open vsplit\n" | ||
45 | let help .= '" '. g:NERDTreeMapPreviewVSplit .": preview vsplit\n" | ||
46 | let help .= '" '. g:NERDTreeMapCustomOpen .": custom open\n" | ||
47 | |||
48 | let help .= "\"\n\" ----------------------------\n" | ||
49 | let help .= "\" Directory node mappings~\n" | ||
50 | let help .= '" '. (g:NERDTreeMouseMode ==# 1 ? 'double' : 'single') ."-click,\n" | ||
51 | let help .= '" '. g:NERDTreeMapActivateNode .": open & close node\n" | ||
52 | let help .= '" '. g:NERDTreeMapOpenRecursively .": recursively open node\n" | ||
53 | let help .= '" '. g:NERDTreeMapOpenInTab.": open in new tab\n" | ||
54 | let help .= '" '. g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" | ||
55 | let help .= '" '. g:NERDTreeMapCustomOpen .": custom open\n" | ||
56 | let help .= '" '. g:NERDTreeMapCloseDir .": close parent of node\n" | ||
57 | let help .= '" '. g:NERDTreeMapCloseChildren .": close all child nodes of\n" | ||
58 | let help .= "\" current node recursively\n" | ||
59 | let help .= "\" middle-click,\n" | ||
60 | let help .= '" '. g:NERDTreeMapOpenExpl.": explore selected dir\n" | ||
61 | |||
62 | let help .= "\"\n\" ----------------------------\n" | ||
63 | let help .= "\" Bookmark table mappings~\n" | ||
64 | let help .= "\" double-click,\n" | ||
65 | let help .= '" '. g:NERDTreeMapActivateNode .": open bookmark\n" | ||
66 | let help .= '" '. g:NERDTreeMapPreview .": preview file\n" | ||
67 | let help .= '" '. g:NERDTreeMapPreview .": find dir in tree\n" | ||
68 | let help .= '" '. g:NERDTreeMapOpenInTab.": open in new tab\n" | ||
69 | let help .= '" '. g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" | ||
70 | let help .= '" '. g:NERDTreeMapOpenSplit .": open split\n" | ||
71 | let help .= '" '. g:NERDTreeMapPreviewSplit .": preview split\n" | ||
72 | let help .= '" '. g:NERDTreeMapOpenVSplit .": open vsplit\n" | ||
73 | let help .= '" '. g:NERDTreeMapPreviewVSplit .": preview vsplit\n" | ||
74 | let help .= '" '. g:NERDTreeMapCustomOpen .": custom open\n" | ||
75 | let help .= '" '. g:NERDTreeMapDeleteBookmark .": delete bookmark\n" | ||
76 | |||
77 | let help .= "\"\n\" ----------------------------\n" | ||
78 | let help .= "\" Tree navigation mappings~\n" | ||
79 | let help .= '" '. g:NERDTreeMapJumpRoot .": go to root\n" | ||
80 | let help .= '" '. g:NERDTreeMapJumpParent .": go to parent\n" | ||
81 | let help .= '" '. g:NERDTreeMapJumpFirstChild .": go to first child\n" | ||
82 | let help .= '" '. g:NERDTreeMapJumpLastChild .": go to last child\n" | ||
83 | let help .= '" '. g:NERDTreeMapJumpNextSibling .": go to next sibling\n" | ||
84 | let help .= '" '. g:NERDTreeMapJumpPrevSibling .": go to prev sibling\n" | ||
85 | |||
86 | let help .= "\"\n\" ----------------------------\n" | ||
87 | let help .= "\" Filesystem mappings~\n" | ||
88 | let help .= '" '. g:NERDTreeMapChangeRoot .": change tree root to the\n" | ||
89 | let help .= "\" selected dir\n" | ||
90 | let help .= '" '. g:NERDTreeMapUpdir .": move tree root up a dir\n" | ||
91 | let help .= '" '. g:NERDTreeMapUpdirKeepOpen .": move tree root up a dir\n" | ||
92 | let help .= "\" but leave old root open\n" | ||
93 | let help .= '" '. g:NERDTreeMapRefresh .": refresh cursor dir\n" | ||
94 | let help .= '" '. g:NERDTreeMapRefreshRoot .": refresh current root\n" | ||
95 | let help .= '" '. g:NERDTreeMapMenu .": Show menu\n" | ||
96 | let help .= '" '. g:NERDTreeMapChdir .":change the CWD to the\n" | ||
97 | let help .= "\" selected dir\n" | ||
98 | let help .= '" '. g:NERDTreeMapCWD .":change tree root to CWD\n" | ||
99 | |||
100 | let help .= "\"\n\" ----------------------------\n" | ||
101 | let help .= "\" Tree filtering mappings~\n" | ||
102 | let help .= '" '. g:NERDTreeMapToggleHidden .': hidden files (' . (self.getShowHidden() ? 'on' : 'off') . ")\n" | ||
103 | let help .= '" '. g:NERDTreeMapToggleFilters .': file filters (' . (self.isIgnoreFilterEnabled() ? 'on' : 'off') . ")\n" | ||
104 | let help .= '" '. g:NERDTreeMapToggleFiles .': files (' . (self.getShowFiles() ? 'on' : 'off') . ")\n" | ||
105 | let help .= '" '. g:NERDTreeMapToggleBookmarks .': bookmarks (' . (self.getShowBookmarks() ? 'on' : 'off') . ")\n" | ||
106 | |||
107 | " add quickhelp entries for each custom key map | ||
108 | let help .= "\"\n\" ----------------------------\n" | ||
109 | let help .= "\" Custom mappings~\n" | ||
110 | for i in g:NERDTreeKeyMap.All() | ||
111 | if !empty(i.quickhelpText) | ||
112 | let help .= '" '. i.key .': '. i.quickhelpText ."\n" | ||
113 | endif | ||
114 | endfor | ||
115 | |||
116 | let help .= "\"\n\" ----------------------------\n" | ||
117 | let help .= "\" Other mappings~\n" | ||
118 | let help .= '" '. g:NERDTreeMapQuit .": Close the NERDTree window\n" | ||
119 | let help .= '" '. g:NERDTreeMapToggleZoom .": Zoom (maximize-minimize)\n" | ||
120 | let help .= "\" the NERDTree window\n" | ||
121 | let help .= '" '. g:NERDTreeMapHelp .": toggle help\n" | ||
122 | let help .= "\"\n\" ----------------------------\n" | ||
123 | let help .= "\" Bookmark commands~\n" | ||
124 | let help .= "\" :Bookmark [<name>]\n" | ||
125 | let help .= "\" :BookmarkToRoot <name>\n" | ||
126 | let help .= "\" :RevealBookmark <name>\n" | ||
127 | let help .= "\" :OpenBookmark <name>\n" | ||
128 | let help .= "\" :ClearBookmarks [<names>]\n" | ||
129 | let help .= "\" :ClearAllBookmarks\n" | ||
130 | let help .= "\" :ReadBookmarks\n" | ||
131 | let help .= "\" :WriteBookmarks\n" | ||
132 | let help .= "\" :EditBookmarks\n" | ||
133 | silent! put =help | ||
134 | elseif !self.isMinimal() | ||
135 | let help ='" Press '. g:NERDTreeMapHelp ." for help\n" | ||
136 | silent! put =help | ||
137 | endif | ||
138 | endfunction | ||
139 | |||
140 | |||
141 | " FUNCTION: s:UI.new(nerdtree) {{{1 | ||
142 | function! s:UI.New(nerdtree) | ||
143 | let newObj = copy(self) | ||
144 | let newObj.nerdtree = a:nerdtree | ||
145 | let newObj._showHelp = 0 | ||
146 | let newObj._ignoreEnabled = 1 | ||
147 | let newObj._showFiles = g:NERDTreeShowFiles | ||
148 | let newObj._showHidden = g:NERDTreeShowHidden | ||
149 | let newObj._showBookmarks = g:NERDTreeShowBookmarks | ||
150 | |||
151 | return newObj | ||
152 | endfunction | ||
153 | |||
154 | " FUNCTION: s:UI.getPath(ln) {{{1 | ||
155 | " Return the Path object for the node that is rendered on the given line | ||
156 | " number. If the 'up a dir' line is selected, return the Path object for | ||
157 | " the parent of the root. Return the empty dictionary if the given line | ||
158 | " does not reference a tree node. | ||
159 | function! s:UI.getPath(ln) | ||
160 | let line = getline(a:ln) | ||
161 | |||
162 | let rootLine = self.getRootLineNum() | ||
163 | |||
164 | if a:ln ==# rootLine | ||
165 | return self.nerdtree.root.path | ||
166 | endif | ||
167 | |||
168 | if line ==# s:UI.UpDirLine() | ||
169 | return self.nerdtree.root.path.getParent() | ||
170 | endif | ||
171 | |||
172 | if a:ln < rootLine | ||
173 | return {} | ||
174 | endif | ||
175 | |||
176 | let indent = self._indentLevelFor(line) | ||
177 | |||
178 | " remove the tree parts and the leading space | ||
179 | let curFile = self._stripMarkup(line) | ||
180 | |||
181 | let dir = '' | ||
182 | let lnum = a:ln | ||
183 | while lnum > 0 | ||
184 | let lnum = lnum - 1 | ||
185 | let curLine = getline(lnum) | ||
186 | let curLineStripped = self._stripMarkup(curLine) | ||
187 | |||
188 | " have we reached the top of the tree? | ||
189 | if lnum ==# rootLine | ||
190 | let dir = self.nerdtree.root.path.str({'format': 'UI'}) . dir | ||
191 | break | ||
192 | endif | ||
193 | if curLineStripped =~# '/$' | ||
194 | let lpindent = self._indentLevelFor(curLine) | ||
195 | if lpindent < indent | ||
196 | let indent = indent - 1 | ||
197 | |||
198 | let dir = substitute (curLineStripped,'^\\', '', '') . dir | ||
199 | continue | ||
200 | endif | ||
201 | endif | ||
202 | endwhile | ||
203 | let curFile = self.nerdtree.root.path.drive . dir . curFile | ||
204 | let toReturn = g:NERDTreePath.New(curFile) | ||
205 | return toReturn | ||
206 | endfunction | ||
207 | |||
208 | " FUNCTION: s:UI.getLineNum(node) {{{1 | ||
209 | " Return the line number where the given node is rendered. Return -1 if the | ||
210 | " given node is not visible. | ||
211 | function! s:UI.getLineNum(node) | ||
212 | |||
213 | if a:node.isRoot() | ||
214 | return self.getRootLineNum() | ||
215 | endif | ||
216 | |||
217 | let l:pathComponents = [substitute(self.nerdtree.root.path.str({'format': 'UI'}), '/\s*$', '', '')] | ||
218 | let l:currentPathComponent = 1 | ||
219 | |||
220 | let l:fullPath = a:node.path.str({'format': 'UI'}) | ||
221 | |||
222 | for l:lineNumber in range(self.getRootLineNum() + 1, line('$')) | ||
223 | let l:currentLine = getline(l:lineNumber) | ||
224 | let l:indentLevel = self._indentLevelFor(l:currentLine) | ||
225 | |||
226 | if l:indentLevel !=# l:currentPathComponent | ||
227 | continue | ||
228 | endif | ||
229 | |||
230 | let l:currentLine = self._stripMarkup(l:currentLine) | ||
231 | let l:currentPath = join(l:pathComponents, '/') . '/' . l:currentLine | ||
232 | |||
233 | " Directories: If the current path 'starts with' the full path, then | ||
234 | " either the paths are equal or the line is a cascade containing the | ||
235 | " full path. | ||
236 | if l:fullPath[-1:] ==# '/' && stridx(l:currentPath, l:fullPath) ==# 0 | ||
237 | return l:lineNumber | ||
238 | endif | ||
239 | |||
240 | " Files: The paths must exactly match. | ||
241 | if l:fullPath ==# l:currentPath | ||
242 | return l:lineNumber | ||
243 | endif | ||
244 | |||
245 | " Otherwise: If the full path starts with the current path and the | ||
246 | " current path is a directory, we add a new path component. | ||
247 | if stridx(l:fullPath, l:currentPath) ==# 0 && l:currentPath[-1:] ==# '/' | ||
248 | let l:currentLine = substitute(l:currentLine, '/\s*$', '', '') | ||
249 | call add(l:pathComponents, l:currentLine) | ||
250 | let l:currentPathComponent += 1 | ||
251 | endif | ||
252 | endfor | ||
253 | |||
254 | return -1 | ||
255 | endfunction | ||
256 | |||
257 | " FUNCTION: s:UI.getRootLineNum(){{{1 | ||
258 | " gets the line number of the root node | ||
259 | function! s:UI.getRootLineNum() | ||
260 | let rootLine = 1 | ||
261 | while rootLine <= line('$') && getline(rootLine) !~# '^\(/\|<\)' | ||
262 | let rootLine = rootLine + 1 | ||
263 | endwhile | ||
264 | return rootLine | ||
265 | endfunction | ||
266 | |||
267 | " FUNCTION: s:UI.getShowBookmarks() {{{1 | ||
268 | function! s:UI.getShowBookmarks() | ||
269 | return self._showBookmarks | ||
270 | endfunction | ||
271 | |||
272 | " FUNCTION: s:UI.getShowFiles() {{{1 | ||
273 | function! s:UI.getShowFiles() | ||
274 | return self._showFiles | ||
275 | endfunction | ||
276 | |||
277 | " FUNCTION: s:UI.getShowHelp() {{{1 | ||
278 | function! s:UI.getShowHelp() | ||
279 | return self._showHelp | ||
280 | endfunction | ||
281 | |||
282 | " FUNCTION: s:UI.getShowHidden() {{{1 | ||
283 | function! s:UI.getShowHidden() | ||
284 | return self._showHidden | ||
285 | endfunction | ||
286 | |||
287 | " FUNCTION: s:UI._indentLevelFor(line) {{{1 | ||
288 | function! s:UI._indentLevelFor(line) | ||
289 | " Replace multi-character DirArrows with a single space so the | ||
290 | " indentation calculation doesn't get messed up. | ||
291 | if g:NERDTreeDirArrowExpandable ==# '' | ||
292 | let l:line = ' '.a:line | ||
293 | else | ||
294 | let l:line = substitute(substitute(a:line, '\V'.g:NERDTreeDirArrowExpandable, ' ', ''), '\V'.g:NERDTreeDirArrowCollapsible, ' ', '') | ||
295 | endif | ||
296 | let leadChars = match(l:line, '\M\[^ ]') | ||
297 | return leadChars / s:UI.IndentWid() | ||
298 | endfunction | ||
299 | |||
300 | " FUNCTION: s:UI.IndentWid() {{{1 | ||
301 | function! s:UI.IndentWid() | ||
302 | return 2 | ||
303 | endfunction | ||
304 | |||
305 | " FUNCTION: s:UI.isIgnoreFilterEnabled() {{{1 | ||
306 | function! s:UI.isIgnoreFilterEnabled() | ||
307 | return self._ignoreEnabled ==# 1 | ||
308 | endfunction | ||
309 | |||
310 | " FUNCTION: s:UI.isMinimal() {{{1 | ||
311 | function! s:UI.isMinimal() | ||
312 | return g:NERDTreeMinimalUI | ||
313 | endfunction | ||
314 | |||
315 | " FUNCTION: s:UI.MarkupReg() {{{1 | ||
316 | function! s:UI.MarkupReg() | ||
317 | return '^ *['.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.']\? ' | ||
318 | endfunction | ||
319 | |||
320 | " FUNCTION: s:UI._renderBookmarks {{{1 | ||
321 | function! s:UI._renderBookmarks() | ||
322 | |||
323 | if !self.isMinimal() | ||
324 | call setline(line('.')+1, '>----------Bookmarks----------') | ||
325 | call cursor(line('.')+1, col('.')) | ||
326 | endif | ||
327 | |||
328 | if g:NERDTreeBookmarksSort ==# 1 || g:NERDTreeBookmarksSort ==# 2 | ||
329 | call g:NERDTreeBookmark.SortBookmarksList() | ||
330 | endif | ||
331 | |||
332 | for i in g:NERDTreeBookmark.Bookmarks() | ||
333 | call setline(line('.')+1, i.str()) | ||
334 | call cursor(line('.')+1, col('.')) | ||
335 | endfor | ||
336 | |||
337 | call setline(line('.')+1, '') | ||
338 | call cursor(line('.')+1, col('.')) | ||
339 | endfunction | ||
340 | |||
341 | " FUNCTION: s:UI.restoreScreenState() {{{1 | ||
342 | " | ||
343 | " Sets the screen state back to what it was when nerdtree#saveScreenState was last | ||
344 | " called. | ||
345 | " | ||
346 | " Assumes the cursor is in the NERDTree window | ||
347 | function! s:UI.restoreScreenState() | ||
348 | if !has_key(self, '_screenState') | ||
349 | return | ||
350 | endif | ||
351 | call nerdtree#exec('silent vertical resize ' . self._screenState['oldWindowSize'], 1) | ||
352 | |||
353 | let old_scrolloff=&scrolloff | ||
354 | let &scrolloff=0 | ||
355 | call cursor(self._screenState['oldTopLine'], 0) | ||
356 | normal! zt | ||
357 | call setpos('.', self._screenState['oldPos']) | ||
358 | let &scrolloff=old_scrolloff | ||
359 | endfunction | ||
360 | |||
361 | " FUNCTION: s:UI.saveScreenState() {{{1 | ||
362 | " Saves the current cursor position in the current buffer and the window | ||
363 | " scroll position | ||
364 | function! s:UI.saveScreenState() | ||
365 | let win = winnr() | ||
366 | let self._screenState = {} | ||
367 | try | ||
368 | call g:NERDTree.CursorToTreeWin() | ||
369 | let self._screenState['oldPos'] = getpos('.') | ||
370 | let self._screenState['oldTopLine'] = line('w0') | ||
371 | let self._screenState['oldWindowSize'] = winnr('$')==1 ? g:NERDTreeWinSize : winwidth('') | ||
372 | call nerdtree#exec(win . 'wincmd w', 1) | ||
373 | catch | ||
374 | endtry | ||
375 | endfunction | ||
376 | |||
377 | " FUNCTION: s:UI.setShowHidden(val) {{{1 | ||
378 | function! s:UI.setShowHidden(val) | ||
379 | let self._showHidden = a:val | ||
380 | endfunction | ||
381 | |||
382 | " FUNCTION: s:UI._stripMarkup(line){{{1 | ||
383 | " find the filename in the given line, and return it. | ||
384 | " | ||
385 | " Args: | ||
386 | " line: the subject line | ||
387 | function! s:UI._stripMarkup(line) | ||
388 | let l:line = substitute(a:line, '^.\{-}' . g:NERDTreeNodeDelimiter, '', '') | ||
389 | return substitute(l:line, g:NERDTreeNodeDelimiter.'.*$', '', '') | ||
390 | endfunction | ||
391 | |||
392 | " FUNCTION: s:UI.render() {{{1 | ||
393 | function! s:UI.render() | ||
394 | setlocal noreadonly modifiable | ||
395 | |||
396 | " remember the top line of the buffer and the current line so we can | ||
397 | " restore the view exactly how it was | ||
398 | let curLine = line('.') | ||
399 | let curCol = col('.') | ||
400 | let topLine = line('w0') | ||
401 | |||
402 | " delete all lines in the buffer (being careful not to clobber a register) | ||
403 | silent 1,$delete _ | ||
404 | |||
405 | call self._dumpHelp() | ||
406 | |||
407 | " delete the blank line before the help and add one after it | ||
408 | if !self.isMinimal() | ||
409 | call setline(line('.')+1, '') | ||
410 | call cursor(line('.')+1, col('.')) | ||
411 | endif | ||
412 | |||
413 | if self.getShowBookmarks() | ||
414 | call self._renderBookmarks() | ||
415 | endif | ||
416 | |||
417 | " add the 'up a dir' line | ||
418 | if !self.isMinimal() | ||
419 | call setline(line('.')+1, s:UI.UpDirLine()) | ||
420 | call cursor(line('.')+1, col('.')) | ||
421 | endif | ||
422 | |||
423 | " draw the header line | ||
424 | let header = self.nerdtree.root.path.str({'format': 'UI', 'truncateTo': winwidth(0)}) | ||
425 | call setline(line('.')+1, header) | ||
426 | call cursor(line('.')+1, col('.')) | ||
427 | |||
428 | " draw the tree | ||
429 | silent put =self.nerdtree.root.renderToString() | ||
430 | |||
431 | " delete the blank line at the top of the buffer | ||
432 | silent 1,1delete _ | ||
433 | |||
434 | " restore the view | ||
435 | let old_scrolloff=&scrolloff | ||
436 | let &scrolloff=0 | ||
437 | call cursor(topLine, 1) | ||
438 | normal! zt | ||
439 | call cursor(curLine, curCol) | ||
440 | let &scrolloff = old_scrolloff | ||
441 | |||
442 | setlocal readonly nomodifiable | ||
443 | endfunction | ||
444 | |||
445 | |||
446 | " FUNCTION: UI.renderViewSavingPosition {{{1 | ||
447 | " Renders the tree and ensures the cursor stays on the current node or the | ||
448 | " current nodes parent if it is no longer available upon re-rendering | ||
449 | function! s:UI.renderViewSavingPosition() | ||
450 | let currentNode = g:NERDTreeFileNode.GetSelected() | ||
451 | |||
452 | " go up the tree till we find a node that will be visible or till we run | ||
453 | " out of nodes | ||
454 | while currentNode !=# {} && !currentNode.isVisible() && !currentNode.isRoot() | ||
455 | let currentNode = currentNode.parent | ||
456 | endwhile | ||
457 | |||
458 | call self.render() | ||
459 | |||
460 | if currentNode !=# {} | ||
461 | call currentNode.putCursorHere(0, 0) | ||
462 | endif | ||
463 | endfunction | ||
464 | |||
465 | " FUNCTION: s:UI.toggleHelp() {{{1 | ||
466 | function! s:UI.toggleHelp() | ||
467 | let self._showHelp = !self._showHelp | ||
468 | endfunction | ||
469 | |||
470 | " FUNCTION: s:UI.toggleIgnoreFilter() {{{1 | ||
471 | " toggles the use of the NERDTreeIgnore option | ||
472 | function! s:UI.toggleIgnoreFilter() | ||
473 | let self._ignoreEnabled = !self._ignoreEnabled | ||
474 | call self.renderViewSavingPosition() | ||
475 | call self.centerView() | ||
476 | endfunction | ||
477 | |||
478 | " FUNCTION: s:UI.toggleShowBookmarks() {{{1 | ||
479 | " Toggle the visibility of the Bookmark table. | ||
480 | function! s:UI.toggleShowBookmarks() | ||
481 | let self._showBookmarks = !self._showBookmarks | ||
482 | |||
483 | if self.getShowBookmarks() | ||
484 | call self.nerdtree.render() | ||
485 | call g:NERDTree.CursorToBookmarkTable() | ||
486 | else | ||
487 | |||
488 | if empty(g:NERDTreeFileNode.GetSelected()) | ||
489 | call b:NERDTree.root.putCursorHere(0, 0) | ||
490 | normal! 0 | ||
491 | endif | ||
492 | |||
493 | call self.renderViewSavingPosition() | ||
494 | endif | ||
495 | |||
496 | call self.centerView() | ||
497 | endfunction | ||
498 | |||
499 | " FUNCTION: s:UI.toggleShowFiles() {{{1 | ||
500 | " toggles the display of hidden files | ||
501 | function! s:UI.toggleShowFiles() | ||
502 | let self._showFiles = !self._showFiles | ||
503 | call self.renderViewSavingPosition() | ||
504 | call self.centerView() | ||
505 | endfunction | ||
506 | |||
507 | " FUNCTION: s:UI.toggleShowHidden() {{{1 | ||
508 | " toggles the display of hidden files | ||
509 | function! s:UI.toggleShowHidden() | ||
510 | let self._showHidden = !self._showHidden | ||
511 | call self.renderViewSavingPosition() | ||
512 | call self.centerView() | ||
513 | endfunction | ||
514 | |||
515 | " FUNCTION: s:UI.toggleZoom() {{{1 | ||
516 | " zoom (maximize/minimize) the NERDTree window | ||
517 | function! s:UI.toggleZoom() | ||
518 | if exists('b:NERDTreeZoomed') && b:NERDTreeZoomed | ||
519 | call nerdtree#exec('silent vertical resize '. g:NERDTreeWinSize, 1) | ||
520 | let b:NERDTreeZoomed = 0 | ||
521 | else | ||
522 | call nerdtree#exec('vertical resize '. get(g:, 'NERDTreeWinSizeMax', ''), 1) | ||
523 | let b:NERDTreeZoomed = 1 | ||
524 | endif | ||
525 | endfunction | ||
526 | |||
527 | " FUNCTION: s:UI.UpDirLine() {{{1 | ||
528 | function! s:UI.UpDirLine() | ||
529 | return '.. (up a dir)' | ||
530 | endfunction | ||
531 | |||
532 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/exec_menuitem.vim b/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/exec_menuitem.vim new file mode 100644 index 0000000..fb6c486 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/exec_menuitem.vim | |||
@@ -0,0 +1,40 @@ | |||
1 | " ============================================================================ | ||
2 | " File: exec_menuitem.vim | ||
3 | " Description: plugin for NERD Tree that provides an execute file menu item | ||
4 | " Maintainer: Martin Grenfell <martin.grenfell at gmail dot com> | ||
5 | " License: This program is free software. It comes without any warranty, | ||
6 | " to the extent permitted by applicable law. You can redistribute | ||
7 | " it and/or modify it under the terms of the Do What The Fuck You | ||
8 | " Want To Public License, Version 2, as published by Sam Hocevar. | ||
9 | " See http://sam.zoy.org/wtfpl/COPYING for more details. | ||
10 | " | ||
11 | " ============================================================================ | ||
12 | if exists('g:loaded_nerdtree_exec_menuitem') | ||
13 | finish | ||
14 | endif | ||
15 | let g:loaded_nerdtree_exec_menuitem = 1 | ||
16 | |||
17 | call NERDTreeAddMenuItem({ | ||
18 | \ 'text': '(!)Execute file', | ||
19 | \ 'shortcut': '!', | ||
20 | \ 'callback': 'NERDTreeExecFile', | ||
21 | \ 'isActiveCallback': 'NERDTreeExecFileActive' }) | ||
22 | |||
23 | function! NERDTreeExecFileActive() | ||
24 | let node = g:NERDTreeFileNode.GetSelected() | ||
25 | return !node.path.isDirectory && node.path.isExecutable | ||
26 | endfunction | ||
27 | |||
28 | function! NERDTreeExecFile() | ||
29 | let treenode = g:NERDTreeFileNode.GetSelected() | ||
30 | echo "==========================================================\n" | ||
31 | echo "Complete the command to execute (add arguments etc):\n" | ||
32 | let cmd = treenode.path.str({'escape': 1}) | ||
33 | let cmd = input(':!', cmd . ' ') | ||
34 | |||
35 | if cmd !=# '' | ||
36 | exec ':!' . cmd | ||
37 | else | ||
38 | echo 'Aborted' | ||
39 | endif | ||
40 | endfunction | ||
diff --git a/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/fs_menu.vim b/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/fs_menu.vim new file mode 100644 index 0000000..05bee60 --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/fs_menu.vim | |||
@@ -0,0 +1,484 @@ | |||
1 | " ============================================================================ | ||
2 | " File: fs_menu.vim | ||
3 | " Description: plugin for the NERD Tree that provides a file system menu | ||
4 | " Maintainer: Martin Grenfell <martin.grenfell at gmail dot com> | ||
5 | " License: This program is free software. It comes without any warranty, | ||
6 | " to the extent permitted by applicable law. You can redistribute | ||
7 | " it and/or modify it under the terms of the Do What The Fuck You | ||
8 | " Want To Public License, Version 2, as published by Sam Hocevar. | ||
9 | " See http://sam.zoy.org/wtfpl/COPYING for more details. | ||
10 | " | ||
11 | " ============================================================================ | ||
12 | if exists('g:loaded_nerdtree_fs_menu') | ||
13 | finish | ||
14 | endif | ||
15 | let g:loaded_nerdtree_fs_menu = 1 | ||
16 | |||
17 | "Automatically delete the buffer after deleting or renaming a file | ||
18 | if !exists('g:NERDTreeAutoDeleteBuffer') | ||
19 | let g:NERDTreeAutoDeleteBuffer = 0 | ||
20 | endif | ||
21 | |||
22 | call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'}) | ||
23 | call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'}) | ||
24 | call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'}) | ||
25 | |||
26 | if has('gui_mac') || has('gui_macvim') || has('mac') | ||
27 | call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'}) | ||
28 | call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'}) | ||
29 | call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'}) | ||
30 | endif | ||
31 | |||
32 | if executable('xdg-open') | ||
33 | call NERDTreeAddMenuItem({'text': '(r)eveal the current node in file manager', 'shortcut': 'r', 'callback': 'NERDTreeRevealFileLinux'}) | ||
34 | call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFileLinux'}) | ||
35 | endif | ||
36 | |||
37 | if nerdtree#runningWindows() | ||
38 | call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFileWindows'}) | ||
39 | endif | ||
40 | |||
41 | if g:NERDTreePath.CopyingSupported() | ||
42 | call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'}) | ||
43 | endif | ||
44 | call NERDTreeAddMenuItem({'text': (has('clipboard')?'copy (p)ath to clipboard':'print (p)ath to screen'), 'shortcut': 'p', 'callback': 'NERDTreeCopyPath'}) | ||
45 | |||
46 | if has('unix') || has('osx') | ||
47 | call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNode'}) | ||
48 | else | ||
49 | call NERDTreeAddMenuItem({'text': '(l)ist the current node', 'shortcut': 'l', 'callback': 'NERDTreeListNodeWin32'}) | ||
50 | endif | ||
51 | |||
52 | if exists('*system') | ||
53 | call NERDTreeAddMenuItem({'text': 'Run (s)ystem command in this directory', 'shortcut':'s', 'callback': 'NERDTreeSystemCommand'}) | ||
54 | endif | ||
55 | |||
56 | "FUNCTION: s:inputPrompt(action){{{1 | ||
57 | "returns the string that should be prompted to the user for the given action | ||
58 | " | ||
59 | "Args: | ||
60 | "action: the action that is being performed, e.g. 'delete' | ||
61 | function! s:inputPrompt(action) | ||
62 | if a:action ==# 'add' | ||
63 | let title = 'Add a childnode' | ||
64 | let info = "Enter the dir/file name to be created. Dirs end with a '/'" | ||
65 | let minimal = 'Add node:' | ||
66 | |||
67 | elseif a:action ==# 'copy' | ||
68 | let title = 'Copy the current node' | ||
69 | let info = 'Enter the new path to copy the node to:' | ||
70 | let minimal = 'Copy to:' | ||
71 | |||
72 | elseif a:action ==# 'delete' | ||
73 | let title = 'Delete the current node' | ||
74 | let info = 'Are you sure you wish to delete the node:' | ||
75 | let minimal = 'Delete?' | ||
76 | |||
77 | elseif a:action ==# 'deleteNonEmpty' | ||
78 | let title = 'Delete the current node' | ||
79 | let info = "STOP! Directory is not empty! To delete, type 'yes'" | ||
80 | let minimal = 'Delete directory?' | ||
81 | |||
82 | elseif a:action ==# 'move' | ||
83 | let title = 'Rename the current node' | ||
84 | let info = 'Enter the new path for the node:' | ||
85 | let minimal = 'Move to:' | ||
86 | endif | ||
87 | |||
88 | if g:NERDTreeMenuController.isMinimal() | ||
89 | redraw! " Clear the menu | ||
90 | return minimal . ' ' | ||
91 | else | ||
92 | let divider = '==========================================================' | ||
93 | return title . "\n" . divider . "\n" . info . "\n" | ||
94 | end | ||
95 | endfunction | ||
96 | |||
97 | "FUNCTION: s:promptToDelBuffer(bufnum, msg){{{1 | ||
98 | "prints out the given msg and, if the user responds by pushing 'y' then the | ||
99 | "buffer with the given bufnum is deleted | ||
100 | " | ||
101 | "Args: | ||
102 | "bufnum: the buffer that may be deleted | ||
103 | "msg: a message that will be echoed to the user asking them if they wish to | ||
104 | " del the buffer | ||
105 | function! s:promptToDelBuffer(bufnum, msg) | ||
106 | echo a:msg | ||
107 | if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y' | ||
108 | " 1. ensure that all windows which display the just deleted filename | ||
109 | " now display an empty buffer (so a layout is preserved). | ||
110 | " Is not it better to close single tabs with this file only ? | ||
111 | let s:originalTabNumber = tabpagenr() | ||
112 | let s:originalWindowNumber = winnr() | ||
113 | " Go to the next buffer in buffer list if at least one extra buffer is listed | ||
114 | " Otherwise open a new empty buffer | ||
115 | if v:version >= 800 | ||
116 | let l:listedBufferCount = len(getbufinfo({'buflisted':1})) | ||
117 | elseif v:version >= 702 | ||
118 | let l:listedBufferCount = len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) | ||
119 | else | ||
120 | " Ignore buffer count in this case to make sure we keep the old | ||
121 | " behavior | ||
122 | let l:listedBufferCount = 0 | ||
123 | endif | ||
124 | if l:listedBufferCount > 1 | ||
125 | call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufnum . " | exec ':bnext! ' | endif", 1) | ||
126 | else | ||
127 | call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufnum . " | exec ':enew! ' | endif", 1) | ||
128 | endif | ||
129 | call nerdtree#exec('tabnext ' . s:originalTabNumber, 1) | ||
130 | call nerdtree#exec(s:originalWindowNumber . 'wincmd w', 1) | ||
131 | " 3. We don't need a previous buffer anymore | ||
132 | call nerdtree#exec('bwipeout! ' . a:bufnum, 0) | ||
133 | endif | ||
134 | endfunction | ||
135 | |||
136 | "FUNCTION: s:renameBuffer(bufNum, newNodeName, isDirectory){{{1 | ||
137 | "The buffer with the given bufNum is replaced with a new one | ||
138 | " | ||
139 | "Args: | ||
140 | "bufNum: the buffer that may be deleted | ||
141 | "newNodeName: the name given to the renamed node | ||
142 | "isDirectory: determines how to do the create the new filenames | ||
143 | function! s:renameBuffer(bufNum, newNodeName, isDirectory) | ||
144 | if a:isDirectory | ||
145 | let quotedFileName = fnameescape(a:newNodeName . '/' . fnamemodify(bufname(a:bufNum),':t')) | ||
146 | let editStr = g:NERDTreePath.New(a:newNodeName . '/' . fnamemodify(bufname(a:bufNum),':t')).str({'format': 'Edit'}) | ||
147 | else | ||
148 | let quotedFileName = fnameescape(a:newNodeName) | ||
149 | let editStr = g:NERDTreePath.New(a:newNodeName).str({'format': 'Edit'}) | ||
150 | endif | ||
151 | " 1. ensure that a new buffer is loaded | ||
152 | call nerdtree#exec('badd ' . quotedFileName, 0) | ||
153 | " 2. ensure that all windows which display the just deleted filename | ||
154 | " display a buffer for a new filename. | ||
155 | let s:originalTabNumber = tabpagenr() | ||
156 | let s:originalWindowNumber = winnr() | ||
157 | call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufNum . " | exec ':e! " . editStr . "' | endif", 0) | ||
158 | call nerdtree#exec('tabnext ' . s:originalTabNumber, 1) | ||
159 | call nerdtree#exec(s:originalWindowNumber . 'wincmd w', 1) | ||
160 | " 3. We don't need a previous buffer anymore | ||
161 | try | ||
162 | call nerdtree#exec('confirm bwipeout ' . a:bufNum, 0) | ||
163 | catch | ||
164 | " This happens when answering Cancel if confirmation is needed. Do nothing. | ||
165 | endtry | ||
166 | endfunction | ||
167 | |||
168 | "FUNCTION: NERDTreeAddNode(){{{1 | ||
169 | function! NERDTreeAddNode() | ||
170 | let curDirNode = g:NERDTreeDirNode.GetSelected() | ||
171 | let prompt = s:inputPrompt('add') | ||
172 | let newNodeName = substitute(input(prompt, curDirNode.path.str() . nerdtree#slash(), 'file'), '\(^\s*\|\s*$\)', '', 'g') | ||
173 | |||
174 | if newNodeName ==# '' | ||
175 | call nerdtree#echo('Node Creation Aborted.') | ||
176 | return | ||
177 | endif | ||
178 | |||
179 | try | ||
180 | let newPath = g:NERDTreePath.Create(newNodeName) | ||
181 | let parentNode = b:NERDTree.root.findNode(newPath.getParent()) | ||
182 | |||
183 | let newTreeNode = g:NERDTreeFileNode.New(newPath, b:NERDTree) | ||
184 | " Emptying g:NERDTreeOldSortOrder forces the sort to | ||
185 | " recalculate the cached sortKey so nodes sort correctly. | ||
186 | let g:NERDTreeOldSortOrder = [] | ||
187 | if empty(parentNode) | ||
188 | call b:NERDTree.root.refresh() | ||
189 | call b:NERDTree.render() | ||
190 | elseif parentNode.isOpen || !empty(parentNode.children) | ||
191 | call parentNode.addChild(newTreeNode, 1) | ||
192 | call NERDTreeRender() | ||
193 | call newTreeNode.putCursorHere(1, 0) | ||
194 | endif | ||
195 | |||
196 | redraw! | ||
197 | catch /^NERDTree/ | ||
198 | call nerdtree#echoWarning('Node Not Created.') | ||
199 | endtry | ||
200 | endfunction | ||
201 | |||
202 | "FUNCTION: NERDTreeMoveNode(){{{1 | ||
203 | function! NERDTreeMoveNode() | ||
204 | let curNode = g:NERDTreeFileNode.GetSelected() | ||
205 | let prompt = s:inputPrompt('move') | ||
206 | let newNodePath = input(prompt, curNode.path.str(), 'file') | ||
207 | while filereadable(newNodePath) | ||
208 | call nerdtree#echoWarning('This destination already exists. Try again.') | ||
209 | let newNodePath = substitute(input(prompt, curNode.path.str(), 'file'), '\(^\s*\|\s*$\)', '', 'g') | ||
210 | endwhile | ||
211 | |||
212 | |||
213 | if newNodePath ==# '' | ||
214 | call nerdtree#echo('Node Renaming Aborted.') | ||
215 | return | ||
216 | endif | ||
217 | |||
218 | try | ||
219 | if curNode.path.isDirectory | ||
220 | let l:curPath = escape(curNode.path.str(),'\') . (nerdtree#runningWindows()?'\\':'/') . '.*' | ||
221 | let l:openBuffers = filter(range(1,bufnr('$')),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") =~# "'.escape(l:curPath,'\').'"') | ||
222 | else | ||
223 | let l:openBuffers = filter(range(1,bufnr('$')),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") ==# curNode.path.str()') | ||
224 | endif | ||
225 | |||
226 | call curNode.rename(newNodePath) | ||
227 | " Emptying g:NERDTreeOldSortOrder forces the sort to | ||
228 | " recalculate the cached sortKey so nodes sort correctly. | ||
229 | let g:NERDTreeOldSortOrder = [] | ||
230 | call b:NERDTree.root.refresh() | ||
231 | call NERDTreeRender() | ||
232 | |||
233 | " If the file node is open, or files under the directory node are | ||
234 | " open, ask the user if they want to replace the file(s) with the | ||
235 | " renamed files. | ||
236 | if !empty(l:openBuffers) | ||
237 | if curNode.path.isDirectory | ||
238 | echo "\nDirectory renamed.\n\nFiles with the old directory name are open in buffers " . join(l:openBuffers, ', ') . '. Replace these buffers with the new files? (yN)' | ||
239 | else | ||
240 | echo "\nFile renamed.\n\nThe old file is open in buffer " . l:openBuffers[0] . '. Replace this buffer with the new file? (yN)' | ||
241 | endif | ||
242 | if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y' | ||
243 | for bufNum in l:openBuffers | ||
244 | call s:renameBuffer(bufNum, newNodePath, curNode.path.isDirectory) | ||
245 | endfor | ||
246 | endif | ||
247 | endif | ||
248 | |||
249 | call curNode.putCursorHere(1, 0) | ||
250 | |||
251 | redraw! | ||
252 | catch /^NERDTree/ | ||
253 | call nerdtree#echoWarning('Node Not Renamed.') | ||
254 | endtry | ||
255 | endfunction | ||
256 | |||
257 | " FUNCTION: NERDTreeDeleteNode() {{{1 | ||
258 | function! NERDTreeDeleteNode() | ||
259 | let currentNode = g:NERDTreeFileNode.GetSelected() | ||
260 | let confirmed = 0 | ||
261 | |||
262 | if currentNode.path.isDirectory && ((currentNode.isOpen && currentNode.getChildCount() > 0) || | ||
263 | \ (len(currentNode._glob('*', 1)) > 0)) | ||
264 | let prompt = s:inputPrompt('deleteNonEmpty') . currentNode.path.str() . ': ' | ||
265 | let choice = input(prompt) | ||
266 | let confirmed = choice ==# 'yes' | ||
267 | else | ||
268 | let prompt = s:inputPrompt('delete') . currentNode.path.str() . ' (yN): ' | ||
269 | echo prompt | ||
270 | let choice = nr2char(getchar()) | ||
271 | let confirmed = choice ==# 'y' | ||
272 | endif | ||
273 | |||
274 | if confirmed | ||
275 | try | ||
276 | call currentNode.delete() | ||
277 | call NERDTreeRender() | ||
278 | |||
279 | "if the node is open in a buffer, ask the user if they want to | ||
280 | "close that buffer | ||
281 | let bufnum = bufnr('^'.currentNode.path.str().'$') | ||
282 | if buflisted(bufnum) | ||
283 | let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? ' (hidden)' : '') .'. Delete this buffer? (yN)' | ||
284 | call s:promptToDelBuffer(bufnum, prompt) | ||
285 | endif | ||
286 | |||
287 | redraw! | ||
288 | catch /^NERDTree/ | ||
289 | call nerdtree#echoWarning('Could not remove node') | ||
290 | endtry | ||
291 | else | ||
292 | call nerdtree#echo('delete aborted') | ||
293 | endif | ||
294 | endfunction | ||
295 | |||
296 | " FUNCTION: NERDTreeListNode() {{{1 | ||
297 | function! NERDTreeListNode() | ||
298 | let treenode = g:NERDTreeFileNode.GetSelected() | ||
299 | if !empty(treenode) | ||
300 | let s:uname = system('uname') | ||
301 | let stat_cmd = 'stat -c "%s" ' | ||
302 | |||
303 | if s:uname =~? 'Darwin' | ||
304 | let stat_cmd = 'stat -f "%z" ' | ||
305 | endif | ||
306 | |||
307 | let cmd = 'size=$(' . stat_cmd . shellescape(treenode.path.str()) . ') && ' . | ||
308 | \ 'size_with_commas=$(echo $size | sed -e :a -e "s/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta") && ' . | ||
309 | \ 'ls -ld ' . shellescape(treenode.path.str()) . ' | sed -e "s/ $size / $size_with_commas /"' | ||
310 | |||
311 | let metadata = split(system(cmd),'\n') | ||
312 | call nerdtree#echo(metadata[0]) | ||
313 | else | ||
314 | call nerdtree#echo('No information available') | ||
315 | endif | ||
316 | endfunction | ||
317 | |||
318 | " FUNCTION: NERDTreeListNodeWin32() {{{1 | ||
319 | function! NERDTreeListNodeWin32() | ||
320 | let l:node = g:NERDTreeFileNode.GetSelected() | ||
321 | |||
322 | if !empty(l:node) | ||
323 | let l:path = l:node.path.str() | ||
324 | call nerdtree#echo(printf('%s:%s MOD:%s BYTES:%d PERMISSIONS:%s', | ||
325 | \ toupper(getftype(l:path)), | ||
326 | \ fnamemodify(l:path, ':t'), | ||
327 | \ strftime('%c', getftime(l:path)), | ||
328 | \ getfsize(l:path), | ||
329 | \ getfperm(l:path))) | ||
330 | return | ||
331 | endif | ||
332 | |||
333 | call nerdtree#echo('node not recognized') | ||
334 | endfunction | ||
335 | |||
336 | " FUNCTION: NERDTreeCopyNode() {{{1 | ||
337 | function! NERDTreeCopyNode() | ||
338 | let currentNode = g:NERDTreeFileNode.GetSelected() | ||
339 | let prompt = s:inputPrompt('copy') | ||
340 | let newNodePath = substitute(input(prompt, currentNode.path.str(), 'file'), '\(^\s*\|\s*$\)', '', 'g') | ||
341 | |||
342 | if newNodePath !=# '' | ||
343 | "strip trailing slash | ||
344 | let newNodePath = substitute(newNodePath, '\/$', '', '') | ||
345 | |||
346 | let confirmed = 1 | ||
347 | if currentNode.path.copyingWillOverwrite(newNodePath) | ||
348 | call nerdtree#echo('Warning: copying may overwrite files! Continue? (yN)') | ||
349 | let choice = nr2char(getchar()) | ||
350 | let confirmed = choice ==# 'y' | ||
351 | endif | ||
352 | |||
353 | if confirmed | ||
354 | try | ||
355 | let newNode = currentNode.copy(newNodePath) | ||
356 | " Emptying g:NERDTreeOldSortOrder forces the sort to | ||
357 | " recalculate the cached sortKey so nodes sort correctly. | ||
358 | let g:NERDTreeOldSortOrder = [] | ||
359 | if empty(newNode) | ||
360 | call b:NERDTree.root.refresh() | ||
361 | call b:NERDTree.render() | ||
362 | else | ||
363 | call NERDTreeRender() | ||
364 | call newNode.putCursorHere(0, 0) | ||
365 | endif | ||
366 | catch /^NERDTree/ | ||
367 | call nerdtree#echoWarning('Could not copy node') | ||
368 | endtry | ||
369 | endif | ||
370 | else | ||
371 | call nerdtree#echo('Copy aborted.') | ||
372 | endif | ||
373 | redraw! | ||
374 | endfunction | ||
375 | |||
376 | " FUNCTION: NERDTreeCopyPath() {{{1 | ||
377 | function! NERDTreeCopyPath() | ||
378 | let l:nodePath = g:NERDTreeFileNode.GetSelected().path.str() | ||
379 | if has('clipboard') | ||
380 | if &clipboard ==# 'unnamedplus' | ||
381 | let @+ = l:nodePath | ||
382 | else | ||
383 | let @* = l:nodePath | ||
384 | endif | ||
385 | call nerdtree#echo('The path [' . l:nodePath . '] was copied to your clipboard.') | ||
386 | else | ||
387 | call nerdtree#echo('The full path is: ' . l:nodePath) | ||
388 | endif | ||
389 | endfunction | ||
390 | |||
391 | " FUNCTION: NERDTreeQuickLook() {{{1 | ||
392 | function! NERDTreeQuickLook() | ||
393 | let l:node = g:NERDTreeFileNode.GetSelected() | ||
394 | |||
395 | if empty(l:node) | ||
396 | return | ||
397 | endif | ||
398 | |||
399 | call system('qlmanage -p 2>/dev/null ' . shellescape(l:node.path.str())) | ||
400 | endfunction | ||
401 | |||
402 | " FUNCTION: NERDTreeRevealInFinder() {{{1 | ||
403 | function! NERDTreeRevealInFinder() | ||
404 | let l:node = g:NERDTreeFileNode.GetSelected() | ||
405 | |||
406 | if empty(l:node) | ||
407 | return | ||
408 | endif | ||
409 | |||
410 | call system('open -R ' . shellescape(l:node.path.str())) | ||
411 | endfunction | ||
412 | |||
413 | " FUNCTION: NERDTreeExecuteFile() {{{1 | ||
414 | function! NERDTreeExecuteFile() | ||
415 | let l:node = g:NERDTreeFileNode.GetSelected() | ||
416 | |||
417 | if empty(l:node) | ||
418 | return | ||
419 | endif | ||
420 | |||
421 | call system('open ' . shellescape(l:node.path.str())) | ||
422 | endfunction | ||
423 | |||
424 | " FUNCTION: NERDTreeRevealFileLinux() {{{1 | ||
425 | function! NERDTreeRevealFileLinux() | ||
426 | let l:node = g:NERDTreeFileNode.GetSelected() | ||
427 | |||
428 | if empty(l:node) | ||
429 | return | ||
430 | endif | ||
431 | |||
432 | " Handle the edge case of "/", which has no parent. | ||
433 | if l:node.path.str() ==# '/' | ||
434 | call system('xdg-open /') | ||
435 | return | ||
436 | endif | ||
437 | |||
438 | if empty(l:node.parent) | ||
439 | return | ||
440 | endif | ||
441 | |||
442 | call system('xdg-open ' . shellescape(l:node.parent.path.str())) | ||
443 | endfunction | ||
444 | |||
445 | " FUNCTION: NERDTreeExecuteFileLinux() {{{1 | ||
446 | function! NERDTreeExecuteFileLinux() | ||
447 | let l:node = g:NERDTreeFileNode.GetSelected() | ||
448 | |||
449 | if empty(l:node) | ||
450 | return | ||
451 | endif | ||
452 | |||
453 | call system('xdg-open ' . shellescape(l:node.path.str())) | ||
454 | endfunction | ||
455 | |||
456 | " FUNCTION: NERDTreeExecuteFileWindows() {{{1 | ||
457 | function! NERDTreeExecuteFileWindows() | ||
458 | let l:node = g:NERDTreeFileNode.GetSelected() | ||
459 | |||
460 | if empty(l:node) | ||
461 | return | ||
462 | endif | ||
463 | |||
464 | call system('cmd.exe /c start "" ' . shellescape(l:node.path.str())) | ||
465 | endfunction | ||
466 | |||
467 | " FUNCTION: NERDTreeSystemCommand() {{{1 | ||
468 | function! NERDTreeSystemCommand() | ||
469 | let l:node = g:NERDTreeFileNode.GetSelected() | ||
470 | |||
471 | if empty(l:node) | ||
472 | return | ||
473 | endif | ||
474 | |||
475 | let l:cwd = getcwd() | ||
476 | let l:directory = l:node.path.isDirectory ? l:node.path.str() : l:node.parent.path.str() | ||
477 | execute 'cd '.l:directory | ||
478 | |||
479 | let l:nl = nr2char(10) | ||
480 | echo l:nl . system(input(l:directory . (nerdtree#runningWindows() ? '> ' : ' $ '))) | ||
481 | execute 'cd '.l:cwd | ||
482 | endfunction | ||
483 | |||
484 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/vcs.vim b/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/vcs.vim new file mode 100644 index 0000000..d20e35e --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/vcs.vim | |||
@@ -0,0 +1,47 @@ | |||
1 | " ============================================================================ | ||
2 | " File: vcs.vim | ||
3 | " Description: NERDTree plugin that provides a command to open on the root of | ||
4 | " a version control system repository. | ||
5 | " Maintainer: Phil Runninger | ||
6 | " License: This program is free software. It comes without any warranty, | ||
7 | " to the extent permitted by applicable law. You can redistribute | ||
8 | " it and/or modify it under the terms of the Do What The Fuck You | ||
9 | " Want To Public License, Version 2, as published by Sam Hocevar. | ||
10 | " See http://sam.zoy.org/wtfpl/COPYING for more details. | ||
11 | " | ||
12 | " ============================================================================ | ||
13 | command! -n=? -complete=dir -bar NERDTreeVCS :call <SID>CreateTabTreeVCS('<args>') | ||
14 | command! -n=? -complete=dir -bar NERDTreeToggleVCS :call <SID>ToggleTabTreeVCS('<args>') | ||
15 | |||
16 | " FUNCTION: s:CreateTabTreeVCS(a:name) {{{1 | ||
17 | function! s:CreateTabTreeVCS(name) | ||
18 | let l:path = g:NERDTreeCreator._pathForString(a:name) | ||
19 | let l:path = s:FindParentVCSRoot(l:path) | ||
20 | call g:NERDTreeCreator.createTabTree(empty(l:path) ? '' : l:path._str()) | ||
21 | endfunction | ||
22 | |||
23 | " FUNCTION: s:ToggleTabTreeVCS(a:name) {{{1 | ||
24 | " Behaves the same as ToggleTabTree except roots directory at VCS root | ||
25 | function! s:ToggleTabTreeVCS(name) | ||
26 | let l:path = g:NERDTreeCreator._pathForString(a:name) | ||
27 | let l:path = s:FindParentVCSRoot(l:path) | ||
28 | call g:NERDTreeCreator.toggleTabTree(empty(l:path) ? '' : l:path._str()) | ||
29 | endfunction | ||
30 | |||
31 | " FUNCTION: s:FindParentVCSRoot(a:path) {{{1 | ||
32 | " Finds the root version control system folder of the given path. If a:path is | ||
33 | " not part of a repository, return the original path. | ||
34 | function! s:FindParentVCSRoot(path) | ||
35 | let l:path = a:path | ||
36 | while !empty(l:path) && | ||
37 | \ l:path._str() !~# '^\(\a:[\\\/]\|\/\)$' && | ||
38 | \ !isdirectory(l:path._str() . '/.git') && | ||
39 | \ !isdirectory(l:path._str() . '/.svn') && | ||
40 | \ !isdirectory(l:path._str() . '/.hg') && | ||
41 | \ !isdirectory(l:path._str() . '/.bzr') && | ||
42 | \ !isdirectory(l:path._str() . '/_darcs') | ||
43 | let l:path = l:path.getParent() | ||
44 | endwhile | ||
45 | return (empty(l:path) || l:path._str() =~# '^\(\a:[\\\/]\|\/\)$') ? a:path : l:path | ||
46 | endfunction | ||
47 | |||
diff --git a/.vim/pack/vendor/start/nerdtree/plugin/NERD_tree.vim b/.vim/pack/vendor/start/nerdtree/plugin/NERD_tree.vim new file mode 100644 index 0000000..ef60cca --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/plugin/NERD_tree.vim | |||
@@ -0,0 +1,234 @@ | |||
1 | " ============================================================================ | ||
2 | " File: NERD_tree.vim | ||
3 | " Maintainer: Martin Grenfell <martin.grenfell at gmail dot com> | ||
4 | " License: This program is free software. It comes without any warranty, | ||
5 | " to the extent permitted by applicable law. You can redistribute | ||
6 | " it and/or modify it under the terms of the Do What The Fuck You | ||
7 | " Want To Public License, Version 2, as published by Sam Hocevar. | ||
8 | " See http://sam.zoy.org/wtfpl/COPYING for more details. | ||
9 | " | ||
10 | " ============================================================================ | ||
11 | " | ||
12 | " SECTION: Script init stuff {{{1 | ||
13 | "============================================================ | ||
14 | scriptencoding utf-8 | ||
15 | |||
16 | if exists('loaded_nerd_tree') | ||
17 | finish | ||
18 | endif | ||
19 | if v:version < 703 | ||
20 | echoerr "NERDTree: this plugin requires vim >= 7.3. DOWNLOAD IT! You'll thank me later!" | ||
21 | finish | ||
22 | endif | ||
23 | let loaded_nerd_tree = 1 | ||
24 | |||
25 | "for line continuation - i.e dont want C in &cpoptions | ||
26 | let s:old_cpo = &cpoptions | ||
27 | set cpoptions&vim | ||
28 | |||
29 | "SECTION: Initialize variable calls and other random constants {{{2 | ||
30 | let g:NERDTreeAutoCenter = get(g:, 'NERDTreeAutoCenter', 1) | ||
31 | let g:NERDTreeAutoCenterThreshold = get(g:, 'NERDTreeAutoCenterThreshold', 3) | ||
32 | let g:NERDTreeCaseSensitiveSort = get(g:, 'NERDTreeCaseSensitiveSort', 0) | ||
33 | let g:NERDTreeNaturalSort = get(g:, 'NERDTreeNaturalSort', 0) | ||
34 | let g:NERDTreeSortHiddenFirst = get(g:, 'NERDTreeSortHiddenFirst', 1) | ||
35 | let g:NERDTreeUseTCD = get(g:, 'NERDTreeUseTCD', 0) | ||
36 | let g:NERDTreeChDirMode = get(g:, 'NERDTreeChDirMode', 0) | ||
37 | let g:NERDTreeCreatePrefix = get(g:, 'NERDTreeCreatePrefix', 'silent') | ||
38 | let g:NERDTreeMinimalUI = get(g:, 'NERDTreeMinimalUI', 0) | ||
39 | let g:NERDTreeMinimalMenu = get(g:, 'NERDTreeMinimalMenu', 0) | ||
40 | let g:NERDTreeIgnore = get(g:, 'NERDTreeIgnore', ['\~$']) | ||
41 | let g:NERDTreeBookmarksFile = get(g:, 'NERDTreeBookmarksFile', expand('$HOME') . '/.NERDTreeBookmarks') | ||
42 | let g:NERDTreeBookmarksSort = get(g:, 'NERDTreeBookmarksSort', 1) | ||
43 | let g:NERDTreeHighlightCursorline = get(g:, 'NERDTreeHighlightCursorline', 1) | ||
44 | let g:NERDTreeHijackNetrw = get(g:, 'NERDTreeHijackNetrw', 1) | ||
45 | let g:NERDTreeMarkBookmarks = get(g:, 'NERDTreeMarkBookmarks', 1) | ||
46 | let g:NERDTreeMouseMode = get(g:, 'NERDTreeMouseMode', 1) | ||
47 | let g:NERDTreeNotificationThreshold = get(g:, 'NERDTreeNotificationThreshold', 100) | ||
48 | let g:NERDTreeQuitOnOpen = get(g:, 'NERDTreeQuitOnOpen', 0) | ||
49 | let g:NERDTreeRespectWildIgnore = get(g:, 'NERDTreeRespectWildIgnore', 0) | ||
50 | let g:NERDTreeShowBookmarks = get(g:, 'NERDTreeShowBookmarks', 0) | ||
51 | let g:NERDTreeShowFiles = get(g:, 'NERDTreeShowFiles', 1) | ||
52 | let g:NERDTreeShowHidden = get(g:, 'NERDTreeShowHidden', 0) | ||
53 | let g:NERDTreeShowLineNumbers = get(g:, 'NERDTreeShowLineNumbers', 0) | ||
54 | let g:NERDTreeSortDirs = get(g:, 'NERDTreeSortDirs', 1) | ||
55 | |||
56 | if !nerdtree#runningWindows() && !nerdtree#runningCygwin() | ||
57 | let g:NERDTreeDirArrowExpandable = get(g:, 'NERDTreeDirArrowExpandable', '▸') | ||
58 | let g:NERDTreeDirArrowCollapsible = get(g:, 'NERDTreeDirArrowCollapsible', '▾') | ||
59 | else | ||
60 | let g:NERDTreeDirArrowExpandable = get(g:, 'NERDTreeDirArrowExpandable', '+') | ||
61 | let g:NERDTreeDirArrowCollapsible = get(g:, 'NERDTreeDirArrowCollapsible', '~') | ||
62 | endif | ||
63 | |||
64 | let g:NERDTreeCascadeOpenSingleChildDir = get(g:, 'NERDTreeCascadeOpenSingleChildDir', 1) | ||
65 | let g:NERDTreeCascadeSingleChildDir = get(g:, 'NERDTreeCascadeSingleChildDir', 1) | ||
66 | |||
67 | let g:NERDTreeSortOrder = get(g:, 'NERDTreeSortOrder', ['\/$', '*', '\.swp$', '\.bak$', '\~$']) | ||
68 | let g:NERDTreeOldSortOrder = [] | ||
69 | |||
70 | let g:NERDTreeGlyphReadOnly = get(g:, 'NERDTreeGlyphReadOnly', 'RO') | ||
71 | |||
72 | if has('conceal') | ||
73 | let g:NERDTreeNodeDelimiter = get(g:, 'NERDTreeNodeDelimiter', "\x07") | ||
74 | elseif (g:NERDTreeDirArrowExpandable ==# "\u00a0" || g:NERDTreeDirArrowCollapsible ==# "\u00a0") | ||
75 | let g:NERDTreeNodeDelimiter = get(g:, 'NERDTreeNodeDelimiter', "\u00b7") | ||
76 | else | ||
77 | let g:NERDTreeNodeDelimiter = get(g:, 'NERDTreeNodeDelimiter', "\u00a0") | ||
78 | endif | ||
79 | |||
80 | "the exists() crap here is a hack to stop vim spazzing out when | ||
81 | "loading a session that was created with an open nerd tree. It spazzes | ||
82 | "because it doesnt store b:NERDTree(its a b: var, and its a hash) | ||
83 | let g:NERDTreeStatusline = get(g:, 'NERDTreeStatusline', "%{exists('b:NERDTree')?b:NERDTree.root.path.str():''}") | ||
84 | |||
85 | let g:NERDTreeWinPos = get(g:, 'NERDTreeWinPos', 'left') | ||
86 | let g:NERDTreeWinSize = get(g:, 'NERDTreeWinSize', 31) | ||
87 | |||
88 | "init the shell commands that will be used to copy nodes, and remove dir trees | ||
89 | "Note: the space after the command is important | ||
90 | if nerdtree#runningWindows() | ||
91 | let g:NERDTreeRemoveDirCmd = get(g:, 'NERDTreeRemoveDirCmd', 'rmdir /s /q ') | ||
92 | let g:NERDTreeCopyDirCmd = get(g:, 'NERDTreeCopyDirCmd', 'xcopy /s /e /i /y /q ') | ||
93 | let g:NERDTreeCopyFileCmd = get(g:, 'NERDTreeCopyFileCmd', 'copy /y ') | ||
94 | else | ||
95 | let g:NERDTreeRemoveDirCmd = get(g:, 'NERDTreeRemoveDirCmd', 'rm -rf ') | ||
96 | let g:NERDTreeCopyCmd = get(g:, 'NERDTreeCopyCmd', 'cp -r ') | ||
97 | endif | ||
98 | |||
99 | "SECTION: Init variable calls for key mappings {{{2 | ||
100 | let g:NERDTreeMapCustomOpen = get(g:, 'NERDTreeMapCustomOpen', '<CR>') | ||
101 | let g:NERDTreeMapActivateNode = get(g:, 'NERDTreeMapActivateNode', 'o') | ||
102 | let g:NERDTreeMapChangeRoot = get(g:, 'NERDTreeMapChangeRoot', 'C') | ||
103 | let g:NERDTreeMapChdir = get(g:, 'NERDTreeMapChdir', 'cd') | ||
104 | let g:NERDTreeMapCloseChildren = get(g:, 'NERDTreeMapCloseChildren', 'X') | ||
105 | let g:NERDTreeMapCloseDir = get(g:, 'NERDTreeMapCloseDir', 'x') | ||
106 | let g:NERDTreeMapDeleteBookmark = get(g:, 'NERDTreeMapDeleteBookmark', 'D') | ||
107 | let g:NERDTreeMapMenu = get(g:, 'NERDTreeMapMenu', 'm') | ||
108 | let g:NERDTreeMapHelp = get(g:, 'NERDTreeMapHelp', '?') | ||
109 | let g:NERDTreeMapJumpFirstChild = get(g:, 'NERDTreeMapJumpFirstChild', 'K') | ||
110 | let g:NERDTreeMapJumpLastChild = get(g:, 'NERDTreeMapJumpLastChild', 'J') | ||
111 | let g:NERDTreeMapJumpNextSibling = get(g:, 'NERDTreeMapJumpNextSibling', '<C-j>') | ||
112 | let g:NERDTreeMapJumpParent = get(g:, 'NERDTreeMapJumpParent', 'p') | ||
113 | let g:NERDTreeMapJumpPrevSibling = get(g:, 'NERDTreeMapJumpPrevSibling', '<C-k>') | ||
114 | let g:NERDTreeMapJumpRoot = get(g:, 'NERDTreeMapJumpRoot', 'P') | ||
115 | let g:NERDTreeMapOpenExpl = get(g:, 'NERDTreeMapOpenExpl', 'e') | ||
116 | let g:NERDTreeMapOpenInTab = get(g:, 'NERDTreeMapOpenInTab', 't') | ||
117 | let g:NERDTreeMapOpenInTabSilent = get(g:, 'NERDTreeMapOpenInTabSilent', 'T') | ||
118 | let g:NERDTreeMapOpenRecursively = get(g:, 'NERDTreeMapOpenRecursively', 'O') | ||
119 | let g:NERDTreeMapOpenSplit = get(g:, 'NERDTreeMapOpenSplit', 'i') | ||
120 | let g:NERDTreeMapOpenVSplit = get(g:, 'NERDTreeMapOpenVSplit', 's') | ||
121 | let g:NERDTreeMapPreview = get(g:, 'NERDTreeMapPreview', 'g'.NERDTreeMapActivateNode) | ||
122 | let g:NERDTreeMapPreviewSplit = get(g:, 'NERDTreeMapPreviewSplit', 'g'.NERDTreeMapOpenSplit) | ||
123 | let g:NERDTreeMapPreviewVSplit = get(g:, 'NERDTreeMapPreviewVSplit', 'g'.NERDTreeMapOpenVSplit) | ||
124 | let g:NERDTreeMapQuit = get(g:, 'NERDTreeMapQuit', 'q') | ||
125 | let g:NERDTreeMapRefresh = get(g:, 'NERDTreeMapRefresh', 'r') | ||
126 | let g:NERDTreeMapRefreshRoot = get(g:, 'NERDTreeMapRefreshRoot', 'R') | ||
127 | let g:NERDTreeMapToggleBookmarks = get(g:, 'NERDTreeMapToggleBookmarks', 'B') | ||
128 | let g:NERDTreeMapToggleFiles = get(g:, 'NERDTreeMapToggleFiles', 'F') | ||
129 | let g:NERDTreeMapToggleFilters = get(g:, 'NERDTreeMapToggleFilters', 'f') | ||
130 | let g:NERDTreeMapToggleHidden = get(g:, 'NERDTreeMapToggleHidden', 'I') | ||
131 | let g:NERDTreeMapToggleZoom = get(g:, 'NERDTreeMapToggleZoom', 'A') | ||
132 | let g:NERDTreeMapUpdir = get(g:, 'NERDTreeMapUpdir', 'u') | ||
133 | let g:NERDTreeMapUpdirKeepOpen = get(g:, 'NERDTreeMapUpdirKeepOpen', 'U') | ||
134 | let g:NERDTreeMapCWD = get(g:, 'NERDTreeMapCWD', 'CD') | ||
135 | let g:NERDTreeMenuDown = get(g:, 'NERDTreeMenuDown', 'j') | ||
136 | let g:NERDTreeMenuUp = get(g:, 'NERDTreeMenuUp', 'k') | ||
137 | |||
138 | "SECTION: Load class files{{{2 | ||
139 | call nerdtree#loadClassFiles() | ||
140 | |||
141 | " SECTION: Commands {{{1 | ||
142 | "============================================================ | ||
143 | call nerdtree#ui_glue#setupCommands() | ||
144 | |||
145 | " SECTION: Auto commands {{{1 | ||
146 | "============================================================ | ||
147 | augroup NERDTree | ||
148 | "Save the cursor position whenever we close the nerd tree | ||
149 | exec 'autocmd BufLeave,WinLeave '. g:NERDTreeCreator.BufNamePrefix() .'* if g:NERDTree.IsOpen() | call b:NERDTree.ui.saveScreenState() | endif' | ||
150 | |||
151 | "disallow insert mode in the NERDTree | ||
152 | exec 'autocmd BufEnter,WinEnter '. g:NERDTreeCreator.BufNamePrefix() .'* stopinsert' | ||
153 | augroup END | ||
154 | |||
155 | if g:NERDTreeHijackNetrw | ||
156 | augroup NERDTreeHijackNetrw | ||
157 | autocmd VimEnter * silent! autocmd! FileExplorer | ||
158 | au BufEnter,VimEnter * call nerdtree#checkForBrowse(expand('<amatch>')) | ||
159 | augroup END | ||
160 | endif | ||
161 | |||
162 | if g:NERDTreeChDirMode ==# 3 | ||
163 | augroup NERDTreeChDirOnTabSwitch | ||
164 | autocmd TabEnter * if g:NERDTree.ExistsForTab()|call g:NERDTree.ForCurrentTab().getRoot().path.changeToDir()|endif | ||
165 | augroup END | ||
166 | endif | ||
167 | |||
168 | " SECTION: Public API {{{1 | ||
169 | "============================================================ | ||
170 | function! NERDTreeAddMenuItem(options) | ||
171 | call g:NERDTreeMenuItem.Create(a:options) | ||
172 | endfunction | ||
173 | |||
174 | function! NERDTreeAddMenuSeparator(...) | ||
175 | let opts = a:0 ? a:1 : {} | ||
176 | call g:NERDTreeMenuItem.CreateSeparator(opts) | ||
177 | endfunction | ||
178 | |||
179 | function! NERDTreeAddSubmenu(options) | ||
180 | return g:NERDTreeMenuItem.Create(a:options) | ||
181 | endfunction | ||
182 | |||
183 | function! NERDTreeAddKeyMap(options) | ||
184 | call g:NERDTreeKeyMap.Create(a:options) | ||
185 | endfunction | ||
186 | |||
187 | function! NERDTreeRender() | ||
188 | call nerdtree#renderView() | ||
189 | endfunction | ||
190 | |||
191 | function! NERDTreeFocus() | ||
192 | if g:NERDTree.IsOpen() | ||
193 | call g:NERDTree.CursorToTreeWin(0) | ||
194 | else | ||
195 | call g:NERDTreeCreator.ToggleTabTree('') | ||
196 | endif | ||
197 | endfunction | ||
198 | |||
199 | function! NERDTreeCWD() | ||
200 | |||
201 | if empty(getcwd()) | ||
202 | call nerdtree#echoWarning('current directory does not exist') | ||
203 | return | ||
204 | endif | ||
205 | |||
206 | try | ||
207 | let l:cwdPath = g:NERDTreePath.New(getcwd()) | ||
208 | catch /^NERDTree.InvalidArgumentsError/ | ||
209 | call nerdtree#echoWarning('current directory does not exist') | ||
210 | return | ||
211 | endtry | ||
212 | |||
213 | call NERDTreeFocus() | ||
214 | |||
215 | if b:NERDTree.root.path.equals(l:cwdPath) | ||
216 | return | ||
217 | endif | ||
218 | |||
219 | let l:newRoot = g:NERDTreeFileNode.New(l:cwdPath, b:NERDTree) | ||
220 | call b:NERDTree.changeRoot(l:newRoot) | ||
221 | normal! ^ | ||
222 | endfunction | ||
223 | |||
224 | function! NERDTreeAddPathFilter(callback) | ||
225 | call g:NERDTree.AddPathFilter(a:callback) | ||
226 | endfunction | ||
227 | |||
228 | " SECTION: Post Source Actions {{{1 | ||
229 | call nerdtree#postSourceActions() | ||
230 | |||
231 | "reset &cpoptions back to users setting | ||
232 | let &cpoptions = s:old_cpo | ||
233 | |||
234 | " vim: set sw=4 sts=4 et fdm=marker: | ||
diff --git a/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim b/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim new file mode 100644 index 0000000..c4197ee --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim | |||
@@ -0,0 +1,97 @@ | |||
1 | let s:tree_up_dir_line = '.. (up a dir)' | ||
2 | syn match NERDTreeIgnore #\~# | ||
3 | exec 'syn match NERDTreeIgnore #\['.g:NERDTreeGlyphReadOnly.'\]#' | ||
4 | |||
5 | "highlighting for the .. (up dir) line at the top of the tree | ||
6 | execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line .'#' | ||
7 | |||
8 | "quickhelp syntax elements | ||
9 | syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#ms=s+2,me=e-1 | ||
10 | syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#ms=s+2,me=e-1 | ||
11 | syn match NERDTreeHelpTitle #" .*\~$#ms=s+2,me=e-1 | ||
12 | syn match NERDTreeToggleOn #(on)#ms=s+1,he=e-1 | ||
13 | syn match NERDTreeToggleOff #(off)#ms=e-3,me=e-1 | ||
14 | syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3 | ||
15 | syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeIgnore,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand | ||
16 | |||
17 | "highlighting for sym links | ||
18 | syn match NERDTreeLinkTarget #->.*# containedin=NERDTreeDir,NERDTreeFile | ||
19 | syn match NERDTreeLinkFile #.* ->#me=e-3 containedin=NERDTreeFile | ||
20 | syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir | ||
21 | |||
22 | "highlighting to conceal the delimiter around the file/dir name | ||
23 | if has('conceal') | ||
24 | exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# conceal containedin=ALL' | ||
25 | setlocal conceallevel=2 concealcursor=nvic | ||
26 | else | ||
27 | exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# containedin=ALL' | ||
28 | hi! link NERDTreeNodeDelimiters Ignore | ||
29 | endif | ||
30 | |||
31 | "highlighing for directory nodes and file nodes | ||
32 | syn match NERDTreeDirSlash #/# containedin=NERDTreeDir | ||
33 | |||
34 | if g:NERDTreeDirArrowExpandable !=# '' | ||
35 | exec 'syn match NERDTreeClosable #' . escape(g:NERDTreeDirArrowCollapsible, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile' | ||
36 | exec 'syn match NERDTreeOpenable #' . escape(g:NERDTreeDirArrowExpandable, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile' | ||
37 | let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-') | ||
38 | exec 'syn match NERDTreeDir #[^'.s:dirArrows.' ].*/#' | ||
39 | exec 'syn match NERDTreeExecFile #^.*'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmarkName' | ||
40 | exec 'syn match NERDTreeFile #^[^"\.'.s:dirArrows.'] *[^'.s:dirArrows.']*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmarkName,NERDTreeExecFile' | ||
41 | else | ||
42 | exec 'syn match NERDTreeDir #[^'.g:NERDTreeNodeDelimiter.']\{-}/\ze\($\|'.g:NERDTreeNodeDelimiter.'\)#' | ||
43 | exec 'syn match NERDTreeExecFile #[^'.g:NERDTreeNodeDelimiter.']\{-}'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmarkName' | ||
44 | exec 'syn match NERDTreeFile #^.*'.g:NERDTreeNodeDelimiter.'.*[^\/]\($\|'.g:NERDTreeNodeDelimiter.'.*\)# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmarkName,NERDTreeExecFile' | ||
45 | endif | ||
46 | |||
47 | "highlighting for readonly files | ||
48 | exec 'syn match NERDTreeRO #.*'.g:NERDTreeNodeDelimiter.'\zs.*\ze'.g:NERDTreeNodeDelimiter.'.*\['.g:NERDTreeGlyphReadOnly.'\]# contains=NERDTreeIgnore,NERDTreeBookmarkName,NERDTreeFile' | ||
49 | |||
50 | exec 'syn match NERDTreeFlags #\[[^\]]*\]\ze'.g:NERDTreeNodeDelimiter.'# containedin=NERDTreeFile,NERDTreeExecFile,NERDTreeLinkFile,NERDTreeRO,NERDTreeDir' | ||
51 | |||
52 | syn match NERDTreeCWD #^[</].*$# | ||
53 | |||
54 | "highlighting for bookmarks | ||
55 | syn match NERDTreeBookmarkName # {.*}#hs=s+2,he=e-1 | ||
56 | |||
57 | "highlighting for the bookmarks table | ||
58 | syn match NERDTreeBookmarksLeader #^># | ||
59 | syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader | ||
60 | syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader | ||
61 | syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader | ||
62 | |||
63 | hi def link NERDTreePart Special | ||
64 | hi def link NERDTreePartFile Type | ||
65 | hi def link NERDTreeExecFile Title | ||
66 | hi def link NERDTreeDirSlash Identifier | ||
67 | |||
68 | hi def link NERDTreeBookmarksHeader statement | ||
69 | hi def link NERDTreeBookmarksLeader ignore | ||
70 | hi def link NERDTreeBookmarkName Identifier | ||
71 | hi def link NERDTreeBookmark normal | ||
72 | |||
73 | hi def link NERDTreeHelp String | ||
74 | hi def link NERDTreeHelpKey Identifier | ||
75 | hi def link NERDTreeHelpCommand Identifier | ||
76 | hi def link NERDTreeHelpTitle Macro | ||
77 | hi def link NERDTreeToggleOn Question | ||
78 | hi def link NERDTreeToggleOff WarningMsg | ||
79 | |||
80 | hi def link NERDTreeLinkTarget Type | ||
81 | hi def link NERDTreeLinkFile Macro | ||
82 | hi def link NERDTreeLinkDir Macro | ||
83 | |||
84 | hi def link NERDTreeDir Directory | ||
85 | hi def link NERDTreeUp Directory | ||
86 | hi def link NERDTreeFile Normal | ||
87 | hi def link NERDTreeCWD Statement | ||
88 | hi def link NERDTreeOpenable Directory | ||
89 | hi def link NERDTreeClosable Directory | ||
90 | hi def link NERDTreeIgnore ignore | ||
91 | hi def link NERDTreeRO WarningMsg | ||
92 | hi def link NERDTreeBookmark Statement | ||
93 | hi def link NERDTreeFlags Number | ||
94 | |||
95 | hi def link NERDTreeCurrentNode Search | ||
96 | |||
97 | hi NERDTreeFile ctermbg=NONE guibg=NONE | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/airline/extensions/tabline/formatters/webdevicons.vim b/.vim/pack/vendor/start/vim-devicons/autoload/airline/extensions/tabline/formatters/webdevicons.vim new file mode 100644 index 0000000..c298025 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/airline/extensions/tabline/formatters/webdevicons.vim | |||
@@ -0,0 +1,14 @@ | |||
1 | " Version: 0.11.0 | ||
2 | " Webpage: https://github.com/ryanoasis/vim-devicons | ||
3 | " Maintainer: Ryan McIntyre <ryanoasis@gmail.com> | ||
4 | " License: see LICENSE | ||
5 | |||
6 | function! airline#extensions#tabline#formatters#webdevicons#format(bufnr, buffers) abort | ||
7 | " Call original formatter. | ||
8 | let originalFormatter = airline#extensions#tabline#formatters#{g:_webdevicons_airline_orig_formatter}#format(a:bufnr, a:buffers) | ||
9 | return originalFormatter . g:WebDevIconsTabAirLineBeforeGlyphPadding . | ||
10 | \ WebDevIconsGetFileTypeSymbol(bufname(a:bufnr)) . g:WebDevIconsTabAirLineAfterGlyphPadding | ||
11 | endfunction | ||
12 | |||
13 | " modeline syntax: | ||
14 | " vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/ctrlp.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/ctrlp.vim new file mode 100644 index 0000000..1ea4898 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/ctrlp.vim | |||
@@ -0,0 +1,30 @@ | |||
1 | " Initialize for up to date ctrlp fork: ctrlpvim/ctrlp.vim | ||
2 | " Support for kien/ctrlp.vim deprecated since v0.7.0 | ||
3 | " @TODO implementation for CtrlP buffer and find file mode | ||
4 | |||
5 | function! devicons#plugins#ctrlp#init() abort | ||
6 | let l:ctrlp_warning_message = 'vim-devicons: https://github.com/kien/ctrlp.vim is deprecated since v0.7.0, please use https://github.com/ctrlpvim/ctrlp.vim' | ||
7 | let l:ctrlp_warned_file = webdevicons#pluginHome() . '/status_warned_ctrlp' | ||
8 | |||
9 | if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp | ||
10 | let l:forkedCtrlp = exists('g:ctrlp_mruf_map_string') | ||
11 | |||
12 | if l:forkedCtrlp | ||
13 | if !exists('g:ctrlp_formatline_func') | ||
14 | " logic for ctrlpvim/ctrlp.vim: | ||
15 | let g:ctrlp_formatline_func = 's:formatline(s:curtype() == "buf" ? v:val : WebDevIconsGetFileTypeSymbol(v:val) . " " . v:val) ' | ||
16 | endif | ||
17 | elseif empty(glob(l:ctrlp_warned_file)) | ||
18 | " logic for kien/ctrlp.vim: | ||
19 | echohl WarningMsg | | ||
20 | \ echomsg l:ctrlp_warning_message | ||
21 | " only warn first time, do not warn again: | ||
22 | try | ||
23 | execute writefile(['File automatically generated after warning about CtrlP once', l:ctrlp_warning_message], l:ctrlp_warned_file) | ||
24 | catch | ||
25 | endtry | ||
26 | endif | ||
27 | endif | ||
28 | endfunction | ||
29 | |||
30 | " vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/denite.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/denite.vim new file mode 100644 index 0000000..5884644 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/denite.vim | |||
@@ -0,0 +1,10 @@ | |||
1 | function! devicons#plugins#denite#init() abort | ||
2 | let s:denite_ver = (exists('*denite#get_status_mode') ? 2 : 3) | ||
3 | if s:denite_ver == 3 | ||
4 | call denite#custom#source('file,file/rec,file_mru,file/old,buffer,directory/rec,directory_mru', 'converters', ['devicons_denite_converter']) | ||
5 | else | ||
6 | call denite#custom#source('file,file_rec,file_mru,file_old,buffer,directory_rec,directory_mru', 'converters', ['devicons_denite_converter']) | ||
7 | endif | ||
8 | endfunction | ||
9 | |||
10 | " vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/flagship.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/flagship.vim new file mode 100644 index 0000000..f67103c --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/flagship.vim | |||
@@ -0,0 +1,15 @@ | |||
1 | function! devicons#plugins#flagship#init() abort | ||
2 | if g:webdevicons_enable_flagship_statusline | ||
3 | augroup webdevicons_flagship_filetype | ||
4 | autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileTypeSymbol') | ||
5 | augroup END | ||
6 | endif | ||
7 | |||
8 | if g:webdevicons_enable_flagship_statusline_fileformat_symbols | ||
9 | augroup webdevicons_flagship_filesymbol | ||
10 | autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileFormatSymbol') | ||
11 | augroup END | ||
12 | endif | ||
13 | endfunction | ||
14 | |||
15 | " vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/startify.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/startify.vim new file mode 100644 index 0000000..f3c2d12 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/startify.vim | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | function! devicons#plugins#startify#init() abort | ||
3 | exec ":function! StartifyEntryFormat() abort \n return 'WebDevIconsGetFileTypeSymbol(absolute_path) .\" \". entry_path' \n endfunction" | ||
4 | endfunction | ||
5 | |||
6 | " vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/unite.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/unite.vim new file mode 100644 index 0000000..c40924a --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/unite.vim | |||
@@ -0,0 +1,37 @@ | |||
1 | function! devicons#plugins#unite#init() abort | ||
2 | let s:filters = { | ||
3 | \ 'name': 'devicons_unite_converter' | ||
4 | \ } | ||
5 | |||
6 | function! s:filters.filter(candidates, context) abort | ||
7 | for candidate in a:candidates | ||
8 | |||
9 | if has_key(candidate, 'action__buffer_nr') | ||
10 | let bufname = bufname(candidate.action__buffer_nr) | ||
11 | let filename = fnamemodify(bufname, ':p:t') | ||
12 | let path = fnamemodify(bufname, ':p:h') | ||
13 | elseif has_key(candidate, 'word') && has_key(candidate, 'action__path') | ||
14 | let path = candidate.action__path | ||
15 | let filename = candidate.word | ||
16 | endif | ||
17 | |||
18 | let icon = WebDevIconsGetFileTypeSymbol(filename, isdirectory(filename)) | ||
19 | |||
20 | " prevent filenames of buffers getting 'lost' | ||
21 | if filename != path | ||
22 | let path = printf('%s', filename) | ||
23 | endif | ||
24 | |||
25 | " Customize output format. | ||
26 | let candidate.abbr = printf('%s %s', icon, path) | ||
27 | endfor | ||
28 | return a:candidates | ||
29 | endfunction | ||
30 | |||
31 | call unite#define_filter(s:filters) | ||
32 | unlet s:filters | ||
33 | |||
34 | call unite#custom#source('file,file_rec,buffer,file_rec/async,file_rec/neovim,file_rec/neovim2,file_rec/git', 'converters', 'devicons_unite_converter') | ||
35 | endfunction | ||
36 | |||
37 | " vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/vimfiler.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/vimfiler.vim new file mode 100644 index 0000000..62e6c3d --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/vimfiler.vim | |||
@@ -0,0 +1,8 @@ | |||
1 | function! devicons#plugins#vimfiler#init() abort | ||
2 | call vimfiler#custom#profile('default', 'context', { | ||
3 | \ 'columns': 'devicons:size:time', | ||
4 | \ 'explorer_columns': 'devicons' | ||
5 | \ }) | ||
6 | endfunction | ||
7 | |||
8 | " vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/vimfiler/columns/devicons.vim b/.vim/pack/vendor/start/vim-devicons/autoload/vimfiler/columns/devicons.vim new file mode 100644 index 0000000..d11ee22 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/vimfiler/columns/devicons.vim | |||
@@ -0,0 +1,80 @@ | |||
1 | "============================================================================= | ||
2 | " FILE: devicons.vim | ||
3 | " Version: 0.11.0 | ||
4 | " Webpage: https://github.com/ryanoasis/vim-devicons | ||
5 | " Maintainer: Ryan McIntyre <ryanoasis@gmail.com> | ||
6 | " License: MIT license {{{ | ||
7 | " Permission is hereby granted, free of charge, to any person obtaining | ||
8 | " a copy of this software and associated documentation files (the | ||
9 | " "Software"), to deal in the Software without restriction, including | ||
10 | " without limitation the rights to use, copy, modify, merge, publish, | ||
11 | " distribute, sublicense, and/or sell copies of the Software, and to | ||
12 | " permit persons to whom the Software is furnished to do so, subject to | ||
13 | " the following conditions: | ||
14 | " | ||
15 | " The above copyright notice and this permission notice shall be included | ||
16 | " in all copies or substantial portions of the Software. | ||
17 | " | ||
18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
19 | " OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
20 | " MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
21 | " IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
22 | " CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
23 | " TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
24 | " SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
25 | " }}} | ||
26 | "============================================================================= | ||
27 | |||
28 | let s:save_cpo = &cpo | ||
29 | set cpo&vim | ||
30 | |||
31 | function! vimfiler#columns#devicons#define() abort | ||
32 | return s:column | ||
33 | endfunction | ||
34 | |||
35 | let s:column = { | ||
36 | \ 'name' : 'devicons', | ||
37 | \ 'description' : 'get devicon glyph', | ||
38 | \ 'syntax' : 'vimfilerColumn__devicons', | ||
39 | \ } | ||
40 | |||
41 | function! s:column.length(files, context) abort | ||
42 | return 3 | ||
43 | endfunction | ||
44 | |||
45 | function! s:column.define_syntax(context) abort "{{{ | ||
46 | syntax match vimfilerColumn__TypeText '\[T\]' | ||
47 | \ contained containedin=vimfilerColumn__Type | ||
48 | syntax match vimfilerColumn__TypeImage '\[I\]' | ||
49 | \ contained containedin=vimfilerColumn__Type | ||
50 | syntax match vimfilerColumn__TypeArchive '\[A\]' | ||
51 | \ contained containedin=vimfilerColumn__Type | ||
52 | syntax match vimfilerColumn__TypeExecute '\[X\]' | ||
53 | \ contained containedin=vimfilerColumn__Type | ||
54 | syntax match vimfilerColumn__TypeMultimedia '\[M\]' | ||
55 | \ contained containedin=vimfilerColumn__Type | ||
56 | syntax match vimfilerColumn__TypeDirectory '\[do\]' | ||
57 | \ contained containedin=vimfilerColumn__Type | ||
58 | syntax match vimfilerColumn__TypeSystem '\[S\]' | ||
59 | \ contained containedin=vimfilerColumn__Type | ||
60 | syntax match vimfilerColumn__TypeLink '\[L\]' | ||
61 | \ contained containedin=vimfilerColumn__Type | ||
62 | |||
63 | highlight def link vimfilerColumn__TypeText Constant | ||
64 | highlight def link vimfilerColumn__TypeImage Type | ||
65 | highlight def link vimfilerColumn__TypeArchive Special | ||
66 | highlight def link vimfilerColumn__TypeExecute Statement | ||
67 | highlight def link vimfilerColumn__TypeMultimedia Identifier | ||
68 | highlight def link vimfilerColumn__TypeDirectory Preproc | ||
69 | highlight def link vimfilerColumn__TypeSystem Comment | ||
70 | highlight def link vimfilerColumn__TypeLink Comment | ||
71 | endfunction"}}} | ||
72 | |||
73 | function! s:column.get(file, context) abort | ||
74 | return WebDevIconsGetFileTypeSymbol(strpart(a:file.action__path, strridx(a:file.action__path, '/')), a:file.vimfiler__is_directory) | ||
75 | endfunction | ||
76 | |||
77 | let &cpo = s:save_cpo | ||
78 | unlet s:save_cpo | ||
79 | |||
80 | " vim: foldmethod=marker | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/doc/webdevicons.txt b/.vim/pack/vendor/start/vim-devicons/doc/webdevicons.txt new file mode 100644 index 0000000..c1f5db1 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/doc/webdevicons.txt | |||
@@ -0,0 +1,1078 @@ | |||
1 | *devicons* | ||
2 | |||
3 | =============================================================================== | ||
4 | Contents ~ | ||
5 | |||
6 | 1. Introduction |devicons-introduction| | ||
7 | 2. Features |devicons-features| | ||
8 | 3. Installation |devicons-installation| | ||
9 | 4. Developers |devicons-developers| | ||
10 | 5. Troubleshooting |devicons-troubleshooting| | ||
11 | 6. Contributing |devicons-contributing| | ||
12 | 1. Code of Conduct [22] |devicons-code-of-conduct-22| | ||
13 | 2. Contributing Guide [23] |devicons-contributing-guide-23| | ||
14 | 3. Promotion |devicons-promotion| | ||
15 | 7. Acknowledgments |devicons-acknowledgments| | ||
16 | 8. License |devicons-license| | ||
17 | 9. Detailed Installation |devicons-detailed-installation| | ||
18 | 1. Step 1 'Nerd Font' |Nerd-Font| | ||
19 | 2. Step 2 'VimDevIcons Plugin' |VimDevIcons-Plugin| | ||
20 | 1. Pathogen [38] |devicons-pathogen-38| | ||
21 | 2. NeoBundle [39] |devicons-neobundle-39| | ||
22 | 3. Vundle [40] |devicons-vundle-40| | ||
23 | 4. Manual |devicons-manual| | ||
24 | 3. Step 3 'Configure Vim' |Configure-Vim| | ||
25 | 1. Set Encoding |devicons-set-encoding| | ||
26 | 2. Set Font |devicons-set-font| | ||
27 | 3. vim-airline |devicons-vim-airline| | ||
28 | 4. vimrc examples |devicons-vimrc-examples| | ||
29 | 4. That's it! You're done. |devicons-thats-it-youre-done.| | ||
30 | 10. Usage |devicons-usage| | ||
31 | 1. NERDTree |devicons-nerdtree| | ||
32 | 2. Unite |devicons-unite| | ||
33 | 3. Denite |devicons-denite| | ||
34 | 4. Vimfiler |devicons-vimfiler| | ||
35 | 5. CtrlP |devicons-ctrlp| | ||
36 | 6. Airline |devicons-airline| | ||
37 | 7. Startify |devicons-startify| | ||
38 | 8. Lightline Setup |devicons-lightline-setup| | ||
39 | 9. Powerline Setup |devicons-powerline-setup| | ||
40 | 10. Flagship |devicons-flagship| | ||
41 | 11. Detailed Features |devicons-detailed-features| | ||
42 | 12. Extra Configuration |devicons-extra-configuration| | ||
43 | 1. Character Mappings |devicons-character-mappings| | ||
44 | 2. API |devicons-api| | ||
45 | 1. Public Methods |devicons-public-methods| | ||
46 | 2. API Examples |devicons-api-examples| | ||
47 | 1. Status line |devicons-status-line| | ||
48 | 2. Simple function call |devicons-simple-function-call| | ||
49 | 3. Integration with other plugins |devicons-integration-with-other-plugins| | ||
50 | 1. vim-startify |devicons-vim-startify| | ||
51 | 13. FAQ |devicons-faq| | ||
52 | 1. Why isn't it working? How come I don't see any icons? |devicons-why-isnt-it-working-how-come-i-dont-see-any-icons| | ||
53 | 2. How did you get color matching based on file type in NERDtree? |devicons-how-did-you-get-color-matching-based-on-file-type-in-nerdtree| | ||
54 | 3. How did you get color matching on just the glyph/icon in NERDtree? |devicons-how-did-you-get-color-matching-on-just-glyph-icon-in-nerdtree| | ||
55 | 4. How do I solve issues after re-sourcing my |vimrc|? | ||
56 | 5. Why do I have artifacts after (or instead) of icons? |devicons-why-do-i-have-artifacts-after-of-icons| | ||
57 | 6. Square brackets around icons |devicons-square-brackets-around-icons| | ||
58 | 1. from terminal |devicons-from-terminal| | ||
59 | 7. Do I have to use a patched font such as Nerd Fonts? |devicons-do-i-have-to-use-patched-font-such-as-nerd-fonts| | ||
60 | 8. Rationale: Why does this exist? How did this start? |devicons-rationale-why-does-this-exist-how-did-this-start| | ||
61 | 14. References |devicons-references| | ||
62 | |||
63 | =============================================================================== | ||
64 | *devicons-introduction* | ||
65 | Introduction ~ | ||
66 | > | ||
67 | _ ___ ____ ____ | ||
68 | | | / (_____ ___ / __ \___ _ __/ _/________ ____ _____ | ||
69 | | | / / / __ `__ \/ / / / _ | | / // // ___/ __ \/ __ \/ ___/ | ||
70 | | |/ / / / / / / / /_/ / __| |/ _/ // /__/ /_/ / / / (__ ) | ||
71 | |___/_/_/ /_/ /_/_____/\___/|___/___/\___/\____/_/ /_/____/ | ||
72 | < | ||
73 | **VimDevIcons** | ||
74 | |||
75 | Adds Icons to Your Plugins | ||
76 | |||
77 | Supports plugins such as NERDTree [1], vim-airline [2], CtrlP [3], powerline | ||
78 | [4], denite [5], unite [6], lightline.vim [7], vim-startify [8], vimfiler [9], | ||
79 | vim-workspace [10] and flagship [11]. | ||
80 | |||
81 | See Screenshots [12] for more. | ||
82 | |||
83 | =============================================================================== | ||
84 | *devicons-features* | ||
85 | Features ~ | ||
86 | |||
87 | - Adds filetype glyphs (icons) to various vim plugins. | ||
88 | - Supports byte order marker (BOM). | ||
89 | - Customizable and extendable glyphs settings. | ||
90 | - Supports a wide range of file type extensions. | ||
91 | - Supports popular full filenames, like '.gitignore', 'node_modules', | ||
92 | '.vimrc'. | ||
93 | - Works with patched fonts, especially Nerd Fonts [13]. | ||
94 | |||
95 | See Detailed Features [14] for more. | ||
96 | |||
97 | See Configuration [15] for a list of configuration and customization options. | ||
98 | |||
99 | =============================================================================== | ||
100 | *devicons-installation* | ||
101 | Installation ~ | ||
102 | |||
103 | 1. Install a Nerd Font compatible font [16] or patch your own [17]. Then set | ||
104 | your terminal font (or 'guifont' if you are using GUI version of Vim). | ||
105 | |||
106 | 2. Install the Vim plugin with your favorite plugin manager, e.g. vim-plug | ||
107 | [18]: | ||
108 | |||
109 | "vim Plug 'ryanoasis/vim-devicons'" | ||
110 | |||
111 | Always load the vim-devicons as the very last one. | ||
112 | |||
113 | 3. Configure Vim | ||
114 | |||
115 | 'vim set encoding=UTF-8' | ||
116 | |||
117 | No need to set explicitly under Neovim: always uses UTF-8 as the default | ||
118 | encoding. | ||
119 | |||
120 | See Installation [19] for detailed setup instructions | ||
121 | |||
122 | Use ':help devicons' for further configuration. | ||
123 | |||
124 | =============================================================================== | ||
125 | *devicons-developers* | ||
126 | Developers ~ | ||
127 | |||
128 | See DEVELOPER [20] for how to use the API. | ||
129 | |||
130 | =============================================================================== | ||
131 | *devicons-troubleshooting* | ||
132 | Troubleshooting ~ | ||
133 | |||
134 | See FAQ [21]. | ||
135 | |||
136 | =============================================================================== | ||
137 | *devicons-contributing* | ||
138 | Contributing ~ | ||
139 | |||
140 | ------------------------------------------------------------------------------- | ||
141 | *devicons-code-of-conduct-22* | ||
142 | Code of Conduct [22] ~ | ||
143 | |||
144 | This project has adopted a Code of Conduct that we expect project participants | ||
145 | to adhere to. Check out code of conduct [22] for further details. | ||
146 | |||
147 | ------------------------------------------------------------------------------- | ||
148 | *devicons-contributing-guide-23* | ||
149 | Contributing Guide [23] ~ | ||
150 | |||
151 | Read our contributing [23] guide to learn about how to send pull requests, | ||
152 | creating issues properly. | ||
153 | |||
154 | ------------------------------------------------------------------------------- | ||
155 | *devicons-promotion* | ||
156 | Promotion ~ | ||
157 | |||
158 | You can help us by simply giving a star or voting on vim.org. It will ensure | ||
159 | continued development going forward. | ||
160 | |||
161 | - Star this repository on GitHub [24]. | ||
162 | - Vote for it on vim.org [25]. | ||
163 | |||
164 | =============================================================================== | ||
165 | *devicons-acknowledgments* | ||
166 | Acknowledgments ~ | ||
167 | |||
168 | Thanks goes to these people for inspiration and helping with sending PRs. | ||
169 | |||
170 | - vim-airline [2] | ||
171 | - nerdtree [1] | ||
172 | - nerdtree-git-plugin [26] by @Xuyuanp [27] | ||
173 | - seti-ui [28] by @jesseweed [29] | ||
174 | - devicons [30] by @vorillaz [31] | ||
175 | - development.svg.icons [32] by @benatespina [33] | ||
176 | - Learn Vimscript the Hard Way [34] book by Steve Losh [35] | ||
177 | - All contributors [36] | ||
178 | |||
179 | =============================================================================== | ||
180 | *devicons-license* | ||
181 | License ~ | ||
182 | |||
183 | MIT [37] | ||
184 | |||
185 | =============================================================================== | ||
186 | *devicons-detailed-installation* | ||
187 | Detailed Installation ~ | ||
188 | |||
189 | ------------------------------------------------------------------------------- | ||
190 | *Nerd-Font* | ||
191 | Step 1 'Nerd Font' ~ | ||
192 | |||
193 | Get a **Nerd Font!** [16] or patch your own. [17] Without this, things break | ||
194 | |||
195 | ------------------------------------------------------------------------------- | ||
196 | *VimDevIcons-Plugin* | ||
197 | Step 2 'VimDevIcons Plugin' ~ | ||
198 | |||
199 | **Set VimDevIcons to load _after_ these plugins!** | ||
200 | |||
201 | NERDTree [1] | vim-airline [2] | CtrlP [3] | powerline [4] | Denite [5] | unite | ||
202 | [6] | lightline.vim [7] | vim-startify [8] | vimfiler [9] | flagship [11] | ||
203 | |||
204 | Choose your favorite plugin manager | ||
205 | |||
206 | ------------------------------------------------------------------------------- | ||
207 | *devicons-pathogen-38* | ||
208 | Pathogen [38] ~ | ||
209 | |||
210 | - 'git clone https://github.com/ryanoasis/vim-devicons ~/.vim/bundle/vim- | ||
211 | devicons' | ||
212 | |||
213 | ------------------------------------------------------------------------------- | ||
214 | *devicons-neobundle-39* | ||
215 | NeoBundle [39] ~ | ||
216 | |||
217 | - Add to vimrc: | ||
218 | |||
219 | "vim NeoBundle 'ryanoasis/vim-devicons'" * And install it: | ||
220 | |||
221 | 'vim :so ~/.vimrc :NeoBundleInstall' | ||
222 | |||
223 | ------------------------------------------------------------------------------- | ||
224 | *devicons-vundle-40* | ||
225 | Vundle [40] ~ | ||
226 | |||
227 | - Add to vimrc: | ||
228 | |||
229 | "vim Plugin 'ryanoasis/vim-devicons'" * And install it: | ||
230 | |||
231 | 'vim :so ~/.vimrc :PlugInstall' | ||
232 | |||
233 | ------------------------------------------------------------------------------- | ||
234 | *devicons-manual* | ||
235 | Manual ~ | ||
236 | |||
237 | - copy all of the files into your '~/.vim' directory | ||
238 | |||
239 | ------------------------------------------------------------------------------- | ||
240 | *Configure-Vim* | ||
241 | Step 3 'Configure Vim' ~ | ||
242 | |||
243 | Add the following in your '.vimrc' or '.gvimrc': | ||
244 | |||
245 | ------------------------------------------------------------------------------- | ||
246 | *devicons-set-encoding* | ||
247 | Set Encoding ~ | ||
248 | |||
249 | **Set encoding to UTF-8 to show glyphs** | ||
250 | |||
251 | 'vim set encoding=utf8' | ||
252 | |||
253 | ------------------------------------------------------------------------------- | ||
254 | *devicons-set-font* | ||
255 | Set Font ~ | ||
256 | |||
257 | **Set Vim font to a Nerd Font** | ||
258 | |||
259 | Linux 'vim set guifont=' | ||
260 | > | ||
261 | set guifont=DroidSansMono\ Nerd\ Font\ 11 | ||
262 | < | ||
263 | macOS (OS X) and Windows | ||
264 | > | ||
265 | set guifont=:h | ||
266 | < | ||
267 | |||
268 | > | ||
269 | set guifont=DroidSansMono\ Nerd\ Font:h11 | ||
270 | " or: | ||
271 | set guifont=DroidSansMono_Nerd_Font:h11 | ||
272 | < | ||
273 | **Note:** if you don't set 'guifont' then you'll have to set your terminal's | ||
274 | font, else things break! | ||
275 | |||
276 | ------------------------------------------------------------------------------- | ||
277 | *devicons-vim-airline* | ||
278 | vim-airline ~ | ||
279 | |||
280 | **If you use vim-airline you need this:** | ||
281 | |||
282 | 'vim let g:airline_powerline_fonts = 1' | ||
283 | |||
284 | ------------------------------------------------------------------------------- | ||
285 | *devicons-vimrc-examples* | ||
286 | vimrc examples ~ | ||
287 | |||
288 | - Sample Windows vimrc configuration 1 [41] | ||
289 | - Sample Linux vimrc configuration 1 [42] | ||
290 | |||
291 | ------------------------------------------------------------------------------- | ||
292 | *devicons-thats-it-youre-done.* | ||
293 | That's it! You're done. ~ | ||
294 | |||
295 | =============================================================================== | ||
296 | *devicons-usage* | ||
297 | Usage ~ | ||
298 | |||
299 | If you installed and setup things correctly you should now see icons in the | ||
300 | supported plugins! | ||
301 | |||
302 | **Notes on include order:** _for support of these plugins: NERDTree [1], vim- | ||
303 | airline [2], CtrlP [3], powerline [4], Denite [5], unite [6], vimfiler [9], | ||
304 | flagship [11] you **must** configure vim to load those plugins__before_ vim- | ||
305 | devicons loads. for better nerdtree-git-plugin [26] support, you _should_ | ||
306 | configure vim to load nerdtree-git-plugin **_before_** VimDevIcons loads. * if | ||
307 | you are lazy loading Denite [5] using the Dein plugin manager, you will need to | ||
308 | source VimDevIcons before Denite loads. | ||
309 | |||
310 | Lightline Setup and Powerline Setup require some extra setup as shown below: | ||
311 | |||
312 | ------------------------------------------------------------------------------- | ||
313 | *devicons-nerdtree* | ||
314 | NERDTree ~ | ||
315 | |||
316 | Should work "out of the box", no particular configuration should be needed. | ||
317 | > | ||
318 | " Can be enabled or disabled | ||
319 | let g:webdevicons_enable_nerdtree = 1 | ||
320 | < | ||
321 | |||
322 | > | ||
323 | " whether or not to show the nerdtree brackets around flags | ||
324 | let g:webdevicons_conceal_nerdtree_brackets = 1 | ||
325 | < | ||
326 | ------------------------------------------------------------------------------- | ||
327 | *devicons-unite* | ||
328 | Unite ~ | ||
329 | |||
330 | Should work "out of the box", no particular configuration should be needed. | ||
331 | > | ||
332 | " Can be enabled or disabled | ||
333 | " adding the custom source to unite | ||
334 | let g:webdevicons_enable_unite = 1 | ||
335 | < | ||
336 | ------------------------------------------------------------------------------- | ||
337 | *devicons-denite* | ||
338 | Denite ~ | ||
339 | |||
340 | Should work "out of the box", no particular configuration should be needed. | ||
341 | > | ||
342 | " Can be enabled or disabled | ||
343 | " Adding the custom source to denite | ||
344 | let g:webdevicons_enable_denite = 1 | ||
345 | < | ||
346 | ------------------------------------------------------------------------------- | ||
347 | *devicons-vimfiler* | ||
348 | Vimfiler ~ | ||
349 | |||
350 | Should work "out of the box", no particular configuration should be needed. | ||
351 | > | ||
352 | " Can be enabled or disabled | ||
353 | " adding the column to vimfiler | ||
354 | let g:webdevicons_enable_vimfiler = 1 | ||
355 | < | ||
356 | ------------------------------------------------------------------------------- | ||
357 | *devicons-ctrlp* | ||
358 | CtrlP ~ | ||
359 | |||
360 | Should work "out of the box", no particular configuration should be needed. | ||
361 | > | ||
362 | " Can be enabled or disabled | ||
363 | " add glyphs to all modes | ||
364 | let g:webdevicons_enable_ctrlp = 1 | ||
365 | < | ||
366 | ------------------------------------------------------------------------------- | ||
367 | *devicons-airline* | ||
368 | Airline ~ | ||
369 | |||
370 | Should work "out of the box", no particular configuration should be needed. | ||
371 | > | ||
372 | " adding to vim-airline's tabline | ||
373 | let g:webdevicons_enable_airline_tabline = 1 | ||
374 | < | ||
375 | |||
376 | > | ||
377 | " adding to vim-airline's statusline | ||
378 | let g:webdevicons_enable_airline_statusline = 1 | ||
379 | < | ||
380 | ------------------------------------------------------------------------------- | ||
381 | *devicons-startify* | ||
382 | Startify ~ | ||
383 | |||
384 | Should work "out of the box", no particular configuration should be needed. | ||
385 | > | ||
386 | " Can be enabled or disabled | ||
387 | " adding to vim-startify screen | ||
388 | let g:webdevicons_enable_startify = 1 | ||
389 | < | ||
390 | ------------------------------------------------------------------------------- | ||
391 | *devicons-lightline-setup* | ||
392 | Lightline Setup ~ | ||
393 | |||
394 | To add the appropriate icon to lightline [7], call the function | ||
395 | 'WebDevIconsGetFileTypeSymbol()' and/or 'WebDevIconsGetFileFormatSymbol()' in | ||
396 | your '.vimrc'. For example, you could set your sections to: | ||
397 | > | ||
398 | let g:lightline = { | ||
399 | \ 'component_function': { | ||
400 | \ 'filetype': 'MyFiletype', | ||
401 | \ 'fileformat': 'MyFileformat', | ||
402 | \ } | ||
403 | \ } | ||
404 | |||
405 | function! MyFiletype() | ||
406 | return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' | ||
407 | endfunction | ||
408 | |||
409 | function! MyFileformat() | ||
410 | return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : '' | ||
411 | endfunction | ||
412 | < | ||
413 | ------------------------------------------------------------------------------- | ||
414 | *devicons-powerline-setup* | ||
415 | Powerline Setup ~ | ||
416 | |||
417 | - _Note this is for the current Powerline [4] not the deprecated vim- | ||
418 | powerline [43]_ | ||
419 | |||
420 | To enable for Powerline [4] some |vimrc| and powerline configuration changes | ||
421 | are needed: | ||
422 | |||
423 | |vimrc| changes (only required if you don't already have powerline setup for | ||
424 | vim): | ||
425 | > | ||
426 | set rtp+=$HOME/.local/lib/python2.7/site-packages/powerline/bindings/vim/ | ||
427 | |||
428 | " Always show statusline | ||
429 | set laststatus=2 | ||
430 | |||
431 | " Use 256 colours (Use this setting only if your terminal supports 256 colours) | ||
432 | set t_Co=256 | ||
433 | < | ||
434 | powerline configuration changes: | ||
435 | |||
436 | file type segment | ||
437 | > | ||
438 | { | ||
439 | "function": "vim_devicons.powerline.segments.webdevicons", | ||
440 | "priority": 10, | ||
441 | "draw_soft_divider": false, | ||
442 | "after": " " | ||
443 | } | ||
444 | < | ||
445 | file format segment | ||
446 | > | ||
447 | { | ||
448 | "function": "vim_devicons.powerline.segments.webdevicons_file_format", | ||
449 | "draw_soft_divider": false, | ||
450 | "exclude_modes": ["nc"], | ||
451 | "priority": 90 | ||
452 | } | ||
453 | < | ||
454 | for full example see sample file [44] | ||
455 | |||
456 | ------------------------------------------------------------------------------- | ||
457 | *devicons-flagship* | ||
458 | Flagship ~ | ||
459 | |||
460 | Should work "out of the box", no particular configuration should be needed. | ||
461 | > | ||
462 | " Can be enabled or disabled | ||
463 | " adding to flagship's statusline | ||
464 | let g:webdevicons_enable_flagship_statusline = 1 | ||
465 | < | ||
466 | =============================================================================== | ||
467 | *devicons-detailed-features* | ||
468 | Detailed Features ~ | ||
469 | |||
470 | - Adds filetype glyphs (icons) to various vim plugins, currently supports: | ||
471 | |||
472 | - NERDTree [1] | ||
473 | |||
474 | - Using the version hosted on vimscripts [45] in favor of GitHub will | ||
475 | lead to a outdated message, and icons will fail to show. | ||
476 | |||
477 | - vim-airline [2] (statusline and tabline) | ||
478 | |||
479 | - CtrlP [3] (All modes now supported) | ||
480 | |||
481 | - Using the version hosted on vimscripts [46] in favor of GitHub will | ||
482 | lead to a outdated message, and icons will fail to show. | ||
483 | |||
484 | - powerline [4] (statusline) | ||
485 | |||
486 | - see: powerline setup | ||
487 | |||
488 | - Denite [5] | ||
489 | |||
490 | - Currently supports 'file_rec', 'file_old', 'buffer', and | ||
491 | 'directory_rec' | ||
492 | |||
493 | - unite [6] | ||
494 | |||
495 | - Currently supports 'file', 'file_rec', 'buffer', 'file_rec/async', and | ||
496 | 'file_rec/neovim' | ||
497 | |||
498 | - lightline.vim [7] (statusline) | ||
499 | |||
500 | - see: lightline setup | ||
501 | |||
502 | - vim-startify [8] | ||
503 | |||
504 | - vimfiler [9] | ||
505 | |||
506 | - flagship [11] | ||
507 | |||
508 | - Support is **experimental** because the API may be changing [47] | ||
509 | |||
510 | - vim-workspace [10] | ||
511 | |||
512 | - Supports byte order marker (BOM) | ||
513 | |||
514 | - Customizable and extendable glyphs (icons) settings | ||
515 | |||
516 | - ability to override defaults and use your own characters or glyphs | ||
517 | |||
518 | - Supports a wide range of file type extensions by default: | ||
519 | |||
520 | - 'styl, sass, scss, htm, html, slim, ejs, css, less, md, rmd, json, js, jsx, | ||
521 | rb, php, py, pyc, pyd, pyo, coffee, mustache, hbs, conf, ini, yml, yaml, | ||
522 | bat, jpg, jpeg, bmp, png, gif, twig, cpp, c++, cxx, cc, cp, c, h, hpp, hxx, | ||
523 | hs, lhs, lua, java, sh, bash, zsh, ksh, csh, awk, ps1, fish, diff, db, clj, | ||
524 | cljs, edn, scala, go, dart, xul, sln, suo, pl, pm, t, rss, f#, fsscript, | ||
525 | fsx, fs, fsi, rs, rlib, d, erl, hrl, vim, ai, psd, psb, ts, jl, pp, vue, | ||
526 | swift, eex, ex, exs' | ||
527 | |||
528 | - Supports a few full filename matches, by default: | ||
529 | |||
530 | - 'gruntfile.coffee, gruntfile.js, gruntfile.ls, gulpfile.coffee, | ||
531 | gulpfile.js, gulpfile.ls, dropbox, .ds_store, .gitconfig, .gitignore, | ||
532 | .bashrc, .zshrc, .vimrc, .bashprofile, favicon.ico, license, node_modules, | ||
533 | react.jsx, procfile' | ||
534 | |||
535 | - Supports a few library pattern matches, by default: | ||
536 | |||
537 | - 'jquery, angular, backbone, requirejs, materialize, mootools, Vagrantfile' | ||
538 | |||
539 | - Works with patched fonts, especially Nerd Fonts [13] | ||
540 | |||
541 | =============================================================================== | ||
542 | *devicons-extra-configuration* | ||
543 | Extra Configuration ~ | ||
544 | |||
545 | - These options can be defined in your |vimrc| or 'gvimrc' | ||
546 | |||
547 | - Most options are enabled **'1'** by default but can be disabled with | ||
548 | **'0'** | ||
549 | |||
550 | - You _should_**not** need to configure anything, however, the following | ||
551 | options are provided for customizing or changing the defaults: | ||
552 | > | ||
553 | " loading the plugin | ||
554 | let g:webdevicons_enable = 1 | ||
555 | < | ||
556 | |||
557 | > | ||
558 | " adding the flags to NERDTree | ||
559 | let g:webdevicons_enable_nerdtree = 1 | ||
560 | < | ||
561 | |||
562 | > | ||
563 | " adding the custom source to unite | ||
564 | let g:webdevicons_enable_unite = 1 | ||
565 | < | ||
566 | |||
567 | > | ||
568 | " adding the column to vimfiler | ||
569 | let g:webdevicons_enable_vimfiler = 1 | ||
570 | < | ||
571 | |||
572 | > | ||
573 | " adding to vim-airline's tabline | ||
574 | let g:webdevicons_enable_airline_tabline = 1 | ||
575 | < | ||
576 | |||
577 | > | ||
578 | " adding to vim-airline's statusline | ||
579 | let g:webdevicons_enable_airline_statusline = 1 | ||
580 | < | ||
581 | |||
582 | > | ||
583 | " ctrlp glyphs | ||
584 | let g:webdevicons_enable_ctrlp = 1 | ||
585 | < | ||
586 | |||
587 | > | ||
588 | " adding to vim-startify screen | ||
589 | let g:webdevicons_enable_startify = 1 | ||
590 | < | ||
591 | |||
592 | > | ||
593 | " adding to flagship's statusline | ||
594 | let g:webdevicons_enable_flagship_statusline = 1 | ||
595 | < | ||
596 | |||
597 | > | ||
598 | " turn on/off file node glyph decorations (not particularly useful) | ||
599 | let g:WebDevIconsUnicodeDecorateFileNodes = 1 | ||
600 | < | ||
601 | |||
602 | > | ||
603 | " use double-width(1) or single-width(0) glyphs | ||
604 | " only manipulates padding, has no effect on terminal or set(guifont) font | ||
605 | let g:WebDevIconsUnicodeGlyphDoubleWidth = 1 | ||
606 | < | ||
607 | |||
608 | > | ||
609 | " whether or not to show the nerdtree brackets around flags | ||
610 | let g:webdevicons_conceal_nerdtree_brackets = 1 | ||
611 | < | ||
612 | |||
613 | > | ||
614 | " the amount of space to use after the glyph character (default ' ') | ||
615 | let g:WebDevIconsNerdTreeAfterGlyphPadding = ' ' | ||
616 | < | ||
617 | |||
618 | > | ||
619 | " Force extra padding in NERDTree so that the filetype icons line up vertically | ||
620 | let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1 | ||
621 | < | ||
622 | |||
623 | > | ||
624 | " Adding the custom source to denite | ||
625 | let g:webdevicons_enable_denite = 1 | ||
626 | |||
627 | |||
628 | |||
629 | " the amount of space to use after the glyph character in vim-airline | ||
630 | tabline(default '') | ||
631 | let g:WebDevIconsTabAirLineAfterGlyphPadding = ' ' | ||
632 | |||
633 | |||
634 | |||
635 | " the amount of space to use before the glyph character in vim-airline | ||
636 | tabline(default ' ') | ||
637 | let g:WebDevIconsTabAirLineBeforeGlyphPadding = ' ' | ||
638 | < | ||
639 | ------------------------------------------------------------------------------- | ||
640 | *devicons-character-mappings* | ||
641 | Character Mappings ~ | ||
642 | |||
643 | - 'ƛ' is used as an example below, substitute for the glyph you **actually** | ||
644 | want to use | ||
645 | > | ||
646 | " change the default character when no match found | ||
647 | let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = 'ƛ' | ||
648 | < | ||
649 | |||
650 | > | ||
651 | " set a byte character marker (BOM) utf-8 symbol when retrieving file encoding | ||
652 | " disabled by default with no value | ||
653 | let g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol = '' | ||
654 | < | ||
655 | |||
656 | > | ||
657 | " enable folder/directory glyph flag (disabled by default with 0) | ||
658 | let g:WebDevIconsUnicodeDecorateFolderNodes = 1 | ||
659 | < | ||
660 | |||
661 | > | ||
662 | " enable open and close folder/directory glyph flags (disabled by default with 0) | ||
663 | let g:DevIconsEnableFoldersOpenClose = 1 | ||
664 | < | ||
665 | |||
666 | > | ||
667 | " enable pattern matching glyphs on folder/directory (enabled by default with 1) | ||
668 | let g:DevIconsEnableFolderPatternMatching = 1 | ||
669 | < | ||
670 | |||
671 | > | ||
672 | " enable file extension pattern matching glyphs on folder/directory (disabled by default with 0) | ||
673 | let g:DevIconsEnableFolderExtensionPatternMatching = 0 | ||
674 | < | ||
675 | |||
676 | > | ||
677 | " disable showing the distribution for unix file encoding (enabled by default with 1) | ||
678 | let g:DevIconsEnableDistro = 0 | ||
679 | < | ||
680 | |||
681 | > | ||
682 | " enable custom folder/directory glyph exact matching | ||
683 | " (enabled by default when g:WebDevIconsUnicodeDecorateFolderNodes is set to 1) | ||
684 | let WebDevIconsUnicodeDecorateFolderNodesExactMatches = 1 | ||
685 | < | ||
686 | |||
687 | > | ||
688 | " change the default folder/directory glyph/icon | ||
689 | let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = 'ƛ' | ||
690 | < | ||
691 | |||
692 | > | ||
693 | " change the default open folder/directory glyph/icon (default is '') | ||
694 | let g:DevIconsDefaultFolderOpenSymbol = 'ƛ' | ||
695 | < | ||
696 | |||
697 | > | ||
698 | " change the default dictionary mappings for file extension matches | ||
699 | |||
700 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed | ||
701 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['js'] = 'ƛ' | ||
702 | < | ||
703 | |||
704 | > | ||
705 | " change the default dictionary mappings for exact file node matches | ||
706 | |||
707 | let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {} " needed | ||
708 | let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols['MyReallyCoolFile.okay'] = 'ƛ' | ||
709 | < | ||
710 | |||
711 | > | ||
712 | " add or override individual additional filetypes | ||
713 | |||
714 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed | ||
715 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['myext'] = 'ƛ' | ||
716 | < | ||
717 | |||
718 | > | ||
719 | " add or override pattern matches for filetypes | ||
720 | " these take precedence over the file extensions | ||
721 | |||
722 | let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {} " needed | ||
723 | let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*jquery.*\.js$'] = 'ƛ' | ||
724 | < | ||
725 | specify OS to decide an icon for unix fileformat (_not_ defined by default) - | ||
726 | this is useful for avoiding unnecessary 'system()' call. see #135 [48] for | ||
727 | further details. | ||
728 | > | ||
729 | let g:WebDevIconsOS = 'Darwin' | ||
730 | < | ||
731 | ------------------------------------------------------------------------------- | ||
732 | *devicons-api* | ||
733 | API ~ | ||
734 | > | ||
735 | " returns the font character that represents the icon | ||
736 | " parameters: a:1 (filename), a:2 (isDirectory) | ||
737 | " both parameters optional | ||
738 | " by default without parameters uses buffer name | ||
739 | WebDevIconsGetFileTypeSymbol(...) | ||
740 | |||
741 | " returns the font character that represents | ||
742 | " the file format as an icon (windows, linux, mac) | ||
743 | WebDevIconsGetFileFormatSymbol() | ||
744 | < | ||
745 | ------------------------------------------------------------------------------- | ||
746 | *devicons-public-methods* | ||
747 | Public Methods ~ | ||
748 | > | ||
749 | " Returns the current version of the plugin | ||
750 | webdevicons#version() | ||
751 | < | ||
752 | |||
753 | > | ||
754 | " Calls webdevicons#softRefresh() | ||
755 | " basically a backwards compatibility convenience | ||
756 | webdevicons#refresh() | ||
757 | < | ||
758 | |||
759 | > | ||
760 | " Does a 'hard' refresh of NERDTree | ||
761 | " resets vim-devicons syntax and closes and reopens NERDTree | ||
762 | webdevicons#hardRefresh() | ||
763 | < | ||
764 | |||
765 | > | ||
766 | " Does a 'soft' refresh of NERDTree | ||
767 | " resets vim-devicons syntax and toggles NERDTree to the same state | ||
768 | webdevicons#softRefresh() | ||
769 | < | ||
770 | ------------------------------------------------------------------------------- | ||
771 | *devicons-api-examples* | ||
772 | API Examples ~ | ||
773 | |||
774 | ------------------------------------------------------------------------------- | ||
775 | *devicons-status-line* | ||
776 | Status line ~ | ||
777 | |||
778 | Custom vim status line (not relying on vim-airline or lightline): | ||
779 | > | ||
780 | set statusline=%f\ %{WebDevIconsGetFileTypeSymbol()}\ %h%w%m%r\ %=%(%l,%c%V\ %Y\ %=\ %P%) | ||
781 | < | ||
782 | ------------------------------------------------------------------------------- | ||
783 | *devicons-simple-function-call* | ||
784 | Simple function call ~ | ||
785 | > | ||
786 | echo WebDevIconsGetFileFormatSymbol() | ||
787 | < | ||
788 | ------------------------------------------------------------------------------- | ||
789 | *devicons-integration-with-other-plugins* | ||
790 | Integration with other plugins ~ | ||
791 | |||
792 | ------------------------------------------------------------------------------- | ||
793 | *devicons-vim-startify* | ||
794 | vim-startify ~ | ||
795 | > | ||
796 | let entry_format = "' ['. index .']'. repeat(' ', (3 - strlen(index)))" | ||
797 | |||
798 | if exists('*WebDevIconsGetFileTypeSymbol') " support for vim-devicons | ||
799 | let entry_format .= ". WebDevIconsGetFileTypeSymbol(entry_path) .' '. entry_path" | ||
800 | else | ||
801 | let entry_format .= '. entry_path' | ||
802 | endif | ||
803 | < | ||
804 | =============================================================================== | ||
805 | *devicons-faq* | ||
806 | FAQ ~ | ||
807 | |||
808 | **Table of Contents:** | ||
809 | |||
810 | **It's not working at all:** | ||
811 | |||
812 | - **Why isn't it working? How come I don't see any icons?** | ||
813 | |||
814 | **Syntax or color highlighting:** | ||
815 | |||
816 | - **How did you get color matching based on file type in NERDtree?** | ||
817 | - **How did you get color matching on just the glyph/icon in NERDtree?** | ||
818 | |||
819 | **Re-sourcing |vimrc|:** | ||
820 | |||
821 | - **How do I solve issues after re-sourcing my |vimrc|?** | ||
822 | |||
823 | **Weird artifacts after/on the glyphs:** | ||
824 | |||
825 | - **Why do I have artifacts after (or instead) of icons?** | ||
826 | - **Square brackets around icons?** | ||
827 | |||
828 | **Fonts:** | ||
829 | |||
830 | - **Do I have to use a patched font such as Nerd Fonts?** | ||
831 | |||
832 | **Why does this exist? How did this start?** | ||
833 | |||
834 | ------------------------------------------------------------------------------- | ||
835 | *devicons-why-isnt-it-working-how-come-i-dont-see-any-icons* | ||
836 | Why isn't it working? How come I don't see any icons? ~ | ||
837 | |||
838 | - Are you using the patched font provided in the separate repo (Nerd Fonts | ||
839 | [13]) or are you patching your own? | ||
840 | |||
841 | - _NOTE:_ if running vim and no font set it will default to the terminal font | ||
842 | that is set | ||
843 | |||
844 | - check what the vim/gvim font is set to, from ex mode: | ||
845 | |||
846 | 'vim :set guifont?' | ||
847 | |||
848 | - check if the plugin is loaded (should give '1'), from ex mode: | ||
849 | |||
850 | 'vim :echo loaded_webdevicons' | ||
851 | |||
852 | - check if the plugin is enabled (should give '1'), from ex mode: | ||
853 | |||
854 | 'vim :echo g:webdevicons_enable' | ||
855 | |||
856 | - check if the plugin is enabled for NERDTree (should give '1'), from ex | ||
857 | mode: | ||
858 | |||
859 | - this should _NOT_ need to be set under normal circumstances | ||
860 | |||
861 | 'vim :echo g:webdevicons_enable_nerdtree' | ||
862 | |||
863 | - check if you are able to see the characters, from ex mode: | ||
864 | |||
865 | 'vim :echo g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol' | ||
866 | |||
867 | - if all this looks correct you may try this to see if any files show flags | ||
868 | |||
869 | - last resort, see if you can even set the default symbol and have it | ||
870 | display anywhere (NERDTree, vim-airline's statusline, vim-airlines's | ||
871 | tabline), from ex mode: | ||
872 | |||
873 | "vim :let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol='x'" | ||
874 | |||
875 | ------------------------------------------------------------------------------- | ||
876 | *devicons-how-did-you-get-color-matching-based-on-file-type-in-nerdtree* | ||
877 | How did you get color matching based on file type in NERDtree? ~ | ||
878 | |||
879 | - You can either use this additional plugin: vim-nerdtree-syntax-highlight | ||
880 | [49] created by @tiagofumo [50] | ||
881 | |||
882 | - Or you can use my current settings from: | ||
883 | https://github.com/scrooloose/nerdtree/issues/201#issuecomment-9954740 | ||
884 | |||
885 | ```vim " NERDTress File highlighting function! | ||
886 | NERDTreeHighlightFile(extension, fg, bg, guifg, guibg) exec 'autocmd | ||
887 | FileType nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' | ||
888 | ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg exec 'autocmd | ||
889 | FileType nerdtree syn match ' . a:extension .' #^\s+.*'. a:extension .'$#' | ||
890 | endfunction | ||
891 | |||
892 | call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') | ||
893 | call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515') | ||
894 | call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515') call | ||
895 | NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515') call | ||
896 | NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515') call | ||
897 | NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515') call | ||
898 | NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515') call | ||
899 | NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515') call | ||
900 | NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515') call | ||
901 | NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515') call | ||
902 | NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515') call | ||
903 | NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515') call | ||
904 | NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515') call | ||
905 | NERDTreeHighlightFile('ds_store', 'Gray', 'none', '#686868', '#151515') | ||
906 | call NERDTreeHighlightFile('gitconfig', 'Gray', 'none', '#686868', | ||
907 | '#151515') call NERDTreeHighlightFile('gitignore', 'Gray', 'none', | ||
908 | '#686868', '#151515') call NERDTreeHighlightFile('bashrc', 'Gray', 'none', | ||
909 | '#686868', '#151515') call NERDTreeHighlightFile('bashprofile', 'Gray', | ||
910 | 'none', '#686868', '#151515') 'Note: If the colors still are not | ||
911 | highlighting, try invoking such as:' autocmd VimEnter * call | ||
912 | NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') ``` per: | ||
913 | https://github.com/ryanoasis/vim-devicons/issues/49#issuecomment-101753558 | ||
914 | |||
915 | ------------------------------------------------------------------------------- | ||
916 | *devicons-how-did-you-get-color-matching-on-just-glyph-icon-in-nerdtree* | ||
917 | How did you get color matching on just the glyph/icon in NERDtree? ~ | ||
918 | |||
919 | - You can add something like this to your |vimrc| | ||
920 | |||
921 | ```vim " NERDTress File highlighting only the glyph/icon " test highlight | ||
922 | just the glyph (icons) in nerdtree: autocmd filetype nerdtree highlight | ||
923 | haskell_icon ctermbg=none ctermfg=Red guifg=#ffa500 autocmd filetype | ||
924 | nerdtree highlight html_icon ctermbg=none ctermfg=Red guifg=#ffa500 autocmd | ||
925 | filetype nerdtree highlight go_icon ctermbg=none ctermfg=Red guifg=#ffa500 | ||
926 | |||
927 | autocmd filetype nerdtree syn match haskell_icon ## | ||
928 | containedin=NERDTreeFile " if you are using another syn highlight for a | ||
929 | given line (e.g. " NERDTreeHighlightFile) need to give that name in the | ||
930 | 'containedin' for this " other highlight to work with it autocmd filetype | ||
931 | nerdtree syn match html_icon ## containedin=NERDTreeFile,html autocmd | ||
932 | filetype nerdtree syn match go_icon ## containedin=NERDTreeFile ``` | ||
933 | |||
934 | ------------------------------------------------------------------------------- | ||
935 | How do I solve issues after re-sourcing my *vimrc*? | ||
936 | |||
937 | - Try adding this to the bottom of your |vimrc| | ||
938 | |||
939 | 'vim if exists("g:loaded_webdevicons") call webdevicons#refresh() endif' | ||
940 | |||
941 | ------------------------------------------------------------------------------- | ||
942 | *devicons-why-do-i-have-artifacts-after-of-icons* | ||
943 | Why do I have artifacts after (or instead) of icons? ~ | ||
944 | |||
945 | - Dots after icons in NERDTree (on GVim), try: | ||
946 | |||
947 | 'vim autocmd FileType nerdtree setlocal nolist' | ||
948 | |||
949 | source: Issue #110 [51] | ||
950 | |||
951 | - Newly created files in NERDTree are slow to show the glyph (icon) | ||
952 | - check your current setting of ':updatetime?' | ||
953 | - try setting 'updatetime' in your |vimrc| to a lower value like '250', for | ||
954 | more info see: Issue #153 [52] | ||
955 | |||
956 | ------------------------------------------------------------------------------- | ||
957 | *devicons-square-brackets-around-icons* | ||
958 | Square brackets around icons ~ | ||
959 | |||
960 | - By default if your Vim supports conceal you should not see these, debug | ||
961 | steps: | ||
962 | |||
963 | - Check if the plugin feature is set (should be '1'): | ||
964 | |||
965 | 'vim echo g:webdevicons_conceal_nerdtree_brackets' | ||
966 | |||
967 | - Check that your vim was compiled with the 'conceal' feature (should be | ||
968 | '+conceal'): | ||
969 | |||
970 | ```shell | ||
971 | |||
972 | ------------------------------------------------------------------------------- | ||
973 | *devicons-from-terminal* | ||
974 | from terminal ~ | ||
975 | |||
976 | vim --version | grep conceal ``` | ||
977 | |||
978 | - Check the 'conceallevel' (should be '3'): | ||
979 | |||
980 | 'vim set conceallevel?' | ||
981 | |||
982 | ------------------------------------------------------------------------------- | ||
983 | *devicons-do-i-have-to-use-patched-font-such-as-nerd-fonts* | ||
984 | Do I have to use a patched font such as Nerd Fonts? ~ | ||
985 | |||
986 | VimDevIcons was desired to work with Nerd Fonts [13], however you do _not_ have | ||
987 | to use a patched font or even Nerd Fonts specified glyphs. You have 2 main | ||
988 | options: | ||
989 | |||
990 | fontconfig fallback | ||
991 | |||
992 | 1. Install the NERD Font symbol fonts: | ||
993 | |||
994 | 2. Symbols Nerd Font:style=1000-em [53] | ||
995 | |||
996 | 3. Symbols Nerd Font:style=2048-em [54] | ||
997 | |||
998 | 4. Install 10-nerd-font-symbols.conf [55] for Fontconfig | ||
999 | |||
1000 | 5. for additional information see: Issue #124 [56] and [Nerd Fonts | ||
1001 | 'fontconfig'] | ||
1002 | |||
1003 | Use your own glyph codepoints | ||
1004 | |||
1005 | - specify your own glyphs and/or use your own font (see: Character Mappings | ||
1006 | [57]) | ||
1007 | |||
1008 | ------------------------------------------------------------------------------- | ||
1009 | *devicons-rationale-why-does-this-exist-how-did-this-start* | ||
1010 | Rationale: Why does this exist? How did this start? ~ | ||
1011 | |||
1012 | After seeing the awesome theme for Atom (seti-ui) and the awesome plugins work | ||
1013 | done for NERDTree and vim-airline and wanting something like this for Vim I | ||
1014 | decided to create my first plugin. | ||
1015 | |||
1016 | =============================================================================== | ||
1017 | *devicons-references* | ||
1018 | References ~ | ||
1019 | |||
1020 | [1] https://github.com/scrooloose/nerdtree | ||
1021 | [2] https://github.com/vim-airline/vim-airline | ||
1022 | [3] https://github.com/ctrlpvim/ctrlp.vim | ||
1023 | [4] https://github.com/powerline/powerline | ||
1024 | [5] https://github.com/Shougo/denite.nvim | ||
1025 | [6] https://github.com/Shougo/unite.vim | ||
1026 | [7] https://github.com/itchyny/lightline.vim | ||
1027 | [8] https://github.com/mhinz/vim-startify | ||
1028 | [9] https://github.com/Shougo/vimfiler.vim | ||
1029 | [10] https://github.com/bagrat/vim-workspace | ||
1030 | [11] https://github.com/tpope/vim-flagship | ||
1031 | [12] https://github.com/ryanoasis/vim-devicons/wiki/screenshots | ||
1032 | [13] https://github.com/ryanoasis/nerd-fonts | ||
1033 | [14] https://github.com/ryanoasis/vim-devicons/wiki/Detailed-Features | ||
1034 | [15] https://github.com/ryanoasis/vim-devicons/wiki/Extra-Configuration | ||
1035 | [16] https://github.com/ryanoasis/nerd-fonts#font-installation | ||
1036 | [17] https://github.com/ryanoasis/nerd-fonts#font-patcher | ||
1037 | [18] https://github.com/junegunn/vim-plug | ||
1038 | [19] https://github.com/ryanoasis/vim-devicons/wiki/Installation | ||
1039 | [20] DEVELOPER.md | ||
1040 | [21] https://github.com/ryanoasis/vim-devicons/wiki/FAQ-&-Troubleshooting | ||
1041 | [22] CODE_OF_CONDUCT.md | ||
1042 | [23] CONTRIBUTING.md | ||
1043 | [24] https://github.com/ryanoasis/vim-devicons | ||
1044 | [25] http://www.vim.org/scripts/script.php?script_id=5114 | ||
1045 | [26] https://github.com/Xuyuanp/nerdtree-git-plugin | ||
1046 | [27] https://github.com/Xuyuanp | ||
1047 | [28] https://atom.io/themes/seti-ui | ||
1048 | [29] https://github.com/jesseweed | ||
1049 | [30] http://vorillaz.github.io/devicons | ||
1050 | [31] https://github.com/vorillaz | ||
1051 | [32] https://github.com/benatespina/development.svg.icons | ||
1052 | [33] https://github.com/benatespina | ||
1053 | [34] http://learnvimscriptthehardway.stevelosh.com/ | ||
1054 | [35] http://stevelosh.com/ | ||
1055 | [36] https://github.com/ryanoasis/vim-devicons/graphs/contributors | ||
1056 | [37] LICENSE | ||
1057 | [38] https://github.com/tpope/vim-pathogen | ||
1058 | [39] https://github.com/Shougo/neobundle.vim | ||
1059 | [40] https://github.com/gmarik/vundle | ||
1060 | [41] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/.vimrc-windows-1 | ||
1061 | [42] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/.vimrc-linux-1 | ||
1062 | [43] https://github.com/Lokaltog/vim-powerline | ||
1063 | [44] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/powerline/themes/vim/default.json | ||
1064 | [45] http://www.vim.org/scripts/script.php?script_id=1658 | ||
1065 | [46] http://www.vim.org/scripts/script.php?script_id=3736 | ||
1066 | [47] https://github.com/tpope/vim-flagship/issues/6#issuecomment-116121220 | ||
1067 | [48] https://github.com/ryanoasis/vim-devicons/pull/135 | ||
1068 | [49] https://github.com/tiagofumo/vim-nerdtree-syntax-highlight | ||
1069 | [50] https://github.com/tiagofumo | ||
1070 | [51] https://github.com/ryanoasis/vim-devicons/issues/110#issue-103801335 | ||
1071 | [52] https://github.com/ryanoasis/vim-devicons/issues/153 | ||
1072 | [53] https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-1000-em%20Nerd%20Font%20Complete.ttf | ||
1073 | [54] https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-2048-em%20Nerd%20Font%20Complete.ttf | ||
1074 | [55] https://github.com/ryanoasis/nerd-fonts/blob/master/10-nerd-font-symbols.conf | ||
1075 | [56] https://github.com/ryanoasis/vim-devicons/issues/124 | ||
1076 | [57] https://github.com/ryanoasis/vim-devicons#character-mappings | ||
1077 | |||
1078 | vim: ft=help | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/nerdtree_plugin/webdevicons.vim b/.vim/pack/vendor/start/vim-devicons/nerdtree_plugin/webdevicons.vim new file mode 100644 index 0000000..7c1f9f7 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/nerdtree_plugin/webdevicons.vim | |||
@@ -0,0 +1,389 @@ | |||
1 | " Version: 0.11.0 | ||
2 | " Webpage: https://github.com/ryanoasis/vim-devicons | ||
3 | " Maintainer: Ryan McIntyre <ryanoasis@gmail.com> | ||
4 | " License: see LICENSE | ||
5 | |||
6 | " @todo fix duplicate global variable initialize here: | ||
7 | if !exists('g:webdevicons_enable') | ||
8 | let g:webdevicons_enable = 1 | ||
9 | endif | ||
10 | |||
11 | if !exists('g:webdevicons_enable_nerdtree') | ||
12 | let g:webdevicons_enable_nerdtree = 1 | ||
13 | endif | ||
14 | |||
15 | if !exists('g:DevIconsEnableFoldersOpenClose') | ||
16 | let g:DevIconsEnableFoldersOpenClose = 0 | ||
17 | endif | ||
18 | |||
19 | if !exists('g:DevIconsEnableFolderPatternMatching') | ||
20 | let g:DevIconsEnableFolderPatternMatching = 1 | ||
21 | endif | ||
22 | |||
23 | if !exists('g:DevIconsEnableFolderExtensionPatternMatching') | ||
24 | let g:DevIconsEnableFolderExtensionPatternMatching = 0 | ||
25 | endif | ||
26 | |||
27 | " end @todo duplicate global variables | ||
28 | |||
29 | " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the | ||
30 | " actual font patcher) | ||
31 | if !exists('g:webdevicons_gui_glyph_fix') | ||
32 | if has('gui_running') | ||
33 | let g:webdevicons_gui_glyph_fix = 1 | ||
34 | else | ||
35 | let g:webdevicons_gui_glyph_fix = 0 | ||
36 | endif | ||
37 | endif | ||
38 | |||
39 | if !exists('g:DevIconsEnableNERDTreeRedraw') | ||
40 | if has('gui_running') | ||
41 | let g:DevIconsEnableNERDTreeRedraw = 1 | ||
42 | else | ||
43 | let g:DevIconsEnableNERDTreeRedraw = 0 | ||
44 | endif | ||
45 | endif | ||
46 | |||
47 | if g:webdevicons_enable_nerdtree == 1 | ||
48 | if !exists('g:loaded_nerd_tree') | ||
49 | echohl WarningMsg | | ||
50 | \ echomsg 'vim-webdevicons requires NERDTree to be loaded before vim-webdevicons.' | ||
51 | endif | ||
52 | |||
53 | if exists('g:loaded_nerd_tree') && g:loaded_nerd_tree == 1 && !exists('g:NERDTreePathNotifier') | ||
54 | let g:webdevicons_enable_nerdtree = 0 | ||
55 | echohl WarningMsg | | ||
56 | \ echomsg 'vim-webdevicons requires a newer version of NERDTree to show glyphs in NERDTree - consider updating NERDTree.' | ||
57 | endif | ||
58 | |||
59 | " @todo I don't even want this to execute UNLESS the user has the | ||
60 | " 'nerdtree-git-plugin' INSTALLED (not LOADED) | ||
61 | " As it currently functions this warning will display even if the user does | ||
62 | " not have nerdtree-git-plugin not just if it isn't loaded yet | ||
63 | " (not what we want) | ||
64 | "if !exists('g:loaded_nerdtree_git_status') | ||
65 | " echohl WarningMsg | | ||
66 | " \ echomsg 'vim-webdevicons works better when 'nerdtree-git-plugin' is loaded before vim-webdevicons (small refresh issues otherwise).' | ||
67 | "endif | ||
68 | endif | ||
69 | |||
70 | if !exists('g:webdevicons_enable_airline_tabline') | ||
71 | let g:webdevicons_enable_airline_tabline = 1 | ||
72 | endif | ||
73 | |||
74 | if !exists('g:webdevicons_enable_airline_statusline') | ||
75 | let g:webdevicons_enable_airline_statusline = 1 | ||
76 | endif | ||
77 | |||
78 | function! s:SetupListeners() | ||
79 | call g:NERDTreePathNotifier.AddListener('init', 'NERDTreeWebDevIconsRefreshListener') | ||
80 | call g:NERDTreePathNotifier.AddListener('refresh', 'NERDTreeWebDevIconsRefreshListener') | ||
81 | call g:NERDTreePathNotifier.AddListener('refreshFlags', 'NERDTreeWebDevIconsRefreshListener') | ||
82 | endfunction | ||
83 | |||
84 | " util like helpers | ||
85 | " scope: local | ||
86 | function! s:Refresh() | ||
87 | call b:NERDTree.root.refreshFlags() | ||
88 | call NERDTreeRender() | ||
89 | endfunction | ||
90 | |||
91 | " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the | ||
92 | " actual font patcher) | ||
93 | |||
94 | " NERDTree-C | ||
95 | " scope: global | ||
96 | function! WebDevIconsNERDTreeChangeRootHandler(node) | ||
97 | call b:NERDTree.changeRoot(a:node) | ||
98 | call NERDTreeRender() | ||
99 | call a:node.putCursorHere(0, 0) | ||
100 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
101 | redraw! | ||
102 | endif | ||
103 | endfunction | ||
104 | |||
105 | " NERDTree-u | ||
106 | " scope: global | ||
107 | function! WebDevIconsNERDTreeUpDirCurrentRootClosedHandler() | ||
108 | call nerdtree#ui_glue#upDir(0) | ||
109 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
110 | redraw! | ||
111 | endif | ||
112 | endfunction | ||
113 | |||
114 | function! WebDevIconsNERDTreeDirUpdateFlags(node, glyph) | ||
115 | let path = a:node.path | ||
116 | let isOpen = a:node.isOpen | ||
117 | let postPadding = g:WebDevIconsNerdTreeAfterGlyphPadding | ||
118 | let prePadding = g:WebDevIconsNerdTreeBeforeGlyphPadding | ||
119 | let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0) | ||
120 | let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1) | ||
121 | let collapsesToSameLine = (exists('g:NERDTreeCascadeSingleChildDir') == 1) | ||
122 | let dirHasOnlyOneChildDir = 0 | ||
123 | |||
124 | if collapsesToSameLine | ||
125 | " need to call to determin children: | ||
126 | call a:node._initChildren(1) | ||
127 | let dirHasOnlyOneChildDir = (a:node.getChildCount() ==# 1 && a:node.children[0].path.isDirectory) | ||
128 | endif | ||
129 | |||
130 | " properly set collapsed/combined directory display to opened glyph | ||
131 | if collapsesToSameLine && dirHasOnlyOneChildDir | ||
132 | call WebDevIconsNERDTreeDirOpen(a:node.children[0]) | ||
133 | endif | ||
134 | |||
135 | " align vertically at the same level: non git-flag nodes with git-flag nodes | ||
136 | if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin | ||
137 | let prePadding .= ' ' | ||
138 | endif | ||
139 | |||
140 | let flag = prePadding . a:glyph . postPadding | ||
141 | |||
142 | call a:node.path.flagSet.clearFlags('webdevicons') | ||
143 | |||
144 | if flag !=? '' | ||
145 | call a:node.path.flagSet.addFlag('webdevicons', flag) | ||
146 | "echom "added flag of " . flag | ||
147 | call a:node.path.refreshFlags(b:NERDTree) | ||
148 | "echom "flagset is now " . string(a:node.path.flagSet) | ||
149 | endif | ||
150 | endfunction | ||
151 | |||
152 | function! WebDevIconsNERDTreeDirClose(node) | ||
153 | let a:node.path.isOpen = 0 | ||
154 | let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
155 | call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) | ||
156 | endfunction | ||
157 | |||
158 | function! WebDevIconsNERDTreeDirOpen(node) | ||
159 | let a:node.path.isOpen = 1 | ||
160 | let glyph = g:DevIconsDefaultFolderOpenSymbol | ||
161 | call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) | ||
162 | endfunction | ||
163 | |||
164 | function! WebDevIconsNERDTreeDirOpenRecursively(node) | ||
165 | call WebDevIconsNERDTreeDirOpen(a:node) | ||
166 | for i in a:node.children | ||
167 | if i.path.isDirectory ==# 1 | ||
168 | call WebDevIconsNERDTreeDirOpenRecursively(i) | ||
169 | endif | ||
170 | endfor | ||
171 | endfunction | ||
172 | |||
173 | function! WebDevIconsNERDTreeDirCloseRecursively(node) | ||
174 | call WebDevIconsNERDTreeDirClose(a:node) | ||
175 | for i in a:node.children | ||
176 | if i.path.isDirectory ==# 1 | ||
177 | call WebDevIconsNERDTreeDirCloseRecursively(i) | ||
178 | endif | ||
179 | endfor | ||
180 | endfunction | ||
181 | |||
182 | function! WebDevIconsNERDTreeDirCloseChildren(node) | ||
183 | for i in a:node.children | ||
184 | if i.path.isDirectory ==# 1 | ||
185 | call WebDevIconsNERDTreeDirClose(i) | ||
186 | endif | ||
187 | endfor | ||
188 | endfunction | ||
189 | |||
190 | " NERDTreeMapActivateNode and <2-LeftMouse> | ||
191 | " handle the user activating a tree node | ||
192 | " scope: global | ||
193 | function! WebDevIconsNERDTreeMapActivateNode(node) | ||
194 | let isOpen = a:node.isOpen | ||
195 | if isOpen | ||
196 | let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
197 | else | ||
198 | let glyph = g:DevIconsDefaultFolderOpenSymbol | ||
199 | endif | ||
200 | let a:node.path.isOpen = !isOpen | ||
201 | call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) | ||
202 | " continue with normal activate logic | ||
203 | call a:node.activate() | ||
204 | " glyph change possible artifact clean-up | ||
205 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
206 | redraw! | ||
207 | endif | ||
208 | endfunction | ||
209 | |||
210 | " NERDTreeMapActivateNodeSingleMode | ||
211 | " handle the user activating a tree node if NERDTreeMouseMode is setted to 3 | ||
212 | " scope: global | ||
213 | function! WebDevIconsNERDTreeMapActivateNodeSingleMode(node) | ||
214 | if g:NERDTreeMouseMode == 3 | ||
215 | let isOpen = a:node.isOpen | ||
216 | if isOpen | ||
217 | let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
218 | else | ||
219 | let glyph = g:DevIconsDefaultFolderOpenSymbol | ||
220 | endif | ||
221 | let a:node.path.isOpen = !isOpen | ||
222 | call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) | ||
223 | " continue with normal activate logic | ||
224 | call a:node.activate() | ||
225 | " glyph change possible artifact clean-up | ||
226 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
227 | redraw! | ||
228 | endif | ||
229 | endif | ||
230 | endfunction | ||
231 | |||
232 | function! WebDevIconsNERDTreeMapOpenRecursively(node) | ||
233 | " normal original logic: | ||
234 | call nerdtree#echo('Recursively opening node. Please wait...') | ||
235 | call WebDevIconsNERDTreeDirOpenRecursively(a:node) | ||
236 | call a:node.openRecursively() | ||
237 | " continue with normal original logic: | ||
238 | call b:NERDTree.render() | ||
239 | " glyph change possible artifact clean-up | ||
240 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
241 | redraw! | ||
242 | endif | ||
243 | call nerdtree#echo('Recursively opening node. Please wait... DONE') | ||
244 | endfunction | ||
245 | |||
246 | function! WebDevIconsNERDTreeMapCloseChildren(node) | ||
247 | " close children but not current node: | ||
248 | call WebDevIconsNERDTreeDirCloseChildren(a:node) | ||
249 | " continue with normal original logic: | ||
250 | call a:node.closeChildren() | ||
251 | call b:NERDTree.render() | ||
252 | call a:node.putCursorHere(0, 0) | ||
253 | " glyph change possible artifact clean-up | ||
254 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
255 | redraw! | ||
256 | endif | ||
257 | endfunction | ||
258 | |||
259 | function! WebDevIconsNERDTreeMapCloseDir(node) | ||
260 | " continue with normal original logic: | ||
261 | let parent = a:node.parent | ||
262 | while g:NERDTreeCascadeOpenSingleChildDir && !parent.isRoot() | ||
263 | let childNodes = parent.getVisibleChildren() | ||
264 | if len(childNodes) == 1 && childNodes[0].path.isDirectory | ||
265 | let parent = parent.parent | ||
266 | else | ||
267 | break | ||
268 | endif | ||
269 | endwhile | ||
270 | if parent ==# {} || parent.isRoot() | ||
271 | call nerdtree#echo('cannot close tree root') | ||
272 | else | ||
273 | call parent.close() | ||
274 | " update the glyph | ||
275 | call WebDevIconsNERDTreeDirClose(parent) | ||
276 | call b:NERDTree.render() | ||
277 | call parent.putCursorHere(0, 0) | ||
278 | " glyph change possible artifact clean-up | ||
279 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
280 | redraw! | ||
281 | endif | ||
282 | endif | ||
283 | endfunction | ||
284 | |||
285 | function! WebDevIconsNERDTreeMapUpdirKeepOpen() | ||
286 | call WebDevIconsNERDTreeDirOpen(b:NERDTree.root) | ||
287 | " continue with normal logic: | ||
288 | call nerdtree#ui_glue#upDir(1) | ||
289 | call s:Refresh() | ||
290 | " glyph change possible artifact clean-up | ||
291 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
292 | redraw! | ||
293 | endif | ||
294 | endfunction | ||
295 | |||
296 | if g:webdevicons_enable == 1 && g:webdevicons_enable_nerdtree == 1 | ||
297 | call s:SetupListeners() | ||
298 | |||
299 | if g:DevIconsEnableFoldersOpenClose | ||
300 | |||
301 | " These overrides are needed because we cannot | ||
302 | " simply use AddListener for reliably updating | ||
303 | " the folder open/close glyphs because the event | ||
304 | " path has no access to the 'isOpen' property | ||
305 | " some of these are a little more brittle/fragile | ||
306 | " than others | ||
307 | " TODO FIXME better way to reliably update | ||
308 | " open/close glyphs in NERDTreeWebDevIconsRefreshListener | ||
309 | |||
310 | " NERDTreeMapActivateNode | ||
311 | call NERDTreeAddKeyMap({ | ||
312 | \ 'key': g:NERDTreeMapActivateNode, | ||
313 | \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', | ||
314 | \ 'override': 1, | ||
315 | \ 'scope': 'DirNode' }) | ||
316 | |||
317 | " NERDTreeMapCustomOpen | ||
318 | call NERDTreeAddKeyMap({ | ||
319 | \ 'key': g:NERDTreeMapCustomOpen, | ||
320 | \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', | ||
321 | \ 'override': 1, | ||
322 | \ 'scope': 'DirNode' }) | ||
323 | |||
324 | " NERDTreeMapOpenRecursively | ||
325 | call NERDTreeAddKeyMap({ | ||
326 | \ 'key': g:NERDTreeMapOpenRecursively, | ||
327 | \ 'callback': 'WebDevIconsNERDTreeMapOpenRecursively', | ||
328 | \ 'override': 1, | ||
329 | \ 'scope': 'DirNode' }) | ||
330 | |||
331 | " NERDTreeMapCloseChildren | ||
332 | call NERDTreeAddKeyMap({ | ||
333 | \ 'key': g:NERDTreeMapCloseChildren, | ||
334 | \ 'callback': 'WebDevIconsNERDTreeMapCloseChildren', | ||
335 | \ 'override': 1, | ||
336 | \ 'scope': 'DirNode' }) | ||
337 | |||
338 | " NERDTreeMapCloseChildren | ||
339 | call NERDTreeAddKeyMap({ | ||
340 | \ 'key': g:NERDTreeMapCloseDir, | ||
341 | \ 'callback': 'WebDevIconsNERDTreeMapCloseDir', | ||
342 | \ 'override': 1, | ||
343 | \ 'scope': 'Node' }) | ||
344 | |||
345 | " <2-LeftMouse> | ||
346 | call NERDTreeAddKeyMap({ | ||
347 | \ 'key': '<2-LeftMouse>', | ||
348 | \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', | ||
349 | \ 'override': 1, | ||
350 | \ 'scope': 'DirNode' }) | ||
351 | |||
352 | " <LeftRelease> | ||
353 | call NERDTreeAddKeyMap({ | ||
354 | \ 'key': '<LeftRelease>', | ||
355 | \ 'callback': 'WebDevIconsNERDTreeMapActivateNodeSingleMode', | ||
356 | \ 'override': 1, | ||
357 | \ 'scope': 'DirNode' }) | ||
358 | |||
359 | " NERDTreeMapUpdirKeepOpen | ||
360 | call NERDTreeAddKeyMap({ | ||
361 | \ 'key': g:NERDTreeMapUpdirKeepOpen, | ||
362 | \ 'callback': 'WebDevIconsNERDTreeMapUpdirKeepOpen', | ||
363 | \ 'override': 1, | ||
364 | \ 'scope': 'all' }) | ||
365 | |||
366 | endif | ||
367 | |||
368 | " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the | ||
369 | " actual font patcher) | ||
370 | if g:webdevicons_gui_glyph_fix ==# 1 | ||
371 | call NERDTreeAddKeyMap({ | ||
372 | \ 'key': g:NERDTreeMapChangeRoot, | ||
373 | \ 'callback': 'WebDevIconsNERDTreeChangeRootHandler', | ||
374 | \ 'override': 1, | ||
375 | \ 'quickhelpText': "change tree root to the\n\" selected dir\n\" plus devicons redraw\n\" hack fix", | ||
376 | \ 'scope': 'Node' }) | ||
377 | |||
378 | call NERDTreeAddKeyMap({ | ||
379 | \ 'key': g:NERDTreeMapUpdir, | ||
380 | \ 'callback': 'WebDevIconsNERDTreeUpDirCurrentRootClosedHandler', | ||
381 | \ 'override': 1, | ||
382 | \ 'quickhelpText': "move tree root up a dir\n\" plus devicons redraw\n\" hack fix", | ||
383 | \ 'scope': 'all' }) | ||
384 | endif | ||
385 | |||
386 | endif | ||
387 | |||
388 | " modeline syntax: | ||
389 | " vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/plugin/webdevicons.vim b/.vim/pack/vendor/start/vim-devicons/plugin/webdevicons.vim new file mode 100644 index 0000000..596ec68 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/plugin/webdevicons.vim | |||
@@ -0,0 +1,703 @@ | |||
1 | " Version: 0.11.0 | ||
2 | " Webpage: https://github.com/ryanoasis/vim-devicons | ||
3 | " Maintainer: Ryan McIntyre <ryanoasis@gmail.com> | ||
4 | " License: see LICENSE | ||
5 | |||
6 | let s:version = '0.11.0' | ||
7 | let s:plugin_home = expand('<sfile>:p:h:h') | ||
8 | |||
9 | " set scriptencoding after 'encoding' and when using multibyte chars | ||
10 | scriptencoding utf-8 | ||
11 | |||
12 | " standard fix/safety: line continuation (avoiding side effects) {{{1 | ||
13 | "======================================================================== | ||
14 | let s:save_cpo = &cpo | ||
15 | set cpo&vim | ||
16 | |||
17 | " standard loading / not loading {{{1 | ||
18 | "======================================================================== | ||
19 | |||
20 | if exists('g:loaded_webdevicons') | ||
21 | finish | ||
22 | endif | ||
23 | |||
24 | let g:loaded_webdevicons = 1 | ||
25 | |||
26 | " config enable / disable settings {{{1 | ||
27 | "======================================================================== | ||
28 | |||
29 | "" | ||
30 | " Set the variable to the default value, only if variable is not defined. | ||
31 | " | ||
32 | " @param {string} var Variable name with its scope. | ||
33 | " @param {*} default Default value for variable. | ||
34 | "" | ||
35 | function! s:set(var, default) abort | ||
36 | if !exists(a:var) | ||
37 | if type(a:default) | ||
38 | execute 'let' a:var '=' string(a:default) | ||
39 | else | ||
40 | execute 'let' a:var '=' a:default | ||
41 | endif | ||
42 | endif | ||
43 | endfunction | ||
44 | |||
45 | call s:set('g:webdevicons_enable', 1) | ||
46 | call s:set('g:webdevicons_enable_nerdtree', 1) | ||
47 | call s:set('g:webdevicons_enable_unite ', 1) | ||
48 | call s:set('g:webdevicons_enable_denite', 1) | ||
49 | call s:set('g:webdevicons_enable_vimfiler', 1) | ||
50 | call s:set('g:webdevicons_enable_ctrlp', 1) | ||
51 | call s:set('g:webdevicons_enable_airline_tabline', 1) | ||
52 | call s:set('g:webdevicons_enable_airline_statusline', 1) | ||
53 | call s:set('g:webdevicons_enable_airline_statusline_fileformat_symbols', 1) | ||
54 | call s:set('g:webdevicons_enable_flagship_statusline', 1) | ||
55 | call s:set('g:webdevicons_enable_flagship_statusline_fileformat_symbols', 1) | ||
56 | call s:set('g:webdevicons_enable_startify', 1) | ||
57 | call s:set('g:webdevicons_conceal_nerdtree_brackets', 1) | ||
58 | call s:set('g:DevIconsAppendArtifactFix', has('gui_running') ? 1 : 0) | ||
59 | call s:set('g:DevIconsArtifactFixChar', ' ') | ||
60 | |||
61 | " config options {{{1 | ||
62 | "======================================================================== | ||
63 | |||
64 | call s:set('g:WebDevIconsUnicodeDecorateFileNodes', 1) | ||
65 | call s:set('g:WebDevIconsUnicodeDecorateFolderNodes', 1) | ||
66 | call s:set('g:DevIconsEnableFoldersOpenClose', 0) | ||
67 | call s:set('g:DevIconsEnableFolderPatternMatching', 1) | ||
68 | call s:set('g:DevIconsEnableFolderExtensionPatternMatching', 0) | ||
69 | call s:set('g:DevIconsEnableDistro', 1) | ||
70 | call s:set('g:WebDevIconsUnicodeDecorateFolderNodesExactMatches', 1) | ||
71 | call s:set('g:WebDevIconsUnicodeGlyphDoubleWidth', 1) | ||
72 | call s:set('g:WebDevIconsNerdTreeBeforeGlyphPadding', ' ') | ||
73 | call s:set('g:WebDevIconsNerdTreeAfterGlyphPadding', ' ') | ||
74 | call s:set('g:WebDevIconsNerdTreeGitPluginForceVAlign', 1) | ||
75 | call s:set('g:NERDTreeUpdateOnCursorHold', 1) " Obsolete: For backward compatibility | ||
76 | call s:set('g:NERDTreeGitStatusUpdateOnCursorHold', 1) | ||
77 | call s:set('g:WebDevIconsTabAirLineBeforeGlyphPadding', ' ') | ||
78 | call s:set('g:WebDevIconsTabAirLineAfterGlyphPadding', '') | ||
79 | |||
80 | " config defaults {{{1 | ||
81 | "======================================================================== | ||
82 | |||
83 | call s:set('g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol', '') | ||
84 | call s:set('g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol', '') | ||
85 | call s:set('g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol', g:DevIconsEnableFoldersOpenClose ? '' : '') | ||
86 | call s:set('g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol', '') | ||
87 | call s:set('g:DevIconsDefaultFolderOpenSymbol', '') | ||
88 | |||
89 | " functions {{{1 | ||
90 | "======================================================================== | ||
91 | |||
92 | " local functions {{{2 | ||
93 | "======================================================================== | ||
94 | |||
95 | " scope: local | ||
96 | function s:getDistro() | ||
97 | if exists('s:distro') | ||
98 | return s:distro | ||
99 | endif | ||
100 | |||
101 | if has('bsd') | ||
102 | let s:distro = '' | ||
103 | return s:distro | ||
104 | endif | ||
105 | |||
106 | if g:DevIconsEnableDistro && executable('lsb_release') | ||
107 | let s:lsb = system('lsb_release -i') | ||
108 | if s:lsb =~# 'Arch' | ||
109 | let s:distro = '' | ||
110 | elseif s:lsb =~# 'Gentoo' | ||
111 | let s:distro = '' | ||
112 | elseif s:lsb =~# 'Ubuntu' | ||
113 | let s:distro = '' | ||
114 | elseif s:lsb =~# 'Cent' | ||
115 | let s:distro = '' | ||
116 | elseif s:lsb =~# 'Debian' | ||
117 | let s:distro = '' | ||
118 | elseif s:lsb =~# 'Dock' | ||
119 | let s:distro = '' | ||
120 | else | ||
121 | let s:distro = '' | ||
122 | endif | ||
123 | return s:distro | ||
124 | endif | ||
125 | |||
126 | let s:distro = '' | ||
127 | return s:distro | ||
128 | endfunction | ||
129 | |||
130 | " scope: local | ||
131 | function s:isDarwin() | ||
132 | if exists('s:is_darwin') | ||
133 | return s:is_darwin | ||
134 | endif | ||
135 | |||
136 | if exists('g:WebDevIconsOS') | ||
137 | let s:is_darwin = g:WebDevIconsOS ==? 'Darwin' | ||
138 | return s:is_darwin | ||
139 | endif | ||
140 | |||
141 | if has('macunix') | ||
142 | let s:is_darwin = 1 | ||
143 | return s:is_darwin | ||
144 | endif | ||
145 | |||
146 | if ! has('unix') | ||
147 | let s:is_darwin = 0 | ||
148 | return s:is_darwin | ||
149 | endif | ||
150 | |||
151 | if system('uname -s') ==# "Darwin\n" | ||
152 | let s:is_darwin = 1 | ||
153 | else | ||
154 | let s:is_darwin = 0 | ||
155 | endif | ||
156 | |||
157 | return s:is_darwin | ||
158 | endfunction | ||
159 | |||
160 | " scope: local | ||
161 | function! s:strip(input) | ||
162 | return substitute(a:input, '^\s*\(.\{-}\)\s*$', '\1', '') | ||
163 | endfunction | ||
164 | |||
165 | " scope: local | ||
166 | function! s:setDictionaries() | ||
167 | |||
168 | let s:file_node_extensions = { | ||
169 | \ 'styl' : '', | ||
170 | \ 'sass' : '', | ||
171 | \ 'scss' : '', | ||
172 | \ 'htm' : '', | ||
173 | \ 'html' : '', | ||
174 | \ 'slim' : '', | ||
175 | \ 'haml' : '', | ||
176 | \ 'ejs' : '', | ||
177 | \ 'css' : '', | ||
178 | \ 'less' : '', | ||
179 | \ 'md' : '', | ||
180 | \ 'mdx' : '', | ||
181 | \ 'markdown' : '', | ||
182 | \ 'rmd' : '', | ||
183 | \ 'json' : '', | ||
184 | \ 'webmanifest' : '', | ||
185 | \ 'js' : '', | ||
186 | \ 'mjs' : '', | ||
187 | \ 'jsx' : '', | ||
188 | \ 'rb' : '', | ||
189 | \ 'gemspec' : '', | ||
190 | \ 'rake' : '', | ||
191 | \ 'php' : '', | ||
192 | \ 'py' : '', | ||
193 | \ 'pyc' : '', | ||
194 | \ 'pyo' : '', | ||
195 | \ 'pyd' : '', | ||
196 | \ 'coffee' : '', | ||
197 | \ 'mustache' : '', | ||
198 | \ 'hbs' : '', | ||
199 | \ 'conf' : '', | ||
200 | \ 'ini' : '', | ||
201 | \ 'yml' : '', | ||
202 | \ 'yaml' : '', | ||
203 | \ 'toml' : '', | ||
204 | \ 'bat' : '', | ||
205 | \ 'mk' : '', | ||
206 | \ 'jpg' : '', | ||
207 | \ 'jpeg' : '', | ||
208 | \ 'bmp' : '', | ||
209 | \ 'png' : '', | ||
210 | \ 'webp' : '', | ||
211 | \ 'gif' : '', | ||
212 | \ 'ico' : '', | ||
213 | \ 'twig' : '', | ||
214 | \ 'cpp' : '', | ||
215 | \ 'c++' : '', | ||
216 | \ 'cxx' : '', | ||
217 | \ 'cc' : '', | ||
218 | \ 'cp' : '', | ||
219 | \ 'c' : '', | ||
220 | \ 'cs' : '', | ||
221 | \ 'h' : '', | ||
222 | \ 'hh' : '', | ||
223 | \ 'hpp' : '', | ||
224 | \ 'hxx' : '', | ||
225 | \ 'hs' : '', | ||
226 | \ 'lhs' : '', | ||
227 | \ 'nix' : '', | ||
228 | \ 'lua' : '', | ||
229 | \ 'java' : '', | ||
230 | \ 'sh' : '', | ||
231 | \ 'fish' : '', | ||
232 | \ 'bash' : '', | ||
233 | \ 'zsh' : '', | ||
234 | \ 'ksh' : '', | ||
235 | \ 'csh' : '', | ||
236 | \ 'awk' : '', | ||
237 | \ 'ps1' : '', | ||
238 | \ 'ml' : 'λ', | ||
239 | \ 'mli' : 'λ', | ||
240 | \ 'diff' : '', | ||
241 | \ 'db' : '', | ||
242 | \ 'sql' : '', | ||
243 | \ 'dump' : '', | ||
244 | \ 'clj' : '', | ||
245 | \ 'cljc' : '', | ||
246 | \ 'cljs' : '', | ||
247 | \ 'edn' : '', | ||
248 | \ 'scala' : '', | ||
249 | \ 'go' : '', | ||
250 | \ 'dart' : '', | ||
251 | \ 'xul' : '', | ||
252 | \ 'sln' : '', | ||
253 | \ 'suo' : '', | ||
254 | \ 'pl' : '', | ||
255 | \ 'pm' : '', | ||
256 | \ 't' : '', | ||
257 | \ 'rss' : '', | ||
258 | \ 'f#' : '', | ||
259 | \ 'fsscript' : '', | ||
260 | \ 'fsx' : '', | ||
261 | \ 'fs' : '', | ||
262 | \ 'fsi' : '', | ||
263 | \ 'rs' : '', | ||
264 | \ 'rlib' : '', | ||
265 | \ 'd' : '', | ||
266 | \ 'erl' : '', | ||
267 | \ 'hrl' : '', | ||
268 | \ 'ex' : '', | ||
269 | \ 'exs' : '', | ||
270 | \ 'eex' : '', | ||
271 | \ 'leex' : '', | ||
272 | \ 'heex' : '', | ||
273 | \ 'vim' : '', | ||
274 | \ 'ai' : '', | ||
275 | \ 'psd' : '', | ||
276 | \ 'psb' : '', | ||
277 | \ 'ts' : '', | ||
278 | \ 'tsx' : '', | ||
279 | \ 'jl' : '', | ||
280 | \ 'pp' : '', | ||
281 | \ 'vue' : '﵂', | ||
282 | \ 'elm' : '', | ||
283 | \ 'swift' : '', | ||
284 | \ 'xcplayground' : '', | ||
285 | \ 'tex' : 'ﭨ', | ||
286 | \ 'r' : 'ﳒ', | ||
287 | \ 'rproj' : '鉶', | ||
288 | \ 'sol' : 'ﲹ', | ||
289 | \ 'pem' : '' | ||
290 | \} | ||
291 | |||
292 | let s:file_node_exact_matches = { | ||
293 | \ 'exact-match-case-sensitive-1.txt' : '1', | ||
294 | \ 'exact-match-case-sensitive-2' : '2', | ||
295 | \ 'gruntfile.coffee' : '', | ||
296 | \ 'gruntfile.js' : '', | ||
297 | \ 'gruntfile.ls' : '', | ||
298 | \ 'gulpfile.coffee' : '', | ||
299 | \ 'gulpfile.js' : '', | ||
300 | \ 'gulpfile.ls' : '', | ||
301 | \ 'mix.lock' : '', | ||
302 | \ 'dropbox' : '', | ||
303 | \ '.ds_store' : '', | ||
304 | \ '.gitconfig' : '', | ||
305 | \ '.gitignore' : '', | ||
306 | \ '.gitattributes' : '', | ||
307 | \ '.gitlab-ci.yml' : '', | ||
308 | \ '.bashrc' : '', | ||
309 | \ '.zshrc' : '', | ||
310 | \ '.zshenv' : '', | ||
311 | \ '.zprofile' : '', | ||
312 | \ '.vimrc' : '', | ||
313 | \ '.gvimrc' : '', | ||
314 | \ '_vimrc' : '', | ||
315 | \ '_gvimrc' : '', | ||
316 | \ '.bashprofile' : '', | ||
317 | \ 'favicon.ico' : '', | ||
318 | \ 'license' : '', | ||
319 | \ 'node_modules' : '', | ||
320 | \ 'react.jsx' : '', | ||
321 | \ 'procfile' : '', | ||
322 | \ 'dockerfile' : '', | ||
323 | \ 'docker-compose.yml' : '', | ||
324 | \ 'rakefile' : '', | ||
325 | \ 'config.ru' : '', | ||
326 | \ 'gemfile' : '', | ||
327 | \ 'makefile' : '', | ||
328 | \ 'cmakelists.txt' : '', | ||
329 | \ 'robots.txt' : 'ﮧ' | ||
330 | \} | ||
331 | |||
332 | let s:file_node_pattern_matches = { | ||
333 | \ '.*jquery.*\.js$' : '', | ||
334 | \ '.*angular.*\.js$' : '', | ||
335 | \ '.*backbone.*\.js$' : '', | ||
336 | \ '.*require.*\.js$' : '', | ||
337 | \ '.*materialize.*\.js$' : '', | ||
338 | \ '.*materialize.*\.css$' : '', | ||
339 | \ '.*mootools.*\.js$' : '', | ||
340 | \ '.*vimrc.*' : '', | ||
341 | \ 'Vagrantfile$' : '' | ||
342 | \} | ||
343 | |||
344 | if !exists('g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols') | ||
345 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} | ||
346 | endif | ||
347 | |||
348 | if !exists('g:WebDevIconsUnicodeDecorateFileNodesExactSymbols') | ||
349 | " do not remove: exact-match-case-sensitive-* | ||
350 | let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {} | ||
351 | endif | ||
352 | |||
353 | if !exists('g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols') | ||
354 | let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {} | ||
355 | endif | ||
356 | |||
357 | " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) | ||
358 | for [key, val] in items(s:file_node_extensions) | ||
359 | if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, key) | ||
360 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[key] = val | ||
361 | endif | ||
362 | endfor | ||
363 | |||
364 | " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) | ||
365 | for [key, val] in items(s:file_node_exact_matches) | ||
366 | if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, key) | ||
367 | let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[key] = val | ||
368 | endif | ||
369 | endfor | ||
370 | |||
371 | " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) | ||
372 | for [key, val] in items(s:file_node_pattern_matches) | ||
373 | if !has_key(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols, key) | ||
374 | let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols[key] = val | ||
375 | endif | ||
376 | endfor | ||
377 | |||
378 | endfunction | ||
379 | |||
380 | " scope: local | ||
381 | function! s:setSyntax() | ||
382 | if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1 | ||
383 | augroup webdevicons_conceal_nerdtree_brackets | ||
384 | au! | ||
385 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeFlags | ||
386 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeFlags | ||
387 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeLinkFile | ||
388 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeLinkDir | ||
389 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeLinkFile | ||
390 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeLinkDir | ||
391 | autocmd FileType nerdtree setlocal conceallevel=3 | ||
392 | autocmd FileType nerdtree setlocal concealcursor=nvic | ||
393 | augroup END | ||
394 | endif | ||
395 | endfunction | ||
396 | |||
397 | " scope: local | ||
398 | " stole solution/idea from nerdtree-git-plugin :) | ||
399 | function! s:setCursorHold() | ||
400 | if g:webdevicons_enable_nerdtree | ||
401 | augroup webdevicons_cursor_hold | ||
402 | autocmd CursorHold * silent! call s:CursorHoldUpdate() | ||
403 | augroup END | ||
404 | endif | ||
405 | endfunction | ||
406 | |||
407 | " scope: local | ||
408 | " stole solution/idea from nerdtree-git-plugin :) | ||
409 | function! s:CursorHoldUpdate() | ||
410 | if g:NERDTreeUpdateOnCursorHold != 1 || g:NERDTreeGitStatusUpdateOnCursorHold != 1 | ||
411 | return | ||
412 | endif | ||
413 | |||
414 | if !exists('g:NERDTree') || !g:NERDTree.IsOpen() | ||
415 | return | ||
416 | endif | ||
417 | |||
418 | " Do not update when a special buffer is selected | ||
419 | if !empty(&l:buftype) | ||
420 | return | ||
421 | endif | ||
422 | |||
423 | " winnr need to make focus go to opened file | ||
424 | " CursorToTreeWin needed to avoid error on opening file | ||
425 | let l:winnr = winnr() | ||
426 | let l:altwinnr = winnr('#') | ||
427 | |||
428 | call g:NERDTree.CursorToTreeWin() | ||
429 | call b:NERDTree.root.refreshFlags() | ||
430 | call NERDTreeRender() | ||
431 | |||
432 | exec l:altwinnr . 'wincmd w' | ||
433 | exec l:winnr . 'wincmd w' | ||
434 | endfunction | ||
435 | |||
436 | " scope: local | ||
437 | function! s:hardRefreshNerdTree() | ||
438 | if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1 && g:NERDTree.IsOpen() | ||
439 | NERDTreeClose | ||
440 | NERDTree | ||
441 | endif | ||
442 | endfunction | ||
443 | |||
444 | " scope: local | ||
445 | function! s:softRefreshNerdTree() | ||
446 | if g:webdevicons_enable_nerdtree == 1 && exists('g:NERDTree') && g:NERDTree.IsOpen() | ||
447 | NERDTreeToggle | ||
448 | NERDTreeToggle | ||
449 | endif | ||
450 | endfunction | ||
451 | |||
452 | " local initialization {{{2 | ||
453 | "======================================================================== | ||
454 | |||
455 | " scope: local | ||
456 | function! s:initialize() | ||
457 | call s:setDictionaries() | ||
458 | call s:setSyntax() | ||
459 | call s:setCursorHold() | ||
460 | |||
461 | if exists('g:loaded_flagship') | call devicons#plugins#flagship#init() | endif | ||
462 | if exists('g:loaded_unite') && g:webdevicons_enable_unite | call devicons#plugins#unite#init() | endif | ||
463 | if exists('g:loaded_denite') && g:webdevicons_enable_denite | call devicons#plugins#denite#init() | endif | ||
464 | if exists('g:loaded_vimfiler') && g:webdevicons_enable_vimfiler | call devicons#plugins#vimfiler#init() | endif | ||
465 | if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp | call devicons#plugins#ctrlp#init() | endif | ||
466 | if exists('g:loaded_startify') && g:webdevicons_enable_startify | call devicons#plugins#startify#init() | endif | ||
467 | endfunction | ||
468 | |||
469 | |||
470 | " public functions {{{2 | ||
471 | "======================================================================== | ||
472 | |||
473 | " scope: public | ||
474 | function! webdevicons#version() | ||
475 | return s:version | ||
476 | endfunction | ||
477 | |||
478 | " scope: public | ||
479 | function! webdevicons#pluginHome() | ||
480 | return s:plugin_home | ||
481 | endfunction | ||
482 | |||
483 | " scope: public | ||
484 | " allow the first version of refresh to now call softRefresh | ||
485 | function! webdevicons#refresh() | ||
486 | call webdevicons#softRefresh() | ||
487 | endfunction | ||
488 | |||
489 | " scope: public | ||
490 | function! webdevicons#hardRefresh() | ||
491 | call s:setSyntax() | ||
492 | call s:hardRefreshNerdTree() | ||
493 | endfunction | ||
494 | |||
495 | " scope: public | ||
496 | function! webdevicons#softRefresh() | ||
497 | call s:setSyntax() | ||
498 | call s:softRefreshNerdTree() | ||
499 | endfunction | ||
500 | |||
501 | " a:1 (bufferName), a:2 (isDirectory) | ||
502 | " scope: public | ||
503 | function! WebDevIconsGetFileTypeSymbol(...) abort | ||
504 | if a:0 == 0 | ||
505 | let fileNodeExtension = !empty(expand('%:e')) ? expand('%:e') : &filetype | ||
506 | let fileNode = expand('%:t') | ||
507 | let isDirectory = 0 | ||
508 | else | ||
509 | let fileNodeExtension = fnamemodify(a:1, ':e') | ||
510 | let fileNode = fnamemodify(a:1, ':t') | ||
511 | if a:0 > 1 | ||
512 | let isDirectory = a:2 | ||
513 | else | ||
514 | let isDirectory = 0 | ||
515 | endif | ||
516 | endif | ||
517 | |||
518 | if isDirectory == 0 || g:DevIconsEnableFolderPatternMatching | ||
519 | |||
520 | let symbol = g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol | ||
521 | let fileNodeExtension = tolower(fileNodeExtension) | ||
522 | let fileNode = tolower(fileNode) | ||
523 | |||
524 | for [pattern, glyph] in items(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols) | ||
525 | if match(fileNode, pattern) != -1 | ||
526 | let symbol = glyph | ||
527 | break | ||
528 | endif | ||
529 | endfor | ||
530 | |||
531 | if symbol == g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol | ||
532 | if has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, fileNode) | ||
533 | let symbol = g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[fileNode] | ||
534 | elseif ((isDirectory == 1 && g:DevIconsEnableFolderExtensionPatternMatching) || isDirectory == 0) && has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, fileNodeExtension) | ||
535 | let symbol = g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[fileNodeExtension] | ||
536 | elseif isDirectory == 1 | ||
537 | let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
538 | endif | ||
539 | endif | ||
540 | |||
541 | else | ||
542 | let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
543 | endif | ||
544 | |||
545 | let artifactFix = s:DevIconsGetArtifactFix() | ||
546 | |||
547 | return symbol . artifactFix | ||
548 | |||
549 | endfunction | ||
550 | |||
551 | " scope: local | ||
552 | " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the | ||
553 | " actual font patcher) | ||
554 | function! s:DevIconsGetArtifactFix() | ||
555 | if g:DevIconsAppendArtifactFix == 1 | ||
556 | let artifactFix = g:DevIconsArtifactFixChar | ||
557 | else | ||
558 | let artifactFix = '' | ||
559 | endif | ||
560 | |||
561 | return artifactFix | ||
562 | endfunction | ||
563 | |||
564 | " scope: public | ||
565 | function! WebDevIconsGetFileFormatSymbol(...) | ||
566 | let fileformat = '' | ||
567 | let bomb = '' | ||
568 | |||
569 | if (&bomb && g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol !=? '') | ||
570 | let bomb = g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol . ' ' | ||
571 | endif | ||
572 | |||
573 | if &fileformat ==? 'dos' | ||
574 | let fileformat = '' | ||
575 | elseif &fileformat ==? 'unix' | ||
576 | let fileformat = s:isDarwin() ? '' : s:getDistro() | ||
577 | elseif &fileformat ==? 'mac' | ||
578 | let fileformat = '' | ||
579 | endif | ||
580 | |||
581 | let artifactFix = s:DevIconsGetArtifactFix() | ||
582 | |||
583 | return bomb . fileformat . artifactFix | ||
584 | endfunction | ||
585 | |||
586 | " for airline plugin {{{3 | ||
587 | "======================================================================== | ||
588 | |||
589 | " scope: public | ||
590 | function! AirlineWebDevIcons(...) | ||
591 | let w:airline_section_x = get(w:, 'airline_section_x', | ||
592 | \ get(g:, 'airline_section_x', '')) | ||
593 | let w:airline_section_x .= ' %{WebDevIconsGetFileTypeSymbol()} ' | ||
594 | let hasFileFormatEncodingPart = airline#parts#ffenc() !=? '' | ||
595 | if g:webdevicons_enable_airline_statusline_fileformat_symbols && hasFileFormatEncodingPart | ||
596 | let w:airline_section_y = ' %{&fenc . " " . WebDevIconsGetFileFormatSymbol()} ' | ||
597 | endif | ||
598 | endfunction | ||
599 | |||
600 | if g:webdevicons_enable == 1 && exists('g:loaded_airline') && g:loaded_airline == 1 && g:webdevicons_enable_airline_statusline | ||
601 | call airline#add_statusline_func('AirlineWebDevIcons') | ||
602 | endif | ||
603 | |||
604 | if g:webdevicons_enable == 1 && g:webdevicons_enable_airline_tabline | ||
605 | " Store original formatter. | ||
606 | let g:_webdevicons_airline_orig_formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') | ||
607 | let g:airline#extensions#tabline#formatter = 'webdevicons' | ||
608 | endif | ||
609 | |||
610 | " for nerdtree plugin {{{3 | ||
611 | "======================================================================== | ||
612 | |||
613 | " scope: public | ||
614 | function! NERDTreeWebDevIconsRefreshListener(event) | ||
615 | let path = a:event.subject | ||
616 | let postPadding = g:WebDevIconsNerdTreeAfterGlyphPadding | ||
617 | let prePadding = g:WebDevIconsNerdTreeBeforeGlyphPadding | ||
618 | let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0) | ||
619 | let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1) | ||
620 | let artifactFix = s:DevIconsGetArtifactFix() | ||
621 | |||
622 | " align vertically at the same level: non git-flag nodes with git-flag nodes | ||
623 | if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin | ||
624 | let prePadding .= ' ' | ||
625 | endif | ||
626 | |||
627 | if !path.isDirectory | ||
628 | " Hey we got a regular file, lets get it's proper icon | ||
629 | let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str()) . postPadding | ||
630 | |||
631 | elseif path.isDirectory && g:WebDevIconsUnicodeDecorateFolderNodes == 1 | ||
632 | " Ok we got a directory, some more tests and checks | ||
633 | let directoryOpened = 0 | ||
634 | |||
635 | if g:DevIconsEnableFoldersOpenClose && len(path.flagSet._flagsForScope('webdevicons')) > 0 | ||
636 | " did the user set different icons for open and close? | ||
637 | |||
638 | " isOpen is not available on the path listener directly | ||
639 | " but we added one via overriding particular keymappings for NERDTree | ||
640 | if has_key(path, 'isOpen') && path.isOpen == 1 | ||
641 | let directoryOpened = 1 | ||
642 | endif | ||
643 | endif | ||
644 | |||
645 | if g:WebDevIconsUnicodeDecorateFolderNodesExactMatches == 1 | ||
646 | " Did the user enable exact matching of folder type/names | ||
647 | " think node_modules | ||
648 | if g:DevIconsEnableFoldersOpenClose && directoryOpened | ||
649 | " the folder is open | ||
650 | let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . artifactFix . postPadding | ||
651 | else | ||
652 | " the folder is not open | ||
653 | if path.isSymLink | ||
654 | " We have a symlink | ||
655 | let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol . artifactFix . postPadding | ||
656 | else | ||
657 | " We have a regular folder | ||
658 | let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str(), path.isDirectory) . postPadding | ||
659 | endif | ||
660 | endif | ||
661 | |||
662 | else | ||
663 | " the user did not enable exact matching | ||
664 | if g:DevIconsEnableFoldersOpenClose && directoryOpened | ||
665 | " the folder is open | ||
666 | let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . artifactFix . postPadding | ||
667 | else | ||
668 | " the folder is not open | ||
669 | if path.isSymLink | ||
670 | " We have a symlink | ||
671 | let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol . artifactFix . postPadding | ||
672 | else | ||
673 | " We have a regular folder | ||
674 | let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol . artifactFix . postPadding | ||
675 | endif | ||
676 | endif | ||
677 | |||
678 | endif | ||
679 | |||
680 | else | ||
681 | let flag = prePadding . ' ' . artifactFix . postPadding | ||
682 | endif | ||
683 | |||
684 | call path.flagSet.clearFlags('webdevicons') | ||
685 | |||
686 | if flag !=? '' | ||
687 | call path.flagSet.addFlag('webdevicons', flag) | ||
688 | endif | ||
689 | |||
690 | endfunction | ||
691 | |||
692 | " call setup after processing all the functions (to avoid errors) {{{1 | ||
693 | "======================================================================== | ||
694 | " had some issues with VimEnter, for now using: | ||
695 | call s:initialize() | ||
696 | |||
697 | " standard fix/safety: line continuation (avoiding side effects) {{{1 | ||
698 | "======================================================================== | ||
699 | let &cpo = s:save_cpo | ||
700 | unlet s:save_cpo | ||
701 | |||
702 | " modeline syntax: | ||
703 | " vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab: | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py new file mode 100644 index 0000000..ece379c --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py | |||
@@ -0,0 +1,2 @@ | |||
1 | import pkg_resources | ||
2 | pkg_resources.declare_namespace(__name__) | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py new file mode 100644 index 0000000..ece379c --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py | |||
@@ -0,0 +1,2 @@ | |||
1 | import pkg_resources | ||
2 | pkg_resources.declare_namespace(__name__) | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py new file mode 100644 index 0000000..f92f4ee --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py | |||
@@ -0,0 +1,28 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | # vim:se fenc=utf8 noet: | ||
3 | from __future__ import (unicode_literals, division, absolute_import, print_function) | ||
4 | |||
5 | try: | ||
6 | import vim | ||
7 | except ImportError: | ||
8 | vim = {} | ||
9 | |||
10 | from powerline.bindings.vim import (vim_get_func, buffer_name) | ||
11 | from powerline.theme import requires_segment_info | ||
12 | |||
13 | @requires_segment_info | ||
14 | def webdevicons(pl, segment_info): | ||
15 | webdevicons = vim_get_func('WebDevIconsGetFileTypeSymbol') | ||
16 | name = buffer_name(segment_info) | ||
17 | return [] if not webdevicons else [{ | ||
18 | 'contents': webdevicons(name), | ||
19 | 'highlight_groups': ['webdevicons', 'file_name'], | ||
20 | }] | ||
21 | |||
22 | @requires_segment_info | ||
23 | def webdevicons_file_format(pl, segment_info): | ||
24 | webdevicons_file_format = vim_get_func('WebDevIconsGetFileFormatSymbol') | ||
25 | return [] if not webdevicons_file_format else [{ | ||
26 | 'contents': webdevicons_file_format(), | ||
27 | 'highlight_groups': ['webdevicons_file_format', 'file_format'], | ||
28 | }] | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/rplugin/python3/denite/filter/devicons_denite_converter.py b/.vim/pack/vendor/start/vim-devicons/rplugin/python3/denite/filter/devicons_denite_converter.py new file mode 100644 index 0000000..6768009 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/rplugin/python3/denite/filter/devicons_denite_converter.py | |||
@@ -0,0 +1,31 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | # vim:se fenc=utf8 noet: | ||
3 | from .base import Base | ||
4 | from os.path import isdir | ||
5 | |||
6 | |||
7 | class Filter(Base): | ||
8 | |||
9 | def __init__(self, vim): | ||
10 | super().__init__(vim) | ||
11 | self.name = 'devicons_denite_converter' | ||
12 | self.description = 'add devicons in front of candidates' | ||
13 | |||
14 | def filter(self, context): | ||
15 | for candidate in context['candidates']: | ||
16 | |||
17 | if 'bufnr' in candidate: | ||
18 | bufname = self.vim.funcs.bufname(candidate['bufnr']) | ||
19 | filename = self.vim.funcs.fnamemodify(bufname, ':p:t') | ||
20 | elif 'word' in candidate and 'action__path' in candidate: | ||
21 | filename = candidate['word'] | ||
22 | |||
23 | icon = self.vim.funcs.WebDevIconsGetFileTypeSymbol( | ||
24 | filename, isdir(filename)) | ||
25 | |||
26 | # Customize output format if not done already. | ||
27 | if icon not in candidate.get('abbr', '')[:10]: | ||
28 | candidate['abbr'] = ' {} {}'.format( | ||
29 | icon, candidate.get('abbr', candidate['word'])) | ||
30 | |||
31 | return context['candidates'] | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/test/.themisrc b/.vim/pack/vendor/start/vim-devicons/test/.themisrc new file mode 100644 index 0000000..f59497a --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/test/.themisrc | |||
@@ -0,0 +1 @@ | |||
filetype plugin on | |||
diff --git a/.vim/pack/vendor/start/vim-devicons/test/default_setting.vim b/.vim/pack/vendor/start/vim-devicons/test/default_setting.vim new file mode 100644 index 0000000..b379948 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/test/default_setting.vim | |||
@@ -0,0 +1,39 @@ | |||
1 | scriptencoding utf-8 | ||
2 | |||
3 | let s:suite = themis#suite('Webdevicons-default-value') | ||
4 | let s:assert = themis#helper('assert') | ||
5 | |||
6 | function! s:suite.ExtensionConfig() | ||
7 | call s:assert.equals(g:webdevicons_enable, 1) | ||
8 | call s:assert.equals(g:webdevicons_enable_nerdtree, 1) | ||
9 | call s:assert.equals(g:webdevicons_enable_unite, 1) | ||
10 | call s:assert.equals(g:webdevicons_enable_denite, 1) | ||
11 | call s:assert.equals(g:webdevicons_enable_vimfiler, 1) | ||
12 | call s:assert.equals(g:webdevicons_enable_ctrlp, 1) | ||
13 | call s:assert.equals(g:webdevicons_enable_airline_tabline, 1) | ||
14 | call s:assert.equals(g:webdevicons_enable_airline_statusline, 1) | ||
15 | call s:assert.equals(g:webdevicons_enable_airline_statusline_fileformat_symbols, 1) | ||
16 | call s:assert.equals(g:webdevicons_enable_flagship_statusline, 1) | ||
17 | call s:assert.equals(g:webdevicons_enable_flagship_statusline_fileformat_symbols, 1) | ||
18 | call s:assert.equals(g:webdevicons_enable_startify, 1) | ||
19 | call s:assert.equals(g:webdevicons_conceal_nerdtree_brackets, 1) | ||
20 | endfunction | ||
21 | |||
22 | function! s:suite.ConfigOptions() | ||
23 | call s:assert.equals(g:DevIconsAppendArtifactFix, 0) | ||
24 | call s:assert.equals(g:DevIconsArtifactFixChar, ' ') | ||
25 | call s:assert.equals(g:WebDevIconsUnicodeDecorateFileNodes, 1) | ||
26 | call s:assert.equals(g:WebDevIconsUnicodeDecorateFolderNodes, 1) | ||
27 | call s:assert.equals(g:DevIconsEnableFoldersOpenClose, 0) | ||
28 | call s:assert.equals(g:DevIconsEnableFolderPatternMatching, 1) | ||
29 | call s:assert.equals(g:DevIconsEnableFolderExtensionPatternMatching, 0) | ||
30 | call s:assert.equals(1, g:WebDevIconsUnicodeDecorateFolderNodesExactMatches, 1) | ||
31 | call s:assert.equals(1, g:WebDevIconsUnicodeGlyphDoubleWidth, 1) | ||
32 | call s:assert.equals(g:WebDevIconsNerdTreeBeforeGlyphPadding, ' ') | ||
33 | call s:assert.equals(g:WebDevIconsNerdTreeAfterGlyphPadding, ' ') | ||
34 | call s:assert.equals(g:WebDevIconsNerdTreeGitPluginForceVAlign, 1) | ||
35 | call s:assert.equals(g:NERDTreeUpdateOnCursorHold, 1) " Obsolete: for backward compatibility | ||
36 | call s:assert.equals(g:NERDTreeGitStatusUpdateOnCursorHold, 1) | ||
37 | call s:assert.equals(g:WebDevIconsTabAirLineBeforeGlyphPadding, ' ') | ||
38 | call s:assert.equals(g:WebDevIconsTabAirLineAfterGlyphPadding, '') | ||
39 | endfunction | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/test/fileformat.vim b/.vim/pack/vendor/start/vim-devicons/test/fileformat.vim new file mode 100644 index 0000000..170a27b --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/test/fileformat.vim | |||
@@ -0,0 +1,29 @@ | |||
1 | scriptencoding utf-8 | ||
2 | |||
3 | " Please use nerd-font if you watch icon-font | ||
4 | |||
5 | let s:suite = themis#suite('WebDevIconsGetFileFormatSymbol') | ||
6 | let s:assert = themis#helper('assert') | ||
7 | |||
8 | function! s:suite.UnixIcon() | ||
9 | set fileformat=unix | ||
10 | let os = system('uname -a') | ||
11 | if os =~# 'Darwin' | ||
12 | call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') | ||
13 | " It may return Ubuntu because github-actions's OS is Ubuntu | ||
14 | elseif os =~# 'Ubuntu' | ||
15 | call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') | ||
16 | else | ||
17 | call s:assert.skip('Skip testing except for Ubuntu and Mac.') | ||
18 | endif | ||
19 | endfunction | ||
20 | |||
21 | function! s:suite.WindowsIcon() | ||
22 | set fileformat=dos | ||
23 | call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') | ||
24 | endfunction | ||
25 | |||
26 | function! s:suite.MacIcon() | ||
27 | set fileformat=mac | ||
28 | call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') | ||
29 | endfunction | ||
diff --git a/.vim/pack/vendor/start/vim-devicons/test/filetype.vim b/.vim/pack/vendor/start/vim-devicons/test/filetype.vim new file mode 100644 index 0000000..3669ad9 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/test/filetype.vim | |||
@@ -0,0 +1,344 @@ | |||
1 | scriptencoding utf-8 | ||
2 | |||
3 | " Please use nerd-font if you watch icon-font | ||
4 | |||
5 | let s:suite = themis#suite('WebDevIconsGetFileTypeSymbol') | ||
6 | let s:assert = themis#helper('assert') | ||
7 | |||
8 | function! s:Assert(filename, icon) | ||
9 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(a:filename), a:icon) | ||
10 | endfunction | ||
11 | |||
12 | function! s:suite.NoArgument_GetDefaultIcon() | ||
13 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
14 | endfunction | ||
15 | |||
16 | function! s:suite.__OneArgument_VimIcon__() | ||
17 | let targetfilenames = ['.vimrc', 'vimrc', '.gvimrc', '_gvimrc', 'test.vim'] | ||
18 | let expecticon = '' | ||
19 | let child = themis#suite('OneArgument_VimIcon') | ||
20 | |||
21 | for targetfilename in targetfilenames | ||
22 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
23 | endfor | ||
24 | endfunction | ||
25 | |||
26 | function! s:suite.__OneArgument_RubyIcon__() | ||
27 | let targetfilenames = ['test.rb', 'rakefile', 'RAKEFILE', 'Gemfile', 'config.ru'] | ||
28 | let expecticon = '' | ||
29 | let child = themis#suite('OneArgument_RubyIcon') | ||
30 | |||
31 | for targetfilename in targetfilenames | ||
32 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
33 | endfor | ||
34 | endfunction | ||
35 | |||
36 | function! s:suite.__OneArgument_MarkDownIcon__() | ||
37 | let targetfilenames = ['test.md', 'test.markdown', 'test.mdx', 'test.rmd'] | ||
38 | let expecticon = '' | ||
39 | let child = themis#suite('OneArgument_MarkDownIcon') | ||
40 | |||
41 | for targetfilename in targetfilenames | ||
42 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
43 | endfor | ||
44 | endfunction | ||
45 | |||
46 | function! s:suite.__OneArgument_PythonIcon__() | ||
47 | let targetfilenames = ['test.py', 'test.pyc', 'test.pyo', 'test.pyd'] | ||
48 | let expecticon = '' | ||
49 | let child = themis#suite('OneArgument_PythonIcon') | ||
50 | |||
51 | for targetfilename in targetfilenames | ||
52 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
53 | endfor | ||
54 | endfunction | ||
55 | |||
56 | function! s:suite.__OneArgument_ShellIcon__() | ||
57 | let targetfilenames = ['test.sh', 'test.fish', 'test.bash', 'test.ksh', 'test.csh', 'test.awk', 'test.ps1'] | ||
58 | let expecticon = '' | ||
59 | let child = themis#suite('OneArgument_ShellIcon') | ||
60 | |||
61 | for targetfilename in targetfilenames | ||
62 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
63 | endfor | ||
64 | endfunction | ||
65 | |||
66 | function! s:suite.__OneArgument_DBIcon__() | ||
67 | let targetfilenames = ['test.db', 'test.sql', 'test.dump'] | ||
68 | let expecticon = '' | ||
69 | let child = themis#suite('OneArgument_DBIcon') | ||
70 | |||
71 | for targetfilename in targetfilenames | ||
72 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
73 | endfor | ||
74 | endfunction | ||
75 | |||
76 | function! s:suite.__OneArgument_RustIcon__() | ||
77 | let targetfilenames = ['test.rs', 'test.rlib'] | ||
78 | let expecticon = '' | ||
79 | let child = themis#suite('OneArgument_RustIcon') | ||
80 | |||
81 | for targetfilename in targetfilenames | ||
82 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
83 | endfor | ||
84 | endfunction | ||
85 | |||
86 | function! s:suite.__OneArgument_DockerIcon__() | ||
87 | let targetfilenames = ['Dockerfile', 'docker-compose.yml'] | ||
88 | let expecticon = '' | ||
89 | let child = themis#suite('OneArgument_DockerIcon') | ||
90 | |||
91 | for targetfilename in targetfilenames | ||
92 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
93 | endfor | ||
94 | endfunction | ||
95 | |||
96 | function! s:suite.__OneArgument_JavaScriptIcon__() | ||
97 | let targetfilenames = ['test.js', 'test.mjs'] | ||
98 | let expecticon = '' | ||
99 | let child = themis#suite('OneArgument_JavaScriptIcon') | ||
100 | |||
101 | for targetfilename in targetfilenames | ||
102 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
103 | endfor | ||
104 | endfunction | ||
105 | |||
106 | function! s:suite.__OneArgument_ReactIcon__() | ||
107 | let targetfilenames = ['test.jsx', 'test.tsx', 'react.jsx'] | ||
108 | let expecticon = '' | ||
109 | let child = themis#suite('OneArgument_ReactIcon') | ||
110 | |||
111 | for targetfilename in targetfilenames | ||
112 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
113 | endfor | ||
114 | endfunction | ||
115 | |||
116 | function! s:suite.__OneArgument_JsonIcon__() | ||
117 | let targetfilenames = ['test.json', 'test.webmanifest'] | ||
118 | let expecticon = '' | ||
119 | let child = themis#suite('OneArgument_JsonIcon') | ||
120 | |||
121 | for targetfilename in targetfilenames | ||
122 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
123 | endfor | ||
124 | endfunction | ||
125 | |||
126 | function! s:suite.__OneArgument_GearIcon__() | ||
127 | let targetfilenames = ['.DS_Store', 'Makefile', 'test.mk', '.bashrc', '.zshrc', '.gitignore', '.gitattributes', 'cmakelists.txt', 'test.yaml', 'test.yml', 'test.toml', 'test.bat'] | ||
128 | let expecticon = '' | ||
129 | let child = themis#suite('OneArgument_GearIcon') | ||
130 | |||
131 | for targetfilename in targetfilenames | ||
132 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
133 | endfor | ||
134 | endfunction | ||
135 | |||
136 | function! s:suite.__OneArgument_ErlangIcon__() | ||
137 | let targetfilenames = ['test.erl', 'test.hrl'] | ||
138 | let expecticon = '' | ||
139 | let child = themis#suite('OneArgument_ErlangIcon') | ||
140 | |||
141 | for targetfilename in targetfilenames | ||
142 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
143 | endfor | ||
144 | endfunction | ||
145 | |||
146 | function! s:suite.__OneArgument_SwiftIcon__() | ||
147 | let targetfilenames = ['test.swift', 'test.xcplayground'] | ||
148 | let expecticon = '' | ||
149 | let child = themis#suite('OneArgument_SwiftIcon') | ||
150 | |||
151 | for targetfilename in targetfilenames | ||
152 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
153 | endfor | ||
154 | endfunction | ||
155 | |||
156 | function! s:suite.__OneArgument_HaskellIcon__() | ||
157 | let targetfilenames = ['test.hs', 'test.lhs'] | ||
158 | let expecticon = '' | ||
159 | let child = themis#suite('OneArgument_HaskellIcon') | ||
160 | |||
161 | for targetfilename in targetfilenames | ||
162 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
163 | endfor | ||
164 | endfunction | ||
165 | |||
166 | function! s:suite.__OneArgument_CppIcon__() | ||
167 | let targetfilenames = ['test.cpp', 'test.c++', 'test.cp', 'test.cxx', 'test.cc'] | ||
168 | let expecticon = '' | ||
169 | let child = themis#suite('OneArgument_C++Icon') | ||
170 | |||
171 | for targetfilename in targetfilenames | ||
172 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
173 | endfor | ||
174 | endfunction | ||
175 | |||
176 | function! s:suite.__OneArgument_ElixirIcon__() | ||
177 | let targetfilenames = ['test.ex', 'test.exs', 'test.eex', 'test.leex', 'test.heex'] | ||
178 | let expecticon = '' | ||
179 | let child = themis#suite('OneArgument_ElixirIcon') | ||
180 | |||
181 | for targetfilename in targetfilenames | ||
182 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
183 | endfor | ||
184 | endfunction | ||
185 | |||
186 | function! s:suite.__OneArgument_PerlIcon__() | ||
187 | let targetfilenames = ['test.pl', 'test.pm', 'test.t'] | ||
188 | let expecticon = '' | ||
189 | let child = themis#suite('OneArgument_PerlIcon') | ||
190 | |||
191 | for targetfilename in targetfilenames | ||
192 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
193 | endfor | ||
194 | endfunction | ||
195 | |||
196 | function! s:suite.__OneArgument_FSharpIcon__() | ||
197 | let targetfilenames = ['test.fs', 'test.fsx', 'test.fsi', 'test.fsscript'] | ||
198 | let expecticon = '' | ||
199 | let child = themis#suite('OneArgument_FSharpIcon') | ||
200 | |||
201 | for targetfilename in targetfilenames | ||
202 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
203 | endfor | ||
204 | endfunction | ||
205 | |||
206 | function! s:suite.OneArgument_GetTypeScriptIcon() | ||
207 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.ts'), '') | ||
208 | endfunction | ||
209 | |||
210 | function! s:suite.OneArgument_GetVueIcon() | ||
211 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.vue'), '﵂') | ||
212 | endfunction | ||
213 | |||
214 | function! s:suite.OneArgument_GetNodeModuleIcon() | ||
215 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('node_modules'), '') | ||
216 | endfunction | ||
217 | |||
218 | function! s:suite.OneArgument_GetDropboxIcon() | ||
219 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('Dropbox'), '') | ||
220 | endfunction | ||
221 | |||
222 | function! s:suite.OneArgument_GetRIcon() | ||
223 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.r'), 'ﳒ') | ||
224 | endfunction | ||
225 | |||
226 | function! s:suite.OneArgument_GetLuaIcon() | ||
227 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.lua'), '') | ||
228 | endfunction | ||
229 | |||
230 | function! s:suite.OneArgument_GetJavaIcon() | ||
231 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.java'), '') | ||
232 | endfunction | ||
233 | |||
234 | function! s:suite.OneArgument_GetCIcon() | ||
235 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.c'), '') | ||
236 | endfunction | ||
237 | |||
238 | function! s:suite.OneArgument_GetCSSIcon() | ||
239 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.cs'), '') | ||
240 | endfunction | ||
241 | |||
242 | function! s:suite.OneArgument_GetCSharpIcon() | ||
243 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.cs'), '') | ||
244 | endfunction | ||
245 | |||
246 | function! s:suite.OneArgument_GetElmIcon() | ||
247 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.elm'), '') | ||
248 | endfunction | ||
249 | |||
250 | function! s:suite.OneArgument_GetRssIcon() | ||
251 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.rss'), '') | ||
252 | endfunction | ||
253 | |||
254 | function! s:suite.OneArgument_GetDartIcon() | ||
255 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.dart'), '') | ||
256 | endfunction | ||
257 | |||
258 | function! s:suite.OneArgument_GetSolidityIcon() | ||
259 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.sol'), 'ﲹ') | ||
260 | endfunction | ||
261 | |||
262 | function! s:suite.OneArgument_GetGoIcon() | ||
263 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.go'), '') | ||
264 | endfunction | ||
265 | |||
266 | function! s:suite.OneArgument_GetPhpIcon() | ||
267 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.php'),'') | ||
268 | endfunction | ||
269 | |||
270 | function! s:suite.OneArgument_GetScalaIcon() | ||
271 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.scala'), '') | ||
272 | endfunction | ||
273 | |||
274 | function! s:suite.OneArgument_GetTexIcon() | ||
275 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.tex'), 'ﭨ') | ||
276 | endfunction | ||
277 | |||
278 | function! s:suite.OneArgument_GetLicenseIcon() | ||
279 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('LICENSE'), '') | ||
280 | endfunction | ||
281 | |||
282 | function! s:suite.OneArgument_GetRobotIcon() | ||
283 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('robots.txt'), 'ﮧ') | ||
284 | endfunction | ||
285 | |||
286 | function! s:suite.OneArgument_PemIcon() | ||
287 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.pem'), '') | ||
288 | endfunction | ||
289 | |||
290 | function! s:suite.TwoArgument_zero_GetFileIcon() | ||
291 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 0), '') | ||
292 | endfunction | ||
293 | |||
294 | function! s:suite.TwoArgument_one_GetFolderIcon() | ||
295 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 1), '') | ||
296 | endfunction | ||
297 | |||
298 | function! s:suite.TwoArgument_two_GetDefaultIcon() | ||
299 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 2), '') | ||
300 | endfunction | ||
301 | |||
302 | function! s:suite.TwoArgument_string_GetFileTypeIcon() | ||
303 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.php', 'test.vim'), '') | ||
304 | endfunction | ||
305 | |||
306 | function! s:suite.NoArgument_OverWriteFileType_GetVimIcon() | ||
307 | set ft=vim | ||
308 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
309 | endfunction | ||
310 | |||
311 | function! s:suite.NoArgument_EditVimFile_GetVimIcon() | ||
312 | edit! test.vim | ||
313 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
314 | endfunction | ||
315 | |||
316 | function! s:suite.NoArgument_Editvimrc_GetVimIcon() | ||
317 | edit! vimrc | ||
318 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
319 | endfunction | ||
320 | |||
321 | function! s:suite.NoArgument_EditPythonFile_GetPythonIcon() | ||
322 | edit! test.py | ||
323 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
324 | endfunction | ||
325 | |||
326 | function! s:suite.NoArgument_EditjavaScriptFile_GetjavaScriptIcon() | ||
327 | edit! test.js | ||
328 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
329 | endfunction | ||
330 | |||
331 | function! s:suite.NoArgument_EditRustFile_GetRustIcon() | ||
332 | edit! test.rs | ||
333 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
334 | endfunction | ||
335 | |||
336 | function! s:suite.NoArgument_EditMKFile_GetGearIcon() | ||
337 | edit! test.mk | ||
338 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
339 | endfunction | ||
340 | |||
341 | function! s:suite.OneArgument_EditPythonFile_GetRubyIcon() | ||
342 | edit! test.py | ||
343 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.rb'), '') | ||
344 | endfunction | ||