From 118326acd056360c559003eef152bed4469266eb Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 5 Dec 2017 21:35:22 +0100 Subject: [PATCH] plugin-manager vim-plug, plugin vim airline and airline themes installed. airline theme set to minimalist --- .vim/.netrwhist | 4 + .vim/after/plugin/snipMate.vim | 35 + .vim/autoload/plug.vim | 1 + .vim/autoload/snipMate.vim | 433 +++ .vim/doc/snipMate.txt | 286 ++ .vim/ftplugin/html_snip_helper.vim | 10 + .vim/plugged/vim-airline-themes/.gitignore | 1 + .vim/plugged/vim-airline-themes/LICENSE | 21 + .vim/plugged/vim-airline-themes/README.md | 61 + .../autoload/airline/themes/alduin.vim | 93 + .../autoload/airline/themes/angr.vim | 109 + .../autoload/airline/themes/atomic.vim | 79 + .../autoload/airline/themes/aurora.vim | 52 + .../autoload/airline/themes/badcat.vim | 82 + .../autoload/airline/themes/badwolf.vim | 52 + .../autoload/airline/themes/base16.vim | 181 ++ .../autoload/airline/themes/base16_3024.vim | 73 + .../autoload/airline/themes/base16_apathy.vim | 73 + .../autoload/airline/themes/base16_ashes.vim | 73 + .../airline/themes/base16_atelierdune.vim | 73 + .../airline/themes/base16_atelierforest.vim | 73 + .../airline/themes/base16_atelierheath.vim | 73 + .../airline/themes/base16_atelierlakeside.vim | 73 + .../airline/themes/base16_atelierseaside.vim | 73 + .../autoload/airline/themes/base16_bespin.vim | 73 + .../autoload/airline/themes/base16_brewer.vim | 73 + .../autoload/airline/themes/base16_bright.vim | 73 + .../autoload/airline/themes/base16_chalk.vim | 73 + .../airline/themes/base16_classic.vim | 73 + .../airline/themes/base16_codeschool.vim | 73 + .../autoload/airline/themes/base16_colors.vim | 73 + .../airline/themes/base16_default.vim | 73 + .../airline/themes/base16_eighties.vim | 73 + .../autoload/airline/themes/base16_embers.vim | 73 + .../autoload/airline/themes/base16_flat.vim | 73 + .../autoload/airline/themes/base16_google.vim | 73 + .../airline/themes/base16_grayscale.vim | 73 + .../airline/themes/base16_greenscreen.vim | 73 + .../airline/themes/base16_harmonic16.vim | 73 + .../airline/themes/base16_hopscotch.vim | 73 + .../airline/themes/base16_isotope.vim | 73 + .../airline/themes/base16_londontube.vim | 73 + .../airline/themes/base16_marrakesh.vim | 73 + .../autoload/airline/themes/base16_mocha.vim | 73 + .../airline/themes/base16_monokai.vim | 73 + .../autoload/airline/themes/base16_ocean.vim | 73 + .../airline/themes/base16_oceanicnext.vim | 83 + .../airline/themes/base16_paraiso.vim | 73 + .../autoload/airline/themes/base16_pop.vim | 73 + .../airline/themes/base16_railscasts.vim | 73 + .../autoload/airline/themes/base16_seti.vim | 76 + .../airline/themes/base16_shapeshifter.vim | 73 + .../autoload/airline/themes/base16_shell.vim | 99 + .../airline/themes/base16_solarized.vim | 73 + .../airline/themes/base16_spacemacs.vim | 191 ++ .../airline/themes/base16_summerfruit.vim | 73 + .../airline/themes/base16_tomorrow.vim | 73 + .../airline/themes/base16_twilight.vim | 73 + .../autoload/airline/themes/base16color.vim | 77 + .../autoload/airline/themes/behelit.vim | 58 + .../autoload/airline/themes/biogoo.vim | 47 + .../autoload/airline/themes/bubblegum.vim | 70 + .../autoload/airline/themes/cobalt2.vim | 100 + .../autoload/airline/themes/cool.vim | 65 + .../autoload/airline/themes/dark_minimal.vim | 63 + .../autoload/airline/themes/deus.vim | 117 + .../autoload/airline/themes/distinguished.vim | 59 + .../autoload/airline/themes/durant.vim | 62 + .../autoload/airline/themes/fairyfloss.vim | 88 + .../autoload/airline/themes/hybrid.vim | 52 + .../autoload/airline/themes/hybridline.vim | 34 + .../autoload/airline/themes/jellybeans.vim | 88 + .../autoload/airline/themes/jet.vim | 98 + .../autoload/airline/themes/kalisi.vim | 70 + .../autoload/airline/themes/kolor.vim | 59 + .../autoload/airline/themes/laederon.vim | 62 + .../autoload/airline/themes/light.vim | 45 + .../autoload/airline/themes/lucius.vim | 62 + .../autoload/airline/themes/luna.vim | 92 + .../autoload/airline/themes/minimalist.vim | 67 + .../autoload/airline/themes/molokai.vim | 68 + .../autoload/airline/themes/monochrome.vim | 18 + .../autoload/airline/themes/murmur.vim | 82 + .../autoload/airline/themes/onedark.vim | 129 + .../autoload/airline/themes/papercolor.vim | 65 + .../autoload/airline/themes/powerlineish.vim | 46 + .../autoload/airline/themes/qwq.vim | 61 + .../autoload/airline/themes/raven.vim | 85 + .../autoload/airline/themes/ravenpower.vim | 36 + .../autoload/airline/themes/serene.vim | 41 + .../autoload/airline/themes/sierra.vim | 94 + .../autoload/airline/themes/silver.vim | 85 + .../autoload/airline/themes/simple.vim | 46 + .../autoload/airline/themes/soda.vim | 33 + .../autoload/airline/themes/sol.vim | 90 + .../autoload/airline/themes/solarized.vim | 207 ++ .../autoload/airline/themes/term.vim | 92 + .../autoload/airline/themes/tomorrow.vim | 44 + .../autoload/airline/themes/ubaryd.vim | 64 + .../autoload/airline/themes/understated.vim | 43 + .../autoload/airline/themes/vice.vim | 72 + .../autoload/airline/themes/violet.vim | 32 + .../autoload/airline/themes/wombat.vim | 90 + .../autoload/airline/themes/xtermlight.vim | 45 + .../autoload/airline/themes/zenburn.vim | 44 + .../vim-airline-themes/doc/airline-themes.txt | 249 ++ .../plugin/airline-themes.vim | 7 + .vim/plugged/vim-airline/.gitignore | 4 + .vim/plugged/vim-airline/.travis.yml | 8 + .vim/plugged/vim-airline/CHANGELOG.md | 120 + .vim/plugged/vim-airline/CONTRIBUTING.md | 32 + .vim/plugged/vim-airline/Gemfile | 2 + .vim/plugged/vim-airline/ISSUE_TEMPLATE.md | 21 + .vim/plugged/vim-airline/LICENSE | 21 + .vim/plugged/vim-airline/README.md | 318 +++ .vim/plugged/vim-airline/Rakefile | 14 + .vim/plugged/vim-airline/autoload/airline.vim | 195 ++ .../vim-airline/autoload/airline/async.vim | 250 ++ .../vim-airline/autoload/airline/builder.vim | 212 ++ .../vim-airline/autoload/airline/debug.vim | 52 + .../autoload/airline/extensions.vim | 350 +++ .../autoload/airline/extensions/ale.vim | 77 + .../autoload/airline/extensions/branch.vim | 336 +++ .../airline/extensions/bufferline.vim | 29 + .../autoload/airline/extensions/capslock.vim | 17 + .../autoload/airline/extensions/commandt.vim | 18 + .../autoload/airline/extensions/csv.vim | 33 + .../autoload/airline/extensions/ctrlp.vim | 82 + .../autoload/airline/extensions/ctrlspace.vim | 20 + .../autoload/airline/extensions/default.vim | 101 + .../autoload/airline/extensions/denite.vim | 42 + .../autoload/airline/extensions/eclim.vim | 62 + .../autoload/airline/extensions/example.vim | 56 + .../autoload/airline/extensions/hunks.vim | 93 + .../autoload/airline/extensions/keymap.vim | 20 + .../autoload/airline/extensions/neomake.vim | 35 + .../autoload/airline/extensions/netrw.vim | 34 + .../autoload/airline/extensions/nrrwrgn.vim | 57 + .../autoload/airline/extensions/obsession.vim | 22 + .../autoload/airline/extensions/po.vim | 50 + .../airline/extensions/promptline.vim | 35 + .../autoload/airline/extensions/quickfix.vim | 53 + .../autoload/airline/extensions/syntastic.vim | 43 + .../autoload/airline/extensions/tabline.vim | 200 ++ .../airline/extensions/tabline/autoshow.vim | 55 + .../airline/extensions/tabline/buffers.vim | 252 ++ .../airline/extensions/tabline/buflist.vim | 44 + .../airline/extensions/tabline/ctrlspace.vim | 175 ++ .../extensions/tabline/formatters/default.vim | 41 + .../tabline/formatters/unique_tail.vim | 40 + .../formatters/unique_tail_improved.vim | 91 + .../airline/extensions/tabline/tabs.vim | 116 + .../autoload/airline/extensions/tagbar.vim | 59 + .../autoload/airline/extensions/term.vim | 22 + .../autoload/airline/extensions/tmuxline.vim | 28 + .../autoload/airline/extensions/undotree.vim | 29 + .../autoload/airline/extensions/unicode.vim | 24 + .../autoload/airline/extensions/unite.vim | 25 + .../autoload/airline/extensions/vimagit.vim | 34 + .../autoload/airline/extensions/vimtex.vim | 81 + .../airline/extensions/virtualenv.vim | 31 + .../airline/extensions/whitespace.vim | 168 ++ .../airline/extensions/windowswap.vim | 29 + .../autoload/airline/extensions/wordcount.vim | 43 + .../wordcount/formatters/default.vim | 66 + .../autoload/airline/extensions/xkblayout.vim | 25 + .../autoload/airline/extensions/ycm.vim | 38 + .../autoload/airline/highlighter.vim | 267 ++ .../vim-airline/autoload/airline/init.vim | 201 ++ .../vim-airline/autoload/airline/msdos.vim | 59 + .../vim-airline/autoload/airline/parts.vim | 109 + .../vim-airline/autoload/airline/section.vim | 85 + .../vim-airline/autoload/airline/themes.vim | 77 + .../autoload/airline/themes/dark.vim | 103 + .../vim-airline/autoload/airline/util.vim | 88 + .vim/plugged/vim-airline/doc/airline.txt | 1289 +++++++++ .vim/plugged/vim-airline/plugin/airline.vim | 156 + .vim/plugged/vim-airline/t/airline.vim | 87 + .vim/plugged/vim-airline/t/builder.vim | 108 + .vim/plugged/vim-airline/t/commands.vim | 35 + .../vim-airline/t/extensions_default.vim | 31 + .vim/plugged/vim-airline/t/highlighter.vim | 21 + .vim/plugged/vim-airline/t/init.vim | 87 + .vim/plugged/vim-airline/t/parts.vim | 39 + .vim/plugged/vim-airline/t/section.vim | 81 + .vim/plugged/vim-airline/t/themes.vim | 73 + .vim/plugged/vim-airline/t/util.vim | 54 + .vim/plugin/snipMate.vim | 247 ++ .vim/scripts/closetag.vim | 327 +++ .vim/snippets/_.snippets | 7 + .vim/snippets/autoit.snippets | 66 + .vim/snippets/c.snippets | 110 + .vim/snippets/cpp.snippets | 30 + .vim/snippets/html.snippets | 190 ++ .vim/snippets/java.snippets | 78 + .vim/snippets/javascript.snippets | 74 + .vim/snippets/mako.snippets | 54 + .vim/snippets/objc.snippets | 184 ++ .vim/snippets/perl.snippets | 91 + .vim/snippets/php.snippets | 236 ++ .vim/snippets/python.snippets | 86 + .vim/snippets/ruby.snippets | 420 +++ .vim/snippets/sh.snippets | 28 + .vim/snippets/snippet.snippets | 7 + .vim/snippets/tcl.snippets | 92 + .vim/snippets/tex.snippets | 115 + .vim/snippets/vim.snippets | 32 + .vim/snippets/zsh.snippets | 58 + .vim/swap/.swp | Bin 0 -> 12288 bytes .vim/swap/brief.tex.swp | Bin 0 -> 12288 bytes .vim/swap/fahrrad_ebay_kleinanyeigen.py.swp | Bin 0 -> 12288 bytes .vim/syntax/php.vim | 649 +++++ .vim/syntax/snippet.vim | 19 + .vim/vim-plug/.github/ISSUE_TEMPLATE.md | 32 + .../vim-plug/.github/PULL_REQUEST_TEMPLATE.md | 8 + .vim/vim-plug/.travis.yml | 62 + .vim/vim-plug/LICENSE | 21 + .vim/vim-plug/README.md | 306 ++ .vim/vim-plug/doc/plug.txt | 376 +++ .vim/vim-plug/plug.png | Bin 0 -> 23247 bytes .vim/vim-plug/plug.vim | 2504 +++++++++++++++++ .vim/vim-plug/test/README.md | 25 + .vim/vim-plug/test/regressions.vader | 374 +++ .vim/vim-plug/test/run | 130 + .vim/vim-plug/test/test.vader | 108 + .vim/vim-plug/test/workflow.vader | 1633 +++++++++++ .vimrc | 8 + 227 files changed, 24693 insertions(+) create mode 100644 .vim/.netrwhist create mode 100644 .vim/after/plugin/snipMate.vim create mode 120000 .vim/autoload/plug.vim create mode 100644 .vim/autoload/snipMate.vim create mode 100644 .vim/doc/snipMate.txt create mode 100644 .vim/ftplugin/html_snip_helper.vim create mode 100644 .vim/plugged/vim-airline-themes/.gitignore create mode 100644 .vim/plugged/vim-airline-themes/LICENSE create mode 100644 .vim/plugged/vim-airline-themes/README.md create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/alduin.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/angr.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/atomic.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/aurora.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/badcat.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/badwolf.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_3024.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_apathy.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ashes.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bespin.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brewer.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bright.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_chalk.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_colors.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_eighties.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_embers.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_flat.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_isotope.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_londontube.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mocha.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_monokai.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ocean.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_oceanicnext.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pop.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_seti.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shell.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_spacemacs.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16_twilight.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/base16color.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/behelit.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/biogoo.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/bubblegum.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/cobalt2.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/cool.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/dark_minimal.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/deus.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/distinguished.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/durant.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/fairyfloss.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/hybrid.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/hybridline.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/jellybeans.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/jet.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/kalisi.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/kolor.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/laederon.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/light.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/lucius.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/luna.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/minimalist.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/molokai.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/monochrome.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/murmur.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/onedark.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/papercolor.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/powerlineish.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/qwq.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/raven.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/ravenpower.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/serene.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/sierra.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/silver.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/simple.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/soda.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/sol.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/solarized.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/term.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/tomorrow.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/ubaryd.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/understated.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/vice.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/violet.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/wombat.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/xtermlight.vim create mode 100644 .vim/plugged/vim-airline-themes/autoload/airline/themes/zenburn.vim create mode 100644 .vim/plugged/vim-airline-themes/doc/airline-themes.txt create mode 100644 .vim/plugged/vim-airline-themes/plugin/airline-themes.vim create mode 100644 .vim/plugged/vim-airline/.gitignore create mode 100644 .vim/plugged/vim-airline/.travis.yml create mode 100644 .vim/plugged/vim-airline/CHANGELOG.md create mode 100644 .vim/plugged/vim-airline/CONTRIBUTING.md create mode 100644 .vim/plugged/vim-airline/Gemfile create mode 100644 .vim/plugged/vim-airline/ISSUE_TEMPLATE.md create mode 100644 .vim/plugged/vim-airline/LICENSE create mode 100644 .vim/plugged/vim-airline/README.md create mode 100644 .vim/plugged/vim-airline/Rakefile create mode 100644 .vim/plugged/vim-airline/autoload/airline.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/async.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/builder.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/debug.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/ale.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/branch.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/bufferline.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/capslock.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/commandt.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/csv.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/ctrlp.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/ctrlspace.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/default.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/denite.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/eclim.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/example.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/hunks.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/neomake.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/nrrwrgn.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/obsession.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/po.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/promptline.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/syntastic.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tagbar.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/term.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/tmuxline.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/undotree.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/unicode.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/unite.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/vimagit.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/vimtex.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/virtualenv.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/whitespace.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/windowswap.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/wordcount.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/xkblayout.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/extensions/ycm.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/highlighter.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/init.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/msdos.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/parts.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/section.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/themes.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/themes/dark.vim create mode 100644 .vim/plugged/vim-airline/autoload/airline/util.vim create mode 100644 .vim/plugged/vim-airline/doc/airline.txt create mode 100644 .vim/plugged/vim-airline/plugin/airline.vim create mode 100644 .vim/plugged/vim-airline/t/airline.vim create mode 100644 .vim/plugged/vim-airline/t/builder.vim create mode 100644 .vim/plugged/vim-airline/t/commands.vim create mode 100644 .vim/plugged/vim-airline/t/extensions_default.vim create mode 100644 .vim/plugged/vim-airline/t/highlighter.vim create mode 100644 .vim/plugged/vim-airline/t/init.vim create mode 100644 .vim/plugged/vim-airline/t/parts.vim create mode 100644 .vim/plugged/vim-airline/t/section.vim create mode 100644 .vim/plugged/vim-airline/t/themes.vim create mode 100644 .vim/plugged/vim-airline/t/util.vim create mode 100644 .vim/plugin/snipMate.vim create mode 100644 .vim/scripts/closetag.vim create mode 100644 .vim/snippets/_.snippets create mode 100644 .vim/snippets/autoit.snippets create mode 100644 .vim/snippets/c.snippets create mode 100644 .vim/snippets/cpp.snippets create mode 100644 .vim/snippets/html.snippets create mode 100644 .vim/snippets/java.snippets create mode 100644 .vim/snippets/javascript.snippets create mode 100644 .vim/snippets/mako.snippets create mode 100644 .vim/snippets/objc.snippets create mode 100644 .vim/snippets/perl.snippets create mode 100644 .vim/snippets/php.snippets create mode 100644 .vim/snippets/python.snippets create mode 100644 .vim/snippets/ruby.snippets create mode 100644 .vim/snippets/sh.snippets create mode 100644 .vim/snippets/snippet.snippets create mode 100644 .vim/snippets/tcl.snippets create mode 100644 .vim/snippets/tex.snippets create mode 100644 .vim/snippets/vim.snippets create mode 100644 .vim/snippets/zsh.snippets create mode 100644 .vim/swap/.swp create mode 100644 .vim/swap/brief.tex.swp create mode 100644 .vim/swap/fahrrad_ebay_kleinanyeigen.py.swp create mode 100644 .vim/syntax/php.vim create mode 100644 .vim/syntax/snippet.vim create mode 100644 .vim/vim-plug/.github/ISSUE_TEMPLATE.md create mode 100644 .vim/vim-plug/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 .vim/vim-plug/.travis.yml create mode 100644 .vim/vim-plug/LICENSE create mode 100644 .vim/vim-plug/README.md create mode 100644 .vim/vim-plug/doc/plug.txt create mode 100644 .vim/vim-plug/plug.png create mode 100644 .vim/vim-plug/plug.vim create mode 100644 .vim/vim-plug/test/README.md create mode 100644 .vim/vim-plug/test/regressions.vader create mode 100755 .vim/vim-plug/test/run create mode 100644 .vim/vim-plug/test/test.vader create mode 100644 .vim/vim-plug/test/workflow.vader diff --git a/.vim/.netrwhist b/.vim/.netrwhist new file mode 100644 index 0000000..1aa2373 --- /dev/null +++ b/.vim/.netrwhist @@ -0,0 +1,4 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =2 +let g:netrw_dirhist_1='/etc/apache2/sites-available' +let g:netrw_dirhist_2='/etc/mysql/mysql.conf.d' diff --git a/.vim/after/plugin/snipMate.vim b/.vim/after/plugin/snipMate.vim new file mode 100644 index 0000000..03e79ae --- /dev/null +++ b/.vim/after/plugin/snipMate.vim @@ -0,0 +1,35 @@ +" These are the mappings for snipMate.vim. Putting it here ensures that it +" will be mapped after other plugins such as supertab.vim. +if !exists('loaded_snips') || exists('s:did_snips_mappings') + finish +endif +let s:did_snips_mappings = 1 + +ino =TriggerSnippet() +snor i=TriggerSnippet() +ino =BackwardsSnippet() +snor i=BackwardsSnippet() +ino =ShowAvailableSnips() + +" The default mappings for these are annoying & sometimes break snipMate. +" You can change them back if you want, I've put them here for convenience. +snor b +snor a +snor bi +snor ' b' +snor ` b` +snor % b% +snor U bU +snor ^ b^ +snor \ b\ +snor b + +" By default load snippets in snippets_dir +if empty(snippets_dir) + finish +endif + +call GetSnippets(snippets_dir, '_') " Get global snippets + +au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif +" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/autoload/plug.vim b/.vim/autoload/plug.vim new file mode 120000 index 0000000..6c4bafe --- /dev/null +++ b/.vim/autoload/plug.vim @@ -0,0 +1 @@ +../vim-plug/plug.vim \ No newline at end of file diff --git a/.vim/autoload/snipMate.vim b/.vim/autoload/snipMate.vim new file mode 100644 index 0000000..dcd28f6 --- /dev/null +++ b/.vim/autoload/snipMate.vim @@ -0,0 +1,433 @@ +fun! Filename(...) + let filename = expand('%:t:r') + if filename == '' | return a:0 == 2 ? a:2 : '' | endif + return !a:0 || a:1 == '' ? filename : substitute(a:1, '$1', filename, 'g') +endf + +fun s:RemoveSnippet() + unl! g:snipPos s:curPos s:snipLen s:endCol s:endLine s:prevLen + \ s:lastBuf s:oldWord + if exists('s:update') + unl s:startCol s:origWordLen s:update + if exists('s:oldVars') | unl s:oldVars s:oldEndCol | endif + endif + aug! snipMateAutocmds +endf + +fun snipMate#expandSnip(snip, col) + let lnum = line('.') | let col = a:col + + let snippet = s:ProcessSnippet(a:snip) + " Avoid error if eval evaluates to nothing + if snippet == '' | return '' | endif + + " Expand snippet onto current position with the tab stops removed + let snipLines = split(substitute(snippet, '$\d\+\|${\d\+.\{-}}', '', 'g'), "\n", 1) + + let line = getline(lnum) + let afterCursor = strpart(line, col - 1) + " Keep text after the cursor + if afterCursor != "\t" && afterCursor != ' ' + let line = strpart(line, 0, col - 1) + let snipLines[-1] .= afterCursor + else + let afterCursor = '' + " For some reason the cursor needs to move one right after this + if line != '' && col == 1 && &ve != 'all' && &ve != 'onemore' + let col += 1 + endif + endif + + call setline(lnum, line.snipLines[0]) + + " Autoindent snippet according to previous indentation + let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1 + call append(lnum, map(snipLines[1:], "'".strpart(line, 0, indent - 1)."'.v:val")) + + " Open any folds snippet expands into + if &fen | sil! exe lnum.','.(lnum + len(snipLines) - 1).'foldopen' | endif + + let [g:snipPos, s:snipLen] = s:BuildTabStops(snippet, lnum, col - indent, indent) + + if s:snipLen + aug snipMateAutocmds + au CursorMovedI * call s:UpdateChangedSnip(0) + au InsertEnter * call s:UpdateChangedSnip(1) + aug END + let s:lastBuf = bufnr(0) " Only expand snippet while in current buffer + let s:curPos = 0 + let s:endCol = g:snipPos[s:curPos][1] + let s:endLine = g:snipPos[s:curPos][0] + + call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) + let s:prevLen = [line('$'), col('$')] + if g:snipPos[s:curPos][2] != -1 | return s:SelectWord() | endif + else + unl g:snipPos s:snipLen + " Place cursor at end of snippet if no tab stop is given + let newlines = len(snipLines) - 1 + call cursor(lnum + newlines, indent + len(snipLines[-1]) - len(afterCursor) + \ + (newlines ? 0: col - 1)) + endif + return '' +endf + +" Prepare snippet to be processed by s:BuildTabStops +fun s:ProcessSnippet(snip) + let snippet = a:snip + " Evaluate eval (`...`) expressions. + " Using a loop here instead of a regex fixes a bug with nested "\=". + if stridx(snippet, '`') != -1 + while match(snippet, '`.\{-}`') != -1 + let snippet = substitute(snippet, '`.\{-}`', + \ substitute(eval(matchstr(snippet, '`\zs.\{-}\ze`')), + \ "\n\\%$", '', ''), '') + endw + let snippet = substitute(snippet, "\r", "\n", 'g') + endif + + " Place all text after a colon in a tab stop after the tab stop + " (e.g. "${#:foo}" becomes "${:foo}foo"). + " This helps tell the position of the tab stops later. + let snippet = substitute(snippet, '${\d\+:\(.\{-}\)}', '&\1', 'g') + + " Update the a:snip so that all the $# become the text after + " the colon in their associated ${#}. + " (e.g. "${1:foo}" turns all "$1"'s into "foo") + let i = 1 + while stridx(snippet, '${'.i) != -1 + let s = matchstr(snippet, '${'.i.':\zs.\{-}\ze}') + if s != '' + let snippet = substitute(snippet, '$'.i, s.'&', 'g') + endif + let i += 1 + endw + + if &et " Expand tabs to spaces if 'expandtab' is set. + return substitute(snippet, '\t', repeat(' ', &sts ? &sts : &sw), 'g') + endif + return snippet +endf + +" Counts occurences of haystack in needle +fun s:Count(haystack, needle) + let counter = 0 + let index = stridx(a:haystack, a:needle) + while index != -1 + let index = stridx(a:haystack, a:needle, index+1) + let counter += 1 + endw + return counter +endf + +" Builds a list of a list of each tab stop in the snippet containing: +" 1.) The tab stop's line number. +" 2.) The tab stop's column number +" (by getting the length of the string between the last "\n" and the +" tab stop). +" 3.) The length of the text after the colon for the current tab stop +" (e.g. "${1:foo}" would return 3). If there is no text, -1 is returned. +" 4.) If the "${#:}" construct is given, another list containing all +" the matches of "$#", to be replaced with the placeholder. This list is +" composed the same way as the parent; the first item is the line number, +" and the second is the column. +fun s:BuildTabStops(snip, lnum, col, indent) + let snipPos = [] + let i = 1 + let withoutVars = substitute(a:snip, '$\d\+', '', 'g') + while stridx(a:snip, '${'.i) != -1 + let beforeTabStop = matchstr(withoutVars, '^.*\ze${'.i.'\D') + let withoutOthers = substitute(withoutVars, '${\('.i.'\D\)\@!\d\+.\{-}}', '', 'g') + + let j = i - 1 + call add(snipPos, [0, 0, -1]) + let snipPos[j][0] = a:lnum + s:Count(beforeTabStop, "\n") + let snipPos[j][1] = a:indent + len(matchstr(withoutOthers, '.*\(\n\|^\)\zs.*\ze${'.i.'\D')) + if snipPos[j][0] == a:lnum | let snipPos[j][1] += a:col | endif + + " Get all $# matches in another list, if ${#:name} is given + if stridx(withoutVars, '${'.i.':') != -1 + let snipPos[j][2] = len(matchstr(withoutVars, '${'.i.':\zs.\{-}\ze}')) + let dots = repeat('.', snipPos[j][2]) + call add(snipPos[j], []) + let withoutOthers = substitute(a:snip, '${\d\+.\{-}}\|$'.i.'\@!\d\+', '', 'g') + while match(withoutOthers, '$'.i.'\(\D\|$\)') != -1 + let beforeMark = matchstr(withoutOthers, '^.\{-}\ze'.dots.'$'.i.'\(\D\|$\)') + call add(snipPos[j][3], [0, 0]) + let snipPos[j][3][-1][0] = a:lnum + s:Count(beforeMark, "\n") + let snipPos[j][3][-1][1] = a:indent + (snipPos[j][3][-1][0] > a:lnum + \ ? len(matchstr(beforeMark, '.*\n\zs.*')) + \ : a:col + len(beforeMark)) + let withoutOthers = substitute(withoutOthers, '$'.i.'\ze\(\D\|$\)', '', '') + endw + endif + let i += 1 + endw + return [snipPos, i - 1] +endf + +fun snipMate#jumpTabStop(backwards) + let leftPlaceholder = exists('s:origWordLen') + \ && s:origWordLen != g:snipPos[s:curPos][2] + if leftPlaceholder && exists('s:oldEndCol') + let startPlaceholder = s:oldEndCol + 1 + endif + + if exists('s:update') + call s:UpdatePlaceholderTabStops() + else + call s:UpdateTabStops() + endif + + " Don't reselect placeholder if it has been modified + if leftPlaceholder && g:snipPos[s:curPos][2] != -1 + if exists('startPlaceholder') + let g:snipPos[s:curPos][1] = startPlaceholder + else + let g:snipPos[s:curPos][1] = col('.') + let g:snipPos[s:curPos][2] = 0 + endif + endif + + let s:curPos += a:backwards ? -1 : 1 + " Loop over the snippet when going backwards from the beginning + if s:curPos < 0 | let s:curPos = s:snipLen - 1 | endif + + if s:curPos == s:snipLen + let sMode = s:endCol == g:snipPos[s:curPos-1][1]+g:snipPos[s:curPos-1][2] + call s:RemoveSnippet() + return sMode ? "\" : TriggerSnippet() + endif + + call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) + + let s:endLine = g:snipPos[s:curPos][0] + let s:endCol = g:snipPos[s:curPos][1] + let s:prevLen = [line('$'), col('$')] + + return g:snipPos[s:curPos][2] == -1 ? '' : s:SelectWord() +endf + +fun s:UpdatePlaceholderTabStops() + let changeLen = s:origWordLen - g:snipPos[s:curPos][2] + unl s:startCol s:origWordLen s:update + if !exists('s:oldVars') | return | endif + " Update tab stops in snippet if text has been added via "$#" + " (e.g., in "${1:foo}bar$1${2}"). + if changeLen != 0 + let curLine = line('.') + + for pos in g:snipPos + if pos == g:snipPos[s:curPos] | continue | endif + let changed = pos[0] == curLine && pos[1] > s:oldEndCol + let changedVars = 0 + let endPlaceholder = pos[2] - 1 + pos[1] + " Subtract changeLen from each tab stop that was after any of + " the current tab stop's placeholders. + for [lnum, col] in s:oldVars + if lnum > pos[0] | break | endif + if pos[0] == lnum + if pos[1] > col || (pos[2] == -1 && pos[1] == col) + let changed += 1 + elseif col < endPlaceholder + let changedVars += 1 + endif + endif + endfor + let pos[1] -= changeLen * changed + let pos[2] -= changeLen * changedVars " Parse variables within placeholders + " e.g., "${1:foo} ${2:$1bar}" + + if pos[2] == -1 | continue | endif + " Do the same to any placeholders in the other tab stops. + for nPos in pos[3] + let changed = nPos[0] == curLine && nPos[1] > s:oldEndCol + for [lnum, col] in s:oldVars + if lnum > nPos[0] | break | endif + if nPos[0] == lnum && nPos[1] > col + let changed += 1 + endif + endfor + let nPos[1] -= changeLen * changed + endfor + endfor + endif + unl s:endCol s:oldVars s:oldEndCol +endf + +fun s:UpdateTabStops() + let changeLine = s:endLine - g:snipPos[s:curPos][0] + let changeCol = s:endCol - g:snipPos[s:curPos][1] + if exists('s:origWordLen') + let changeCol -= s:origWordLen + unl s:origWordLen + endif + let lnum = g:snipPos[s:curPos][0] + let col = g:snipPos[s:curPos][1] + " Update the line number of all proceeding tab stops if has + " been inserted. + if changeLine != 0 + let changeLine -= 1 + for pos in g:snipPos + if pos[0] >= lnum + if pos[0] == lnum | let pos[1] += changeCol | endif + let pos[0] += changeLine + endif + if pos[2] == -1 | continue | endif + for nPos in pos[3] + if nPos[0] >= lnum + if nPos[0] == lnum | let nPos[1] += changeCol | endif + let nPos[0] += changeLine + endif + endfor + endfor + elseif changeCol != 0 + " Update the column of all proceeding tab stops if text has + " been inserted/deleted in the current line. + for pos in g:snipPos + if pos[1] >= col && pos[0] == lnum + let pos[1] += changeCol + endif + if pos[2] == -1 | continue | endif + for nPos in pos[3] + if nPos[0] > lnum | break | endif + if nPos[0] == lnum && nPos[1] >= col + let nPos[1] += changeCol + endif + endfor + endfor + endif +endf + +fun s:SelectWord() + let s:origWordLen = g:snipPos[s:curPos][2] + let s:oldWord = strpart(getline('.'), g:snipPos[s:curPos][1] - 1, + \ s:origWordLen) + let s:prevLen[1] -= s:origWordLen + if !empty(g:snipPos[s:curPos][3]) + let s:update = 1 + let s:endCol = -1 + let s:startCol = g:snipPos[s:curPos][1] - 1 + endif + if !s:origWordLen | return '' | endif + let l = col('.') != 1 ? 'l' : '' + if &sel == 'exclusive' + return "\".l.'v'.s:origWordLen."l\" + endif + return s:origWordLen == 1 ? "\".l.'gh' + \ : "\".l.'v'.(s:origWordLen - 1)."l\" +endf + +" This updates the snippet as you type when text needs to be inserted +" into multiple places (e.g. in "${1:default text}foo$1bar$1", +" "default text" would be highlighted, and if the user types something, +" UpdateChangedSnip() would be called so that the text after "foo" & "bar" +" are updated accordingly) +" +" It also automatically quits the snippet if the cursor is moved out of it +" while in insert mode. +fun s:UpdateChangedSnip(entering) + if exists('g:snipPos') && bufnr(0) != s:lastBuf + call s:RemoveSnippet() + elseif exists('s:update') " If modifying a placeholder + if !exists('s:oldVars') && s:curPos + 1 < s:snipLen + " Save the old snippet & word length before it's updated + " s:startCol must be saved too, in case text is added + " before the snippet (e.g. in "foo$1${2}bar${1:foo}"). + let s:oldEndCol = s:startCol + let s:oldVars = deepcopy(g:snipPos[s:curPos][3]) + endif + let col = col('.') - 1 + + if s:endCol != -1 + let changeLen = col('$') - s:prevLen[1] + let s:endCol += changeLen + else " When being updated the first time, after leaving select mode + if a:entering | return | endif + let s:endCol = col - 1 + endif + + " If the cursor moves outside the snippet, quit it + if line('.') != g:snipPos[s:curPos][0] || col < s:startCol || + \ col - 1 > s:endCol + unl! s:startCol s:origWordLen s:oldVars s:update + return s:RemoveSnippet() + endif + + call s:UpdateVars() + let s:prevLen[1] = col('$') + elseif exists('g:snipPos') + if !a:entering && g:snipPos[s:curPos][2] != -1 + let g:snipPos[s:curPos][2] = -2 + endif + + let col = col('.') + let lnum = line('.') + let changeLine = line('$') - s:prevLen[0] + + if lnum == s:endLine + let s:endCol += col('$') - s:prevLen[1] + let s:prevLen = [line('$'), col('$')] + endif + if changeLine != 0 + let s:endLine += changeLine + let s:endCol = col + endif + + " Delete snippet if cursor moves out of it in insert mode + if (lnum == s:endLine && (col > s:endCol || col < g:snipPos[s:curPos][1])) + \ || lnum > s:endLine || lnum < g:snipPos[s:curPos][0] + call s:RemoveSnippet() + endif + endif +endf + +" This updates the variables in a snippet when a placeholder has been edited. +" (e.g., each "$1" in "${1:foo} $1bar $1bar") +fun s:UpdateVars() + let newWordLen = s:endCol - s:startCol + 1 + let newWord = strpart(getline('.'), s:startCol, newWordLen) + if newWord == s:oldWord || empty(g:snipPos[s:curPos][3]) + return + endif + + let changeLen = g:snipPos[s:curPos][2] - newWordLen + let curLine = line('.') + let startCol = col('.') + let oldStartSnip = s:startCol + let updateTabStops = changeLen != 0 + let i = 0 + + for [lnum, col] in g:snipPos[s:curPos][3] + if updateTabStops + let start = s:startCol + if lnum == curLine && col <= start + let s:startCol -= changeLen + let s:endCol -= changeLen + endif + for nPos in g:snipPos[s:curPos][3][(i):] + " This list is in ascending order, so quit if we've gone too far. + if nPos[0] > lnum | break | endif + if nPos[0] == lnum && nPos[1] > col + let nPos[1] -= changeLen + endif + endfor + if lnum == curLine && col > start + let col -= changeLen + let g:snipPos[s:curPos][3][i][1] = col + endif + let i += 1 + endif + + " "Very nomagic" is used here to allow special characters. + call setline(lnum, substitute(getline(lnum), '\%'.col.'c\V'. + \ escape(s:oldWord, '\'), escape(newWord, '\&'), '')) + endfor + if oldStartSnip != s:startCol + call cursor(0, startCol + s:startCol - oldStartSnip) + endif + + let s:oldWord = newWord + let g:snipPos[s:curPos][2] = newWordLen +endf +" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/doc/snipMate.txt b/.vim/doc/snipMate.txt new file mode 100644 index 0000000..704d44a --- /dev/null +++ b/.vim/doc/snipMate.txt @@ -0,0 +1,286 @@ +*snipMate.txt* Plugin for using TextMate-style snippets in Vim. + +snipMate *snippet* *snippets* *snipMate* +Last Change: July 13, 2009 + +|snipMate-description| Description +|snipMate-syntax| Snippet syntax +|snipMate-usage| Usage +|snipMate-settings| Settings +|snipMate-features| Features +|snipMate-disadvantages| Disadvantages to TextMate +|snipMate-contact| Contact + +For Vim version 7.0 or later. +This plugin only works if 'compatible' is not set. +{Vi does not have any of these features.} + +============================================================================== +DESCRIPTION *snipMate-description* + +snipMate.vim implements some of TextMate's snippets features in Vim. A +snippet is a piece of often-typed text that you can insert into your +document using a trigger word followed by a . + +For instance, in a C file using the default installation of snipMate.vim, if +you type "for" in insert mode, it will expand a typical for loop in C: > + + for (i = 0; i < count; i++) { + + } + + +To go to the next item in the loop, simply over to it; if there is +repeated code, such as the "i" variable in this example, you can simply +start typing once it's highlighted and all the matches specified in the +snippet will be updated. To go in reverse, use . + +============================================================================== +SYNTAX *snippet-syntax* + +Snippets can be defined in two ways. They can be in their own file, named +after their trigger in 'snippets//.snippet', or they can be +defined together in a 'snippets/.snippets' file. Note that dotted +'filetype' syntax is supported -- e.g., you can use > + + :set ft=html.eruby + +to activate snippets for both HTML and eRuby for the current file. + +The syntax for snippets in *.snippets files is the following: > + + snippet trigger + expanded text + more expanded text + +Note that the first hard tab after the snippet trigger is required, and not +expanded in the actual snippet. The syntax for *.snippet files is the same, +only without the trigger declaration and starting indentation. + +Also note that snippets must be defined using hard tabs. They can be expanded +to spaces later if desired (see |snipMate-indenting|). + +"#" is used as a line-comment character in *.snippets files; however, they can +only be used outside of a snippet declaration. E.g.: > + + # this is a correct comment + snippet trigger + expanded text + snippet another_trigger + # this isn't a comment! + expanded text +< +This should hopefully be obvious with the included syntax highlighting. + + *snipMate-${#}* +Tab stops ~ + +By default, the cursor is placed at the end of a snippet. To specify where the +cursor is to be placed next, use "${#}", where the # is the number of the tab +stop. E.g., to place the cursor first on the id of a
tag, and then allow +the user to press to go to the middle of it: + > + snippet div +
+ ${2} +
+< + *snipMate-placeholders* *snipMate-${#:}* *snipMate-$#* +Placeholders ~ + +Placeholder text can be supplied using "${#:text}", where # is the number of +the tab stop. This text then can be copied throughout the snippet using "$#", +given # is the same number as used before. So, to make a C for loop: > + + snippet for + for (${2:i}; $2 < ${1:count}; $1++) { + ${4} + } + +This will cause "count" to first be selected and change if the user starts +typing. When is pressed, the "i" in ${2}'s position will be selected; +all $2 variables will default to "i" and automatically be updated if the user +starts typing. +NOTE: "$#" syntax is used only for variables, not for tab stops as in TextMate. + +Variables within variables are also possible. For instance: > + + snippet opt + + +Will, as usual, cause "option" to first be selected and update all the $1 +variables if the user starts typing. Since one of these variables is inside of +${2}, this text will then be used as a placeholder for the next tab stop, +allowing the user to change it if he wishes. + +To copy a value throughout a snippet without supplying default text, simply +use the "${#:}" construct without the text; e.g.: > + + snippet foo + ${1:}bar$1 +< *snipMate-commands* +Interpolated Vim Script ~ + +Snippets can also contain Vim script commands that are executed (via |eval()|) +when the snippet is inserted. Commands are given inside backticks (`...`); for +TextMates's functionality, use the |system()| function. E.g.: > + + snippet date + `system("date +%Y-%m-%d")` + +will insert the current date, assuming you are on a Unix system. Note that you +can also (and should) use |strftime()| for this example. + +Filename([{expr}] [, {defaultText}]) *snipMate-filename* *Filename()* + +Since the current filename is used often in snippets, a default function +has been defined for it in snipMate.vim, appropriately called Filename(). + +With no arguments, the default filename without an extension is returned; +the first argument specifies what to place before or after the filename, +and the second argument supplies the default text to be used if the file +has not been named. "$1" in the first argument is replaced with the filename; +if you only want the filename to be returned, the first argument can be left +blank. Examples: > + + snippet filename + `Filename()` + snippet filename_with_default + `Filename('', 'name')` + snippet filename_foo + `filename('$1_foo')` + +The first example returns the filename if it the file has been named, and an +empty string if it hasn't. The second returns the filename if it's been named, +and "name" if it hasn't. The third returns the filename followed by "_foo" if +it has been named, and an empty string if it hasn't. + + *multi_snip* +To specify that a snippet can have multiple matches in a *.snippets file, use +this syntax: > + + snippet trigger A description of snippet #1 + expand this text + snippet trigger A description of snippet #2 + expand THIS text! + +In this example, when "trigger" is typed, a numbered menu containing all +of the descriptions of the "trigger" will be shown; when the user presses the +corresponding number, that snippet will then be expanded. + +To create a snippet with multiple matches using *.snippet files, +simply place all the snippets in a subdirectory with the trigger name: +'snippets///.snippet'. + +============================================================================== +USAGE *snipMate-usage* + + *'snippets'* *g:snippets_dir* +Snippets are by default looked for any 'snippets' directory in your +'runtimepath'. Typically, it is located at '~/.vim/snippets/' on *nix or +'$HOME\vimfiles\snippets\' on Windows. To change that location or add another +one, change the g:snippets_dir variable in your |.vimrc| to your preferred +directory, or use the |ExtractSnips()|function. This will be used by the +|globpath()| function, and so accepts the same syntax as it (e.g., +comma-separated paths). + +ExtractSnipsFile({directory}, {filetype}) *ExtractSnipsFile()* *.snippets* + +ExtractSnipsFile() extracts the specified *.snippets file for the given +filetype. A .snippets file contains multiple snippet declarations for the +filetype. It is further explained above, in |snippet-syntax|. + +ExtractSnips({directory}, {filetype}) *ExtractSnips()* *.snippet* + +ExtractSnips() extracts *.snippet files from the specified directory and +defines them as snippets for the given filetype. The directory tree should +look like this: 'snippets//.snippet'. If the snippet has +multiple matches, it should look like this: +'snippets///.snippet' (see |multi_snip|). + + *ResetSnippets()* +The ResetSnippets() function removes all snippets from memory. This is useful +to put at the top of a snippet setup file for if you would like to |:source| +it multiple times. + + *list-snippets* *i_CTRL-R_* +If you would like to see what snippets are available, simply type +in the current buffer to show a list via |popupmenu-completion|. + +============================================================================== +SETTINGS *snipMate-settings* *g:snips_author* + +The g:snips_author string (similar to $TM_FULLNAME in TextMate) should be set +to your name; it can then be used in snippets to automatically add it. E.g.: > + + let g:snips_author = 'Hubert Farnsworth' + snippet name + `g:snips_author` +< + *snipMate-expandtab* *snipMate-indenting* +If you would like your snippets to be expanded using spaces instead of tabs, +just enable 'expandtab' and set 'softtabstop' to your preferred amount of +spaces. If 'softtabstop' is not set, 'shiftwidth' is used instead. + + *snipMate-remap* +snipMate does not come with a setting to customize the trigger key, but you +can remap it easily in the two lines it's defined in the 'after' directory +under 'plugin/snipMate.vim'. For instance, to change the trigger key +to CTRL-J, just change this: > + + ino =TriggerSnippet() + snor i=TriggerSnippet() + +to this: > + ino =TriggerSnippet() + snor i=TriggerSnippet() + +============================================================================== +FEATURES *snipMate-features* + +snipMate.vim has the following features among others: + - The syntax of snippets is very similar to TextMate's, allowing + easy conversion. + - The position of the snippet is kept transparently (i.e. it does not use + markers/placeholders written to the buffer), which allows you to escape + out of an incomplete snippet, something particularly useful in Vim. + - Variables in snippets are updated as-you-type. + - Snippets can have multiple matches. + - Snippets can be out of order. For instance, in a do...while loop, the + condition can be added before the code. + - [New] File-based snippets are supported. + - [New] Triggers after non-word delimiters are expanded, e.g. "foo" + in "bar.foo". + - [New] can now be used to jump tab stops in reverse order. + +============================================================================== +DISADVANTAGES *snipMate-disadvantages* + +snipMate.vim currently has the following disadvantages to TextMate's snippets: + - There is no $0; the order of tab stops must be explicitly stated. + - Placeholders within placeholders are not possible. E.g.: > + + '${3}
' +< + In TextMate this would first highlight ' id="some_id"', and if + you hit delete it would automatically skip ${2} and go to ${3} + on the next , but if you didn't delete it it would highlight + "some_id" first. You cannot do this in snipMate.vim. + - Regex cannot be performed on variables, such as "${1/.*/\U&}" + - Placeholders cannot span multiple lines. + - Activating snippets in different scopes of the same file is + not possible. + +Perhaps some of these features will be added in a later release. + +============================================================================== +CONTACT *snipMate-contact* *snipMate-author* + +To contact the author (Michael Sanders), please email: + msanders42+snipmate gmail com + +I greatly appreciate any suggestions or improvements offered for the script. + +============================================================================== + +vim:tw=78:ts=8:ft=help:norl: diff --git a/.vim/ftplugin/html_snip_helper.vim b/.vim/ftplugin/html_snip_helper.vim new file mode 100644 index 0000000..2e54570 --- /dev/null +++ b/.vim/ftplugin/html_snip_helper.vim @@ -0,0 +1,10 @@ +" Helper function for (x)html snippets +if exists('s:did_snip_helper') || &cp || !exists('loaded_snips') + finish +endif +let s:did_snip_helper = 1 + +" Automatically closes tag if in xhtml +fun! Close() + return stridx(&ft, 'xhtml') == -1 ? '' : ' /' +endf diff --git a/.vim/plugged/vim-airline-themes/.gitignore b/.vim/plugged/vim-airline-themes/.gitignore new file mode 100644 index 0000000..926ccaa --- /dev/null +++ b/.vim/plugged/vim-airline-themes/.gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/.vim/plugged/vim-airline-themes/LICENSE b/.vim/plugged/vim-airline-themes/LICENSE new file mode 100644 index 0000000..b8f4e6b --- /dev/null +++ b/.vim/plugged/vim-airline-themes/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2016 Bailey Ling & Contributors. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.vim/plugged/vim-airline-themes/README.md b/.vim/plugged/vim-airline-themes/README.md new file mode 100644 index 0000000..ac99386 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/README.md @@ -0,0 +1,61 @@ +# vim-airline-themes + +This is the official theme repository for [vim-airline][11] + +# Installation + +This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers: + +| Plugin Manager | Install with... | +| ------------- | ------------- | +| [Pathogen][4] | `git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/bundle/vim-airline-themes`
Remember to run `:Helptags` to generate help tags | +| [NeoBundle][5] | `NeoBundle 'vim-airline/vim-airline-themes'` | +| [Vundle][6] | `Plugin 'vim-airline/vim-airline-themes'` | +| [Plug][7] | `Plug 'vim-airline/vim-airline-themes'` | +| [VAM][8] | `call vam#ActivateAddons([ 'vim-airline-themes' ])` | +| [Dein][9] | `call dein#add('vim-airline/vim-airline-themes')` | +| [minpac][10] | `call minpac#add('vim-airline/vim-airline-themes')` | +| manual | copy all of the files into your `~/.vim` directory | + +# Using a Theme + +Once installed, use `:AirlineTheme ` to set the theme, e.g. `:AirlineTheme simple` + +To set in .vimrc, use `let g:airline_theme=''`, e.g. `let g:airline_theme='simple'` + +**Note:** The command `:AirlineTheme` is only available, if you have also cloned and installed the main [vim-airline][11] repository. + +# Contribution Guidelines + +## New themes + +* Pull requests for new themes are welcome. Please be sure to include a screenshot. You can paste an image into issue [#1](https://github.com/vim-airline/vim-airline-themes/issues/1), and then editing the post to reveal the uploaded image URL. Please don't forgot to update the documentation. + +## Modifications to existing themes + +* Themes are subjective, so if you are going to make modifications to an existing theme, please expose a configurable variable to allow users to choose how the theme will react. + +# Screenshots + +Screenshots are in the process of being migrated here. In the meantime you can find screenshots in the existing repository's [Wiki](https://github.com/vim-airline/vim-airline/wiki/Screenshots). + +# Maintenance + +If you are interested in becoming the official maintainer of this project, please contact [**@bling**][1], [**@chrisbra**][2], or [**@mhartington**][3]. + +# License + +MIT License. Copyright (c) 2013-2017 Bailey Ling & Contributors. + + +[1]: https://github.com/bling +[2]: https://github.com/chrisbra +[3]: https://github.com/mhartington +[4]: https://github.com/tpope/vim-pathogen +[5]: https://github.com/Shougo/neobundle.vim +[6]: https://github.com/VundleVim/Vundle.vim +[7]: https://github.com/junegunn/vim-plug +[8]: https://github.com/MarcWeber/vim-addon-manager +[9]: https://github.com/Shougo/dein.vim +[10]: https://github.com/k-takata/minpac/ +[11]: https://github.com/vim-airline/vim-airline diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/alduin.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/alduin.vim new file mode 100644 index 0000000..0599653 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/alduin.vim @@ -0,0 +1,93 @@ +" Author: Danilo Augusto +" Script: Alduin (vim-airline version) +" License: MIT + +let s:gui00 = "#1c1c1c" " ANSI Black +let s:gui01 = "#af8787" " ANSI Red +let s:gui02 = "#dfaf87" " ANSI Green +let s:gui03 = "#878787" " ANSI Yellow +let s:gui04 = "#af5f5f" " ANSI Blue +let s:gui05 = "#875f5f" " ANSI Magenta +let s:gui06 = "#87afaf" " ANSI Cyan +let s:gui07 = "#ffdf87" " ANSI White +let s:gui08 = "#87875f" +let s:gui09 = "#af1600" +let s:gui0A = "#af875f" +let s:gui0B = "#878787" +let s:gui0C = "#af5f00" +let s:gui0D = "#5f5f87" +let s:gui0E = "#afd7d7" +let s:gui0F = "#dfdfaf" + +let s:cterm00 = "234" +let s:cterm01 = "138" +let s:cterm02 = "180" +let s:cterm03 = "102" +let s:cterm04 = "131" +let s:cterm05 = "95" +let s:cterm06 = "109" +let s:cterm07 = "222" +let s:cterm08 = "101" +let s:cterm09 = "138" +let s:cterm0A = "180" +let s:cterm0B = "102" +let s:cterm0C = "130" +let s:cterm0D = "60" +let s:cterm0E = "152" +let s:cterm0F = "187" + +let s:guiWhite = "#ffffff" +let s:guiGray = "#666666" +let s:guiDarkGray = "#545454" +let s:guiAlmostBlack = "#2a2a2a" +let s:ctermWhite = "231" +let s:ctermGray = "243" +let s:ctermDarkGray = "240" +let s:ctermAlmostBlack = "235" + +let g:airline#themes#alduin#palette = {} +let s:modified = { 'airline_c': [s:gui07, '', s:cterm07, '', ''] } + +" Normal mode +let s:N1 = [s:gui07, s:gui0D, s:cterm07, s:cterm0D] +let s:N2 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let s:N3 = [s:gui02, s:guiDarkGray, s:cterm02, s:ctermDarkGray] +let g:airline#themes#alduin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#alduin#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [s:guiWhite, s:gui0B, s:ctermWhite, s:cterm0B] +let s:I2 = s:N2 +let s:I3 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let g:airline#themes#alduin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#alduin#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [s:guiWhite, s:gui08, s:ctermWhite, s:cterm08] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#alduin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#alduin#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [s:gui08, s:gui00, s:cterm08, s:cterm00] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#alduin#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#alduin#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [s:guiGray, s:gui01, s:ctermGray, s:cterm01] +let s:IN2 = [s:gui02, s:guiAlmostBlack, s:cterm02, s:ctermAlmostBlack] +let s:IN3 = [s:gui02, s:guiAlmostBlack, s:cterm02, s:ctermAlmostBlack] +let g:airline#themes#alduin#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#alduin#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let s:CP2 = [s:guiWhite, s:gui03, s:ctermWhite, s:cterm01] +let s:CP3 = [s:guiWhite, s:gui0D, s:ctermWhite, s:cterm0D] diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/angr.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/angr.vim new file mode 100644 index 0000000..df00add --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/angr.vim @@ -0,0 +1,109 @@ +" Color palette +let s:gui_dark_gray = '#303030' +let s:cterm_dark_gray = 236 +let s:gui_med_gray_hi = '#444444' +let s:cterm_med_gray_hi = 238 +let s:gui_med_gray_lo = '#3a3a3a' +let s:cterm_med_gray_lo = 237 +let s:gui_light_gray = '#b2b2b2' +let s:cterm_light_gray = 249 +let s:gui_green = '#005f87' +let s:cterm_green = 150 +let s:gui_blue = '#87afd7' +let s:cterm_blue = 110 +let s:gui_purple = '#afafd7' +let s:cterm_purple = 146 +let s:gui_orange = '#ffaf87' +let s:cterm_orange = 216 +let s:gui_red = '#d78787' +let s:cterm_red = 174 +let s:gui_pink = '#d7afd7' +let s:cterm_pink = 182 + +let g:airline#themes#angr#palette = {} + +" Normal mode +let s:N1 = [s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green] +let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] +let s:N3 = [s:gui_light_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi] " inside text +let g:airline#themes#angr#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#angr#palette.normal_modified = { + \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, ''], + \ } + +" Insert mode +let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] +let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] " inside text +let g:airline#themes#angr#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) +let g:airline#themes#angr#palette.insert_modified = copy(g:airline#themes#angr#palette.normal_modified) +let g:airline#themes#angr#palette.insert_paste = { + \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], + \ } + +" Replace mode +let g:airline#themes#angr#palette.replace = { + \ 'airline_a': [s:gui_dark_gray, s:gui_red, s:cterm_dark_gray, s:cterm_red, ''], + \ 'airline_c': [s:gui_red, s:gui_med_gray_hi, s:cterm_red, s:cterm_med_gray_hi, ''], + \ } +let g:airline#themes#angr#palette.replace_modified = copy(g:airline#themes#angr#palette.insert_modified) + +" Visual mode +let s:V1 = [s:gui_dark_gray, s:gui_pink, s:cterm_dark_gray, s:cterm_pink] +let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:cterm_pink, s:cterm_med_gray_hi] +let g:airline#themes#angr#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) +let g:airline#themes#angr#palette.visual_modified = copy(g:airline#themes#angr#palette.insert_modified) + +" Inactive window +let s:IA = [s:gui_light_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi, ''] +let g:airline#themes#angr#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#angr#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], + \ } + +" Warnings +let s:ER = airline#themes#get_highlight2(['ErrorMsg', 'bg'], ['ErrorMsg', 'fg'], 'bold') +let g:airline#themes#angr#palette.normal.airline_warning = [ + \ s:ER[1], s:ER[0], s:ER[3], s:ER[2] + \ ] +let g:airline#themes#angr#palette.normal_modified.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.insert.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.insert_modified.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.visual.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.visual_modified.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.replace.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.replace_modified.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning + +" Errors +let g:airline#themes#angr#palette.normal.airline_error = [ + \ s:ER[1], s:ER[0], s:ER[3], s:ER[2] + \ ] +let g:airline#themes#angr#palette.normal_modified.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.insert.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.insert_modified.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.visual.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.visual_modified.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.replace.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.replace_modified.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#angr#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, '' ] , + \ [ s:gui_orange, s:gui_med_gray_lo, s:cterm_orange, s:cterm_med_gray_lo, '' ] , + \ [ s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green, 'bold' ] ) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/atomic.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/atomic.vim new file mode 100644 index 0000000..7e2bc6e --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/atomic.vim @@ -0,0 +1,79 @@ +"---------------------------------------------------------------- +" ___ __ _ +" / | / /_____ ____ ___ (_)____ +" / /| |/ __/ __ \/ __ `__ \/ / ___/ +" / ___ / /_/ /_/ / / / / / / / /__ +" /_/ |_\__/\____/_/ /_/ /_/_/\___/ +" +"---------------------------------------------------------------- +" Theme : Atomic +" Version : 2.0.0 +" License : MIT +" Author : Gerard Bajona +" URL : https://github.com/gerardbm/atomic +" ---------------------------------------------------------------- +" Colors will be adapted to the current colorscheme. For better +" contrast use the atomic colorscheme: it has ten color palettes +" with sixteen colors selected procedurally (algorithms). +" +" Atomic colorscheme: https://github.com/gerardbm/vim-atomic +" ---------------------------------------------------------------- + +let g:airline#themes#atomic#palette = {} + +function! airline#themes#atomic#refresh() + + let s:N1 = airline#themes#get_highlight2(['LineNr', 'bg'], ['ModeMsg', 'fg'], 'none') + let s:N2 = airline#themes#get_highlight2(['LineNr', 'bg'], ['LineNr', 'fg'], 'none') + let s:N3 = airline#themes#get_highlight2(['ModeMsg', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let s:I1 = airline#themes#get_highlight2(['LineNr', 'bg'], ['Question', 'fg'], 'none') + let s:I2 = airline#themes#get_highlight2(['LineNr', 'bg'], ['LineNr', 'fg'], 'none') + let s:I3 = airline#themes#get_highlight2(['Question', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + + let s:R1 = airline#themes#get_highlight2(['LineNr', 'bg'], ['ErrorMsg', 'fg'], 'none') + let s:R2 = airline#themes#get_highlight2(['LineNr', 'bg'], ['LineNr', 'fg'], 'none') + let s:R3 = airline#themes#get_highlight2(['ErrorMsg', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + + let s:V1 = airline#themes#get_highlight2(['LineNr', 'bg'], ['WarningMsg', 'fg'], 'none') + let s:V2 = airline#themes#get_highlight2(['LineNr', 'bg'], ['LineNr', 'fg'], 'none') + let s:V3 = airline#themes#get_highlight2(['WarningMsg', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + + let s:IA1 = airline#themes#get_highlight2(['LineNr', 'fg'], ['StatusLine', 'bg'], 'none') + let s:IA2 = airline#themes#get_highlight2(['LineNr', 'fg'], ['StatusLine', 'bg'], 'none') + let s:IA3 = airline#themes#get_highlight2(['LineNr', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + + " Accent color + " It helps to remove the bold typography into modes section + let g:airline#themes#atomic#palette.accents = {'black' : airline#themes#get_highlight2(['LineNr', 'bg'], ['ModeMsg', 'fg'], 'none')} + + " Mode map + let g:airline_mode_map = { + \ '__' : '--', + \ 'n' : 'N', + \ 'i' : 'I', + \ 'R' : 'R', + \ 'c' : 'C', + \ 'v' : 'V', + \ 'V' : 'V-L', + \ '' : 'V-B', + \ 's' : 'S', + \ 'S' : 'S-L', + \ '' : 'S-B', + \ 't' : 'T', + \ } + + " Settings + let g:airline_symbols.paste = 'Ξ' + let g:airline_symbols.spell = 'S' + let g:airline_section_z = airline#section#create(['--%1p%%-- ', + \ '%#__accent_bold#%l%#__restore__#', ':%c']) + +endfunction + +call airline#themes#atomic#refresh() diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/aurora.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/aurora.vim new file mode 100644 index 0000000..d85dd39 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/aurora.vim @@ -0,0 +1,52 @@ +" Normal mode +let s:N1 = [ '#ffffff' , '#5f00af' , 231 , 55 ] +let s:N2 = [ '#ffffff' , '#875fd7' , 231 , 98 ] +let s:N3 = [ '#333333' , '#efefef' , 59 , 255 ] + +" Insert mode +let s:I1 = [ '#ffffff' , '#005fff' , 231 , 27 ] +let s:I2 = [ '#ffffff' , '#00afff' , 231 , 39 ] +let s:I3 = [ '#333333' , '#efefef' , 59 , 255 ] + +" Visual mode +let s:V1 = [ '#121212' , '#ff5f00' , 233 , 202 ] +let s:V2 = [ '#121212' , '#ffaf00' , 233 , 214 ] +let s:V3 = [ '#333333' , '#efefef' , 59 , 255 ] + +" Replace mode +let s:R1 = [ '#ffffff' , '#ff0000' , 231 , 196 ] +let s:R2 = [ '#ffffff' , '#ff5f5f' , 231 , 203 ] +let s:R3 = [ '#333333' , '#efefef' , 59 , 255 ] + +let g:airline#themes#aurora#palette = {} +let g:airline#themes#aurora#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#aurora#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#aurora#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#aurora#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +" Inactive mode +let s:IN1 = [ '#9e9e9e' , '#9e9e9e' , 247 , 247 ] +let s:IN2 = [ '#efefef' , '#efefef' , 255 , 255 ] + +let s:IA = [ s:IN1[1] , s:IN2[1] , s:IN1[3] , s:IN2[3] , '' ] +let g:airline#themes#aurora#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ '#ffffff' , '#5f00af' , 231 , 55 ] +let s:CP2 = [ '#ffffff' , '#875fd7' , 231 , 98 ] +let s:CP3 = [ '#5f00af' , '#ffffff' , 55 , 231 ] + +let g:airline#themes#aurora#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) + +" Tabline +let g:airline#themes#aurora#palette.tabline = { + \ 'airline_tab': [ '#ffffff' , '#5f00af' , 231 , 55 , '' ], + \ 'airline_tabsel': [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], + \ 'airline_tabtype': [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], + \ 'airline_tabfill': [ '#ffffff' , '#121212' , 231 , 16 , '' ], + \ 'airline_tabmod': [ '#ffffff' , '#ff5f5f' , 231 , 203 , '' ] + \ } diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/badcat.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/badcat.vim new file mode 100644 index 0000000..5247e99 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/badcat.vim @@ -0,0 +1,82 @@ +" Vim Airline theme. +" +" Repository: https://github.com/idlua/badcat +" Author: Luan Vicente + + +" COLOR PALETTE -------------------------------------------------------------{{{ +let g:airline#themes#badcat#palette = {} + +let s:guiBlack = "#080808" +let s:guiGray = "#262626" +let s:guiLightgray = "#6c6c6c" +let s:guiWhite = "#e4e4e4" +let s:guiRed = "#ff5f5f" +let s:guiGreen = "#afd787" +let s:guiBlue = "#5fafd7" +let s:guiOrange = "#ffaf5f" + +let s:ctermBlack = "232" +let s:ctermGray = "235" +let s:ctermLightgray = "242" +let s:ctermWhite = "254" +let s:ctermRed = "203" +let s:ctermGreen = "150" +let s:ctermBlue = "074" +let s:ctermOrange = "215" +" }}} +" BASICS --------------------------------------------------------------------{{{ +let s:modified = { 'airline_c': [ '#ffb964', '', s:ctermRed, '', '' ] } +" }}} + + +" MODES SUPPORT +" NORMAL MODE ---------------------------------------------------------------{{{ +let s:N1 = [ s:guiWhite , s:guiBlack , s:ctermWhite , s:ctermGray ] +let s:N2 = [ s:guiLightgray , s:guiGray , s:ctermLightgray , s:ctermGray ] +let s:N3 = [ s:guiWhite , s:guiBlack , s:ctermWhite , s:ctermBlack ] +let g:airline#themes#badcat#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#badcat#palette.normal_modified = s:modified +" }}} +" INSERT MODE ---------------------------------------------------------------{{{ +let s:I1 = [ s:guiGreen , s:guiBlack , s:ctermGreen , s:ctermBlack ] +let s:I2 = [ s:guiBlack , s:guiGreen , s:ctermBlack , s:ctermGreen ] +let s:I3 = [ s:guiGreen , s:guiBlack , s:ctermGreen , s:ctermBlack ] +let g:airline#themes#badcat#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#badcat#palette.insert_modified = s:modified +" }}} +" VISUAL MODE ---------------------------------------------------------------{{{ +let s:V1 = [ s:guiBlue , s:guiBlack , s:ctermBlue , s:ctermBlack ] +let s:V2 = [ s:guiBlack , s:guiBlue , s:ctermBlack , s:ctermBlue ] +let s:V3 = [ s:guiBlue , s:guiBlack , s:ctermBlue , s:ctermBlack ] +let g:airline#themes#badcat#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#badcat#palette.visual_modified = s:modified +" }}} +" REPLACE MODE --------------------------------------------------------------{{{ +let s:R1 = [ s:guiOrange , s:guiBlack , s:ctermOrange , s:ctermBlack ] +let s:R2 = [ s:guiBlack , s:guiOrange , s:ctermBlack , s:ctermOrange ] +let s:R3 = [ s:guiOrange , s:guiBlack , s:ctermOrange , s:ctermBlack ] +let g:airline#themes#badcat#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#badcat#palette.replace_modified = s:modified +" }}} +" INACTIVE MODE -------------------------------------------------------------{{{ +let s:IN1 = [ s:guiBlack , s:guiGray , s:ctermBlack , s:ctermGray ] +let s:IN2 = [ s:guiLightgray , s:guiBlack , s:ctermLightgray , s:ctermBlack ] +let s:IN3 = [ s:guiLightgray , s:guiBlack , s:ctermLightgray , s:ctermBlack ] +let g:airline#themes#badcat#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#badcat#palette.inactive_modified = s:modified +" }}} + + +" SPECIFIC PLUGIN SUPPORT +" CtrlP ---------------------------------------------------------------------{{{ +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:ctermGray ] +let s:CP2 = [ s:guiWhite , s:gui03 , s:ctermWhite , s:ctermGray ] +let s:CP3 = [ s:guiWhite , s:gui0D , s:ctermWhite , s:ctermBlack ] + +let g:airline#themes#badcat#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) +" }}} diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/badwolf.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/badwolf.vim new file mode 100644 index 0000000..e2b9006 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/badwolf.vim @@ -0,0 +1,52 @@ +let s:N1 = [ '#141413' , '#aeee00' , 232 , 154 ] " blackestgravel & lime +let s:N2 = [ '#f4cf86' , '#45413b' , 222 , 238 ] " dirtyblonde & deepgravel +let s:N3 = [ '#8cffba' , '#242321' , 121 , 235 ] " saltwatertaffy & darkgravel +let s:N4 = [ '#666462' , 241 ] " mediumgravel + +let s:I1 = [ '#141413' , '#0a9dff' , 232 , 39 ] " blackestgravel & tardis +let s:I2 = [ '#f4cf86' , '#005fff' , 222 , 27 ] " dirtyblonde & facebook +let s:I3 = [ '#0a9dff' , '#242321' , 39 , 235 ] " tardis & darkgravel + +let s:V1 = [ '#141413' , '#ffa724' , 232 , 214 ] " blackestgravel & orange +let s:V2 = [ '#000000' , '#fade3e' , 16 , 221 ] " coal & dalespale +let s:V3 = [ '#000000' , '#b88853' , 16 , 137 ] " coal & toffee +let s:V4 = [ '#c7915b' , 173 ] " coffee + +let s:PA = [ '#f4cf86' , 222 ] " dirtyblonde +let s:RE = [ '#ff9eb8' , 211 ] " dress + +let s:IA = [ s:N3[1] , s:N2[1] , s:N3[3] , s:N2[3] , '' ] + +let g:airline#themes#badwolf#palette = {} + +let g:airline#themes#badwolf#palette.accents = { + \ 'red': [ '#ff2c4b' , '' , 196 , '' , '' ] + \ } + +let g:airline#themes#badwolf#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#badwolf#palette.normal_modified = { + \ 'airline_b': [ s:N2[0] , s:N4[0] , s:N2[2] , s:N4[1] , '' ] , + \ 'airline_c': [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } + + +let g:airline#themes#badwolf#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#badwolf#palette.insert_modified = { + \ 'airline_c': [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } +let g:airline#themes#badwolf#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] } + + +let g:airline#themes#badwolf#palette.replace = copy(airline#themes#badwolf#palette.insert) +let g:airline#themes#badwolf#palette.replace.airline_a = [ s:I1[0] , s:RE[0] , s:I1[2] , s:RE[1] , '' ] +let g:airline#themes#badwolf#palette.replace_modified = g:airline#themes#badwolf#palette.insert_modified + + +let g:airline#themes#badwolf#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#badwolf#palette.visual_modified = { + \ 'airline_c': [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } + + +let g:airline#themes#badwolf#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#badwolf#palette.inactive_modified = { + \ 'airline_c': [ s:V1[1] , '' , s:V1[3] , '' , '' ] } + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16.vim new file mode 100644 index 0000000..031489a --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16.vim @@ -0,0 +1,181 @@ +let s:improved_contrast = get(g:, 'airline_base16_improved_contrast', 0) + +" Color palette +let s:gui_dark_gray = '#202020' +let s:cterm_dark_gray = 234 +let s:gui_med_gray_hi = '#303030' +let s:cterm_med_gray_hi = 236 +let s:gui_med_gray_lo = '#3a3a3a' +let s:cterm_med_gray_lo = 237 +let s:gui_light_gray = '#505050' +let s:cterm_light_gray = 239 +let s:gui_lightlight_gray = '#8A8A8A' +let s:cterm_lightlight_gray = 245 +let s:gui_green = '#99cc99' +let s:cterm_green = 151 +let s:gui_blue = '#6a9fb5' +let s:cterm_blue = 67 +let s:gui_purple = '#aa759f' +let s:cterm_purple = 139 +let s:gui_orange = '#d28445' +let s:cterm_orange = 173 +let s:gui_red = '#ac4142' +let s:cterm_red = 131 +let s:gui_pink = '#d7afd7' +let s:cterm_pink = 182 + +if get(g:, 'airline#themes#base16#constant', 0) + let g:airline#themes#base16#palette = {} + + " Normal mode + let s:N1 = [s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green] + if s:improved_contrast + let s:N2 = [s:gui_lightlight_gray, s:gui_med_gray_lo, s:cterm_lightlight_gray, s:cterm_med_gray_lo] + else + + let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] + endif + let s:N3 = [s:gui_green, s:gui_med_gray_hi, s:cterm_green, s:cterm_med_gray_hi] + let g:airline#themes#base16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#base16#palette.normal_modified = { + \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, ''], + \ } + + " Insert mode + let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] + let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] + let g:airline#themes#base16#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) + let g:airline#themes#base16#palette.insert_modified = copy(g:airline#themes#base16#palette.normal_modified) + let g:airline#themes#base16#palette.insert_paste = { + \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], + \ } + + " Replace mode + let g:airline#themes#base16#palette.replace = { + \ 'airline_a': [s:gui_dark_gray, s:gui_red, s:cterm_dark_gray, s:cterm_red, ''], + \ 'airline_c': [s:gui_red, s:gui_med_gray_hi, s:cterm_red, s:cterm_med_gray_hi, ''], + \ } + let g:airline#themes#base16#palette.replace_modified = copy(g:airline#themes#base16#palette.insert_modified) + + " Visual mode + let s:V1 = [s:gui_dark_gray, s:gui_pink, s:cterm_dark_gray, s:cterm_pink] + let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:cterm_pink, s:cterm_med_gray_hi] + let g:airline#themes#base16#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) + let g:airline#themes#base16#palette.visual_modified = copy(g:airline#themes#base16#palette.insert_modified) + + " Inactive window + if s:improved_contrast + let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:cterm_lightlight_gray, s:cterm_med_gray_hi, ''] + else + let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi, ''] + endif + let g:airline#themes#base16#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#base16#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], + \ } +else + function! airline#themes#base16#refresh() + let g:airline#themes#base16#palette = {} + + let g:airline#themes#base16#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + + let s:N1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['DiffText', 'fg'], 'bold') + let s:N2 = airline#themes#get_highlight2(['Visual', 'fg'], ['Visual', 'bg']) + let s:N3 = airline#themes#get_highlight('CursorLine') + let g:airline#themes#base16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let group = airline#themes#get_highlight('vimCommand') + let g:airline#themes#base16#palette.normal_modified = { + \ 'statusline': [ group[0], '', group[2], '', '' ] + \ } + + let s:I1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['DiffAdded', 'fg'], 'bold') + let s:I2 = airline#themes#get_highlight2(['DiffAdded', 'fg'], ['Normal', 'bg']) + let s:I3 = s:N3 + let g:airline#themes#base16#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#base16#palette.insert_modified = g:airline#themes#base16#palette.normal_modified + + let s:R1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['WarningMsg', 'fg'], 'bold') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#base16#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#base16#palette.replace_modified = g:airline#themes#base16#palette.normal_modified + + let s:V1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['Constant', 'fg'], 'bold') + let s:V2 = airline#themes#get_highlight2(['Constant', 'fg'], ['Normal', 'bg']) + let s:V3 = s:N3 + let g:airline#themes#base16#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#base16#palette.visual_modified = g:airline#themes#base16#palette.normal_modified + + " Use VertSplit's bg and default fg (reversed) for inactive statusline. + let s:VS = airline#themes#get_highlight('VertSplit') + if s:improved_contrast + let s:IA = [ s:VS[1], 'NONE', s:VS[2], s:cterm_lightlight_gray, 'reverse'] + else + let s:IA = [ s:VS[1], 'NONE', s:VS[2], 'NONE', 'reverse'] + endif + let g:airline#themes#base16#palette.inactive = + \ airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:IA, s:IA, s:IA) + let s:IM = [ s:VS[1], 'NONE', s:VS[2], 'NONE', 'reverse'] + let g:airline#themes#base16#palette.inactive_modified = + \ airline#themes#generate_color_map(s:IM, s:IM, s:IM, s:IM, s:IM, s:IM) + + " Warnings + let s:WI = airline#themes#get_highlight2(['WarningMsg', 'bg'], ['WarningMsg', 'fg'], 'bold') + let g:airline#themes#base16#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + + let g:airline#themes#base16#palette.normal_modified.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.insert.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.insert_modified.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.visual.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.visual_modified.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.replace.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.replace_modified.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + " Errors + let s:ER = airline#themes#get_highlight2(['ErrorMsg', 'bg'], ['ErrorMsg', 'fg'], 'bold') + let g:airline#themes#base16#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] + + let g:airline#themes#base16#palette.normal_modified.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.insert.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.insert_modified.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.visual.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.visual_modified.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.replace.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.replace_modified.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + endfunction + call airline#themes#base16#refresh() +endif diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_3024.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_3024.vim new file mode 100644 index 0000000..f4e318a --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_3024.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 3024 Scheme by Jan T. Sott (http://github.com/idleberg) +let g:airline#themes#base16_3024#palette = {} +let s:gui00 = "#090300" +let s:gui01 = "#3a3432" +let s:gui02 = "#4a4543" +let s:gui03 = "#5c5855" +let s:gui04 = "#807d7c" +let s:gui05 = "#a5a2a2" +let s:gui06 = "#d6d5d4" +let s:gui07 = "#f7f7f7" +let s:gui08 = "#db2d20" +let s:gui09 = "#e8bbd0" +let s:gui0A = "#fded02" +let s:gui0B = "#01a252" +let s:gui0C = "#b5e4f4" +let s:gui0D = "#01a0e4" +let s:gui0E = "#a16a94" +let s:gui0F = "#cdab53" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 59 +let s:cterm04 = 102 +let s:cterm05 = 145 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 182 +let s:cterm0A = 11 +let s:cterm0B = 35 +let s:cterm0C = 153 +let s:cterm0D = 38 +let s:cterm0E = 132 +let s:cterm0F = 179 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_3024#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_3024#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_3024#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_3024#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_3024#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_3024#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_apathy.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_apathy.vim new file mode 100644 index 0000000..85a9584 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_apathy.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Apathy Scheme by Jannik Siebert (https://github.com/janniks) +let g:airline#themes#base16_apathy#palette = {} +let s:gui00 = "#031A16" +let s:gui01 = "#0B342D" +let s:gui02 = "#184E45" +let s:gui03 = "#2B685E" +let s:gui04 = "#5F9C92" +let s:gui05 = "#81B5AC" +let s:gui06 = "#A7CEC8" +let s:gui07 = "#D2E7E4" +let s:gui08 = "#3E9688" +let s:gui09 = "#3E7996" +let s:gui0A = "#3E4C96" +let s:gui0B = "#883E96" +let s:gui0C = "#963E4C" +let s:gui0D = "#96883E" +let s:gui0E = "#4C963E" +let s:gui0F = "#3E965B" + +let s:cterm00 = 0 +let s:cterm01 = 22 +let s:cterm02 = 23 +let s:cterm03 = 23 +let s:cterm04 = 72 +let s:cterm05 = 109 +let s:cterm06 = 152 +let s:cterm07 = 188 +let s:cterm08 = 66 +let s:cterm09 = 66 +let s:cterm0A = 60 +let s:cterm0B = 96 +let s:cterm0C = 95 +let s:cterm0D = 101 +let s:cterm0E = 65 +let s:cterm0F = 65 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_apathy#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ashes.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ashes.vim new file mode 100644 index 0000000..a162c67 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ashes.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Ashes Scheme by Jannik Siebert (https://github.com/janniks) +let g:airline#themes#base16_ashes#palette = {} +let s:gui00 = "#1C2023" +let s:gui01 = "#393F45" +let s:gui02 = "#565E65" +let s:gui03 = "#747C84" +let s:gui04 = "#ADB3BA" +let s:gui05 = "#C7CCD1" +let s:gui06 = "#DFE2E5" +let s:gui07 = "#F3F4F5" +let s:gui08 = "#C7AE95" +let s:gui09 = "#C7C795" +let s:gui0A = "#AEC795" +let s:gui0B = "#95C7AE" +let s:gui0C = "#95AEC7" +let s:gui0D = "#AE95C7" +let s:gui0E = "#C795AE" +let s:gui0F = "#C79595" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 102 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 180 +let s:cterm09 = 186 +let s:cterm0A = 150 +let s:cterm0B = 115 +let s:cterm0C = 110 +let s:cterm0D = 140 +let s:cterm0E = 175 +let s:cterm0F = 174 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_ashes#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim new file mode 100644 index 0000000..94cfacd --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Dune Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) +let g:airline#themes#base16_atelierdune#palette = {} +let s:gui00 = "#20201d" +let s:gui01 = "#292824" +let s:gui02 = "#6e6b5e" +let s:gui03 = "#7d7a68" +let s:gui04 = "#999580" +let s:gui05 = "#a6a28c" +let s:gui06 = "#e8e4cf" +let s:gui07 = "#fefbec" +let s:gui08 = "#d73737" +let s:gui09 = "#b65611" +let s:gui0A = "#cfb017" +let s:gui0B = "#60ac39" +let s:gui0C = "#1fad83" +let s:gui0D = "#6684e1" +let s:gui0E = "#b854d4" +let s:gui0F = "#d43552" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 101 +let s:cterm04 = 102 +let s:cterm05 = 144 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 130 +let s:cterm0A = 178 +let s:cterm0B = 71 +let s:cterm0C = 36 +let s:cterm0D = 68 +let s:cterm0E = 134 +let s:cterm0F = 167 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierdune#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim new file mode 100644 index 0000000..70c23de --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Forest Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) +let g:airline#themes#base16_atelierforest#palette = {} +let s:gui00 = "#1b1918" +let s:gui01 = "#2c2421" +let s:gui02 = "#68615e" +let s:gui03 = "#766e6b" +let s:gui04 = "#9c9491" +let s:gui05 = "#a8a19f" +let s:gui06 = "#e6e2e0" +let s:gui07 = "#f1efee" +let s:gui08 = "#f22c40" +let s:gui09 = "#df5320" +let s:gui0A = "#d5911a" +let s:gui0B = "#5ab738" +let s:gui0C = "#00ad9c" +let s:gui0D = "#407ee7" +let s:gui0E = "#6666ea" +let s:gui0F = "#c33ff3" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 95 +let s:cterm04 = 138 +let s:cterm05 = 145 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 197 +let s:cterm09 = 166 +let s:cterm0A = 172 +let s:cterm0B = 71 +let s:cterm0C = 37 +let s:cterm0D = 68 +let s:cterm0E = 62 +let s:cterm0F = 135 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierforest#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim new file mode 100644 index 0000000..20179c7 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Heath Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) +let g:airline#themes#base16_atelierheath#palette = {} +let s:gui00 = "#1b181b" +let s:gui01 = "#292329" +let s:gui02 = "#695d69" +let s:gui03 = "#776977" +let s:gui04 = "#9e8f9e" +let s:gui05 = "#ab9bab" +let s:gui06 = "#d8cad8" +let s:gui07 = "#f7f3f7" +let s:gui08 = "#ca402b" +let s:gui09 = "#a65926" +let s:gui0A = "#bb8a35" +let s:gui0B = "#379a37" +let s:gui0C = "#159393" +let s:gui0D = "#516aec" +let s:gui0E = "#7b59c0" +let s:gui0F = "#cc33cc" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 96 +let s:cterm04 = 139 +let s:cterm05 = 139 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 166 +let s:cterm09 = 130 +let s:cterm0A = 137 +let s:cterm0B = 65 +let s:cterm0C = 30 +let s:cterm0D = 12 +let s:cterm0E = 97 +let s:cterm0F = 170 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierheath#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim new file mode 100644 index 0000000..0d1e758 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Lakeside Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) +let g:airline#themes#base16_atelierlakeside#palette = {} +let s:gui00 = "#161b1d" +let s:gui01 = "#1f292e" +let s:gui02 = "#516d7b" +let s:gui03 = "#5a7b8c" +let s:gui04 = "#7195a8" +let s:gui05 = "#7ea2b4" +let s:gui06 = "#c1e4f6" +let s:gui07 = "#ebf8ff" +let s:gui08 = "#d22d72" +let s:gui09 = "#935c25" +let s:gui0A = "#8a8a0f" +let s:gui0B = "#568c3b" +let s:gui0C = "#2d8f6f" +let s:gui0D = "#257fad" +let s:gui0E = "#5d5db1" +let s:gui0F = "#b72dd2" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 60 +let s:cterm03 = 66 +let s:cterm04 = 67 +let s:cterm05 = 109 +let s:cterm06 = 153 +let s:cterm07 = 195 +let s:cterm08 = 161 +let s:cterm09 = 94 +let s:cterm0A = 100 +let s:cterm0B = 65 +let s:cterm0C = 29 +let s:cterm0D = 31 +let s:cterm0E = 61 +let s:cterm0F = 5 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierlakeside#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim new file mode 100644 index 0000000..0314ea2 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Seaside Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) +let g:airline#themes#base16_atelierseaside#palette = {} +let s:gui00 = "#131513" +let s:gui01 = "#242924" +let s:gui02 = "#5e6e5e" +let s:gui03 = "#687d68" +let s:gui04 = "#809980" +let s:gui05 = "#8ca68c" +let s:gui06 = "#cfe8cf" +let s:gui07 = "#f0fff0" +let s:gui08 = "#e6193c" +let s:gui09 = "#87711d" +let s:gui0A = "#c3c322" +let s:gui0B = "#29a329" +let s:gui0C = "#1999b3" +let s:gui0D = "#3d62f5" +let s:gui0E = "#ad2bee" +let s:gui0F = "#e619c3" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 65 +let s:cterm04 = 102 +let s:cterm05 = 108 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 161 +let s:cterm09 = 94 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 31 +let s:cterm0D = 12 +let s:cterm0E = 129 +let s:cterm0F = 5 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierseaside#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bespin.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bespin.vim new file mode 100644 index 0000000..b4f3523 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bespin.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Bespin Scheme by Jan T. Sott +let g:airline#themes#base16_bespin#palette = {} +let s:gui00 = "#28211c" +let s:gui01 = "#36312e" +let s:gui02 = "#5e5d5c" +let s:gui03 = "#666666" +let s:gui04 = "#797977" +let s:gui05 = "#8a8986" +let s:gui06 = "#9d9b97" +let s:gui07 = "#baae9e" +let s:gui08 = "#cf6a4c" +let s:gui09 = "#cf7d34" +let s:gui0A = "#f9ee98" +let s:gui0B = "#54be0d" +let s:gui0C = "#afc4db" +let s:gui0D = "#5ea6ea" +let s:gui0E = "#9b859d" +let s:gui0F = "#937121" + +let s:cterm00 = 0 +let s:cterm01 = 58 +let s:cterm02 = 59 +let s:cterm03 = 241 +let s:cterm04 = 102 +let s:cterm05 = 102 +let s:cterm06 = 138 +let s:cterm07 = 145 +let s:cterm08 = 167 +let s:cterm09 = 173 +let s:cterm0A = 228 +let s:cterm0B = 70 +let s:cterm0C = 152 +let s:cterm0D = 74 +let s:cterm0E = 103 +let s:cterm0F = 94 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_bespin#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brewer.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brewer.vim new file mode 100644 index 0000000..0164677 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brewer.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Brewer Scheme by Timothée Poisot (http://github.com/tpoisot) +let g:airline#themes#base16_brewer#palette = {} +let s:gui00 = "#0c0d0e" +let s:gui01 = "#2e2f30" +let s:gui02 = "#515253" +let s:gui03 = "#737475" +let s:gui04 = "#959697" +let s:gui05 = "#b7b8b9" +let s:gui06 = "#dadbdc" +let s:gui07 = "#fcfdfe" +let s:gui08 = "#e31a1c" +let s:gui09 = "#e6550d" +let s:gui0A = "#dca060" +let s:gui0B = "#31a354" +let s:gui0C = "#80b1d3" +let s:gui0D = "#3182bd" +let s:gui0E = "#756bb1" +let s:gui0F = "#b15928" + +let s:cterm00 = 0 +let s:cterm01 = 17 +let s:cterm02 = 59 +let s:cterm03 = 66 +let s:cterm04 = 102 +let s:cterm05 = 145 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 166 +let s:cterm0A = 179 +let s:cterm0B = 71 +let s:cterm0C = 110 +let s:cterm0D = 67 +let s:cterm0E = 97 +let s:cterm0F = 130 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_brewer#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bright.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bright.vim new file mode 100644 index 0000000..23c7432 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bright.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Bright Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_bright#palette = {} +let s:gui00 = "#000000" +let s:gui01 = "#303030" +let s:gui02 = "#505050" +let s:gui03 = "#b0b0b0" +let s:gui04 = "#d0d0d0" +let s:gui05 = "#e0e0e0" +let s:gui06 = "#f5f5f5" +let s:gui07 = "#ffffff" +let s:gui08 = "#fb0120" +let s:gui09 = "#fc6d24" +let s:gui0A = "#fda331" +let s:gui0B = "#a1c659" +let s:gui0C = "#76c7b7" +let s:gui0D = "#6fb3d2" +let s:gui0E = "#d381c3" +let s:gui0F = "#be643c" + +let s:cterm00 = 0 +let s:cterm01 = 236 +let s:cterm02 = 239 +let s:cterm03 = 249 +let s:cterm04 = 252 +let s:cterm05 = 253 +let s:cterm06 = 15 +let s:cterm07 = 15 +let s:cterm08 = 9 +let s:cterm09 = 202 +let s:cterm0A = 215 +let s:cterm0B = 149 +let s:cterm0C = 115 +let s:cterm0D = 74 +let s:cterm0E = 175 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bright#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bright#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bright#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bright#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_bright#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_bright#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_chalk.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_chalk.vim new file mode 100644 index 0000000..d0345a9 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_chalk.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Chalk Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_chalk#palette = {} +let s:gui00 = "#151515" +let s:gui01 = "#202020" +let s:gui02 = "#303030" +let s:gui03 = "#505050" +let s:gui04 = "#b0b0b0" +let s:gui05 = "#d0d0d0" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#f5f5f5" +let s:gui08 = "#fb9fb1" +let s:gui09 = "#eda987" +let s:gui0A = "#ddb26f" +let s:gui0B = "#acc267" +let s:gui0C = "#12cfc0" +let s:gui0D = "#6fc2ef" +let s:gui0E = "#e1a3ee" +let s:gui0F = "#deaf8f" + +let s:cterm00 = 233 +let s:cterm01 = 234 +let s:cterm02 = 236 +let s:cterm03 = 239 +let s:cterm04 = 249 +let s:cterm05 = 252 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 217 +let s:cterm09 = 216 +let s:cterm0A = 179 +let s:cterm0B = 143 +let s:cterm0C = 6 +let s:cterm0D = 75 +let s:cterm0E = 183 +let s:cterm0F = 180 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_chalk#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic.vim new file mode 100644 index 0000000..ac37123 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Classic Scheme by Jason Heeris (http://heeris.id.au) +let g:airline#themes#base16_classic#palette = {} +let s:gui00 = "#151515" +let s:gui01 = "#202020" +let s:gui02 = "#303030" +let s:gui03 = "#505050" +let s:gui04 = "#B0B0B0" +let s:gui05 = "#D0D0D0" +let s:gui06 = "#E0E0E0" +let s:gui07 = "#F5F5F5" +let s:gui08 = "#AC4142" +let s:gui09 = "#D28445" +let s:gui0A = "#F4BF75" +let s:gui0B = "#90A959" +let s:gui0C = "#75B5AA" +let s:gui0D = "#6A9FB5" +let s:gui0E = "#AA759F" +let s:gui0F = "#8F5536" + +let s:cterm00 = 0 +let s:cterm01 = 18 +let s:cterm02 = 19 +let s:cterm03 = 8 +let s:cterm04 = 20 +let s:cterm05 = 7 +let s:cterm06 = 21 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 16 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 6 +let s:cterm0D = 4 +let s:cterm0E = 5 +let s:cterm0F = 17 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_classic#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_classic#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_classic#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_classic#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_classic#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_classic#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim new file mode 100644 index 0000000..f9cf956 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Codeschool Scheme by brettof86 +let g:airline#themes#base16_codeschool#palette = {} +let s:gui00 = "#232c31" +let s:gui01 = "#1c3657" +let s:gui02 = "#2a343a" +let s:gui03 = "#3f4944" +let s:gui04 = "#84898c" +let s:gui05 = "#9ea7a6" +let s:gui06 = "#a7cfa3" +let s:gui07 = "#b5d8f6" +let s:gui08 = "#2a5491" +let s:gui09 = "#43820d" +let s:gui0A = "#a03b1e" +let s:gui0B = "#237986" +let s:gui0C = "#b02f30" +let s:gui0D = "#484d79" +let s:gui0E = "#c59820" +let s:gui0F = "#c98344" + +let s:cterm00 = 17 +let s:cterm01 = 23 +let s:cterm02 = 23 +let s:cterm03 = 59 +let s:cterm04 = 102 +let s:cterm05 = 145 +let s:cterm06 = 151 +let s:cterm07 = 153 +let s:cterm08 = 24 +let s:cterm09 = 64 +let s:cterm0A = 130 +let s:cterm0B = 30 +let s:cterm0C = 125 +let s:cterm0D = 60 +let s:cterm0E = 172 +let s:cterm0F = 173 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_codeschool#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_colors.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_colors.vim new file mode 100644 index 0000000..d65442d --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_colors.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Colors Scheme by mrmrs (http://clrs.cc) +let g:airline#themes#base16_colors#palette = {} +let s:gui00 = "#111111" +let s:gui01 = "#333333" +let s:gui02 = "#555555" +let s:gui03 = "#777777" +let s:gui04 = "#999999" +let s:gui05 = "#bbbbbb" +let s:gui06 = "#dddddd" +let s:gui07 = "#ffffff" +let s:gui08 = "#ff4136" +let s:gui09 = "#ff851b" +let s:gui0A = "#ffdc00" +let s:gui0B = "#2ecc40" +let s:gui0C = "#7fdbff" +let s:gui0D = "#0074d9" +let s:gui0E = "#b10dc9" +let s:gui0F = "#85144b" + +let s:cterm00 = 233 +let s:cterm01 = 236 +let s:cterm02 = 240 +let s:cterm03 = 243 +let s:cterm04 = 246 +let s:cterm05 = 250 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 203 +let s:cterm09 = 208 +let s:cterm0A = 220 +let s:cterm0B = 41 +let s:cterm0C = 117 +let s:cterm0D = 32 +let s:cterm0E = 128 +let s:cterm0F = 89 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_colors#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_colors#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_colors#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_colors#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_colors#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_colors#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default.vim new file mode 100644 index 0000000..841c12e --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Default Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_default#palette = {} +let s:gui00 = "#181818" +let s:gui01 = "#282828" +let s:gui02 = "#383838" +let s:gui03 = "#585858" +let s:gui04 = "#b8b8b8" +let s:gui05 = "#d8d8d8" +let s:gui06 = "#e8e8e8" +let s:gui07 = "#f8f8f8" +let s:gui08 = "#ab4642" +let s:gui09 = "#dc9656" +let s:gui0A = "#f7ca88" +let s:gui0B = "#a1b56c" +let s:gui0C = "#86c1b9" +let s:gui0D = "#7cafc2" +let s:gui0E = "#ba8baf" +let s:gui0F = "#a16946" + +let s:cterm00 = 233 +let s:cterm01 = 235 +let s:cterm02 = 237 +let s:cterm03 = 240 +let s:cterm04 = 249 +let s:cterm05 = 253 +let s:cterm06 = 254 +let s:cterm07 = 15 +let s:cterm08 = 131 +let s:cterm09 = 173 +let s:cterm0A = 222 +let s:cterm0B = 143 +let s:cterm0C = 109 +let s:cterm0D = 109 +let s:cterm0E = 139 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_default#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_default#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_default#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_default#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_default#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_default#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_eighties.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_eighties.vim new file mode 100644 index 0000000..7161e39 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_eighties.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Eighties Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_eighties#palette = {} +let s:gui00 = "#2d2d2d" +let s:gui01 = "#393939" +let s:gui02 = "#515151" +let s:gui03 = "#747369" +let s:gui04 = "#a09f93" +let s:gui05 = "#d3d0c8" +let s:gui06 = "#e8e6df" +let s:gui07 = "#f2f0ec" +let s:gui08 = "#f2777a" +let s:gui09 = "#f99157" +let s:gui0A = "#ffcc66" +let s:gui0B = "#99cc99" +let s:gui0C = "#66cccc" +let s:gui0D = "#6699cc" +let s:gui0E = "#cc99cc" +let s:gui0F = "#d27b53" + +let s:cterm00 = 236 +let s:cterm01 = 237 +let s:cterm02 = 239 +let s:cterm03 = 95 +let s:cterm04 = 144 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 210 +let s:cterm09 = 209 +let s:cterm0A = 221 +let s:cterm0B = 114 +let s:cterm0C = 80 +let s:cterm0D = 68 +let s:cterm0E = 176 +let s:cterm0F = 173 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_eighties#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_embers.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_embers.vim new file mode 100644 index 0000000..0c26076 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_embers.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Embers Scheme by Jannik Siebert (https://github.com/janniks) +let g:airline#themes#base16_embers#palette = {} +let s:gui00 = "#16130F" +let s:gui01 = "#2C2620" +let s:gui02 = "#433B32" +let s:gui03 = "#5A5047" +let s:gui04 = "#8A8075" +let s:gui05 = "#A39A90" +let s:gui06 = "#BEB6AE" +let s:gui07 = "#DBD6D1" +let s:gui08 = "#826D57" +let s:gui09 = "#828257" +let s:gui0A = "#6D8257" +let s:gui0B = "#57826D" +let s:gui0C = "#576D82" +let s:gui0D = "#6D5782" +let s:gui0E = "#82576D" +let s:gui0F = "#825757" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 59 +let s:cterm04 = 102 +let s:cterm05 = 138 +let s:cterm06 = 145 +let s:cterm07 = 188 +let s:cterm08 = 95 +let s:cterm09 = 101 +let s:cterm0A = 65 +let s:cterm0B = 65 +let s:cterm0C = 60 +let s:cterm0D = 60 +let s:cterm0E = 95 +let s:cterm0F = 95 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_embers#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_embers#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_embers#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_embers#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_embers#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_embers#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_flat.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_flat.vim new file mode 100644 index 0000000..aa4f5cf --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_flat.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Flat Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_flat#palette = {} +let s:gui00 = "#2C3E50" +let s:gui01 = "#34495E" +let s:gui02 = "#7F8C8D" +let s:gui03 = "#95A5A6" +let s:gui04 = "#BDC3C7" +let s:gui05 = "#e0e0e0" +let s:gui06 = "#f5f5f5" +let s:gui07 = "#ECF0F1" +let s:gui08 = "#E74C3C" +let s:gui09 = "#E67E22" +let s:gui0A = "#F1C40F" +let s:gui0B = "#2ECC71" +let s:gui0C = "#1ABC9C" +let s:gui0D = "#3498DB" +let s:gui0E = "#9B59B6" +let s:gui0F = "#be643c" + +let s:cterm00 = 23 +let s:cterm01 = 59 +let s:cterm02 = 102 +let s:cterm03 = 109 +let s:cterm04 = 146 +let s:cterm05 = 253 +let s:cterm06 = 15 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 172 +let s:cterm0A = 220 +let s:cterm0B = 41 +let s:cterm0C = 37 +let s:cterm0D = 68 +let s:cterm0E = 97 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_flat#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_flat#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_flat#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_flat#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_flat#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_flat#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google.vim new file mode 100644 index 0000000..f20da8c --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Google Scheme by Seth Wright (http://sethawright.com) +let g:airline#themes#base16_google#palette = {} +let s:gui00 = "#1d1f21" +let s:gui01 = "#282a2e" +let s:gui02 = "#373b41" +let s:gui03 = "#969896" +let s:gui04 = "#b4b7b4" +let s:gui05 = "#c5c8c6" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#ffffff" +let s:gui08 = "#CC342B" +let s:gui09 = "#F96A38" +let s:gui0A = "#FBA922" +let s:gui0B = "#198844" +let s:gui0C = "#3971ED" +let s:gui0D = "#3971ED" +let s:gui0E = "#A36AC7" +let s:gui0F = "#3971ED" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 102 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 166 +let s:cterm09 = 203 +let s:cterm0A = 214 +let s:cterm0B = 29 +let s:cterm0C = 12 +let s:cterm0D = 12 +let s:cterm0E = 134 +let s:cterm0F = 12 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_google#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_google#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_google#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_google#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_google#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_google#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim new file mode 100644 index 0000000..bf60eb3 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Grayscale Scheme by Alexandre Gavioli (https://github.com/Alexx2/) +let g:airline#themes#base16_grayscale#palette = {} +let s:gui00 = "#101010" +let s:gui01 = "#252525" +let s:gui02 = "#464646" +let s:gui03 = "#525252" +let s:gui04 = "#ababab" +let s:gui05 = "#b9b9b9" +let s:gui06 = "#e3e3e3" +let s:gui07 = "#f7f7f7" +let s:gui08 = "#7c7c7c" +let s:gui09 = "#999999" +let s:gui0A = "#a0a0a0" +let s:gui0B = "#8e8e8e" +let s:gui0C = "#868686" +let s:gui0D = "#686868" +let s:gui0E = "#747474" +let s:gui0F = "#5e5e5e" + +let s:cterm00 = 233 +let s:cterm01 = 235 +let s:cterm02 = 238 +let s:cterm03 = 239 +let s:cterm04 = 248 +let s:cterm05 = 250 +let s:cterm06 = 254 +let s:cterm07 = 15 +let s:cterm08 = 243 +let s:cterm09 = 246 +let s:cterm0A = 247 +let s:cterm0B = 245 +let s:cterm0C = 244 +let s:cterm0D = 241 +let s:cterm0E = 243 +let s:cterm0F = 240 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_grayscale#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim new file mode 100644 index 0000000..b460449 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Green Screen Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_greenscreen#palette = {} +let s:gui00 = "#001100" +let s:gui01 = "#003300" +let s:gui02 = "#005500" +let s:gui03 = "#007700" +let s:gui04 = "#009900" +let s:gui05 = "#00bb00" +let s:gui06 = "#00dd00" +let s:gui07 = "#00ff00" +let s:gui08 = "#007700" +let s:gui09 = "#009900" +let s:gui0A = "#007700" +let s:gui0B = "#00bb00" +let s:gui0C = "#005500" +let s:gui0D = "#009900" +let s:gui0E = "#00bb00" +let s:gui0F = "#005500" + +let s:cterm00 = 0 +let s:cterm01 = 22 +let s:cterm02 = 22 +let s:cterm03 = 28 +let s:cterm04 = 28 +let s:cterm05 = 34 +let s:cterm06 = 40 +let s:cterm07 = 10 +let s:cterm08 = 28 +let s:cterm09 = 28 +let s:cterm0A = 28 +let s:cterm0B = 34 +let s:cterm0C = 22 +let s:cterm0D = 28 +let s:cterm0E = 34 +let s:cterm0F = 22 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_greenscreen#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim new file mode 100644 index 0000000..9700a04 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 harmonic16 Scheme by Jannik Siebert (https://github.com/janniks) +let g:airline#themes#base16_harmonic16#palette = {} +let s:gui00 = "#0b1c2c" +let s:gui01 = "#223b54" +let s:gui02 = "#405c79" +let s:gui03 = "#627e99" +let s:gui04 = "#aabcce" +let s:gui05 = "#cbd6e2" +let s:gui06 = "#e5ebf1" +let s:gui07 = "#f7f9fb" +let s:gui08 = "#bf8b56" +let s:gui09 = "#bfbf56" +let s:gui0A = "#8bbf56" +let s:gui0B = "#56bf8b" +let s:gui0C = "#568bbf" +let s:gui0D = "#8b56bf" +let s:gui0E = "#bf568b" +let s:gui0F = "#bf5656" + +let s:cterm00 = 0 +let s:cterm01 = 23 +let s:cterm02 = 60 +let s:cterm03 = 66 +let s:cterm04 = 146 +let s:cterm05 = 188 +let s:cterm06 = 189 +let s:cterm07 = 15 +let s:cterm08 = 137 +let s:cterm09 = 143 +let s:cterm0A = 107 +let s:cterm0B = 72 +let s:cterm0C = 67 +let s:cterm0D = 97 +let s:cterm0E = 132 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_harmonic16#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim new file mode 100644 index 0000000..0e78688 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Hopscotch Scheme by Jan T. Sott +let g:airline#themes#base16_hopscotch#palette = {} +let s:gui00 = "#322931" +let s:gui01 = "#433b42" +let s:gui02 = "#5c545b" +let s:gui03 = "#797379" +let s:gui04 = "#989498" +let s:gui05 = "#b9b5b8" +let s:gui06 = "#d5d3d5" +let s:gui07 = "#ffffff" +let s:gui08 = "#dd464c" +let s:gui09 = "#fd8b19" +let s:gui0A = "#fdcc59" +let s:gui0B = "#8fc13e" +let s:gui0C = "#149b93" +let s:gui0D = "#1290bf" +let s:gui0E = "#c85e7c" +let s:gui0F = "#b33508" + +let s:cterm00 = 53 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 96 +let s:cterm04 = 102 +let s:cterm05 = 145 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 208 +let s:cterm0A = 221 +let s:cterm0B = 107 +let s:cterm0C = 30 +let s:cterm0D = 31 +let s:cterm0E = 168 +let s:cterm0F = 130 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_hopscotch#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_isotope.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_isotope.vim new file mode 100644 index 0000000..aa5e0bd --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_isotope.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Isotope Scheme by Jan T. Sott +let g:airline#themes#base16_isotope#palette = {} +let s:gui00 = "#000000" +let s:gui01 = "#404040" +let s:gui02 = "#606060" +let s:gui03 = "#808080" +let s:gui04 = "#c0c0c0" +let s:gui05 = "#d0d0d0" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#ffffff" +let s:gui08 = "#ff0000" +let s:gui09 = "#ff9900" +let s:gui0A = "#ff0099" +let s:gui0B = "#33ff00" +let s:gui0C = "#00ffff" +let s:gui0D = "#0066ff" +let s:gui0E = "#cc00ff" +let s:gui0F = "#3300ff" + +let s:cterm00 = 0 +let s:cterm01 = 237 +let s:cterm02 = 241 +let s:cterm03 = 244 +let s:cterm04 = 250 +let s:cterm05 = 252 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 9 +let s:cterm09 = 208 +let s:cterm0A = 198 +let s:cterm0B = 82 +let s:cterm0C = 14 +let s:cterm0D = 27 +let s:cterm0E = 165 +let s:cterm0F = 57 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_isotope#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_londontube.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_londontube.vim new file mode 100644 index 0000000..b228e23 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_londontube.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 London Tube Scheme by Jan T. Sott +let g:airline#themes#base16_londontube#palette = {} +let s:gui00 = "#231f20" +let s:gui01 = "#1c3f95" +let s:gui02 = "#5a5758" +let s:gui03 = "#737171" +let s:gui04 = "#959ca1" +let s:gui05 = "#d9d8d8" +let s:gui06 = "#e7e7e8" +let s:gui07 = "#ffffff" +let s:gui08 = "#ee2e24" +let s:gui09 = "#f386a1" +let s:gui0A = "#ffd204" +let s:gui0B = "#00853e" +let s:gui0C = "#85cebc" +let s:gui0D = "#009ddc" +let s:gui0E = "#98005d" +let s:gui0F = "#b06110" + +let s:cterm00 = 0 +let s:cterm01 = 24 +let s:cterm02 = 59 +let s:cterm03 = 59 +let s:cterm04 = 109 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 211 +let s:cterm0A = 220 +let s:cterm0B = 29 +let s:cterm0C = 115 +let s:cterm0D = 38 +let s:cterm0E = 89 +let s:cterm0F = 130 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_londontube#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim new file mode 100644 index 0000000..e6cd459 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Marrakesh Scheme by Alexandre Gavioli (http://github.com/Alexx2/) +let g:airline#themes#base16_marrakesh#palette = {} +let s:gui00 = "#201602" +let s:gui01 = "#302e00" +let s:gui02 = "#5f5b17" +let s:gui03 = "#6c6823" +let s:gui04 = "#86813b" +let s:gui05 = "#948e48" +let s:gui06 = "#ccc37a" +let s:gui07 = "#faf0a5" +let s:gui08 = "#c35359" +let s:gui09 = "#b36144" +let s:gui0A = "#a88339" +let s:gui0B = "#18974e" +let s:gui0C = "#75a738" +let s:gui0D = "#477ca1" +let s:gui0E = "#8868b3" +let s:gui0F = "#b3588e" + +let s:cterm00 = 0 +let s:cterm01 = 52 +let s:cterm02 = 58 +let s:cterm03 = 58 +let s:cterm04 = 101 +let s:cterm05 = 101 +let s:cterm06 = 180 +let s:cterm07 = 229 +let s:cterm08 = 131 +let s:cterm09 = 131 +let s:cterm0A = 137 +let s:cterm0B = 29 +let s:cterm0C = 107 +let s:cterm0D = 67 +let s:cterm0E = 97 +let s:cterm0F = 132 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_marrakesh#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mocha.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mocha.vim new file mode 100644 index 0000000..1097c95 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mocha.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Mocha Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_mocha#palette = {} +let s:gui00 = "#3B3228" +let s:gui01 = "#534636" +let s:gui02 = "#645240" +let s:gui03 = "#7e705a" +let s:gui04 = "#b8afad" +let s:gui05 = "#d0c8c6" +let s:gui06 = "#e9e1dd" +let s:gui07 = "#f5eeeb" +let s:gui08 = "#cb6077" +let s:gui09 = "#d28b71" +let s:gui0A = "#f4bc87" +let s:gui0B = "#beb55b" +let s:gui0C = "#7bbda4" +let s:gui0D = "#8ab3b5" +let s:gui0E = "#a89bb9" +let s:gui0F = "#bb9584" + +let s:cterm00 = 58 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 95 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 230 +let s:cterm08 = 168 +let s:cterm09 = 173 +let s:cterm0A = 216 +let s:cterm0B = 143 +let s:cterm0C = 109 +let s:cterm0D = 109 +let s:cterm0E = 139 +let s:cterm0F = 138 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_mocha#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_monokai.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_monokai.vim new file mode 100644 index 0000000..fe1b774 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_monokai.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Monokai Scheme by Wimer Hazenberg (http://www.monokai.nl) +let g:airline#themes#base16_monokai#palette = {} +let s:gui00 = "#272822" +let s:gui01 = "#383830" +let s:gui02 = "#49483e" +let s:gui03 = "#75715e" +let s:gui04 = "#a59f85" +let s:gui05 = "#f8f8f2" +let s:gui06 = "#f5f4f1" +let s:gui07 = "#f9f8f5" +let s:gui08 = "#f92672" +let s:gui09 = "#fd971f" +let s:gui0A = "#f4bf75" +let s:gui0B = "#a6e22e" +let s:gui0C = "#a1efe4" +let s:gui0D = "#66d9ef" +let s:gui0E = "#ae81ff" +let s:gui0F = "#cc6633" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 95 +let s:cterm04 = 144 +let s:cterm05 = 15 +let s:cterm06 = 15 +let s:cterm07 = 15 +let s:cterm08 = 197 +let s:cterm09 = 208 +let s:cterm0A = 216 +let s:cterm0B = 3 +let s:cterm0C = 158 +let s:cterm0D = 81 +let s:cterm0E = 141 +let s:cterm0F = 167 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_monokai#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ocean.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ocean.vim new file mode 100644 index 0000000..b1a76dd --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ocean.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Ocean Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_ocean#palette = {} +let s:gui00 = "#2b303b" +let s:gui01 = "#343d46" +let s:gui02 = "#4f5b66" +let s:gui03 = "#65737e" +let s:gui04 = "#a7adba" +let s:gui05 = "#c0c5ce" +let s:gui06 = "#dfe1e8" +let s:gui07 = "#eff1f5" +let s:gui08 = "#bf616a" +let s:gui09 = "#d08770" +let s:gui0A = "#ebcb8b" +let s:gui0B = "#a3be8c" +let s:gui0C = "#96b5b4" +let s:gui0D = "#8fa1b3" +let s:gui0E = "#b48ead" +let s:gui0F = "#ab7967" + +let s:cterm00 = 23 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 60 +let s:cterm04 = 145 +let s:cterm05 = 152 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 131 +let s:cterm09 = 173 +let s:cterm0A = 186 +let s:cterm0B = 144 +let s:cterm0C = 109 +let s:cterm0D = 109 +let s:cterm0E = 139 +let s:cterm0F = 137 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_ocean#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_oceanicnext.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_oceanicnext.vim new file mode 100644 index 0000000..c5e9edf --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_oceanicnext.vim @@ -0,0 +1,83 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Oceanic Next Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_oceanicnext#palette = {} +let s:gui00 = "#1b2b34" +let s:gui01 = "#343d46" +let s:gui02 = "#4f5b66" +let s:gui03 = "#65737e" +let s:gui04 = "#a7adba" +let s:gui05 = "#c0c5ce" +let s:gui06 = "#cdd3de" +let s:gui07 = "#d8dee9" +let s:gui08 = "#ec5f67" +let s:gui09 = "#f99157" +let s:gui0A = "#fac863" +let s:gui0B = "#99c794" +let s:gui0C = "#5fb3b3" +let s:gui0D = "#6699cc" +let s:gui0E = "#c594c5" +let s:gui0F = "#ab7967" + +" Terminal color definitions +let s:cterm00 = 00 +let s:cterm03 = 08 +let s:cterm05 = 07 +let s:cterm07 = 15 +let s:cterm08 = 01 +let s:cterm0A = 03 +let s:cterm0B = 02 +let s:cterm0C = 06 +let s:cterm0D = 04 +let s:cterm0E = 05 +if exists('base16colorspace') && base16colorspace == "256" + let s:cterm01 = 18 + let s:cterm02 = 19 + let s:cterm04 = 20 + let s:cterm06 = 21 + let s:cterm09 = 16 + let s:cterm0F = 17 +else + let s:cterm01 = 10 + let s:cterm02 = 11 + let s:cterm04 = 12 + let s:cterm06 = 13 + let s:cterm09 = 09 + let s:cterm0F = 14 +endif + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_oceanicnext#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim new file mode 100644 index 0000000..1277b31 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Paraiso Scheme by Jan T. Sott +let g:airline#themes#base16_paraiso#palette = {} +let s:gui00 = "#2f1e2e" +let s:gui01 = "#41323f" +let s:gui02 = "#4f424c" +let s:gui03 = "#776e71" +let s:gui04 = "#8d8687" +let s:gui05 = "#a39e9b" +let s:gui06 = "#b9b6b0" +let s:gui07 = "#e7e9db" +let s:gui08 = "#ef6155" +let s:gui09 = "#f99b15" +let s:gui0A = "#fec418" +let s:gui0B = "#48b685" +let s:gui0C = "#5bc4bf" +let s:gui0D = "#06b6ef" +let s:gui0E = "#815ba4" +let s:gui0F = "#e96ba8" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 95 +let s:cterm04 = 102 +let s:cterm05 = 144 +let s:cterm06 = 145 +let s:cterm07 = 188 +let s:cterm08 = 203 +let s:cterm09 = 208 +let s:cterm0A = 220 +let s:cterm0B = 72 +let s:cterm0C = 79 +let s:cterm0D = 39 +let s:cterm0E = 97 +let s:cterm0F = 169 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_paraiso#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pop.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pop.vim new file mode 100644 index 0000000..0888703 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pop.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Pop Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_pop#palette = {} +let s:gui00 = "#000000" +let s:gui01 = "#202020" +let s:gui02 = "#303030" +let s:gui03 = "#505050" +let s:gui04 = "#b0b0b0" +let s:gui05 = "#d0d0d0" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#ffffff" +let s:gui08 = "#eb008a" +let s:gui09 = "#f29333" +let s:gui0A = "#f8ca12" +let s:gui0B = "#37b349" +let s:gui0C = "#00aabb" +let s:gui0D = "#0e5a94" +let s:gui0E = "#b31e8d" +let s:gui0F = "#7a2d00" + +let s:cterm00 = 0 +let s:cterm01 = 234 +let s:cterm02 = 236 +let s:cterm03 = 239 +let s:cterm04 = 249 +let s:cterm05 = 252 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 162 +let s:cterm09 = 209 +let s:cterm0A = 220 +let s:cterm0B = 71 +let s:cterm0C = 37 +let s:cterm0D = 24 +let s:cterm0E = 126 +let s:cterm0F = 88 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_pop#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_pop#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_pop#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_pop#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_pop#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_pop#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim new file mode 100644 index 0000000..771a5b1 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Railscasts Scheme by Ryan Bates (http://railscasts.com) +let g:airline#themes#base16_railscasts#palette = {} +let s:gui00 = "#2b2b2b" +let s:gui01 = "#272935" +let s:gui02 = "#3a4055" +let s:gui03 = "#5a647e" +let s:gui04 = "#d4cfc9" +let s:gui05 = "#e6e1dc" +let s:gui06 = "#f4f1ed" +let s:gui07 = "#f9f7f3" +let s:gui08 = "#da4939" +let s:gui09 = "#cc7833" +let s:gui0A = "#ffc66d" +let s:gui0B = "#a5c261" +let s:gui0C = "#519f50" +let s:gui0D = "#6d9cbe" +let s:gui0E = "#b6b3eb" +let s:gui0F = "#bc9458" + +let s:cterm00 = 235 +let s:cterm01 = 17 +let s:cterm02 = 59 +let s:cterm03 = 60 +let s:cterm04 = 188 +let s:cterm05 = 188 +let s:cterm06 = 15 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 173 +let s:cterm0A = 221 +let s:cterm0B = 143 +let s:cterm0C = 71 +let s:cterm0D = 73 +let s:cterm0E = 146 +let s:cterm0F = 137 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_railscasts#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_seti.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_seti.vim new file mode 100644 index 0000000..b152add --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_seti.vim @@ -0,0 +1,76 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base16 Seti UI by + +let g:airline#themes#base16_seti ui#palette = {} +let s:gui00 = "#151718" +let s:gui01 = "#8ec43d" +let s:gui02 = "#3B758C" +let s:gui03 = "#41535B" +let s:gui04 = "#43a5d5" +let s:gui05 = "#d6d6d6" +let s:gui06 = "#eeeeee" +let s:gui07 = "#ffffff" +let s:gui08 = "#Cd3f45" +let s:gui09 = "#db7b55" +let s:gui0A = "#e6cd69" +let s:gui0B = "#9fca56" +let s:gui0C = "#55dbbe" +let s:gui0D = "#55b5db" +let s:gui0E = "#a074c4" +let s:gui0F = "#8a553f" + + +let s:cterm00 = 0 +let s:cterm01 = 18 +let s:cterm02 = 19 +let s:cterm03 = 8 +let s:cterm04 = 20 +let s:cterm05 = 7 +let s:cterm06 = 21 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 16 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 6 +let s:cterm0D = 4 +let s:cterm0E = 5 +let s:cterm0F = 17 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_seti ui#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_seti ui#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_seti ui#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_seti ui#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_seti ui#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_seti ui#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim new file mode 100644 index 0000000..a518265 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 shapeshifter Scheme by Tyler Benziger (http://tybenz.com) +let g:airline#themes#base16_shapeshifter#palette = {} +let s:gui00 = "#000000" +let s:gui01 = "#040404" +let s:gui02 = "#102015" +let s:gui03 = "#343434" +let s:gui04 = "#555555" +let s:gui05 = "#ababab" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#f9f9f9" +let s:gui08 = "#e92f2f" +let s:gui09 = "#e09448" +let s:gui0A = "#dddd13" +let s:gui0B = "#0ed839" +let s:gui0C = "#23edda" +let s:gui0D = "#3b48e3" +let s:gui0E = "#f996e2" +let s:gui0F = "#69542d" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 0 +let s:cterm03 = 236 +let s:cterm04 = 240 +let s:cterm05 = 248 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 173 +let s:cterm0A = 3 +let s:cterm0B = 41 +let s:cterm0C = 50 +let s:cterm0D = 12 +let s:cterm0E = 212 +let s:cterm0F = 58 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_shapeshifter#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shell.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shell.vim new file mode 100644 index 0000000..d04e4d5 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shell.vim @@ -0,0 +1,99 @@ +let s:improved_contrast = get(g:, 'airline_base16_improved_contrast', 0) +let s:solarized = get(g:, 'airline_base16_solarized', 0) + +" Base16 term color palette +let s:base00_black = 0 +let s:base08_red = 1 +let s:base0B_green = 2 +let s:base0A_yellow = 3 +let s:base0D_blue = 4 +let s:base0E_magenta = 5 +let s:base0C_cyan = 6 +let s:base05_white = 7 +let s:base03_brblack = 8 +let s:base09 = 16 +let s:base0F = 17 +let s:base01 = 18 +let s:base02 = 19 +let s:base04 = 20 +let s:base06 = 21 + +" Gui color palette +let s:gui_dark_gray = '#202020' +let s:gui_med_gray_lo = '#3a3a3a' +let s:gui_med_gray_hi = '#303030' +let s:gui_light_gray = '#505050' +let s:gui_lightlight_gray = '#8A8A8A' +let s:gui_green = '#99cc99' +let s:gui_blue = '#6a9fb5' +let s:gui_purple = '#aa759f' +let s:gui_orange = '#d28445' +let s:gui_red = '#ac4142' +let s:gui_pink = '#d7afd7' + +let g:airline#themes#base16_shell#palette = {} + +" Normal mode +let s:N1 = [s:gui_dark_gray, s:gui_green, s:base00_black, s:base0B_green] +let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:base04, s:base02] +let s:N3 = [s:gui_green, s:gui_med_gray_hi, s:base0B_green, s:base01] + +if s:improved_contrast + let s:N2 = [s:gui_lightlight_gray, s:gui_med_gray_lo, s:base05_white, s:base02] +endif + +if s:solarized + let s:N1 = [s:gui_dark_gray, s:gui_green, s:base01, s:base04] + let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:base00_black, s:base02] + let s:N3 = [s:gui_green, s:gui_med_gray_hi, s:base04, s:base01] +endif + +let g:airline#themes#base16_shell#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#base16_shell#palette.normal_modified = { + \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:base09, s:base01, ''], + \ } + +" Insert mode +let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:base01, s:base0D_blue] +let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:base0D_blue, s:base01] +let g:airline#themes#base16_shell#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) + +if s:solarized + let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:base01, s:base0A_yellow] + let g:airline#themes#base16_shell#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:N3) +endif + +let g:airline#themes#base16_shell#palette.insert_modified = copy(g:airline#themes#base16_shell#palette.normal_modified) + +" Replace mode +let s:R1 = [s:gui_dark_gray, s:gui_red, s:base01, s:base08_red] +let s:R3 = [s:gui_red, s:gui_med_gray_hi, s:base08_red, s:base01] +let g:airline#themes#base16_shell#palette.replace = airline#themes#generate_color_map(s:R1, s:N2, s:R3) + +if s:solarized + let s:R1 = [s:gui_dark_gray, s:gui_red, s:base01, s:base09] + let g:airline#themes#base16_shell#palette.replace = airline#themes#generate_color_map(s:R1, s:N2, s:N3) +endif + +let g:airline#themes#base16_shell#palette.replace_modified = copy(g:airline#themes#base16_shell#palette.normal_modified) + +" Visual mode +let s:V1 = [s:gui_dark_gray, s:gui_pink, s:base01, s:base0E_magenta] +let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:base0E_magenta, s:base01] +let g:airline#themes#base16_shell#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) + +if s:solarized + let s:V1 = [s:gui_dark_gray, s:gui_pink, s:base01, s:base0F] + let g:airline#themes#base16_shell#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:N3) +endif + +" Inactive window +if s:improved_contrast + let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:base04, s:base01, ''] +else + let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:base03_brblack, s:base01, ''] +endif +let g:airline#themes#base16_shell#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#base16_shell#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:base09, '', ''], + \ } diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized.vim new file mode 100644 index 0000000..81edd56 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Solarized Scheme by Ethan Schoonover (http://ethanschoonover.com/solarized) +let g:airline#themes#base16_solarized#palette = {} +let s:gui00 = "#002b36" +let s:gui01 = "#073642" +let s:gui02 = "#586e75" +let s:gui03 = "#657b83" +let s:gui04 = "#839496" +let s:gui05 = "#93a1a1" +let s:gui06 = "#eee8d5" +let s:gui07 = "#fdf6e3" +let s:gui08 = "#dc322f" +let s:gui09 = "#cb4b16" +let s:gui0A = "#b58900" +let s:gui0B = "#859900" +let s:gui0C = "#2aa198" +let s:gui0D = "#268bd2" +let s:gui0E = "#6c71c4" +let s:gui0F = "#d33682" + +let s:cterm00 = 17 +let s:cterm01 = 23 +let s:cterm02 = 60 +let s:cterm03 = 66 +let s:cterm04 = 102 +let s:cterm05 = 109 +let s:cterm06 = 224 +let s:cterm07 = 230 +let s:cterm08 = 166 +let s:cterm09 = 166 +let s:cterm0A = 136 +let s:cterm0B = 100 +let s:cterm0C = 36 +let s:cterm0D = 32 +let s:cterm0E = 12 +let s:cterm0F = 168 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_solarized#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_spacemacs.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_spacemacs.vim new file mode 100644 index 0000000..4c04bd1 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_spacemacs.vim @@ -0,0 +1,191 @@ +" vim-airline base16-spacemacs theme by Peter Meehan (http://github.com/22a) +" Base16 Spacemacs by Chris Kempson (http://chriskempson.com) +" Spacemacs scheme by Nasser Alshammari (https://github.com/nashamri/spacemacs-theme) + +let s:gui00 = "#1f2022" +let s:gui01 = "#282828" +let s:gui02 = "#444155" +let s:gui03 = "#585858" +let s:gui04 = "#b8b8b8" +let s:gui05 = "#a3a3a3" +let s:gui06 = "#e8e8e8" +let s:gui07 = "#f8f8f8" +let s:gui08 = "#f2241f" +let s:gui09 = "#ffa500" +let s:gui0A = "#b1951d" +let s:gui0B = "#67b11d" +let s:gui0C = "#2d9574" +let s:gui0D = "#4f97d7" +let s:gui0E = "#a31db1" +let s:gui0F = "#b03060" + +let s:cterm00 = 0 +let s:cterm01 = 18 +let s:cterm02 = 19 +let s:cterm03 = 8 +let s:cterm04 = 20 +let s:cterm05 = 7 +let s:cterm06 = 21 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 16 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 6 +let s:cterm0D = 4 +let s:cterm0E = 5 +let s:cterm0F = 17 + +let g:airline#themes#base16_spacemacs#palette = {} + +" Background for branch and file format blocks +let s:cterm_termbg = s:cterm02 +let s:gui_termbg = s:gui02 +" Foreground for branch and file format blocks +let s:cterm_termfg = s:cterm06 +let s:gui_termfg = s:gui06 + + +" Background for middle block +let s:cterm_termbg2 = s:cterm00 +let s:gui_termbg2 = s:gui00 +" Foreground for middle block +let s:cterm_termfg2 = s:cterm06 +let s:gui_termfg2 = s:gui06 + + +" Background for normal mode and file position blocks +let s:cterm_normalbg = s:cterm0D +let s:gui_normalbg = s:gui0D +" Foreground for normal mode and file position blocks +let s:cterm_normalfg = s:cterm07 +let s:gui_normalfg = s:gui07 + + +" Background for insert mode and file position blocks +let s:cterm_insertbg = s:cterm0B +let s:gui_insertbg = s:gui0B +" Foreground for insert mode and file position blocks +let s:cterm_insertfg = s:cterm07 +let s:gui_insertfg = s:gui07 + + +" Background for visual mode and file position blocks +let s:cterm_visualbg = s:cterm09 +let s:gui_visualbg = s:gui09 +" Foreground for visual mode and file position blocks +let s:cterm_visualfg = s:cterm07 +let s:gui_visualfg = s:gui07 + + +" Background for replace mode and file position blocks +let s:cterm_replacebg = s:cterm08 +let s:gui_replacebg = s:gui08 +" Foreground for replace mode and file position blocks +let s:cterm_replacefg = s:cterm07 +let s:gui_replacefg = s:gui07 + + +" Background for inactive mode +let s:cterm_inactivebg = s:cterm02 +let s:gui_inactivebg = s:gui02 +" Foreground for inactive mode +let s:cterm_inactivefg = s:cterm04 +let s:gui_inactivefg = s:gui04 + + +" Branch and file format +let s:BB = [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg] " Branch and file format blocks + +" Normal mode +let s:N1 = [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg] " Outside blocks in normal mode +let s:N2 = [s:gui_termfg2, s:gui_termbg2, s:cterm_normalbg, s:cterm_termbg2] " Middle block +let g:airline#themes#base16_spacemacs#palette.normal = airline#themes#generate_color_map(s:N1, s:BB, s:N2) +let g:airline#themes#base16_spacemacs#palette.normal_modified = g:airline#themes#base16_spacemacs#palette.normal + +" Insert mode +let s:I1 = [s:gui_insertfg, s:gui_insertbg, s:cterm_insertfg, s:cterm_insertbg] " Outside blocks in insert mode +let s:I2 = [s:gui_insertbg, s:gui_termbg2, s:cterm_insertbg, s:cterm_termbg2] " Middle block +let g:airline#themes#base16_spacemacs#palette.insert = airline#themes#generate_color_map(s:I1, s:BB, s:I2) +let g:airline#themes#base16_spacemacs#palette.insert_modified = g:airline#themes#base16_spacemacs#palette.insert + +" Replace mode +let s:R1 = [s:gui_replacefg, s:gui_replacebg, s:cterm_replacefg, s:cterm_replacebg] " Outside blocks in replace mode +let s:R2 = [s:gui_termfg, s:gui_termbg2, s:cterm_termfg, s:cterm_termbg2] " Middle block +let g:airline#themes#base16_spacemacs#palette.replace = airline#themes#generate_color_map(s:R1, s:BB, s:R2) +let g:airline#themes#base16_spacemacs#palette.replace_modified = g:airline#themes#base16_spacemacs#palette.replace + +" Visual mode +let s:V1 = [s:gui_visualfg, s:gui_visualbg, s:cterm_visualfg, s:cterm_visualbg] " Outside blocks in visual mode +let s:V2 = [s:gui_visualbg, s:gui_termbg2, s:cterm_visualbg, s:cterm_termbg2] " Middle block +let g:airline#themes#base16_spacemacs#palette.visual = airline#themes#generate_color_map(s:V1, s:BB, s:V2) +let g:airline#themes#base16_spacemacs#palette.visual_modified = g:airline#themes#base16_spacemacs#palette.visual + +" Inactive mode +let s:IA1 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA2 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA3 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let g:airline#themes#base16_spacemacs#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Warnings +let s:WI = [s:gui07, s:gui09, s:cterm07, s:cterm09] +let g:airline#themes#base16_spacemacs#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#base16_spacemacs#palette.normal_modified.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.insert.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.insert_modified.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.visual.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.visual_modified.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.replace.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.replace_modified.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +" Errors +let s:ER = [s:gui07, s:gui08, s:cterm07, s:cterm08] +let g:airline#themes#base16_spacemacs#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] + +let g:airline#themes#base16_spacemacs#palette.normal_modified.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.insert.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.insert_modified.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.visual.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.visual_modified.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.replace.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.replace_modified.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +" CtrlP plugin colors +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_spacemacs#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg, ''], + \ [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg, ''], + \ [s:gui_termfg2, s:gui_termbg2, s:cterm_termfg2, s:cterm_termbg2, 'bold']) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim new file mode 100644 index 0000000..4bafd59 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Summerfruit Scheme by Christopher Corley (http://cscorley.github.io/) +let g:airline#themes#base16_summerfruit#palette = {} +let s:gui00 = "#151515" +let s:gui01 = "#202020" +let s:gui02 = "#303030" +let s:gui03 = "#505050" +let s:gui04 = "#B0B0B0" +let s:gui05 = "#D0D0D0" +let s:gui06 = "#E0E0E0" +let s:gui07 = "#FFFFFF" +let s:gui08 = "#FF0086" +let s:gui09 = "#FD8900" +let s:gui0A = "#ABA800" +let s:gui0B = "#00C918" +let s:gui0C = "#1faaaa" +let s:gui0D = "#3777E6" +let s:gui0E = "#AD00A1" +let s:gui0F = "#cc6633" + +let s:cterm00 = 233 +let s:cterm01 = 234 +let s:cterm02 = 236 +let s:cterm03 = 239 +let s:cterm04 = 249 +let s:cterm05 = 252 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 198 +let s:cterm09 = 208 +let s:cterm0A = 142 +let s:cterm0B = 2 +let s:cterm0C = 37 +let s:cterm0D = 68 +let s:cterm0E = 127 +let s:cterm0F = 167 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_summerfruit#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim new file mode 100644 index 0000000..f8128bc --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Tomorrow Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_tomorrow#palette = {} +let s:gui00 = "#1d1f21" +let s:gui01 = "#282a2e" +let s:gui02 = "#373b41" +let s:gui03 = "#969896" +let s:gui04 = "#b4b7b4" +let s:gui05 = "#c5c8c6" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#ffffff" +let s:gui08 = "#cc6666" +let s:gui09 = "#de935f" +let s:gui0A = "#f0c674" +let s:gui0B = "#b5bd68" +let s:gui0C = "#8abeb7" +let s:gui0D = "#81a2be" +let s:gui0E = "#b294bb" +let s:gui0F = "#a3685a" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 102 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 173 +let s:cterm0A = 222 +let s:cterm0B = 143 +let s:cterm0C = 109 +let s:cterm0D = 109 +let s:cterm0E = 139 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_tomorrow#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_twilight.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_twilight.vim new file mode 100644 index 0000000..fa82418 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16_twilight.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Twilight Scheme by David Hart (http://hart-dev.com) +let g:airline#themes#base16_twilight#palette = {} +let s:gui00 = "#1e1e1e" +let s:gui01 = "#323537" +let s:gui02 = "#464b50" +let s:gui03 = "#5f5a60" +let s:gui04 = "#838184" +let s:gui05 = "#a7a7a7" +let s:gui06 = "#c3c3c3" +let s:gui07 = "#ffffff" +let s:gui08 = "#cf6a4c" +let s:gui09 = "#cda869" +let s:gui0A = "#f9ee98" +let s:gui0B = "#8f9d6a" +let s:gui0C = "#afc4db" +let s:gui0D = "#7587a6" +let s:gui0E = "#9b859d" +let s:gui0F = "#9b703f" + +let s:cterm00 = 234 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 59 +let s:cterm04 = 102 +let s:cterm05 = 248 +let s:cterm06 = 251 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 179 +let s:cterm0A = 228 +let s:cterm0B = 107 +let s:cterm0C = 152 +let s:cterm0D = 103 +let s:cterm0E = 103 +let s:cterm0F = 95 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_twilight#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16color.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16color.vim new file mode 100644 index 0000000..6c0a1d7 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/base16color.vim @@ -0,0 +1,77 @@ +" Normal mode +" [ guifg, guibg, ctermfg, ctermbg, opts ] +let s:N1 = [ '#141413' , '#CAE682' , 232 , 'green' ] " mode +let s:N2 = [ '#CAE682' , '#32322F' , 'green' , 235 ] " info +let s:N3 = [ '#CAE682' , '#242424' , 'green' , 234 ] " statusline +let s:N4 = [ '#86CD74' , 'DarkGreen' ] " mode modified + +" Insert mode +let s:I1 = [ '#141413' , '#FDE76E' , 232 , 'yellow' ] +let s:I2 = [ '#FDE76E' , '#32322F' , 'yellow' , 235 ] +let s:I3 = [ '#FDE76E' , '#242424' , 'yellow' , 234 ] +let s:I4 = [ '#FADE3E' , 'yellow' ] + +" Visual mode +let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 'blue' ] +let s:V2 = [ '#B5D3F3' , '#32322F' , 'blue' , 235 ] +let s:V3 = [ '#B5D3F3' , '#242424' , 'blue' , 234 ] +let s:V4 = [ '#7CB0E6' , 'blue' ] + +" Replace mode +let s:R1 = [ '#141413' , '#E5786D' , 232 , 'red' ] +let s:R2 = [ '#E5786D' , '#32322F' , 'red' , 235 ] +let s:R3 = [ '#E5786D' , '#242424' , 'red' , 234 ] +let s:R4 = [ '#E55345' , 'red' ] + +" Paste mode +let s:PA = [ '#94E42C' , 005 ] + +" Info modified +let s:IM = [ '#40403C' , 236 ] + +" Inactive mode +let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] + +let g:airline#themes#base16color#palette = {} + +let g:airline#themes#base16color#palette.accents = { + \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], + \ } + +let g:airline#themes#base16color#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#base16color#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#base16color#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#base16color#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#base16color#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#base16color#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/behelit.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/behelit.vim new file mode 100644 index 0000000..77f551c --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/behelit.vim @@ -0,0 +1,58 @@ +let g:airline#themes#behelit#palette = {} + +" Normal mode +let s:N1 = [ '#121212', '#5f87ff', 233, 69 ] +let s:N2 = [ '#5f87ff', '#262626', 69 , 235 ] +let s:N3 = [ '#5f87ff', '#1c1c1c', 69 , 234, 'bold' ] +let g:airline#themes#behelit#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#behelit#palette.normal_modified = { + \ 'airline_c': [ '#d7005f', '#1c1c1c', 161, 234, 'bold' ], + \ } + +" Insert mode +let s:I1 = [ '#121212', '#00ff87', 233, 48 ] +let s:I2 = s:N2 +let s:I3 = s:N3 +let g:airline#themes#behelit#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#behelit#palette.insert_modified = g:airline#themes#behelit#palette.normal_modified +let g:airline#themes#behelit#palette.insert_paste = { + \ 'airline_a': [ "#121212", "#5f5faf", 233, 61, '' ], + \ } + +" Replace mode +let g:airline#themes#behelit#palette.replace = copy(g:airline#themes#behelit#palette.insert) +let g:airline#themes#behelit#palette.replace.airline_a = [ s:I1[0], '#d70057', s:I1[2], 161, '' ] +let g:airline#themes#behelit#palette.replace_modified = g:airline#themes#behelit#palette.insert_modified + +" Visual mode +let s:V1 = [ '#121212', '#5fff5f', 233, 83 ] +let s:V2 = s:N2 +let s:V3 = s:N3 +let g:airline#themes#behelit#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#behelit#palette.visual_modified = g:airline#themes#behelit#palette.normal_modified + +" Inactive window +let s:IA1 = [ '#4e4e4e', '#1c1c1c', 239, 234, '' ] +let s:IA2 = [ '#4e4e4e', '#262626', 239, 235, '' ] +let s:IA3 = [ '#4e4e4e', '#1c1c1c', 239, 234, 'bold' ] +let g:airline#themes#behelit#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#behelit#palette.inactive_modified = { + \ 'airline_c': [ '#5f5f87', '#1c1c1c', 60, 234, 'bold' ], + \ } + +" Accents +let g:airline#themes#behelit#palette.accents = { + \ 'red': [ '#d7005f', '', 161, '' ] + \ } + +" Warnings +let s:WI = [ '#121212', '#d7005f', 233, 161 ] +let g:airline#themes#behelit#palette.normal.airline_warning = s:WI +let g:airline#themes#behelit#palette.normal_modified.airline_warning = s:WI +let g:airline#themes#behelit#palette.insert.airline_warning = s:WI +let g:airline#themes#behelit#palette.insert_modified.airline_warning = s:WI +let g:airline#themes#behelit#palette.insert_paste.airline_warning = s:WI +let g:airline#themes#behelit#palette.visual.airline_warning = s:WI +let g:airline#themes#behelit#palette.visual_modified.airline_warning = s:WI +let g:airline#themes#behelit#palette.replace.airline_warning = s:WI +let g:airline#themes#behelit#palette.replace_modified.airline_warning = s:WI diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/biogoo.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/biogoo.vim new file mode 100644 index 0000000..3bc6e96 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/biogoo.vim @@ -0,0 +1,47 @@ +" Name: biogoo (vim-airline version) +" Author: Benjamin Esham (https://esham.io) +" Last Change: 2017-10-20 +" +" You can find more information on the Biogoo theme at . + +let g:airline#themes#biogoo#palette = {} + +function! airline#themes#biogoo#refresh() + let g:airline#themes#biogoo#palette.accents = { + \ 'red': airline#themes#get_highlight('String'), + \ } + + let s:N1 = airline#themes#get_highlight2(['VertSplit', 'bg'], ['Include', 'fg'], 'bold') + let s:N2 = airline#themes#get_highlight2(['Include', 'fg'], ['Folded', 'bg'], 'bold') + let s:N3 = airline#themes#get_highlight2(['Include', 'fg'], ['VertSplit', 'bg'], 'bold') + let g:airline#themes#biogoo#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let s:Nmod = airline#themes#get_highlight2(['PmenuThumb', 'fg'],['VertSplit', 'bg']) + let g:airline#themes#biogoo#palette.normal_modified = {'airline_c': s:Nmod} + + let s:I1 = airline#themes#get_highlight2(['VertSplit', 'bg'], ['PmenuThumb', 'fg'], 'bold') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#biogoo#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#biogoo#palette.insert_modified = g:airline#themes#biogoo#palette.normal_modified + + let s:R1 = airline#themes#get_highlight2(['VertSplit', 'bg'], ['String', 'fg'], 'bold') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#biogoo#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#biogoo#palette.replace_modified = g:airline#themes#biogoo#palette.normal_modified + + let s:V1 = airline#themes#get_highlight2(['VertSplit', 'bg'], ['Number', 'fg'], 'bold') + let s:V2 = s:N2 + let s:V3 = s:N3 + let g:airline#themes#biogoo#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#biogoo#palette.visual_modified = g:airline#themes#biogoo#palette.normal_modified + + let s:IA1 = airline#themes#get_highlight2(['VertSplit', 'fg'], ['VertSplit', 'bg']) + let s:IA2 = s:IA1 + let s:IA3 = airline#themes#get_highlight2(['VertSplit', 'fg'], ['VertSplit', 'bg'], 'NONE') + let g:airline#themes#biogoo#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + let g:airline#themes#biogoo#palette.inactive_modified = g:airline#themes#biogoo#palette.normal_modified +endfunction + +call airline#themes#biogoo#refresh() diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/bubblegum.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/bubblegum.vim new file mode 100644 index 0000000..f2378ce --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/bubblegum.vim @@ -0,0 +1,70 @@ +" Color palette +let s:gui_dark_gray = '#303030' +let s:cterm_dark_gray = 236 +let s:gui_med_gray_hi = '#444444' +let s:cterm_med_gray_hi = 238 +let s:gui_med_gray_lo = '#3a3a3a' +let s:cterm_med_gray_lo = 237 +let s:gui_light_gray = '#b2b2b2' +let s:cterm_light_gray = 249 +let s:gui_green = '#afd787' +let s:cterm_green = 150 +let s:gui_blue = '#87afd7' +let s:cterm_blue = 110 +let s:gui_purple = '#afafd7' +let s:cterm_purple = 146 +let s:gui_orange = '#d7af5f' +let s:cterm_orange = 179 +let s:gui_red = '#d78787' +let s:cterm_red = 174 +let s:gui_pink = '#d7afd7' +let s:cterm_pink = 182 + +let g:airline#themes#bubblegum#palette = {} + +" Normal mode +let s:N1 = [s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green] +let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] +let s:N3 = [s:gui_green, s:gui_med_gray_hi, s:cterm_green, s:cterm_med_gray_hi] +let g:airline#themes#bubblegum#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#bubblegum#palette.normal_modified = { + \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, ''], + \ } + +" Insert mode +let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] +let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] +let g:airline#themes#bubblegum#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) +let g:airline#themes#bubblegum#palette.insert_modified = copy(g:airline#themes#bubblegum#palette.normal_modified) +let g:airline#themes#bubblegum#palette.insert_paste = { + \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], + \ } + +" Replace mode +let g:airline#themes#bubblegum#palette.replace = { + \ 'airline_a': [s:gui_dark_gray, s:gui_red, s:cterm_dark_gray, s:cterm_red, ''], + \ 'airline_c': [s:gui_red, s:gui_med_gray_hi, s:cterm_red, s:cterm_med_gray_hi, ''], + \ } +let g:airline#themes#bubblegum#palette.replace_modified = copy(g:airline#themes#bubblegum#palette.insert_modified) + +" Visual mode +let s:V1 = [s:gui_dark_gray, s:gui_pink, s:cterm_dark_gray, s:cterm_pink] +let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:cterm_pink, s:cterm_med_gray_hi] +let g:airline#themes#bubblegum#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) +let g:airline#themes#bubblegum#palette.visual_modified = copy(g:airline#themes#bubblegum#palette.insert_modified) + +" Inactive window +let s:IA = [s:gui_light_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi, ''] +let g:airline#themes#bubblegum#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#bubblegum#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], + \ } + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#bubblegum#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, '' ] , + \ [ s:gui_orange, s:gui_med_gray_lo, s:cterm_orange, s:cterm_med_gray_lo, '' ] , + \ [ s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green, 'bold' ] ) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/cobalt2.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/cobalt2.vim new file mode 100644 index 0000000..b156924 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/cobalt2.vim @@ -0,0 +1,100 @@ + + +" vim-airline cobalt2 replication +" (https://github.com/g-kanoufi/vim-airline-cobalt2) + +let g:airline#themes#cobalt2#palette = {} + +let g:airline#themes#cobalt2#palette.accents = { + \ 'red': [ '#b42839' , '' , 231 , '' , '' ], + \ } + + +let s:N1 = [ '#ffffff' , '#1f7ad8' , 231 , 36 ] +let s:N2 = [ '#ffffff' , '#8cc2fd' , 231 , 29 ] +let s:N3 = [ '#ffffff' , '#204458' , 231 , 23 ] +let g:airline#themes#cobalt2#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#cobalt2#palette.normal_modified = { + \ 'airline_c': [ '#ffffff' , '#1f7ad8' , 231 , 52 , '' ] , + \ } + + +let s:I1 = [ '#666d51' , '#fee533' , 231 , 106 ] +let s:I2 = [ '#ffffff' , '#8cc2fd' , 231 , 29 ] +let s:I3 = [ '#ffffff' , '#204458' , 231 , 23 ] +let g:airline#themes#cobalt2#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#cobalt2#palette.insert_modified = { + \ 'airline_c': [ '#666d51' , '#fee533' , 255 , 52 , '' ] , + \ } +let g:airline#themes#cobalt2#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#fee533' , s:I1[2] , 106 , '' ] , + \ } + + +let s:R1 = [ '#ffffff' , '#ea9299' , 231 , 106 ] +let s:R2 = [ '#ffffff' , '#8cc2fd' , 88 , 29 ] +let s:R3 = [ '#ffffff' , '#204458' , 231 , 23 ] +let g:airline#themes#cobalt2#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#cobalt2#palette.replace_modified = { + \ 'airline_c': [ '#ffffff' , '#ea9299' , 231 , 52 , '' ] , + \ } + +let s:V1 = [ '#ffff9a' , '#ff9d00' , 222 , 208 ] +let s:V2 = [ '#ffffff' , '#8cc2fd' , 231 , 29 ] +let s:V3 = [ '#ffffff' , '#204458' , 231 , 23 ] +let g:airline#themes#cobalt2#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#cobalt2#palette.visual_modified = { + \ 'airline_c': [ '#ffff9a' , '#ff9d00' , 231 , 52 , '' ] , + \ } + +let s:IA = [ '#4e4e4e' , '#204458' , 59 , 23 , '' ] +let g:airline#themes#cobalt2#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#cobalt2#palette.inactive_modified = { + \ 'airline_c': [ '#b42839' , '' , 166 , '' , '' ] , + \ } + +let g:airline#themes#cobalt2#palette.tabline = { + \ 'airline_tab': ['#1780e9', '#1a3548', 231, 29, ''], + \ 'airline_tabsel': ['#ffffff', '#46dd3c', 231, 36, ''], + \ 'airline_tabtype': ['#ffffff', '#1f7ad8', 231, 36, ''], + \ 'airline_tabfill': ['#ffffff', '#204458', 231, 23, ''], + \ 'airline_tabmod': ['#666d51', '#fee533', 231, 88, ''], + \ } + +let s:WI = [ '#204458', '#ffffff', 231, 88 ] +let g:airline#themes#cobalt2#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#cobalt2#palette.normal_modified.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.insert.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.insert_modified.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.visual.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.visual_modified.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.replace.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.replace_modified.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#cobalt2#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#ffffff' , '#204458' , 231 , 23 , '' ] , + \ [ '#ffffff' , '#1f7ad8' , 231 , 36 , '' ] , + \ [ '#666d51' , '#fee533' , 231 , 95 , '' ] ) + + + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/cool.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/cool.vim new file mode 100644 index 0000000..83abdb1 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/cool.vim @@ -0,0 +1,65 @@ +let g:airline#themes#cool#palette = {} + +" NORMAL +let s:N1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] +let s:N2 = [ '#E4E4E4' , '#0087AF' , 188 , 31 ] +let s:N3 = [ '#EEEEEE' , '#005F87' , 231 , 24] +let g:airline#themes#cool#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +"let g:airline#themes#cool#palette.normal_modified = { + "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + "\ } + +" INSERT +let s:I1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] +let s:I2 = [ '#E4E4E4' , '#47AF00' , 188 , 70 ] +let s:I3 = [ '#EEEEEE' , '#2E8700' , 231 , 28 ] +let g:airline#themes#cool#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +"let g:airline#themes#cool#palette.insert_modified = { + "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + "\ } +"let g:airline#themes#cool#palette.insert_paste = { + "\ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + "\ } + +" REPLACE +let s:R1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] +let s:R2 = [ '#E4E4E4' , '#AF5F00' , 188 , 130 ] +let s:R3 = [ '#EEEEEE' , '#875300' , 231 , 94 ] +let g:airline#themes#cool#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +"let g:airline#themes#cool#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] +"let g:airline#themes#cool#palette.replace_modified = g:airline#themes#cool#palette.insert_modified + +" VISUAL +let s:V1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] +let s:V2 = [ '#E4E4E4' , '#AF2800' , 188 , 124 ] +let s:V3 = [ '#EEEEEE' , '#872800' , 231 , 88 ] +let g:airline#themes#cool#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +"let g:airline#themes#cool#palette.visual_modified = { + "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + "\ } + +" INACTIVE +let s:IA1 = [ '#585858' , '#E4E4E4' , 59 , 188 , '' ] +let s:IA2 = [ '#E4E4E4' , '#466D79' , 188 , 60 , '' ] +let s:IA3 = [ '#EEEEEE' , '#324E59' , 231 , 59 , '' ] +let g:airline#themes#cool#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +"let g:airline#themes#cool#palette.inactive_modified = { + "\ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , + "\ } + + +let g:airline#themes#cool#palette.accents = { + \ 'red': [ '#ff0000' , '' , 196 , '' ] + \ } + +" CTRLP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#cool#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#E4E4E4' , '#00AFA2' , 188 , 37 , '' ], + \ [ '#EEEEEE' , '#008787' , 231 , 30 , '' ], + \ [ '#585858' , '#E4E4E4' , 59 , 188 , '' ]) + + + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/dark_minimal.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/dark_minimal.vim new file mode 100644 index 0000000..6c08628 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/dark_minimal.vim @@ -0,0 +1,63 @@ +scriptencoding utf-8 + +" This is a copy of the dark.vim theme, however it does not change colors in +" the different modes, so should bring some performance improvements because +" airline does not have to redefine highlighting groups after they have been +" setup once. + +" Each theme is contained in its own file and declares variables scoped to the +" file. These variables represent the possible "modes" that airline can +" detect. The mode is the return value of mode(), which gets converted to a +" readable string. The following is a list currently supported modes: normal, +" insert, replace, visual, and inactive. +" +" Each mode can also have overrides. These are small changes to the mode that +" don't require a completely different look. "modified" and "paste" are two +" such supported overrides. These are simply suffixed to the major mode, +" separated by an underscore. For example, "normal_modified" would be normal +" mode where the current buffer is modified. +" +" The theming algorithm is a 2-pass system where the mode will draw over all +" parts of the statusline, and then the override is applied after. This means +" it is possible to specify a subset of the theme in overrides, as it will +" simply overwrite the previous colors. If you want simultaneous overrides, +" then they will need to change different parts of the statusline so they do +" not conflict with each other. +" +" First, let's define an empty dictionary and assign it to the "palette" +" variable. The # is a separator that maps with the directory structure. If +" you get this wrong, Vim will complain loudly. +let g:airline#themes#dark_minimal#palette = {} + +" First let's define some arrays. The s: is just a VimL thing for scoping the +" variables to the current script. Without this, these variables would be +" declared globally. Now let's declare some colors for normal mode and add it +" to the dictionary. The array is in the format: +" [ guifg, guibg, ctermfg, ctermbg, opts ]. See "help attr-list" for valid +" values for the "opt" value. +let s:N1 = [ '#00005f' , '#dfff00' , 17 , 190 ] +let s:N2 = [ '#ffffff' , '#444444' , 255 , 238 ] +let s:N3 = [ '#9cffd3' , '#202020' , 85 , 234 ] +let g:airline#themes#dark_minimal#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +" Accents are used to give parts within a section a slightly different look or +" color. Here we are defining a "red" accent, which is used by the 'readonly' +" part by default. Only the foreground colors are specified, so the background +" colors are automatically extracted from the underlying section colors. What +" this means is that regardless of which section the part is defined in, it +" will be red instead of the section's foreground color. You can also have +" multiple parts with accents within a section. +let g:airline#themes#dark_minimal#palette.accents = { + \ 'red': [ '#ff0000' , '' , 160 , '' ] + \ } + +let pal = g:airline#themes#dark_minimal#palette +for item in ['insert', 'replace', 'visual', 'inactive', 'ctrlp'] + " why doesn't this work? + " get E713: cannot use empty key for dictionary + "let pal.{item} = pal.normal + exe "let pal.".item." = pal.normal" + for suffix in ['_modified', '_paste'] + exe "let pal.".item.suffix. " = pal.normal" + endfor +endfor diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/deus.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/deus.vim new file mode 100644 index 0000000..5e946ea --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/deus.vim @@ -0,0 +1,117 @@ +if get(g:, 'deus_termcolors', 256) == 16 + let s:term_red = 1 + let s:term_green = 2 + let s:term_yellow = 3 + let s:term_blue = 4 + let s:term_purple = 5 + let s:term_white = 7 + let s:term_black = 0 + let s:term_grey = 8 +else + let s:term_red = 204 + let s:term_green = 114 + let s:term_yellow = 180 + let s:term_blue = 39 + let s:term_purple = 170 + let s:term_white = 145 + let s:term_black = 235 + let s:term_grey = 236 +endif + +let g:airline#themes#deus#palette = {} + +let g:airline#themes#deus#palette.accents = { + \ 'red': [ '#E06C75', '', s:term_red, 0 ] + \ } + +let s:N1 = [ '#282C34', '#98C379', s:term_black, s:term_green ] +let s:N2 = [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ] +let s:N3 = [ '#98C379', '#282C34', s:term_green, '' ] +let g:airline#themes#deus#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let group = airline#themes#get_highlight('vimCommand') +let g:airline#themes#deus#palette.normal_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + +let s:I1 = [ '#282C34', '#61AFEF', s:term_black, s:term_blue ] +let s:I2 = s:N2 +let s:I3 = [ '#61AFEF', '#282C34', s:term_blue, '' ] +let g:airline#themes#deus#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#deus#palette.insert_modified = g:airline#themes#deus#palette.normal_modified + +let s:R1 = [ '#282C34', '#E06C75', s:term_black, s:term_red ] +let s:R2 = s:N2 +let s:R3 = [ '#E06C75', '#282C34', s:term_red, '' ] +let g:airline#themes#deus#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#deus#palette.replace_modified = g:airline#themes#deus#palette.normal_modified + +let s:V1 = [ '#282C34', '#C678DD', s:term_black, s:term_purple ] +let s:V2 = s:N2 +let s:V3 = [ '#C678DD', '#282C34', s:term_purple, '' ] +let g:airline#themes#deus#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#deus#palette.visual_modified = g:airline#themes#deus#palette.normal_modified + +let s:IA1 = [ '#282C34', '#ABB2BF', s:term_black, s:term_white ] +let s:IA2 = [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ] +let s:IA3 = s:N2 +let g:airline#themes#deus#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#deus#palette.inactive_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + +" Warning/Error styling code from vim-airline's ["base16" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/base16.vim) + +" Warnings +let s:WI = [ '#282C34', '#E5C07B', s:term_black, s:term_yellow ] +let g:airline#themes#deus#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#deus#palette.normal_modified.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.insert.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.insert_modified.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.visual.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.visual_modified.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.replace.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.replace_modified.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +" Errors +let s:ER = [ '#282C34', '#E06C75', s:term_black, s:term_red ] +let g:airline#themes#deus#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] + +let g:airline#themes#deus#palette.normal_modified.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.insert.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.insert_modified.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.visual.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.visual_modified.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.replace.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.replace_modified.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/distinguished.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/distinguished.vim new file mode 100644 index 0000000..0d65f4c --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/distinguished.vim @@ -0,0 +1,59 @@ +" vim-airline companion theme of distinguished +" (https://github.com/Lokaltog/vim-distinguished) +" I have nothing to do with the original +" distinguished theme other than being a big fan. +" this theme was shamelessly created by modifying +" the Ubaryd airline theme. + +let s:gray = [245, '#8a8a8a'] +let s:golden = [143, '#afaf5f'] +let s:pink = [131, '#af5f5f'] +let s:blue = [ 67, '#5f87af'] +let s:orange = [166, '#d75f00'] +let s:outerfg = [ 16, '#000000'] +let s:innerbg = [234, '#1c1c1c'] +let s:middle = ['#bcbcbc', '#444444', 250, 238] + +" Normal mode +let s:N1 = [s:outerfg[1], s:gray[1], s:outerfg[0], s:gray[0]] +let s:N3 = [s:gray[1], s:innerbg[1], s:gray[0], s:innerbg[0]] + +" Insert mode +let s:I1 = [s:outerfg[1], s:golden[1], s:outerfg[0], s:golden[0]] +let s:I3 = [s:golden[1], s:innerbg[1], s:golden[0], s:innerbg[0]] + +" Visual mode +let s:V1 = [s:outerfg[1], s:pink[1], s:outerfg[0], s:pink[0]] +let s:V3 = [s:pink[1], s:innerbg[1], s:pink[0], s:innerbg[0]] + +" Replace mode +let s:R1 = [s:outerfg[1], s:blue[1], s:outerfg[0], s:blue[0]] +let s:R3 = [s:blue[1], s:innerbg[1], s:blue[0], s:innerbg[0]] + +" Inactive pane +let s:IA = [s:middle[1], s:innerbg[1], s:middle[3], s:innerbg[0]] + +let g:airline#themes#distinguished#palette = {} +let g:airline#themes#distinguished#palette.accents = { + \ 'red': ['#d70000', '', 160, '', '']} + +let g:airline#themes#distinguished#palette.inactive = { + \ 'airline_a': s:IA, + \ 'airline_b': s:IA, + \ 'airline_c': s:IA} + +let g:airline#themes#distinguished#palette.normal = airline#themes#generate_color_map(s:N1, s:middle, s:N3) +let g:airline#themes#distinguished#palette.normal_modified = { + \ 'airline_a': ['', s:orange[1], '', s:orange[0], ''], + \ 'airline_c': [s:orange[1], '', s:orange[0], '', ''], + \ 'airline_x': [s:orange[1], '', s:orange[0], '', ''], + \ 'airline_z': ['', s:orange[1], '', s:orange[0], '']} + +let g:airline#themes#distinguished#palette.insert = airline#themes#generate_color_map(s:I1, s:middle, s:I3) +let g:airline#themes#distinguished#palette.insert_modified = {} + +let g:airline#themes#distinguished#palette.replace = airline#themes#generate_color_map(s:R1, s:middle, s:R3) +let g:airline#themes#distinguished#palette.replace_modified = {} + +let g:airline#themes#distinguished#palette.visual = airline#themes#generate_color_map(s:V1, s:middle, s:V3) +let g:airline#themes#distinguished#palette.visual_modified = {} diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/durant.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/durant.vim new file mode 100644 index 0000000..cb844d4 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/durant.vim @@ -0,0 +1,62 @@ +let g:airline#themes#durant#palette = {} + + +let s:N1 = [ '#005f00' , '#afd700' , 22 , 148 ] +let s:N2 = [ '#93a1a1' , '#586e75' , 245 , 240 ] +let s:N3 = [ '#93a1a1' , '#073642' , 240 , 233 ] +let g:airline#themes#durant#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + +let g:airline#themes#durant#normal_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } + + + +let s:I1 = [ '#ffffff' , '#00875f' , 255 , 29 ] +let s:I2 = [ '#9e9e9e' , '#303030' , 247 , 236 ] +let s:I3 = [ '#87d7ff' , '#005f87' , 117 , 24 ] +let g:airline#themes#durant#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#durant#palette.insert_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } +let g:airline#themes#durant#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#durant#palette.replace = copy(g:airline#themes#durant#palette.insert) +let g:airline#themes#durant#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] + +let g:airline#themes#durant#palette.replace_modified = g:airline#themes#durant#palette.insert_modified + +let s:V1 = [ '#1a1a18' , '#ffffff' , 232 , 255 ] +let s:V2 = [ '#ffffff' , '#44403a' , 255, 238 ] +let s:V3 = [ '#90a680' , '#2e2d2a' , 64, 235 ] +let g:airline#themes#durant#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#durant#palette.visual_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } + + +let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] +let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] +let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] +let g:airline#themes#durant#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#durant#palette.inactive_modified = { + \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , + \ } + + +let g:airline#themes#durant#palette.accents = { + \ 'red': [ '#ff0000' , '' , 160 , '' ] + \ } + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + let g:airline#themes#durant#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], + \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], + \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ]) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/fairyfloss.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/fairyfloss.vim new file mode 100644 index 0000000..a822c41 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/fairyfloss.vim @@ -0,0 +1,88 @@ +" Color palette +let s:guiShadow = "#3b3a32" " shadow +let s:guiDarkGray = "#49483e" " dark gray +let s:guiBgPurple = "#8076aa" " background purple +let s:guiGray = "#49483e" " gray +let s:guiViolet = "#63588d" " violet +let s:guiDustyLilac = "#efe6ff" "dusty-lilac +let s:guiSeafoam = "#c2ffdf" "seafoam +let s:guiSilver = "#f8f8f0" "silver +let s:guiFuschia = "#f92672" "fuschia +let s:guiPeach = "#ff857f" "peach +let s:guiGold = "#e6c000" "gold +let s:guiDarkSeafoam = "#80ffbd" "dark-seafoam +let s:guiLilac = "#c5a3ff" "lilac +let s:guiLavender = "#ae81ff" "lavender +let s:guiRose = "#ffb8d1" "rose +let s:guiGoldenrod = "#fffea0" "goldenrod + +let s:ctermShadow = "233" +let s:ctermDarkGray = "235" +let s:ctermBgPurple = "59" +let s:cterm03 = "66" +let s:cterm04 = "145" +let s:cterm05 = "152" +let s:cterm06 = "188" +let s:ctermSilver = "189" +let s:ctermFuschia = "88" +let s:cterm09 = "209" +let s:cterm0A = "221" +let s:ctermDarkSeafoam = "22" +let s:cterm0C = "73" +let s:ctermLavender = "25" +let s:cterm0E = "176" +let s:cterm0F = "137" + +let s:guiWhite = "#f8f8f0" +let s:guiGray = "#8076aa" +let s:ctermWhite = "231" +let s:ctermGray = "243" + +let g:airline#themes#fairyfloss#palette = {} +let s:modified = { 'airline_c': [ s:guiRose, '', 215, '', '' ] } + +" Normal mode +let s:N1 = [ s:guiSilver , s:guiLavender , s:ctermSilver , s:ctermLavender ] +let s:N2 = [ s:guiWhite , s:guiDarkGray , s:ctermWhite , s:ctermDarkGray ] +let s:N3 = [ s:guiShadow , s:guiLavender , s:ctermBgPurple , s:ctermShadow ] +let g:airline#themes#fairyfloss#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#fairyfloss#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [ s:guiDarkGray , s:guiDarkSeafoam , s:ctermWhite , s:ctermDarkSeafoam ] +let s:I2 = s:N2 +let s:I3 = [ s:guiWhite , s:guiDarkGray , s:ctermWhite , s:ctermShadow ] +let g:airline#themes#fairyfloss#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#fairyfloss#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [ s:guiWhite , s:guiFuschia , s:ctermWhite , s:ctermFuschia ] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#fairyfloss#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#fairyfloss#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [ s:guiFuschia , s:guiDarkGray , s:ctermFuschia, s:ctermShadow ] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#fairyfloss#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#fairyfloss#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [ s:guiGray , s:guiDarkGray , s:ctermGray , s:ctermDarkGray ] +let s:IN2 = [ s:guiBgPurple , s:guiShadow , s:ctermBgPurple , s:ctermShadow ] +let s:IN3 = [ s:guiBgPurple , s:guiShadow , s:ctermBgPurple , s:ctermShadow ] +let g:airline#themes#fairyfloss#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#fairyfloss#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ s:guiWhite , s:guiDarkGray , s:ctermWhite , s:ctermDarkGray ] +let s:CP2 = [ s:guiWhite , s:guiGray , s:ctermWhite , s:ctermDarkGray ] +let s:CP3 = [ s:guiWhite , s:guiLavender , s:ctermWhite , s:ctermLavender ] + +let g:airline#themes#fairyfloss#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/hybrid.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/hybrid.vim new file mode 100644 index 0000000..b9bd20b --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/hybrid.vim @@ -0,0 +1,52 @@ +" vim-airline companion theme of Hybrid +" (https://github.com/w0ng/vim-hybrid) + +let g:airline#themes#hybrid#palette = {} + +function! airline#themes#hybrid#refresh() + let s:N1 = airline#themes#get_highlight('DiffAdd') + let s:N2 = airline#themes#get_highlight('CursorLine') + let s:N3 = airline#themes#get_highlight('PMenu') + let g:airline#themes#hybrid#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#hybrid#palette.normal_modified = {} + + let warning_group = airline#themes#get_highlight('SpellRare') + let g:airline#themes#hybrid#palette.normal.airline_warning = warning_group + let g:airline#themes#hybrid#palette.normal_modified.airline_warning = warning_group + + let s:I1 = airline#themes#get_highlight2(['Text', 'fg'], ['DiffText', 'bg'], 'bold') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#hybrid#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#hybrid#palette.insert_modified = g:airline#themes#hybrid#palette.normal_modified + let g:airline#themes#hybrid#palette.insert.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning + let g:airline#themes#hybrid#palette.insert_modified.airline_warning = g:airline#themes#hybrid#palette.normal_modified.airline_warning + + let s:R1 = airline#themes#get_highlight('DiffChange') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#hybrid#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let replace_group = airline#themes#get_highlight('SpellRare') + let g:airline#themes#hybrid#palette.replace_modified = g:airline#themes#hybrid#palette.normal_modified + let g:airline#themes#hybrid#palette.replace.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning + let g:airline#themes#hybrid#palette.replace_modified.airline_warning = g:airline#themes#hybrid#palette.replace_modified.airline_warning + + let s:V1 = airline#themes#get_highlight2(['Text', 'fg'], ['DiffDelete', 'bg'], 'bold') + let s:V2 = s:N2 + let s:V3 = s:N3 + let g:airline#themes#hybrid#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#hybrid#palette.visual_modified = g:airline#themes#hybrid#palette.normal_modified + let g:airline#themes#hybrid#palette.visual.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning + let g:airline#themes#hybrid#palette.visual_modified.airline_warning = g:airline#themes#hybrid#palette.normal_modified.airline_warning + + let s:IA = airline#themes#get_highlight('StatusLineNC') + let g:airline#themes#hybrid#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#hybrid#palette.inactive_modified = g:airline#themes#hybrid#palette.normal_modified + + let g:airline#themes#hybrid#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + +endfunction + +call airline#themes#hybrid#refresh() diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/hybridline.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/hybridline.vim new file mode 100644 index 0000000..84729c1 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/hybridline.vim @@ -0,0 +1,34 @@ +" vim-airline theme based on vim-hybrid and powerline +" (https://github.com/w0ng/vim-hybrid) +" (https://github.com/Lokaltog/powerline) + +let g:airline#themes#hybridline#palette = {} + +let s:N1 = [ '#282a2e' , '#c5c8c6' , 'black' , 15 ] +let s:N2 = [ '#c5c8c6' , '#373b41' , 15 , 8 ] +let s:N3 = [ '#ffffff' , '#282a2e' , 255 , 'black' ] +let g:airline#themes#hybridline#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#hybridline#palette.normal.airline_a = ['#005f00', '#b5bd68', 22, 10, ''] + +let s:I1 = [ '#005f5f' , '#8abeb7' , 23 , 14 ] +let s:I2 = [ '#c5c8c6' , '#0087af' , 15 , 31 ] +let s:I3 = [ '#ffffff' , '#005f87' , 255 , 24 ] +let g:airline#themes#hybridline#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#hybridline#palette.insert_paste = { + \ 'airline_a': ['#000000', '#ac4142', 16 , 1, ''] , + \ } + +let g:airline#themes#hybridline#palette.replace = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#hybridline#palette.replace.airline_a = ['#000000', '#CC6666', 16, 9] + +let g:airline#themes#hybridline#palette.visual = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#hybridline#palette.visual.airline_a = ['#000000', '#de935f', 16, 3] + +let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] +let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] +let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] +let g:airline#themes#hybridline#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +let g:airline#themes#hybridline#palette.accents = { + \ 'red': [ '#ff0000' , '' , 160 , '' ] + \ } diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/jellybeans.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/jellybeans.vim new file mode 100644 index 0000000..3b72a1f --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/jellybeans.vim @@ -0,0 +1,88 @@ +" Color palette +let s:gui00 = "#151515" +let s:gui01 = "#262626" +let s:gui02 = "#4f5b66" +let s:gui03 = "#65737e" +let s:gui04 = "#a7adba" +let s:gui05 = "#c0c5ce" +let s:gui06 = "#cdd3de" +let s:gui07 = "#d8dee9" +let s:gui08 = "#870000" +let s:gui09 = "#f99157" +let s:gui0A = "#fac863" +let s:gui0B = "#437019" +let s:gui0C = "#5fb3b3" +let s:gui0D = "#0d61ac" +let s:gui0E = "#c594c5" +let s:gui0F = "#ab7967" + +let s:cterm00 = "233" +let s:cterm01 = "235" +let s:cterm02 = "59" +let s:cterm03 = "66" +let s:cterm04 = "145" +let s:cterm05 = "152" +let s:cterm06 = "188" +let s:cterm07 = "189" +let s:cterm08 = "88" +let s:cterm09 = "209" +let s:cterm0A = "221" +let s:cterm0B = "22" +let s:cterm0C = "73" +let s:cterm0D = "25" +let s:cterm0E = "176" +let s:cterm0F = "137" + +let s:guiWhite = "#ffffff" +let s:guiGray = "#666666" +let s:ctermWhite = "231" +let s:ctermGray = "243" + +let g:airline#themes#jellybeans#palette = {} +let s:modified = { 'airline_c': [ '#ffb964', '', 215, '', '' ] } + +" Normal mode +let s:N1 = [ s:gui07 , s:gui0D , s:cterm07 , s:cterm0D ] +let s:N2 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ] +let s:N3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let g:airline#themes#jellybeans#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#jellybeans#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [ s:guiWhite , s:gui0B , s:ctermWhite , s:cterm0B ] +let s:I2 = s:N2 +let s:I3 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm00 ] +let g:airline#themes#jellybeans#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#jellybeans#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [ s:guiWhite , s:gui08 , s:ctermWhite , s:cterm08 ] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#jellybeans#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#jellybeans#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [ s:gui08 , s:gui01 , s:cterm08, s:cterm00 ] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#jellybeans#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#jellybeans#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [ s:guiGray , s:gui01 , s:ctermGray , s:cterm01 ] +let s:IN2 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let s:IN3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let g:airline#themes#jellybeans#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#jellybeans#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ] +let s:CP2 = [ s:guiWhite , s:gui03 , s:ctermWhite , s:cterm01 ] +let s:CP3 = [ s:guiWhite , s:gui0D , s:ctermWhite , s:cterm0D ] + +let g:airline#themes#jellybeans#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/jet.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/jet.vim new file mode 100644 index 0000000..87d98e2 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/jet.vim @@ -0,0 +1,98 @@ +"Originally based on Jellybeans theme. +" Modified to resemble the orclord colorscheme. + +" Color palette +let s:gui00 = "#151515" +let s:gui01 = "#262626" +let s:gui02 = "#4f5b66" +let s:gui03 = "#65737e" +let s:gui04 = "#a7adba" +let s:gui05 = "#c0c5ce" +let s:gui06 = "#cdd3de" +let s:gui07 = "#d8dee9" +let s:gui08 = "#870000" +let s:gui09 = "#f99157" +let s:gui0A = "#fac863" +let s:gui0B = "#437019" +let s:gui0C = "#5fb3b3" +let s:gui0D = "#0d61ac" +let s:gui0E = "#c594c5" +let s:gui0F = "#ab7967" + +let s:cterm00 = "234" +let s:cterm01 = "235" +let s:cterm02 = "239" +let s:cterm03 = "59" +let s:cterm04 = "145" +let s:cterm05 = "152" +let s:cterm06 = "188" +let s:cterm07 = "15" +let s:cterm08 = "88" +let s:cterm09 = "209" +let s:cterm0A = "221" +let s:cterm0B = "28" +let s:cterm0C = "73" +let s:cterm0D = "04" +let s:cterm0E = "176" +let s:cterm0F = "137" + +let s:guiWhite = "#ffffff" +let s:ctermBlack = "00" +let s:ctermRed = "01" +let s:ctermGreen = "02" +let s:ctermPurple = "05" +let s:ctermGrey = "08" +let s:ctermIron = "242" +let s:ctermBrightRed = "09" +let s:ctermWhite = "15" +let s:ctermBlood = "88" +let s:ctermCongealing = "52" +let s:ctermOrange = "166" +let s:ctermBrown = "94" +let s:ctermAsh = "234" +let s:ctermPoison = "58" +let s:ctermBruise = "53" +let s:ctermWinter = "30" + +let g:airline#themes#jet#palette = {} + +" Normal mode +let s:N1 = [ s:gui07 , s:gui0D , s:ctermAsh , s:ctermBlood ] +let s:N2 = [ s:guiWhite , s:gui01 , s:ctermIron , s:ctermCongealing ] +let s:N3 = [ s:gui02 , s:gui00 , s:ctermRed , s:ctermBlack ] +let g:airline#themes#jet#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +" Insert mode +let s:I1 = [ s:guiWhite , s:gui0B , s:ctermOrange , s:ctermAsh ] +let s:I2 = [ s:gui02 , s:gui01 , s:ctermAsh , s:ctermOrange ] +let s:I3 = [ s:guiWhite , s:gui01 , s:ctermOrange , s:ctermBlack ] +let g:airline#themes#jet#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +" Visual mode +let s:V1 = [ s:guiWhite , s:gui08 , s:ctermAsh , s:ctermWinter ] +let s:V2 = [ s:gui02 , s:gui01 , s:ctermWinter , s:ctermAsh ] +let s:V3 = [ s:guiWhite , s:gui01 , s:ctermWinter , s:ctermBlack ] +let g:airline#themes#jet#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +" Replace mode +let s:R1 = [ s:gui08 , s:gui01 , s:ctermBlood, s:ctermBlack ] +let s:R2 = [ s:gui02 , s:gui01 , s:ctermRed , s:ctermBlack ] +let s:R3 = [ s:guiWhite , s:gui01 , s:ctermIron , s:ctermBlack ] +let g:airline#themes#jet#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +" Inactive mode +let s:IN1 = [ s:gui00 , s:gui01 , s:cterm00 , s:cterm01 ] +let s:IN2 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let s:IN3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let g:airline#themes#jet#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ] +let s:CP2 = [ s:guiWhite , s:gui03 , s:ctermWhite , s:cterm01 ] +let s:CP3 = [ s:guiWhite , s:gui0D , s:ctermWhite , s:cterm0D ] + +let g:airline#themes#jet#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/kalisi.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/kalisi.vim new file mode 100644 index 0000000..78504fa --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/kalisi.vim @@ -0,0 +1,70 @@ +" +" Colorscheme: Kalisi for airline. Inspired by powerline. +" Arthur Jaron +" hifreeo@gmail.com +" 24.10.2014 + +" Visual mode +let s:V1 = [ '#0087ff' , '#ffffff','33','231'] +let s:V2 = [ '#005faf' , '#5fafff','25','75'] +let s:V3 = [ '#87d7ff' , '#005faf','117','25'] + +" Replace mode +let s:R1 = [ '#d75fff' , '#ffffff','171','231'] +let s:R2 = [ '#5f005f' , '#d75fff','53','171'] +let s:R3 = [ '#ff87ff' , '#8700af','213','91'] + +let g:airline#themes#kalisi#palette = {} + + +function! airline#themes#kalisi#refresh() + + let s:StatusLine = airline#themes#get_highlight('StatusLine') + let s:StatusLineNC = airline#themes#get_highlight('StatusLineNC') + + " Insert mode + let s:I1 = [ '#ffffff' , '#e80000','231','160'] + let s:I2 = [ '#ff0000' , '#5f0000','196','52'] + let s:I3 = s:StatusLine + + " Normal mode + let s:N1 = [ '#005f00' , '#afd700','22','148'] + let s:N2 = [ '#afd700' , '#005f00','148','22'] + let s:N3 = s:StatusLine + + " Tabline Plugin + let g:airline#themes#kalisi#palette.tabline = { + \ 'airline_tab': ['#bcbcbc', '#005f00','250','22'], + \ 'airline_tabsel': ['#404042', '#A6DB29','238','148'], + \ 'airline_tabtype':['#afd700', '#204d20','148','22'], + \ 'airline_tabfill': s:StatusLine, + \ 'airline_tabhid': ['#c5c5c5', '#404042','251','238'], + \ 'airline_tabmod': ['#d7ff00', '#afd700','190','148'], + \ 'airline_tabmod_unsel': ['#d7ff00', '#005f00','190','22'] + \ } + + let g:airline#themes#kalisi#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#kalisi#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#kalisi#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#kalisi#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + + " Inactive Mode + let s:IA = airline#themes#get_highlight('StatusLineNC') + let g:airline#themes#kalisi#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#kalisi#palette.inactive_modified = { + \ 'airline_c': ['#d7ff00', s:IA[1],'190',s:IA[3]], + \ } + +endfunction + +call airline#themes#kalisi#refresh() + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#kalisi#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ s:StatusLine, + \ ['#afd700', '#005f00','148','22'], + \ [ '#005f00' , '#afd700' , '22','148'] + \) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/kolor.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/kolor.vim new file mode 100644 index 0000000..e61f56f --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/kolor.vim @@ -0,0 +1,59 @@ +let g:airline#themes#kolor#palette = {} + +let s:N1 = [ '#e2e2e2' , '#4f3598' , 254 , 56 ] +let s:N2 = [ '#ff5fd7' , '#242322' , 206 , 234 ] +let s:N3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] + +let g:airline#themes#kolor#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#kolor#palette.normal_modified = { + \ 'airline_c': [ '#e2e2e2' , '#4f3598' , 254 , 56 , '' ] , + \ } + + +let s:I1 = [ '#242322' , '#7eaefd' , 234 , 111 ] +let s:I2 = [ '#75d7d8' , '#242322' , 80 , 234 ] +let s:I3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] +let g:airline#themes#kolor#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#kolor#palette.insert_modified = { + \ 'airline_c': [ '#242322' , '#7eaefd' , 234 , 111 , '' ] , + \ } + + +let g:airline#themes#kolor#palette.replace = copy(g:airline#themes#kolor#palette.insert) +let g:airline#themes#kolor#palette.replace.airline_a = [ s:I2[0] , '#005154' , s:I2[2] , 23 , '' ] +let g:airline#themes#kolor#palette.replace_modified = { + \ 'airline_c': [ '#e2e2e2' , '#005154' , 254 , 23 , '' ] , + \ } + + +let s:V1 = [ '#242322' , '#e6987a' , 234 , 180 ] +let s:V2 = [ '#dbc570' , '#242322' , 186 , 234 ] +let s:V3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] +let g:airline#themes#kolor#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#kolor#palette.visual_modified = { + \ 'airline_c': [ '#242322' , '#e6987a' , 234 , 180 , '' ] , + \ } + + +let s:IA1 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 , '' ] +let s:IA2 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 ] +let s:IA3 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 , '' ] +let g:airline#themes#kolor#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#kolor#palette.inactive_modified = { + \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , + \ } + + +let g:airline#themes#kolor#palette.accents = { + \ 'red': [ '#d96e8a' , '' , 168 , '' ] + \ } + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#kolor#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#e2e2e2' , '#4a4a4a' , 254 , 238 , '' ], + \ [ '#e2e2e2' , '#242322' , 254 , 234 , '' ], + \ [ '#e2e2e2' , '#4f3598' , 254 , 56 , 'bold' ]) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/laederon.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/laederon.vim new file mode 100644 index 0000000..115c107 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/laederon.vim @@ -0,0 +1,62 @@ +" vim-airline companion theme of Laederon +" (https://github.com/Donearm/Laederon) + +" Normal mode +let s:N1 = [ '#1a1a18' , '#ffffff' , 232 , 255 ] " blackestgravel & snow +let s:N2 = [ '#ffffff' , '#44403a' , 255, 238 ] " snow & deepgravel +let s:N3 = [ '#90a680' , '#2e2d2a' , 64, 235 ] " dilutedpaint & darkgravel +let s:N4 = [ '#777470' , 240 ] " gravel + +" Insert mode +let s:I1 = [ '#1a1a18' , '#1693a5' , 232 , 62 ] " blackestgravel & crystallake +let s:I2 = [ '#515744' , '#44403a' , 101 , 238 ] " lichen & deepgravel +let s:I3 = [ '#1693a5' , '#2e2d2a' , 39 , 235 ] " crystallake & darkgravel + +" Visual mode +let s:V1 = [ '#1a1a18' , '#ab3e5d' , 232 , 161 ] " blackestgravel & raspberry +let s:V2 = [ '#000000' , '#908571' , 16 , 252 ] " coal & winterterrain +let s:V3 = [ '#ab3e5d' , '#8c7f77' , 161 , 245 ] " raspberry & wetcoldterrain +let s:V4 = [ '#515744' , 101 ] " lichen + +" Replace mode +let s:RE = [ '#233e09' , 22 ] " oakleaf + +" Paste mode +let s:PA = [ '#ab3e5d' , 161 ] " raspberry + +let s:IA = [ s:N2[1] , s:N3[1] , s:N2[3], s:N3[3] , '' ] + + +let g:airline#themes#laederon#palette = {} + +let g:airline#themes#laederon#palette.accents = { + \ 'red': [ '#ef393d' , '' , 196 , '' , '' ] + \ } + +let g:airline#themes#laederon#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#laederon#palette.normal_modified = { + \ 'airline_a' : [ s:N2[0] , s:N4[0] , s:N2[2] , s:N4[1] , '' ] , + \ 'airline_c' : [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } + + +let g:airline#themes#laederon#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#laederon#palette.insert_modified = { + \ 'airline_c' : [ s:V2[1] , s:N2[1] , s:V2[3] , s:N2[3] , '' ] } +let g:airline#themes#laederon#palette.insert_paste = { + \ 'airline_a' : [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] } + + +let g:airline#themes#laederon#palette.replace = copy(airline#themes#laederon#palette.insert) +let g:airline#themes#laederon#palette.replace.airline_a = [ s:I1[0] , s:RE[0] , s:I1[2] , s:RE[1] , '' ] +let g:airline#themes#laederon#palette.replace_modified = g:airline#themes#laederon#palette.insert_modified + + +let g:airline#themes#laederon#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#laederon#palette.visual_modified = { + \ 'airline_c' : [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } + + +let g:airline#themes#laederon#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#laederon#palette.inactive_modified = { + \ 'airline_c' : [ s:V1[1] , '' , s:V1[3] , '' , '' ] } + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/light.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/light.vim new file mode 100644 index 0000000..d9fe844 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/light.vim @@ -0,0 +1,45 @@ +let g:airline#themes#light#palette = {} + +let s:N1 = [ '#ffffff' , '#005fff' , 255 , 27 ] +let s:N2 = [ '#000087' , '#00dfff' , 18 , 45 ] +let s:N3 = [ '#005fff' , '#afffff' , 27 , 159 ] +let g:airline#themes#light#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#light#palette.normal_modified = { + \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } + + +let s:I1 = [ '#ffffff' , '#00875f' , 255 , 29 ] +let s:I2 = [ '#005f00' , '#00df87' , 22 , 42 ] +let s:I3 = [ '#005f5f' , '#afff87' , 23 , 156 ] +let g:airline#themes#light#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#light#palette.insert_modified = { + \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } +let g:airline#themes#light#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#light#palette.replace = copy(g:airline#themes#light#palette.insert) +let g:airline#themes#light#palette.replace.airline_a = [ s:I2[0] , '#ff0000' , s:I1[2] , 196 , '' ] +let g:airline#themes#light#palette.replace_modified = g:airline#themes#light#palette.insert_modified + + +let s:V1 = [ '#ffffff' , '#ff5f00' , 255 , 202 ] +let s:V2 = [ '#5f0000' , '#ffaf00' , 52 , 214 ] +let s:V3 = [ '#df5f00' , '#ffff87' , 166 , 228 ] +let g:airline#themes#light#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#light#palette.visual_modified = { + \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } + + +let s:IA1 = [ '#666666' , '#b2b2b2' , 242 , 249 , '' ] +let s:IA2 = [ '#8a8a8a' , '#d0d0d0' , 245 , 252 , '' ] +let s:IA3 = [ '#a8a8a8' , '#ffffff' , 248 , 255 , '' ] +let g:airline#themes#light#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#light#palette.inactive_modified = { + \ 'airline_c': [ '#df0000' , '' , 160 , '' , '' ] , + \ } + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/lucius.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/lucius.vim new file mode 100644 index 0000000..c6db8b6 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/lucius.vim @@ -0,0 +1,62 @@ +let g:airline#themes#lucius#palette = {} + +function! airline#themes#lucius#refresh() + + let s:N1 = airline#themes#get_highlight('StatusLine') + let s:N2 = airline#themes#get_highlight('Folded') + let s:N3 = airline#themes#get_highlight('CursorLine') + let g:airline#themes#lucius#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let modified_group = airline#themes#get_highlight('Statement') + let g:airline#themes#lucius#palette.normal_modified = { + \ 'airline_c': [modified_group[0], '', modified_group[2], '', ''] + \ } + + let warning_group = airline#themes#get_highlight('DiffDelete') + let g:airline#themes#lucius#palette.normal.airline_warning = warning_group + let g:airline#themes#lucius#palette.normal_modified.airline_warning = warning_group + + let s:I1 = airline#themes#get_highlight('DiffAdd') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#lucius#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#lucius#palette.insert_modified = g:airline#themes#lucius#palette.normal_modified + let g:airline#themes#lucius#palette.insert.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning + let g:airline#themes#lucius#palette.insert_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning + + let s:R1 = airline#themes#get_highlight('DiffChange') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#lucius#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#lucius#palette.replace_modified = g:airline#themes#lucius#palette.normal_modified + let g:airline#themes#lucius#palette.replace.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning + let g:airline#themes#lucius#palette.replace_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning + + let s:V1 = airline#themes#get_highlight('Cursor') + let s:V2 = s:N2 + let s:V3 = s:N3 + let g:airline#themes#lucius#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#lucius#palette.visual_modified = g:airline#themes#lucius#palette.normal_modified + let g:airline#themes#lucius#palette.visual.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning + let g:airline#themes#lucius#palette.visual_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning + + let s:IA = airline#themes#get_highlight('StatusLineNC') + let g:airline#themes#lucius#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#lucius#palette.inactive_modified = { + \ 'airline_c': [ modified_group[0], '', modified_group[2], '', '' ] + \ } + + let g:airline#themes#lucius#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + + " Extra tabline colors + let s:TS = airline#themes#get_highlight('TabLineSel') + let g:airline#themes#lucius#palette.tabline = {} + let g:airline#themes#lucius#palette.tabline.airline_tabsel = s:TS + let g:airline#themes#lucius#palette.tabline.airline_tabsel_right = s:TS + +endfunction + +call airline#themes#lucius#refresh() + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/luna.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/luna.vim new file mode 100644 index 0000000..879d862 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/luna.vim @@ -0,0 +1,92 @@ +" vim-airline companion theme of Luna +" (https://github.com/Pychimp/vim-luna) + +let g:airline#themes#luna#palette = {} + +let g:airline#themes#luna#palette.accents = { + \ 'red': [ '#ffffff' , '' , 231 , '' , '' ], + \ } + + +let s:N1 = [ '#ffffff' , '#005252' , 231 , 36 ] +let s:N2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] +let s:N3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] +let g:airline#themes#luna#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#luna#palette.normal_modified = { + \ 'airline_c': [ '#ffffff' , '#450000' , 231 , 52 , '' ] , + \ } + + +let s:I1 = [ '#ffffff' , '#789f00' , 231 , 106 ] +let s:I2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] +let s:I3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] +let g:airline#themes#luna#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#luna#palette.insert_modified = { + \ 'airline_c': [ '#ffffff' , '#005e5e' , 255 , 52 , '' ] , + \ } +let g:airline#themes#luna#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#789f00' , s:I1[2] , 106 , '' ] , + \ } + + +let g:airline#themes#luna#palette.replace = copy(g:airline#themes#luna#palette.insert) +let g:airline#themes#luna#palette.replace.airline_a = [ s:I2[0] , '#920000' , s:I2[2] , 88 , '' ] +let g:airline#themes#luna#palette.replace_modified = g:airline#themes#luna#palette.insert_modified + +let s:V1 = [ '#ffff9a' , '#ff8036' , 222 , 208 ] +let s:V2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] +let s:V3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] +let g:airline#themes#luna#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#luna#palette.visual_modified = { + \ 'airline_c': [ '#ffffff' , '#450000' , 231 , 52 , '' ] , + \ } + +let s:IA = [ '#4e4e4e' , '#002b2b' , 59 , 23 , '' ] +let g:airline#themes#luna#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#luna#palette.inactive_modified = { + \ 'airline_c': [ '#e20000' , '' , 166 , '' , '' ] , + \ } + +let g:airline#themes#luna#palette.tabline = { + \ 'airline_tab': ['#2aa198', '#003f3f', 231, 29, ''], + \ 'airline_tabsel': ['#ffffff', '#2e8b57', 231, 36, ''], + \ 'airline_tabtype': ['#ffffff', '#005252', 231, 36, ''], + \ 'airline_tabfill': ['#ffffff', '#002b2b', 231, 23, ''], + \ 'airline_tabmod': ['#ffffff', '#780000', 231, 88, ''], + \ } + +let s:WI = [ '#ffffff', '#5f0000', 231, 88 ] +let g:airline#themes#luna#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#luna#palette.normal_modified.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.insert.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.insert_modified.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.visual.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.visual_modified.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.replace.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.replace_modified.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#luna#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#ffffff' , '#002b2b' , 231 , 23 , '' ] , + \ [ '#ffffff' , '#005252' , 231 , 36 , '' ] , + \ [ '#ffffff' , '#973d45' , 231 , 95 , '' ] ) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/minimalist.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/minimalist.vim new file mode 100644 index 0000000..8554996 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/minimalist.vim @@ -0,0 +1,67 @@ +" Minimalist Airline - A Material Colorscheme Darker +" +" Author: Diki Ananta +" Repository: https://github.com/dikiaap/minimalist +" Version: 1.4 +" License: MIT + +" Normal Mode +let s:N1 = [ '#E4E4E4' , '#3A3A3A' , 254 , 237 ] +let s:N2 = [ '#E4E4E4' , '#4E4E4E' , 254 , 239 ] +let s:N3 = [ '#EEEEEE' , '#262626' , 255 , 235 ] + +" Insert Mode +let s:I1 = [ '#E4E4E4' , '#3A3A3A' , 254 , 237 ] +let s:I2 = [ '#E4E4E4' , '#4E4E4E' , 254 , 239 ] +let s:I3 = [ '#EEEEEE' , '#262626' , 255 , 235 ] + +" Visual Mode +let s:V1 = [ '#E4E4E4' , '#3A3A3A' , 254 , 237 ] +let s:V2 = [ '#E4E4E4' , '#4E4E4E' , 254 , 239 ] +let s:V3 = [ '#EEEEEE' , '#262626' , 255 , 235 ] + +" Replace Mode +let s:R1 = [ '#E4E4E4' , '#3A3A3A' , 254 , 237 ] +let s:R2 = [ '#E4E4E4' , '#4E4E4E' , 254 , 239 ] +let s:R3 = [ '#EEEEEE' , '#262626' , 255 , 235 ] + +" Inactive Mode +let s:IA = [ '#666666' , '#262626' , 242 , 235 , '' ] + +let g:airline#themes#minimalist#palette = {} +let g:airline#themes#minimalist#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#minimalist#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#minimalist#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#minimalist#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#minimalist#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + +" Warning Mode +let s:WI = [ '#1C1C1C' , '#FFAF5F' , 234 , 215 , '' ] +let g:airline#themes#minimalist#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] +let g:airline#themes#minimalist#palette.insert.airline_warning = g:airline#themes#minimalist#palette.normal.airline_warning +let g:airline#themes#minimalist#palette.visual.airline_warning = g:airline#themes#minimalist#palette.normal.airline_warning +let g:airline#themes#minimalist#palette.replace.airline_warning = g:airline#themes#minimalist#palette.normal.airline_warning + +" Error Mode +let s:ER = [ '#1C1C1C' , '#D75F5F' , 234 , 167 , '' ] +let g:airline#themes#minimalist#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] +let g:airline#themes#minimalist#palette.insert.airline_error = g:airline#themes#minimalist#palette.normal.airline_error +let g:airline#themes#minimalist#palette.visual.airline_error = g:airline#themes#minimalist#palette.normal.airline_error +let g:airline#themes#minimalist#palette.replace.airline_error = g:airline#themes#minimalist#palette.normal.airline_error + +" Accents +let g:airline#themes#minimalist#palette.accents = { + \ 'red': [ '#D75F5F' , '' , 167 , '' ] + \ } + +" CtrlP +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#minimalist#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#E4E4E4' , '#262626' , 254 , 235 , '' ], + \ [ '#E4E4E4' , '#4E4E4E' , 254 , 239 , '' ], + \ [ '#585858' , '#E4E4E4' , 240 , 254 , 'bold' ]) +endif diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/molokai.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/molokai.vim new file mode 100644 index 0000000..8e87b56 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/molokai.vim @@ -0,0 +1,68 @@ +let g:airline#themes#molokai#palette = {} + +let g:airline#themes#molokai#palette.accents = { + \ 'red': [ '#66d9ef' , '' , 81 , '' , '' ], + \ } + + +" Normal mode +let s:N1 = [ '#080808' , '#e6db74' , 232 , 144 ] " mode +let s:N2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] " info +let s:N3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] " statusline + +let g:airline#themes#molokai#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#molokai#palette.normal_modified = { + \ 'airline_c': [ '#080808' , '#e6db74' , 232 , 144 , '' ] , + \ } + + +" Insert mode +let s:I1 = [ '#080808' , '#66d9ef' , 232 , 81 ] +let s:I2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] +let s:I3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] + +let g:airline#themes#molokai#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#molokai#palette.insert_modified = { + \ 'airline_c': [ '#080808' , '#66d9ef' , 232 , 81 , '' ] , + \ } + + +" Replace mode +let s:R1 = [ '#080808' , '#f92672' , 232 , 161 ] +let s:R2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] +let s:R3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] + +let g:airline#themes#molokai#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#molokai#palette.replace_modified = { + \ 'airline_c': [ '#080808' , '#f92672' , 232 , 161 , '' ] , + \ } + + +" Visual mode +let s:V1 = [ '#080808' , '#a6e22e' , 232 , 118 ] +let s:V2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] +let s:V3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] + +let g:airline#themes#molokai#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#molokai#palette.visual_modified = { + \ 'airline_c': [ '#080808' , '#a6e22e' , 232 , 118 , '' ] , + \ } + + +" Inactive +let s:IA = [ '#1b1d1e' , '#465457' , 233 , 67 , '' ] +let g:airline#themes#molokai#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#molokai#palette.inactive_modified = { + \ 'airline_c': [ '#f8f8f0' , '' , 253 , '' , '' ] , + \ } + + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#molokai#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#f8f8f0' , '#465457' , 253 , 67 , '' ] , + \ [ '#f8f8f0' , '#232526' , 253 , 16 , '' ] , + \ [ '#080808' , '#e6db74' , 232 , 144 , 'bold' ] ) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/monochrome.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/monochrome.vim new file mode 100644 index 0000000..57eff9d --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/monochrome.vim @@ -0,0 +1,18 @@ +let g:airline#themes#monochrome#palette = {} + +function! airline#themes#monochrome#refresh() + let s:SL = airline#themes#get_highlight('StatusLine') + let s:SLNC = airline#themes#get_highlight('StatusLineNC') + + let g:airline#themes#monochrome#palette.normal = airline#themes#generate_color_map(s:SL, s:SL, s:SL) + let g:airline#themes#monochrome#palette.insert = g:airline#themes#monochrome#palette.normal + let g:airline#themes#monochrome#palette.replace = g:airline#themes#monochrome#palette.normal + let g:airline#themes#monochrome#palette.visual = g:airline#themes#monochrome#palette.normal + let g:airline#themes#monochrome#palette.normal.airline_error = s:SLNC + let g:airline#themes#monochrome#palette.normal.airline_warning = s:SLNC + + let g:airline#themes#monochrome#palette.inactive = airline#themes#generate_color_map(s:SLNC, s:SLNC, s:SLNC) +endfunction + +call airline#themes#monochrome#refresh() + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/murmur.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/murmur.vim new file mode 100644 index 0000000..08e4757 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/murmur.vim @@ -0,0 +1,82 @@ +let g:airline#themes#murmur#palette = {} + +" Color palette +let s:cterm_termbg = 237 " Background for branch and file format blocks +let s:gui_termbg = '#5F5F5F' +let s:cterm_termfg = 144 " Foreground for branch and file format blocks +let s:gui_termfg = '#AFAF87' + +let s:cterm_termbg2 = 234 " Background for middle block +let s:gui_termbg2 = '#1C1C1C' +let s:cterm_termfg2 = 39 " Foreground for middle block +let s:gui_termfg2 = '#F5F5F5' + +let s:cterm_normalbg = 27 " Background for normal mode and file position blocks +let s:gui_normalbg = '#5F87FF' +let s:cterm_normalfg = 15 " Foreground for normal mode and file position blocks +let s:gui_normalfg = '#FFFFFF' + +let s:cterm_insertbg = 70 " Background for insert mode and file position blocks +let s:gui_insertbg = '#87AF5F' +let s:cterm_insertfg = 15 " Foreground for insert mode and file position blocks +let s:gui_insertfg = '#FFFFFF' + +let s:cterm_visualbg = 166 " Background for visual mode and file position blocks +let s:gui_visualbg = '#ff8c00' +let s:cterm_visualfg = 15 " Foreground for visual mode and file position blocks +let s:gui_visualfg = '#FFFFFF' + +let s:cterm_replacebg = 88 " Background for replace mode and file position blocks +let s:gui_replacebg = '#870000' +let s:cterm_replacefg = 15 " Foreground for replace mode and file position blocks +let s:gui_replacefg = '#FFFFFF' + +let s:cterm_alert = 88 " Modified file alert color +let s:gui_alert = '#870000' + +let s:cterm_inactivebg = 234 " Background for inactive mode +let s:gui_inactivebg = '#1C1C1C' +let s:cterm_inactivefg = 239 " Foreground for inactive mode +let s:gui_inactivefg = '#4E4E4E' + +" Branch and file format +let s:BB = [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg] " Branch and file format blocks + +" Normal mode +let s:N1 = [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg] " Outside blocks in normal mode +let s:N2 = [s:gui_termfg2, s:gui_termbg2, s:cterm_normalbg, s:cterm_termbg2] " Middle block +let g:airline#themes#murmur#palette.normal = airline#themes#generate_color_map(s:N1, s:BB, s:N2) +let g:airline#themes#murmur#palette.normal_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} + +" Insert mode +let s:I1 = [s:gui_insertfg, s:gui_insertbg, s:cterm_insertfg, s:cterm_insertbg] " Outside blocks in insert mode +let s:I2 = [s:gui_insertbg, s:gui_termbg2, s:cterm_insertbg, s:cterm_termbg2] " Middle block +let g:airline#themes#murmur#palette.insert = airline#themes#generate_color_map(s:I1, s:BB, s:I2) +let g:airline#themes#murmur#palette.insert_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} + +" Replace mode +let s:R1 = [s:gui_replacefg, s:gui_replacebg, s:cterm_replacefg, s:cterm_replacebg] " Outside blocks in replace mode +let s:R2 = [s:gui_termfg, s:gui_termbg2, s:cterm_termfg, s:cterm_termbg2] " Middle block +let g:airline#themes#murmur#palette.replace = airline#themes#generate_color_map(s:R1, s:BB, s:R2) +let g:airline#themes#murmur#palette.replace_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} + +" Visual mode +let s:V1 = [s:gui_visualfg, s:gui_visualbg, s:cterm_visualfg, s:cterm_visualbg] " Outside blocks in visual mode +let s:V2 = [s:gui_visualbg, s:gui_termbg2, s:cterm_visualbg, s:cterm_termbg2] " Middle block +let g:airline#themes#murmur#palette.visual = airline#themes#generate_color_map(s:V1, s:BB, s:V2) +let g:airline#themes#murmur#palette.visual_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} + +" Inactive mode +let s:IA1 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA2 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA3 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let g:airline#themes#murmur#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" CtrlP plugin colors +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#murmur#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg, ''], + \ [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg, ''], + \ [s:gui_termfg2, s:gui_termbg2, s:cterm_termfg2, s:cterm_termbg2, 'bold']) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/onedark.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/onedark.vim new file mode 100644 index 0000000..26a925f --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/onedark.vim @@ -0,0 +1,129 @@ +" [onedark.vim](https://github.com/joshdick/onedark.vim/) + +" This is a [vim-airline](https://github.com/vim-airline/vim-airline) theme for use with +" the [onedark.vim](https://github.com/joshdick/onedark.vim) colorscheme. + +" It is based on vim-airline's ["tomorrow" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/tomorrow.vim). +function! airline#themes#onedark#refresh() + + if get(g:, 'onedark_termcolors', 256) == 16 + let s:term_red = 1 + let s:term_green = 2 + let s:term_yellow = 3 + let s:term_blue = 4 + let s:term_purple = 5 + let s:term_white = 7 + let s:term_black = 0 + let s:term_grey = 8 + else + let s:term_red = 204 + let s:term_green = 114 + let s:term_yellow = 180 + let s:term_blue = 39 + let s:term_purple = 170 + let s:term_white = 145 + let s:term_black = 235 + let s:term_grey = 236 + endif + + let g:airline#themes#onedark#palette = {} + + let g:airline#themes#onedark#palette.accents = { + \ 'red': [ '#E06C75', '', s:term_red, 0 ] + \ } + + let s:N1 = [ '#282C34', '#98C379', s:term_black, s:term_green ] + let s:N2 = [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ] + let s:N3 = [ '#98C379', '#282C34', s:term_green, '' ] + let g:airline#themes#onedark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let group = airline#themes#get_highlight('vimCommand') + let g:airline#themes#onedark#palette.normal_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + + let s:I1 = [ '#282C34', '#61AFEF', s:term_black, s:term_blue ] + let s:I2 = s:N2 + let s:I3 = [ '#61AFEF', '#282C34', s:term_blue, '' ] + let g:airline#themes#onedark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#onedark#palette.insert_modified = g:airline#themes#onedark#palette.normal_modified + + let s:R1 = [ '#282C34', '#E06C75', s:term_black, s:term_red ] + let s:R2 = s:N2 + let s:R3 = [ '#E06C75', '#282C34', s:term_red, '' ] + let g:airline#themes#onedark#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#onedark#palette.replace_modified = g:airline#themes#onedark#palette.normal_modified + + let s:V1 = [ '#282C34', '#C678DD', s:term_black, s:term_purple ] + let s:V2 = s:N2 + let s:V3 = [ '#C678DD', '#282C34', s:term_purple, '' ] + let g:airline#themes#onedark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#onedark#palette.visual_modified = g:airline#themes#onedark#palette.normal_modified + + let s:IA1 = [ '#282C34', '#ABB2BF', s:term_black, s:term_white ] + let s:IA2 = [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ] + let s:IA3 = s:N2 + let g:airline#themes#onedark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + let g:airline#themes#onedark#palette.inactive_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + + " Warning/Error styling code from vim-airline's ["base16" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/base16.vim) + + " Warnings + let s:WI = [ '#282C34', '#E5C07B', s:term_black, s:term_yellow ] + let g:airline#themes#onedark#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + + let g:airline#themes#onedark#palette.normal_modified.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.insert.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.insert_modified.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.visual.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.visual_modified.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.replace.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.replace_modified.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + " Errors + let s:ER = [ '#282C34', '#E06C75', s:term_black, s:term_red ] + let g:airline#themes#onedark#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] + + let g:airline#themes#onedark#palette.normal_modified.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.insert.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.insert_modified.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.visual.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.visual_modified.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.replace.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.replace_modified.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + +endfunction + +call airline#themes#onedark#refresh() diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/papercolor.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/papercolor.vim new file mode 100644 index 0000000..fb8022b --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/papercolor.vim @@ -0,0 +1,65 @@ +let g:airline#themes#papercolor#palette = {} + +let g:airline#themes#papercolor#palette.accents = { + \ 'red': [ '#66d9ef' , '' , 81 , '' , '' ], + \ } + +" Normal Mode: +let s:N1 = [ '#585858' , '#e4e4e4' , 240 , 254 ] " Mode +let s:N2 = [ '#e4e4e4' , '#0087af' , 254 , 31 ] " Info +let s:N3 = [ '#eeeeee' , '#005f87' , 255 , 24 ] " StatusLine + + +let g:airline#themes#papercolor#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#papercolor#palette.normal_modified = { + \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , + \ } + + +" Insert Mode: +let s:I1 = [ '#585858' , '#e4e4e4' , 240 , 254 ] " Mode +let s:I2 = [ '#e4e4e4' , '#0087af' , 254 , 31 ] " Info +let s:I3 = [ '#eeeeee' , '#005f87' , 255 , 24 ] " StatusLine + + +let g:airline#themes#papercolor#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#papercolor#palette.insert_modified = { + \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , + \ } + + +" Replace Mode: +let g:airline#themes#papercolor#palette.replace = copy(g:airline#themes#papercolor#palette.insert) +let g:airline#themes#papercolor#palette.replace.airline_a = [ '#d7005f' , '#e4e4e4' , 161 , 254, '' ] +let g:airline#themes#papercolor#palette.replace_modified = { + \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , + \ } + + +" Visual Mode: +let s:V1 = [ '#005f87', '#e4e4e4', 24, 254 ] +let s:V2 = [ '', '#0087af', '', 31 ] +let s:V3 = [ '#e4e4e4', '#005f87', 254, 24 ] + +let g:airline#themes#papercolor#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#papercolor#palette.visual_modified = { + \ 'airline_c': [ '#e4e4e4', '#005f87', 254, 24 ] , + \ } + +" Inactive: +let s:IA = [ '#585858' , '#e4e4e4' , 240 , 254 , '' ] +let g:airline#themes#papercolor#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#papercolor#palette.inactive_modified = { + \ 'airline_c': [ '#585858' , '#e4e4e4' , 240 , 254 , '' ] , + \ } + + +" CtrlP: +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#papercolor#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#e4e4e4' , '#005f87' , 254 , 24 , '' ] , + \ [ '#e4e4e4' , '#0087af' , 254 , 31 , '' ] , + \ [ '#585858' , '#e4e4e4' , 240 , 254 , 'bold' ] ) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/powerlineish.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/powerlineish.vim new file mode 100644 index 0000000..48eb1ec --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/powerlineish.vim @@ -0,0 +1,46 @@ +" Theme to mimic the default colorscheme of powerline +" Not 100% the same so it's powerline... ish. +" +" Differences from default powerline: +" * Paste indicator isn't colored different +" * Far right hand section matches the color of the mode indicator +" +" Differences from other airline themes: +" * No color differences when you're in a modified buffer +" * Visual mode only changes the mode section. Otherwise +" it appears the same as normal mode + +" Normal mode " fg & bg +let s:N1 = [ '#005f00' , '#afd700' , 22 , 148 ] " darkestgreen & brightgreen +let s:N2 = [ '#9e9e9e' , '#303030' , 247 , 236 ] " gray8 & gray2 +let s:N3 = [ '#ffffff' , '#121212' , 231 , 233 ] " white & gray4 + +" Insert mode " fg & bg +let s:I1 = [ '#005f5f' , '#ffffff' , 23 , 231 ] " darkestcyan & white +let s:I2 = [ '#5fafd7' , '#0087af' , 74 , 31 ] " darkcyan & darkblue +let s:I3 = [ '#87d7ff' , '#005f87' , 117 , 24 ] " mediumcyan & darkestblue + +" Visual mode " fg & bg +let s:V1 = [ '#080808' , '#ffaf00' , 232 , 214 ] " gray3 & brightestorange + +" Replace mode " fg & bg +let s:RE = [ '#ffffff' , '#d70000' , 231 , 160 ] " white & brightred + +let g:airline#themes#powerlineish#palette = {} + +let g:airline#themes#powerlineish#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#powerlineish#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#powerlineish#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#powerlineish#palette.visual = { + \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } + +let g:airline#themes#powerlineish#palette.replace = copy(airline#themes#powerlineish#palette.normal) +let g:airline#themes#powerlineish#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + + +let s:IA = [ s:N2[0] , s:N3[1] , s:N2[2] , s:N3[3] , '' ] +let g:airline#themes#powerlineish#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/qwq.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/qwq.vim new file mode 100644 index 0000000..c028aca --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/qwq.vim @@ -0,0 +1,61 @@ +" github: https://github.com/LuciusChen +scriptencoding utf-8 + +let g:airline#themes#qwq#palette = {} + +" normalmode +let s:N1 = [ '#0E3B4F' , '#FFEEE5' , 17 , 190 ] +let s:N2 = [ '#0E3B4F' , '#FFD3CB' , 255 , 238 ] +let s:N3 = [ '#ffffff' , '#F7846E' , 85 , 234 ] +let s:N4 = [ '#ffffff' , '#FF5D4F' , 255 , 53 ] +let g:airline#themes#qwq#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#qwq#palette.normal_modified = { 'airline_c': [ s:N4[0], s:N4[1], s:N4[2], s:N4[3], '' ], } + +" insertmode +let s:I1 = [ '#0E3B4F' , '#FFF5D9' , 17 , 45 ] +let s:I2 = [ '#0E3B4F' , '#DDE58E' , 255 , 27 ] +let s:I3 = [ '#ffffff' , '#9ED47B' , 15 , 17 ] +let s:I4 = [ '#ffffff' , '#6BAD3F' , 255 , 53 ] +let s:I5 = [ '#ffffff' , '#6BAD3F' , 17 , 172 ] +let g:airline#themes#qwq#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#qwq#palette.insert_modified = { 'airline_c': [ s:I4[0], s:I4[1], s:I4[2], s:I4[3], '' ], } +let g:airline#themes#qwq#palette.insert_paste = { 'airline_a': [ s:I5[0], s:I5[2], s:I5[2], s:I5[3], '' ], } + +" replacemode +let s:R1 = [ '#0E3B4F' , '#C1F9CD' , 17 , 45 ] +let s:R2 = [ '#0E3B4F' , '#8BEFC7' , 255 , 27 ] +let s:R3 = [ '#ffffff' , '#04BEC3' , 15 , 17 ] +let s:R4 = [ '#ffffff' , '#008492' , 255 , 53 ] +let g:airline#themes#qwq#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#qwq#palette.replace.airline_a = [ s:R1[0], s:R1[1], s:R2[2], 124, ''] +let g:airline#themes#qwq#palette.replace_modified = { 'airline_c': [ s:R4[0], s:R4[1], s:R4[2], s:R4[3], '' ], } + + +" visualmode +let s:V1 = [ '#0E3B4F' , '#FFEEE5' , 232 , 214 ] +let s:V2 = [ '#0E3B4F' , '#FF9DA5' , 232 , 202 ] +let s:V3 = [ '#ffffff' , '#FF5B6F' , 15 , 52 ] +let s:V4 = [ '#ffffff' , '#FF003F' , 255 , 53 ] +let g:airline#themes#qwq#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#qwq#palette.visual_modified = { 'airline_c': [ s:V4[0], s:V4[1], s:V4[2], s:V4[3], '' ], } + +" inactive +let s:IA1 = [ '#0E3B4F' , '#FEFCF9' , 239 , 234 , '' ] +let s:IA2 = [ '#0E3B4F' , '#DDC6AF' , 239 , 235 , '' ] +let s:IA3 = [ '#ffffff' , '#A28E79' , 239 , 236 , '' ] +let g:airline#themes#qwq#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#qwq#palette.inactive_modified = { 'airline_c': [ '#ffffff', '', 97, '', '' ], } + +let g:airline#themes#qwq#palette.accents = { 'red': [ '#ffffff', '', 160, '' ] } + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let s:C1 = [ '#0E3B4F' , '#FEFCF9' , 189 , 55 , '' ] +let s:C2 = [ '#0E3B4F' , '#DDC6AF' , 231 , 98 , '' ] +let s:C3 = [ '#ffffff' , '#B9A695' , 55 , 231 , '' ] +let g:airline#themes#qwq#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:C1, s:C2, s:C3) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/raven.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/raven.vim new file mode 100644 index 0000000..02bfd73 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/raven.vim @@ -0,0 +1,85 @@ +let g:airline#themes#raven#palette = {} + +let g:airline#themes#raven#palette.accents = { + \ 'red': [ '#ff2121' , '' , 196 , '' , '' ], + \ } + +let s:N1 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] +let s:N2 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] +let s:N3 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] +let g:airline#themes#raven#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#raven#palette.normal_modified = { + \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , + \ } + +let s:I1 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] +let s:I2 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] +let s:I3 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] +let g:airline#themes#raven#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#raven#palette.insert_modified = { + \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , + \ } +let g:airline#themes#raven#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#2e2e2e' , s:I1[2] , 235 , '' ] , + \ } + +let g:airline#themes#raven#palette.replace = copy(g:airline#themes#raven#palette.insert) +let g:airline#themes#raven#palette.replace.airline_a = [ '#e60000' , s:I1[1] , 160 , s:I1[3] , '' ] +let g:airline#themes#raven#palette.replace.airline_z = [ '#e60000' , s:I1[1] , 160 , s:I1[3] , '' ] +let g:airline#themes#raven#palette.replace_modified = g:airline#themes#raven#palette.insert_modified + +let s:V1 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] +let s:V2 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] +let s:V3 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] +let g:airline#themes#raven#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#raven#palette.visual_modified = { + \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , + \ } + +let s:IA = [ '#5e5e5e' , '#222222' , 59 , 235 , '' ] +let g:airline#themes#raven#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#raven#palette.inactive_modified = { + \ 'airline_c': [ '#e25000' , '' , 166 , '' , '' ] , + \ } + +let g:airline#themes#raven#palette.tabline = { + \ 'airline_tab': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], + \ 'airline_tabsel': ['#2e2e2e' , '#a4c639' , 235 , 149 , '' ], + \ 'airline_tabtype': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], + \ 'airline_tabfill': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], + \ 'airline_tabmod': ['#2e2e2e' , '#a4c639' , 235 , 149 , '' ], + \ } + +let s:WI = [ '#ff0000', '#2e2e2e', 196, 235 ] +let g:airline#themes#raven#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#raven#palette.normal_modified.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.insert.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.insert_modified.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.visual.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.visual_modified.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.replace.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.replace_modified.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#raven#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ] , + \ [ '#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ] , + \ [ '#2e2e2e' , '#a4c639' , 235 , 149 , '' ] ) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/ravenpower.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/ravenpower.vim new file mode 100644 index 0000000..0f244ca --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/ravenpower.vim @@ -0,0 +1,36 @@ +" Pretty much powerlineish clone, and some +" of the hex colours was borrowed from raven + +" Normal mode " fg & bg +let s:N1 = [ '#005f00' , '#1d1f21' , 7 , 8 ] " darkestgreen & brightgreen +let s:N2 = [ '#9e9e9e' , '#303030' , 247 , 236 ] " gray8 & gray2 +let s:N3 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] " white & gray4 + +" Insert mode " fg & bg +"let s:I1 = [ '#005f5f' , '#ffffff' , 23 , 231 ] " darkestcyan & white +"let s:I2 = [ '#5fafd7' , '#0087af' , 74 , 31 ] " darkcyan & darkblue +let s:I1 = [ '#87d7ff' , '#1d1f21' , 7 , 24 ] " mediumcyan & darkestblue + +" Visual mode " fg & bg +let s:V1 = [ '#080808' , '#ffaf00' , 232 , 214 ] " gray3 & brightestorange + +" Replace mode " fg & bg +let s:RE = [ '#ffffff' , '#d70000' , 231 , 160 ] " white & brightred + +let g:airline#themes#ravenpower#palette = {} + +let g:airline#themes#ravenpower#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#ravenpower#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:N3) +let g:airline#themes#ravenpower#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#ravenpower#palette.visual = { + \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } + +let g:airline#themes#ravenpower#palette.replace = copy(airline#themes#ravenpower#palette.normal) +let g:airline#themes#ravenpower#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + + +let s:IA = [ s:N2[1] , s:N3[1] , s:N2[3] , s:N3[3] , '' ] +let g:airline#themes#ravenpower#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/serene.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/serene.vim new file mode 100644 index 0000000..9191c07 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/serene.vim @@ -0,0 +1,41 @@ +let g:airline#themes#serene#palette = {} + +let s:guibg = '#080808' +let s:termbg = 232 +let s:termsep = 236 +let s:guisep = '#303030' + +let s:N1 = [ '#00dfff' , s:guibg , 45 , s:termbg ] +let s:N2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] +let s:N3 = [ '#767676' , s:guibg , 7 , s:termbg ] + +let g:airline#themes#serene#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#serene#palette.normal_modified = { + \ 'airline_c': [ '#df0000' , s:guibg, 160 , s:termbg , '' ] , + \ } + +let s:I1 = [ '#5fff00' , s:guibg , 82 , s:termbg ] +let s:I2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] +let s:I3 = [ '#767676' , s:guibg , 7 , s:termbg ] +let g:airline#themes#serene#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#serene#palette.insert_modified = copy(g:airline#themes#serene#palette.normal_modified) +let g:airline#themes#serene#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + +let g:airline#themes#serene#palette.replace = { + \ 'airline_a': [ s:I1[0] , '#af0000' , s:I1[2] , 124 , '' ] , + \ } +let g:airline#themes#serene#palette.replace_modified = copy(g:airline#themes#serene#palette.normal_modified) + +let s:V1 = [ '#dfdf00' , s:guibg , 184 , s:termbg ] +let s:V2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] +let s:V3 = [ '#767676' , s:guibg , 7 , s:termbg ] +let g:airline#themes#serene#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#serene#palette.visual_modified = copy(g:airline#themes#serene#palette.normal_modified) + +let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] +let s:IA2 = [ '#4e4e4e' , s:guisep , 239 , s:termsep , '' ] +let g:airline#themes#serene#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA2, s:IA2) +let g:airline#themes#serene#palette.inactive_modified = copy(g:airline#themes#serene#palette.normal_modified) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/sierra.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/sierra.vim new file mode 100644 index 0000000..d736459 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/sierra.vim @@ -0,0 +1,94 @@ +" File: sierra.vim +" Author: Danilo Augusto +" Date: 2017-02-26 +" License: MIT + +let s:gui00 = "#303030" " ANSI Black +let s:gui01 = "#af5f5f" " ANSI Red +let s:gui02 = "#d75f5f" " ANSI Green +let s:gui03 = "#afd7d7" " ANSI Yellow +let s:gui04 = "#af8787" " ANSI Blue +let s:gui05 = "#dfaf87" " ANSI Magenta +let s:gui06 = "#ffafaf" " ANSI Cyan +let s:gui07 = "#f7e4c0" " ANSI White +let s:gui08 = "#686868" +let s:gui09 = "#af5f5f" +let s:gui0A = "#d75f5f" +let s:gui0B = "#afd7d7" +let s:gui0C = "#af8787" +let s:gui0D = "#dfaf87" +let s:gui0E = "#ffb2af" +let s:gui0F = "#ffffff" + +let s:cterm00 = "236" +let s:cterm01 = "131" +let s:cterm02 = "167" +let s:cterm03 = "152" +let s:cterm04 = "138" +let s:cterm05 = "180" +let s:cterm06 = "217" +let s:cterm07 = "222" +let s:cterm08 = "242" +let s:cterm09 = "131" +let s:cterm0A = "167" +let s:cterm0B = "152" +let s:cterm0C = "138" +let s:cterm0D = "180" +let s:cterm0E = "217" +let s:cterm0F = "231" + +let s:guiWhite = "#ffffff" +let s:guiGray = "#666666" +let s:guiDarkGray = "#545454" +let s:guiAlmostBlack = "#2a2a2a" +let s:ctermWhite = "231" +let s:ctermGray = "243" +let s:ctermDarkGray = "240" +let s:ctermAlmostBlack = "235" + +let g:airline#themes#sierra#palette = {} +let s:modified = { 'airline_c': [s:gui07, '', s:cterm07, '', ''] } + +" Normal mode +let s:N1 = [s:guiWhite, s:gui0D, s:ctermWhite, s:cterm0D] +let s:N2 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let s:N3 = [s:gui02, s:guiDarkGray, s:cterm02, s:ctermDarkGray] +let g:airline#themes#sierra#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#sierra#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [s:guiWhite, s:gui0B, s:ctermWhite, s:cterm0B] +let s:I2 = s:N2 +let s:I3 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let g:airline#themes#sierra#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#sierra#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [s:guiWhite, s:gui08, s:ctermWhite, s:cterm08] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#sierra#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#sierra#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [s:gui08, s:gui00, s:cterm08, s:cterm00] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#sierra#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#sierra#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [s:guiGray, s:gui01, s:ctermGray, s:cterm01] +let s:IN2 = [s:gui02, s:guiAlmostBlack, s:cterm02, s:ctermAlmostBlack] +let s:IN3 = [s:gui02, s:guiAlmostBlack, s:cterm02, s:ctermAlmostBlack] +let g:airline#themes#sierra#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#sierra#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let s:CP2 = [s:guiWhite, s:gui03, s:ctermWhite, s:cterm01] +let s:CP3 = [s:guiWhite, s:gui0D, s:ctermWhite, s:cterm0D] diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/silver.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/silver.vim new file mode 100644 index 0000000..fd85edb --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/silver.vim @@ -0,0 +1,85 @@ +let g:airline#themes#silver#palette = {} + +let g:airline#themes#silver#palette.accents = { + \ 'red': [ '#ff2121' , '' , 196 , '' , '' ], + \ } + +let s:N1 = [ '#414141' , '#e1e1e1' , 59 , 188 ] +let s:N2 = [ '#414141' , '#e1e1e1' , 59 , 188 ] +let s:N3 = [ '#414141' , '#e1e1e1' , 59 , 188 ] +let g:airline#themes#silver#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#silver#palette.normal_modified = { + \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , + \ } + +let s:I1 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] +let s:I2 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] +let s:I3 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] +let g:airline#themes#silver#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#silver#palette.insert_modified = { + \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , + \ } +let g:airline#themes#silver#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#e1e1e1' , s:I1[2] , 188 , '' ] , + \ } + +let g:airline#themes#silver#palette.replace = copy(g:airline#themes#silver#palette.insert) +let g:airline#themes#silver#palette.replace.airline_a = [ '#b30000' , s:I1[1] , 124 , s:I1[3] , '' ] +let g:airline#themes#silver#palette.replace.airline_z = [ '#b30000' , s:I1[1] , 124 , s:I1[3] , '' ] +let g:airline#themes#silver#palette.replace_modified = g:airline#themes#silver#palette.insert_modified + +let s:V1 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] +let s:V2 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] +let s:V3 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] +let g:airline#themes#silver#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#silver#palette.visual_modified = { + \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , + \ } + +let s:IA = [ '#a1a1a1' , '#dddddd' , 145 , 188 , '' ] +let g:airline#themes#silver#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#silver#palette.inactive_modified = { + \ 'airline_c': [ '#e25000' , '' , 166 , '' , '' ] , + \ } + +let g:airline#themes#silver#palette.tabline = { + \ 'airline_tab': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], + \ 'airline_tabsel': ['#e1e1e1' , '#007599' , 188 , 30 , '' ], + \ 'airline_tabtype': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], + \ 'airline_tabfill': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], + \ 'airline_tabmod': ['#e1e1e1' , '#007599' , 188 , 30 , '' ], + \ } + +let s:WI = [ '#ff0000', '#e1e1e1', 196, 188 ] +let g:airline#themes#silver#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#silver#palette.normal_modified.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.insert.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.insert_modified.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.visual.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.visual_modified.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.replace.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.replace_modified.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#silver#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#414141' , '#e1e1e1' , 59 , 188 , '' ] , + \ [ '#414141' , '#e1e1e1' , 59 , 188 , '' ] , + \ [ '#e1e1e1' , '#007599' , 188 , 30 , '' ] ) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/simple.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/simple.vim new file mode 100644 index 0000000..a111a1c --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/simple.vim @@ -0,0 +1,46 @@ +let g:airline#themes#simple#palette = {} + +let s:guibg = '#080808' +let s:guibg2 = '#1c1c1c' +let s:termbg = 232 +let s:termbg2= 234 + +let s:N1 = [ s:guibg , '#00dfff' , s:termbg , 45 ] +let s:N2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] +let s:N3 = [ '#767676' , s:guibg, 243 , s:termbg] +let g:airline#themes#simple#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#simple#palette.normal_modified = { + \ 'airline_c': [ '#df0000' , s:guibg, 160 , s:termbg , '' ] , + \ } + + +let s:I1 = [ s:guibg, '#5fff00' , s:termbg , 82 ] +let s:I2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] +let s:I3 = [ '#767676' , s:guibg, 243 , s:termbg ] +let g:airline#themes#simple#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#simple#palette.insert_modified = copy(g:airline#themes#simple#palette.normal_modified) +let g:airline#themes#simple#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#simple#palette.replace = { + \ 'airline_a': [ s:I1[0] , '#af0000' , s:I1[2] , 124 , '' ] , + \ } +let g:airline#themes#simple#palette.replace_modified = copy(g:airline#themes#simple#palette.normal_modified) + + +let s:V1 = [ s:guibg, '#dfdf00' , s:termbg , 184 ] +let s:V2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] +let s:V3 = [ '#767676' , s:guibg, 243 , s:termbg ] +let g:airline#themes#simple#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#simple#palette.visual_modified = copy(g:airline#themes#simple#palette.normal_modified) + + +let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] +let s:IA2 = [ '#4e4e4e' , s:guibg2 , 239 , s:termbg2 , '' ] +let g:airline#themes#simple#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA2, s:IA2) +let g:airline#themes#simple#palette.inactive_modified = { + \ 'airline_c': [ '#df0000', '', 160, '', '' ] , + \ } + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/soda.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/soda.vim new file mode 100644 index 0000000..582adc5 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/soda.vim @@ -0,0 +1,33 @@ +let g:airline#themes#soda#palette = {} + +let g:airline#themes#soda#palette.normal = airline#themes#generate_color_map( + \['#ffffff', '#875faf', 255, 97], + \['#ffffff', '#875f87', 255, 91], + \['#ffffff', '#5f0087', 255, 54]) + +let g:airline#themes#soda#palette.insert = airline#themes#generate_color_map( + \['#ffffff', '#005f00', 255, 22], + \['#ffffff', '#008700', 255, 28], + \['#ffffff', '#00af00', 255, 34]) + +let g:airline#themes#soda#palette.replace = {'airline_a': ['#767676', '#ffff5f', 243, 227]} + +let g:airline#themes#soda#palette.visual = airline#themes#generate_color_map( + \['#767676', '#ffff5f', 243, 227], + \['#767676', '#ffd75f', 243, 221], + \['#767676', '#ffaf5f', 243, 215]) + +let g:airline#themes#soda#palette.inactive = airline#themes#generate_color_map( + \['#767676', '#ffffff', 243, 255], + \['#767676', '#ffffff', 243, 255], + \['#767676', '#ffffff', 243, 255]) + +let g:airline#themes#soda#palette.inactive_modified = {'airline_c': ['#ffffff', '#df0000', 255, 160]} + +let g:airline#themes#soda#palette.tabline = { + \'airline_tab': ['#ffffff', '#5f0087', 255, 54], + \'airline_tabsel': ['#ffffff', '#875faf', 255, 97], + \'airline_tabtype': ['#ffffff', '#00af00', 255, 34], + \'airline_tabfill': ['#767676', '#ffffff', 243, 255], + \'airline_tabmod': ['#ffffff', '#767676', 255, 243]} + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/sol.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/sol.vim new file mode 100644 index 0000000..89ea505 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/sol.vim @@ -0,0 +1,90 @@ +" vim-airline companion theme of Sol +" (https://github.com/Pychimp/vim-sol) + +let g:airline#themes#sol#palette = {} + +let g:airline#themes#sol#palette.accents = { + \ 'red': [ '#ffffff' , '' , 231 , '' , '' ], + \ } + +let s:N1 = [ '#343434' , '#a0a0a0' , 237 , 248 ] +let s:N2 = [ '#343434' , '#b3b3b3' , 237 , 250 ] +let s:N3 = [ '#343434' , '#c7c7c7' , 237 , 252 ] +let g:airline#themes#sol#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#sol#palette.normal_modified = { + \ 'airline_c': [ '#ffffff' , '#ff6868' , 237 , 209 , '' ] , + \ } + + +let s:I1 = [ '#eeeeee' , '#09643f' , 255 , 30 ] +let s:I2 = [ '#343434' , '#a3a3a3' , 237 , 249 ] +let s:I3 = [ '#343434' , '#b0b0b0' , 237 , 250 ] +let g:airline#themes#sol#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#sol#palette.insert_modified = { + \ 'airline_c': [ '#343434' , '#ffdbc7' , 237 , 216 , '' ] , + \ } +let g:airline#themes#sol#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#09643f' , s:I1[2] , 30 , '' ] , + \ } + + +let g:airline#themes#sol#palette.replace = copy(g:airline#themes#sol#palette.insert) +let g:airline#themes#sol#palette.replace.airline_a = [ s:I1[0] , '#ff2121' , s:I1[2] , 196 , '' ] +let g:airline#themes#sol#palette.replace.airline_z = [ s:I1[0] , '#ff2121' , s:I1[2] , 196 , '' ] +let g:airline#themes#sol#palette.replace_modified = g:airline#themes#sol#palette.insert_modified + +let s:V1 = [ '#ffff9a' , '#ff6003' , 222 , 202 ] +let s:V2 = [ '#343434' , '#a3a3a3' , 237 , 249 ] +let s:V3 = [ '#343434' , '#b0b0b0' , 237 , 250 ] +let g:airline#themes#sol#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#sol#palette.visual_modified = { + \ 'airline_c': [ '#343434' , '#ffdbc7' , 237 , 216 , '' ] , + \ } + +let s:IA = [ '#777777' , '#c7c7c7' , 244 , 251 , '' ] +let g:airline#themes#sol#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#sol#palette.inactive_modified = { + \ 'airline_c': [ '#ff3535' , '' , 203 , '' , '' ] , + \ } + +let g:airline#themes#sol#palette.tabline = { + \ 'airline_tab': ['#343434', '#b3b3b3', 237, 250, ''], + \ 'airline_tabsel': ['#ffffff', '#004b9a', 231, 31 , ''], + \ 'airline_tabtype': ['#343434', '#a0a0a0', 237, 248, ''], + \ 'airline_tabfill': ['#343434', '#c7c7c7', 237, 251, ''], + \ 'airline_tabmod': ['#343434', '#ffdbc7', 237, 216, ''], + \ } + +let s:WI = [ '#eeeeee', '#e33900', 255, 166 ] +let g:airline#themes#sol#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#sol#palette.normal_modified.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.insert.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.insert_modified.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.visual.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.visual_modified.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.replace.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.replace_modified.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#sol#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#343434' , '#c7c7c7' , 237 , 251 , '' ] , + \ [ '#343434' , '#b3b3b3' , 237 , 250 , '' ] , + \ [ '#eeeeee' , '#007fff' , 255 , 27 , '' ] ) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/solarized.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/solarized.vim new file mode 100644 index 0000000..b88e1a4 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/solarized.vim @@ -0,0 +1,207 @@ +let g:airline#themes#solarized#palette = {} + +function! airline#themes#solarized#refresh() + """""""""""""""""""""""""""""""""""""""""""""""" + " Options + """""""""""""""""""""""""""""""""""""""""""""""" + let s:background = get(g:, 'airline_solarized_bg', &background) + let s:ansi_colors = get(g:, 'solarized_termcolors', 16) != 256 && &t_Co >= 16 ? 1 : 0 + let s:use_green = get(g:, 'airline_solarized_normal_green', 0) + let s:dark_inactive_border = get(g:, 'airline_solarized_dark_inactive_border', 0) + let s:tty = &t_Co == 8 + + """""""""""""""""""""""""""""""""""""""""""""""" + " Colors + """""""""""""""""""""""""""""""""""""""""""""""" + " Base colors + " Extended base16 support by @cuviper. + " Via https://github.com/blueyed/vim-colors-solarized/commit/92f2f994 / + " https://github.com/cuviper/vim-colors-solarized. + if s:ansi_colors && get(g:, 'solarized_base16', 0) + let s:base03 = {'t': 0, 'g': "#002b36"} " Base 00 + let s:base02 = {'t': 18, 'g': "#073642"} " Base 01 + let s:base01 = {'t': 19, 'g': "#586e75"} " Base 02 + let s:base00 = {'t': 8, 'g': "#657b83"} " Base 03 + let s:base0 = {'t': 20, 'g': "#839496"} " Base 04 + let s:base1 = {'t': 7, 'g': "#93a1a1"} " Base 05 + let s:base2 = {'t': 21, 'g': "#eee8d5"} " Base 06 + let s:base3 = {'t': 15, 'g': "#fdf6e3"} " Base 07 + let s:yellow = {'t': 3, 'g': "#dc322f"} " Base 0A + let s:orange = {'t': 16, 'g': "#cb4b16"} " Base 09 + let s:red = {'t': 1, 'g': "#b58900"} " Base 08 + let s:magenta = {'t': 17, 'g': "#859900"} " Base 0F + let s:violet = {'t': 5, 'g': "#2aa198"} " Base 0E + let s:blue = {'t': 4, 'g': "#268bd2"} " Base 0D + let s:cyan = {'t': 6, 'g': "#6c71c4"} " Base 0C + let s:green = {'t': 2, 'g': "#d33682"} " Base 0B + else + let s:base03 = {'t': s:ansi_colors ? 8 : (s:tty ? '0' : 234), 'g': '#002b36'} + let s:base02 = {'t': s:ansi_colors ? '0' : (s:tty ? '0' : 235), 'g': '#073642'} + let s:base01 = {'t': s:ansi_colors ? 10 : (s:tty ? '0' : 240), 'g': '#586e75'} + let s:base00 = {'t': s:ansi_colors ? 11 : (s:tty ? '7' : 241), 'g': '#657b83'} + let s:base0 = {'t': s:ansi_colors ? 12 : (s:tty ? '7' : 244), 'g': '#839496'} + let s:base1 = {'t': s:ansi_colors ? 14 : (s:tty ? '7' : 245), 'g': '#93a1a1'} + let s:base2 = {'t': s:ansi_colors ? 7 : (s:tty ? '7' : 254), 'g': '#eee8d5'} + let s:base3 = {'t': s:ansi_colors ? 15 : (s:tty ? '7' : 230), 'g': '#fdf6e3'} + let s:yellow = {'t': s:ansi_colors ? 3 : (s:tty ? '3' : 136), 'g': '#b58900'} + let s:orange = {'t': s:ansi_colors ? 9 : (s:tty ? '1' : 166), 'g': '#cb4b16'} + let s:red = {'t': s:ansi_colors ? 1 : (s:tty ? '1' : 160), 'g': '#dc322f'} + let s:magenta = {'t': s:ansi_colors ? 5 : (s:tty ? '5' : 125), 'g': '#d33682'} + let s:violet = {'t': s:ansi_colors ? 13 : (s:tty ? '5' : 61 ), 'g': '#6c71c4'} + let s:blue = {'t': s:ansi_colors ? 4 : (s:tty ? '4' : 33 ), 'g': '#268bd2'} + let s:cyan = {'t': s:ansi_colors ? 6 : (s:tty ? '6' : 37 ), 'g': '#2aa198'} + let s:green = {'t': s:ansi_colors ? 2 : (s:tty ? '2' : 64 ), 'g': '#859900'} + endif + + """""""""""""""""""""""""""""""""""""""""""""""" + " Simple mappings + " NOTE: These are easily tweakable mappings. The actual mappings get + " the specific gui and terminal colors from the base color dicts. + """""""""""""""""""""""""""""""""""""""""""""""" + " Normal mode + if s:background == 'dark' + let s:N1 = [s:base3, (s:use_green ? s:green : s:base1), 'bold'] + let s:N2 = [s:base2, (s:tty ? s:base01 : s:base00), ''] + let s:N3 = [s:base01, s:base02, ''] + else + let s:N1 = [s:base2, (s:use_green ? s:green : s:base00), 'bold'] + let s:N2 = [(s:tty ? s:base01 : s:base2), s:base1, ''] + let s:N3 = [s:base1, s:base2, ''] + endif + let s:NF = [s:orange, s:N3[1], ''] + let s:NW = [s:base3, s:orange, ''] + if s:background == 'dark' + let s:NM = [s:base1, s:N3[1], ''] + let s:NMi = [s:base2, s:N3[1], ''] + else + let s:NM = [s:base01, s:N3[1], ''] + let s:NMi = [s:base02, s:N3[1], ''] + endif + + " Insert mode + let s:I1 = [s:N1[0], s:yellow, 'bold'] + let s:I2 = s:N2 + let s:I3 = s:N3 + let s:IF = s:NF + let s:IM = s:NM + + " Visual mode + let s:V1 = [s:N1[0], s:magenta, 'bold'] + let s:V2 = s:N2 + let s:V3 = s:N3 + let s:VF = s:NF + let s:VM = s:NM + + " Replace mode + let s:R1 = [s:N1[0], s:red, ''] + let s:R2 = s:N2 + let s:R3 = s:N3 + let s:RM = s:NM + let s:RF = s:NF + + " Inactive, according to VertSplit in solarized + " (bg dark: base00; bg light: base0) + if s:background == 'dark' + if s:dark_inactive_border + let s:IA = [s:base01, s:base02, ''] + else + let s:IA = [s:base02, s:base00, ''] + endif + else + let s:IA = [s:base2, s:base0, ''] + endif + + """""""""""""""""""""""""""""""""""""""""""""""" + " Actual mappings + " WARNING: Don't modify this section unless necessary. + """""""""""""""""""""""""""""""""""""""""""""""" + let s:NFa = [s:NF[0].g, s:NF[1].g, s:NF[0].t, s:NF[1].t, s:NF[2]] + let s:IFa = [s:IF[0].g, s:IF[1].g, s:IF[0].t, s:IF[1].t, s:IF[2]] + let s:VFa = [s:VF[0].g, s:VF[1].g, s:VF[0].t, s:VF[1].t, s:VF[2]] + let s:RFa = [s:RF[0].g, s:RF[1].g, s:RF[0].t, s:RF[1].t, s:RF[2]] + + let g:airline#themes#solarized#palette.accents = { + \ 'red': s:NFa, + \ } + + let g:airline#themes#solarized#palette.inactive = airline#themes#generate_color_map( + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]]) + let g:airline#themes#solarized#palette.inactive_modified = { + \ 'airline_c': [s:NMi[0].g, '', s:NMi[0].t, '', s:NMi[2]]} + + let g:airline#themes#solarized#palette.normal = airline#themes#generate_color_map( + \ [s:N1[0].g, s:N1[1].g, s:N1[0].t, s:N1[1].t, s:N1[2]], + \ [s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]], + \ [s:N3[0].g, s:N3[1].g, s:N3[0].t, s:N3[1].t, s:N3[2]]) + + let g:airline#themes#solarized#palette.normal.airline_warning = [ + \ s:NW[0].g, s:NW[1].g, s:NW[0].t, s:NW[1].t, s:NW[2]] + + let g:airline#themes#solarized#palette.normal.airline_error = [ + \ s:NW[0].g, s:NW[1].g, s:NW[0].t, s:NW[1].t, s:NW[2]] + + let g:airline#themes#solarized#palette.normal_modified = { + \ 'airline_c': [s:NM[0].g, s:NM[1].g, + \ s:NM[0].t, s:NM[1].t, s:NM[2]]} + + let g:airline#themes#solarized#palette.normal_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.insert = airline#themes#generate_color_map( + \ [s:I1[0].g, s:I1[1].g, s:I1[0].t, s:I1[1].t, s:I1[2]], + \ [s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]], + \ [s:I3[0].g, s:I3[1].g, s:I3[0].t, s:I3[1].t, s:I3[2]]) + + let g:airline#themes#solarized#palette.insert.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.insert_modified = { + \ 'airline_c': [s:IM[0].g, s:IM[1].g, + \ s:IM[0].t, s:IM[1].t, s:IM[2]]} + + let g:airline#themes#solarized#palette.insert_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.visual = airline#themes#generate_color_map( + \ [s:V1[0].g, s:V1[1].g, s:V1[0].t, s:V1[1].t, s:V1[2]], + \ [s:V2[0].g, s:V2[1].g, s:V2[0].t, s:V2[1].t, s:V2[2]], + \ [s:V3[0].g, s:V3[1].g, s:V3[0].t, s:V3[1].t, s:V3[2]]) + + let g:airline#themes#solarized#palette.visual.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.visual_modified = { + \ 'airline_c': [s:VM[0].g, s:VM[1].g, + \ s:VM[0].t, s:VM[1].t, s:VM[2]]} + + let g:airline#themes#solarized#palette.visual_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.replace = airline#themes#generate_color_map( + \ [s:R1[0].g, s:R1[1].g, s:R1[0].t, s:R1[1].t, s:R1[2]], + \ [s:R2[0].g, s:R2[1].g, s:R2[0].t, s:R2[1].t, s:R2[2]], + \ [s:R3[0].g, s:R3[1].g, s:R3[0].t, s:R3[1].t, s:R3[2]]) + + let g:airline#themes#solarized#palette.replace.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.replace_modified = { + \ 'airline_c': [s:RM[0].g, s:RM[1].g, + \ s:RM[0].t, s:RM[1].t, s:RM[2]]} + + let g:airline#themes#solarized#palette.replace_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.tabline = {} + + let g:airline#themes#solarized#palette.tabline.airline_tab = [ + \ s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]] + + let g:airline#themes#solarized#palette.tabline.airline_tabtype = [ + \ s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]] +endfunction + +call airline#themes#solarized#refresh() + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/term.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/term.vim new file mode 100644 index 0000000..288ca6a --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/term.vim @@ -0,0 +1,92 @@ + +" vim-airline 'term' theme +" it is using current terminal colorscheme +" and in gvim i left colors from 'wombat' theme but i am not using it anyway + +" Normal mode +" [ guifg, guibg, ctermfg, ctermbg, opts ] +let s:N1 = [ '#141413' , '#CAE682' , 232 , 2 ] " mode +let s:N2 = [ '#CAE682' , '#32322F' , 2 , 'black' ] " info +let s:N3 = [ '#CAE682' , '#242424' , 2 , 233 ] " statusline +let s:N4 = [ '#86CD74' , 10 ] " mode modified + +" Insert mode +let s:I1 = [ '#141413' , '#FDE76E' , 232 , 3 ] +let s:I2 = [ '#FDE76E' , '#32322F' , 3 , 'black' ] +let s:I3 = [ '#FDE76E' , '#242424' , 3 , 233 ] +let s:I4 = [ '#FADE3E' , 11 ] + +" Visual mode +let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 4 ] +let s:V2 = [ '#B5D3F3' , '#32322F' , 4 , 'black' ] +let s:V3 = [ '#B5D3F3' , '#242424' , 4 , 233 ] +let s:V4 = [ '#7CB0E6' , 12 ] + +" Replace mode +let s:R1 = [ '#141413' , '#E5786D' , 232 , 1 ] +let s:R2 = [ '#E5786D' , '#32322F' , 1 , 'black' ] +let s:R3 = [ '#E5786D' , '#242424' , 1 , 233 ] +let s:R4 = [ '#E55345' , 9 ] + +" Paste mode +let s:PA = [ '#94E42C' , 6 ] + +" Info modified +let s:IM = [ '#40403C' , 238 ] + +" Inactive mode +let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] + +let g:airline#themes#term#palette = {} + +let g:airline#themes#term#palette.accents = { + \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], + \ } + +let g:airline#themes#term#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#term#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#term#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#term#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#term#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#term#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#term#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#DADADA' , '#242424' , 253 , 234 , '' ] , + \ [ '#DADADA' , '#40403C' , 253 , 238 , '' ] , + \ [ '#141413' , '#DADADA' , 232 , 253 , 'bold' ] ) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/tomorrow.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/tomorrow.vim new file mode 100644 index 0000000..f382fc1 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/tomorrow.vim @@ -0,0 +1,44 @@ +let g:airline#themes#tomorrow#palette = {} + +function! airline#themes#tomorrow#refresh() + let g:airline#themes#tomorrow#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + + let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Directory', 'fg'], 'bold') + let s:N2 = airline#themes#get_highlight('Pmenu') + let s:N3 = airline#themes#get_highlight('CursorLine') + let g:airline#themes#tomorrow#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let group = airline#themes#get_highlight('vimCommand') + let g:airline#themes#tomorrow#palette.normal_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + + let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['MoreMsg', 'fg'], 'bold') + let s:I2 = airline#themes#get_highlight2(['MoreMsg', 'fg'], ['Normal', 'bg']) + let s:I3 = s:N3 + let g:airline#themes#tomorrow#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#tomorrow#palette.insert_modified = g:airline#themes#tomorrow#palette.normal_modified + + let s:R1 = airline#themes#get_highlight('Error', 'bold') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#tomorrow#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#tomorrow#palette.replace_modified = g:airline#themes#tomorrow#palette.normal_modified + + let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Constant', 'fg'], 'bold') + let s:V2 = airline#themes#get_highlight2(['Constant', 'fg'], ['Normal', 'bg']) + let s:V3 = s:N3 + let g:airline#themes#tomorrow#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#tomorrow#palette.visual_modified = g:airline#themes#tomorrow#palette.normal_modified + + let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['CursorLine', 'bg']) + let g:airline#themes#tomorrow#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#tomorrow#palette.inactive_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } +endfunction + +call airline#themes#tomorrow#refresh() + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/ubaryd.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/ubaryd.vim new file mode 100644 index 0000000..70232ef --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/ubaryd.vim @@ -0,0 +1,64 @@ +" vim-airline companion theme of Ubaryd +" (https://github.com/Donearm/Ubaryd) + +" Normal mode +let s:N1 = [ '#141413' , '#c7b386' , 232 , 252 ] " blackestgravel & bleaksand +let s:N2 = [ '#c7b386' , '#45413b' , 252, 238 ] " bleaksand & deepgravel +let s:N3 = [ '#b88853' , '#242321' , 137, 235 ] " toffee & darkgravel +let s:N4 = [ '#857f78' , 243 ] " gravel + +" Insert mode +let s:I1 = [ '#1a1a18' , '#fade3e' , 232 , 221 ] " blackestgravel & warmcorn +let s:I2 = [ '#c7b386' , '#45413b' , 252 , 238 ] " bleaksand & deepgravel +let s:I3 = [ '#f4cf86' , '#242321' , 222 , 235 ] " lighttannedskin & darkgravel + +" Visual mode +let s:V1 = [ '#1c1b1a' , '#9a4820' , 233 , 88 ] " blackgravel & warmadobe +let s:V2 = [ '#000000' , '#88633f' , 16 , 95 ] " coal & cappuccino +let s:V3 = [ '#88633f' , '#c7b386' , 95 , 252 ] " cappuccino & bleaksand +let s:V4 = [ '#c14c3d' , 160 ] " tannedumbrella + +" Replace mode +let s:RE = [ '#c7915b' , 173 ] " nut + +" Paste mode +let s:PA = [ '#f9ef6d' , 154 ] " bleaklemon + +let s:IA = [ s:N2[1], s:N3[1], s:N2[3], s:N3[3], '' ] + +let g:airline#themes#ubaryd#palette = {} + +let g:airline#themes#ubaryd#palette.accents = { + \ 'red': [ '#ff7400' , '' , 196 , '' , '' ], + \ } + +let g:airline#themes#ubaryd#palette.inactive = { + \ 'airline_a' : [ s:N2[1] , s:N3[1] , s:N2[3] , s:N3[3] , '' ] } + + +let g:airline#themes#ubaryd#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#ubaryd#palette.normal_modified = { + \ 'airline_a' : [ s:N2[0] , s:N4[0] , s:N2[2] , s:N4[1] , '' ] , + \ 'airline_c' : [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } + + +let g:airline#themes#ubaryd#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#ubaryd#palette.insert_modified = { + \ 'airline_c' : [ s:V2[1] , s:N2[1] , s:V2[3] , s:N2[3] , '' ] } +let g:airline#themes#ubaryd#palette.insert_paste = { + \ 'airline_a' : [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] } + + +let g:airline#themes#ubaryd#palette.replace = copy(airline#themes#ubaryd#palette.insert) +let g:airline#themes#ubaryd#palette.replace.airline_a = [ s:I1[0] , s:RE[0] , s:I1[2] , s:RE[1] , '' ] +let g:airline#themes#ubaryd#palette.replace_modified = g:airline#themes#ubaryd#palette.insert_modified + + +let g:airline#themes#ubaryd#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#ubaryd#palette.visual_modified = { + \ 'airline_c' : [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } + +let g:airline#themes#ubaryd#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#ubaryd#palette.inactive_modified = { + \ 'airline_c' : [ s:V1[1] , '' , s:V1[3] , '' , '' ] } + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/understated.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/understated.vim new file mode 100644 index 0000000..b3e7917 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/understated.vim @@ -0,0 +1,43 @@ +let g:airline#themes#understated#palette = {} + +let s:N1 = ['#FFFFFF', '#5F87FF', 15, 69] " Outside blocks in normal mode (mode and file position) +let s:N2 = ['#AFAF87', '#5F5F5F', 144, 59] " Next blocks inside (branch and file format) +let s:N3 = ['#AFAF87', '#5F5F5F', 144, 59] " The middle block + +let g:airline#themes#understated#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#understated#palette.normal_modified = {'airline_c': ['#ffffff', '#5f005f', 144, 59, 'bold'] ,} + +let s:I1 = ['#FFFFFF', '#87AF5F', 15, 107] " Outside blocks in normal mode (mode and file position) +let s:I2 = ['#AFAF87', '#5F5F5F', 144, 59] " Next blocks inside (branch and file format) +let s:I3 = ['#AFAF87', '#5F5F5F', 144, 59] " The middle block +let g:airline#themes#understated#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#understated#palette.insert_modified = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, 'bold'] ,} +let g:airline#themes#understated#palette.insert_paste = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, ''] ,} + +let g:airline#themes#understated#palette.replace = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#understated#palette.replace.airline_a = ['#FFFFFF', '#870000', 15, 88, ''] +let g:airline#themes#understated#palette.replace_modified = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, 'bold'] ,} + +let s:V1 = ['#FFFFFF', '#AF5F00', 15, 130] +let s:V2 = ['#AFAF87', '#5F5F5F', 144, 59] +let s:V3 = ['#AFAF87', '#5F5F5F', 144, 59] +let g:airline#themes#understated#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#understated#palette.visual_modified = {'airline_c': [ '#AFAF87', '#5f005f', 144, 59, 'bold'] ,} + +let s:V1 = ['#080808', '#FFAF00', 232, 214] +let s:IA1 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] +let s:IA2 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] +let s:IA3 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] +let g:airline#themes#understated#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#understated#palette.inactive_modified = {'airline_c': ['#4E4E4E', '', 239, '', 'bold'] ,} + +let g:airline#themes#understated#palette.accents = {'red': ['#FF0000', '', 88, '']} + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#understated#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ ['#FFFFFF', '#1C1C1C', 15, 234, '' ], + \ ['#FFFFFF', '#262626', 15, 235, '' ], + \ ['#FFFFFF', '#303030', 15, 236, 'bold']) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/vice.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/vice.vim new file mode 100644 index 0000000..7f88f6d --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/vice.vim @@ -0,0 +1,72 @@ +" Color definitions +let s:white = [231, "#ffffff"] +let s:grey0 = [102, "#878787"] "lightest grey +let s:grey1 = [238, "#444444"] "mid grey +let s:grey2 = [235, "#303030"] "darkest grey + +let s:pink = [212, "#ff87d7"] +let s:light_pink = [218, "#ffafdf"] +let s:hot_pink = [201, "#ff00ff" ] + +let s:red = [197, "#ff005f" ] + +let s:teal = [123, "#87ffff"] +let s:light_blue = [159, "#afffff"] + +let s:light_yellow = [229, "#ffffaf"] + +let s:mint = [158, "#afffd7"] +let s:dark_mint = [49, "#87af87"] + +let s:lavender = [183, "#dfafff"] +let s:gray_purple = [146, "#afafd7"] +let s:dark_lavender = [97, "#875faf"] + +let s:modified = { 'airline_c': [s:dark_mint[1], s:grey2[1], s:dark_mint[0], s:grey2[0] ] } + +let g:airline#themes#vice#palette = {} +" Normal mode +let s:N1 = [s:grey1[1], s:teal[1], s:grey1[0], s:teal[0] ] +let s:N2 = [s:white[1], s:grey2[1], s:white[0], s:grey2[0] ] +let s:N3 = [s:mint[1], s:grey2[1], s:mint[0], s:grey2[0] ] +let g:airline#themes#vice#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#vice#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [s:grey1[1], s:mint[1], s:grey1[0], s:mint[0] ] +let s:I2 = s:N2 +let s:I3 = s:N3 +let g:airline#themes#vice#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#vice#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [s:grey1[1], s:pink[1], s:grey1[0], s:pink[0] ] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#vice#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#vice#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [s:hot_pink[1], s:grey2[1], s:hot_pink[0], s:grey2[0] ] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#vice#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#vice#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [s:grey0[1], s:grey1[1], s:grey0[0], s:grey1[0] ] +let s:IN2 = [s:grey0[1], s:grey1[1], s:grey0[0], s:grey1[0] ] +let s:IN3 = [s:grey0[1], s:grey1[1], s:grey0[0], s:grey1[0] ] +let g:airline#themes#vice#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#vice#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [s:white[1], s:grey1[1], s:white[0], s:grey1[0] ] +let s:CP2 = [s:white[1], s:grey1[1], s:white[0], s:grey1[0] ] +let s:CP3 = [s:white[1], s:grey1[1], s:white[0], s:grey1[0] ] + +let g:airline#themes#vice#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/violet.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/violet.vim new file mode 100644 index 0000000..94199a0 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/violet.vim @@ -0,0 +1,32 @@ +" Normal mode " guifg guibg ctermfg ctermbg +let s:N1 = [ '#bcbcbc' , '#875faf' , 250 , 97 ] +let s:N2 = [ '#d75fd7' , '#4e4e4e' , 170 , 239 ] +let s:N3 = [ '#c6c6c6' , '#3a3a3a' , 251 , 237 ] + +" Insert mode +let s:I1 = [ '#CACFD2' , '#009966' , 253 , 35 ] +let s:I2 = [ '#d75fd7' , '#4e4e4e' , 170 , 239 ] +let s:I3 = [ '#c6c6c6' , '#3a3a3a' , 251 , 237 ] + +" Visual mode +let s:V1 = [ '#5f0000' , '#ff5faf' , 52 , 205 ] + +" Replace mode +let s:RE = [ '#c6c6c6' , '#ce537a' , 251, 168 ] + +let g:airline#themes#violet#palette = {} + +let g:airline#themes#violet#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#violet#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#violet#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#violet#palette.visual = { + \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } + +let g:airline#themes#violet#palette.replace = copy(g:airline#themes#violet#palette.normal) +let g:airline#themes#violet#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + +let s:IA = [ s:N1[1] , s:N3[1] , s:N1[3] , s:N3[3] , '' ] +let g:airline#themes#violet#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/wombat.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/wombat.vim new file mode 100644 index 0000000..622683f --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/wombat.vim @@ -0,0 +1,90 @@ +" vim-airline companion theme of Wombat +" looks great with wombat256 vim colorscheme + +" Normal mode +" [ guifg, guibg, ctermfg, ctermbg, opts ] +let s:N1 = [ '#141413' , '#CAE682' , 232 , 192 ] " mode +let s:N2 = [ '#CAE682' , '#32322F' , 192 , 238 ] " info +let s:N3 = [ '#CAE682' , '#242424' , 192 , 235 ] " statusline +let s:N4 = [ '#86CD74' , 113 ] " mode modified + +" Insert mode +let s:I1 = [ '#141413' , '#FDE76E' , 232 , 227 ] +let s:I2 = [ '#FDE76E' , '#32322F' , 227 , 238 ] +let s:I3 = [ '#FDE76E' , '#242424' , 227 , 235 ] +let s:I4 = [ '#FADE3E' , 221 ] + +" Visual mode +let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 153 ] +let s:V2 = [ '#B5D3F3' , '#32322F' , 153 , 238 ] +let s:V3 = [ '#B5D3F3' , '#242424' , 153 , 235 ] +let s:V4 = [ '#7CB0E6' , 111 ] + +" Replace mode +let s:R1 = [ '#141413' , '#E5786D' , 232 , 173 ] +let s:R2 = [ '#E5786D' , '#32322F' , 173 , 238 ] +let s:R3 = [ '#E5786D' , '#242424' , 173 , 235 ] +let s:R4 = [ '#E55345' , 203 ] + +" Paste mode +let s:PA = [ '#94E42C' , 47 ] + +" Info modified +let s:IM = [ '#40403C' , 238 ] + +" Inactive mode +let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] + +let g:airline#themes#wombat#palette = {} + +let g:airline#themes#wombat#palette.accents = { + \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], + \ } + +let g:airline#themes#wombat#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#wombat#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#wombat#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#wombat#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#wombat#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#wombat#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#wombat#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#DADADA' , '#242424' , 253 , 234 , '' ] , + \ [ '#DADADA' , '#40403C' , 253 , 238 , '' ] , + \ [ '#141413' , '#DADADA' , 232 , 253 , 'bold' ] ) + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/xtermlight.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/xtermlight.vim new file mode 100644 index 0000000..21d349e --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/xtermlight.vim @@ -0,0 +1,45 @@ +let g:airline#themes#xtermlight#palette = {} + +let s:N1 = [ '#eeeeee' , '#005fff' , 255 , 27 ] +let s:N2 = [ '#000087' , '#00d7ff' , 18 , 45 ] +let s:N3 = [ '#005fff' , '#afffff' , 27 , 159 ] +let g:airline#themes#xtermlight#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#xtermlight#palette.normal_modified = { + \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } + + +let s:I1 = [ '#eeeeee' , '#00875f' , 255 , 29 ] +let s:I2 = [ '#005f00' , '#00d787' , 22 , 42 ] +let s:I3 = [ '#005f5f' , '#afff87' , 23 , 156 ] +let g:airline#themes#xtermlight#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#xtermlight#palette.insert_modified = { + \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } +let g:airline#themes#xtermlight#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#xtermlight#palette.replace = copy(g:airline#themes#xtermlight#palette.insert) +let g:airline#themes#xtermlight#palette.replace.airline_a = [ s:I2[0] , '#ff0000' , s:I1[2] , 196 , '' ] +let g:airline#themes#xtermlight#palette.replace_modified = g:airline#themes#xtermlight#palette.insert_modified + + +let s:V1 = [ '#eeeeee' , '#ff5f00' , 255 , 202 ] +let s:V2 = [ '#5f0000' , '#ffaf00' , 52 , 214 ] +let s:V3 = [ '#d75f00' , '#ffff87' , 166 , 228 ] +let g:airline#themes#xtermlight#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#xtermlight#palette.visual_modified = { + \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } + + +let s:IA1 = [ '#6c6c6c' , '#b2b2b2' , 242 , 249 , '' ] +let s:IA2 = [ '#8a8a8a' , '#d0d0d0' , 245 , 252 , '' ] +let s:IA3 = [ '#a8a8a8' , '#eeeeee' , 248 , 255 , '' ] +let g:airline#themes#xtermlight#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#xtermlight#palette.inactive_modified = { + \ 'airline_c': [ '#d70000' , '' , 160 , '' , '' ] , + \ } + diff --git a/.vim/plugged/vim-airline-themes/autoload/airline/themes/zenburn.vim b/.vim/plugged/vim-airline-themes/autoload/airline/themes/zenburn.vim new file mode 100644 index 0000000..9883c21 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/autoload/airline/themes/zenburn.vim @@ -0,0 +1,44 @@ +let g:airline#themes#zenburn#palette = {} + +function! airline#themes#zenburn#refresh() + let g:airline#themes#zenburn#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + + let s:N1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Folded', 'fg'], 'bold') + let s:N2 = airline#themes#get_highlight('Folded') + let s:N3 = airline#themes#get_highlight('NonText') + + let g:airline#themes#zenburn#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let s:Nmod = airline#themes#get_highlight('Comment') + let g:airline#themes#zenburn#palette.normal_modified = { + \ 'airline_c': s:Nmod + \ } + + let s:I1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['String', 'fg'], 'bold') + let s:I2 = airline#themes#get_highlight2(['String', 'fg'], ['Folded', 'bg']) + let s:I3 = s:N3 + let g:airline#themes#zenburn#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#zenburn#palette.insert_modified = g:airline#themes#zenburn#palette.normal_modified + + let s:R1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Comment', 'fg'], 'bold') + let s:R2 = airline#themes#get_highlight2(['Comment', 'fg'], ['Folded', 'bg']) + let s:R3 = s:N3 + let g:airline#themes#zenburn#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#zenburn#palette.replace_modified = g:airline#themes#zenburn#palette.normal_modified + + let s:V1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Identifier', 'fg'], 'bold') + let s:V2 = airline#themes#get_highlight2(['Identifier', 'fg'], ['Folded', 'bg']) + let s:V3 = s:N3 + let g:airline#themes#zenburn#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#zenburn#palette.visual_modified = g:airline#themes#zenburn#palette.normal_modified + + let s:IA = airline#themes#get_highlight('NonText') + let g:airline#themes#zenburn#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#zenburn#palette.inactive_modified = { + \ 'airline_c': s:Nmod + \ } +endfunction + +call airline#themes#zenburn#refresh() + diff --git a/.vim/plugged/vim-airline-themes/doc/airline-themes.txt b/.vim/plugged/vim-airline-themes/doc/airline-themes.txt new file mode 100644 index 0000000..bfd5c47 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/doc/airline-themes.txt @@ -0,0 +1,249 @@ +*airline-themes.txt* Themes for vim-airline + _ _ _ _ ~ + __ _(_)_ __ ___ __ _(_)_ __| (_)_ __ ___ ~ + \ \ / / | '_ ` _ \ _____ / _` | | '__| | | '_ \ / _ \ ~ + \ V /| | | | | | |_____| (_| | | | | | | | | | __/ ~ + \_/ |_|_| |_| |_| \__,_|_|_| |_|_|_| |_|\___| ~ + ~ +============================================================================== +CONTENTS *airline-theme-contents* + + 01. Intro ........................................ |airline-themes-intro| + 02. Features ........................................... |airline-themes| + 03. Configuration ........................ |airline-themes-configuration| + 04. Contributions ........................ |airline-themes-contributions| + 05. License .................................... |airline-themes-license| + +============================================================================== +INTRODUCTION *airline-themes-intro* + +This is a plugin for vim-airline and provides several themes to be used in +conjunction with |vim-airline| + +============================================================================== +FEATURES *airline-themes-list* + +Currently this repository contains the following themes: + + * alduin + * angr + * atomic + * aurora + * badcat + * badwolf + * base16 (|airline-theme-base16|) + * base16_shell (|airline-theme-base16_shell|) + * base16_3024 + * base16_apathy + * base16_ashes + * base16_atelierdune + * base16_atelierforest + * base16_atelierheath + * base16_atelierlakeside + * base16_atelierseaside + * base16_bespin + * base16_brewer + * base16_bright + * base16_chalk + * base16_classic + * base16_codeschool + * base16_colors + * base16_default + * base16_eighties + * base16_embers + * base16_flat + * base16_google + * base16_grayscale + * base16_greenscreen + * base16_harmonic16 + * base16_hopscotch + * base16_isotope + * base16_londontube + * base16_marrakesh + * base16_mocha + * base16_monokai + * base16_ocean + * base16_oceanicnext + * base16_paraiso + * base16_pop + * base16_railscasts + * base16_seti + * base16_shapeshifter + * base16_solarized + * base16_spacemacs + * base16_summerfruit + * base16_tomorrow + * base16_twilight + * base16color + * behelit + * biogoo + * bubblegum + * cobalt2 + * cool + * dark + * dark_minimal + * deus + * distinguished + * durant + * faryfloss + * hybrid + * hybridline + * jay + * jellybeans + * jet + * kalisi + * kolor + * laederon + * light + * lucius + * luna + * minimalist + * molokai + * monochrome + * murmur + * onedark (|airline-theme-onedark|) + * papercolor + * powerlineish + * qwq + * raven + * ravenpower + * serene + * sierra + * silver + * simple + * soda + * sol + * solarized (|airline-theme-solarized|) + * term + * tomorrow + * ubaryd + * understated + * vice + * violet + * wombat + * xtermlight + * zenburn + +============================================================================== +NAME *airline-themes-configuration* + + *g:airline_theme* + +To define a theme to be used by vim-airline you can set the variable +g:airline_theme in your |.vimrc| like this: > + + :let g:airline_theme='dark' +< + *airline-theme-dark_minimal* + +This is a copy of the dark.vim theme, however it does not change colors in +the different modes, so should bring some performance improvements because +airline does not have to redefine highlighting groups after they have been +setup once. However, it won't change colors if e.g. the mode changes. + + *airline-theme-solarized* +*g:solarized_base16* + +Base16 has a Solarized theme with the usual colors, but mapped in the +terminal differently. The main difference is that the bright colors, +Ansi 9-15, are left the same as their Ansi 1-7 counterparts. The +remaining solarized colors are mapped into higher indexes by using +Base16 Shell. To enable it: +> + let g:solarized_base16 = 1 +> +See also https://github.com/blueyed/vim-colors-solarized/commit/92f2f994. + +*g:airline_solarized_normal_green* + +Turns the outer-most section of the statusline Solarized green, making it +look more like classic powerline in normal mode. To enable it: +> + let g:airline_solarized_normal_green = 1 +< + +*g:airline_solarized_dark_inactive_border* + +Changes inactive window panes to have a dark bottom border instead +of light by default. To enable it: +> + let g:airline_solarized_dark_inactive_border = 1 +< + *airline-theme-base16* +Base16 is a popular theme from Chris Kempson +(https://github.com/chriskempson/base16-vim) + +The default theme is base16, all other base16-themes have been generated and +might not support all options. + +*g:airline_base16_improved_contrast* + +Improves the contrast for the inactive statusline. To enable it: > + + let g:airline_base16_improved_contrast = 1 +< + +*airline#themes#base16#constant* + +Uses a predefined colorpalette for defining the colors, instead of guessing +the values from other highlight groups. To enable it: > + + let g:airline#themes#base16#constant = 1 +< + *airline-theme-base16-shell* + +base16_shell theme for vim-airline matches your active Base16 Shell theme. + +It should be used in combination with Base16 Shell, which sets the correct +colors in the terminal: (https://github.com/chriskempson/base16-shell). The +colors used in this theme are within the 21 term colors set by Base16 Shell. +The theme supports 2 options described below. + +*g:airline_base16_oceanicnext* + +Allow 256 color use of the base16_oceanicnext theme. Without this setting +base16_oceanicnext may look incorrect in 256 color mode. To enable it: > + + let base16colorspace = 256 + +*g:airline_base16_solarized* + +Adjusts the colors to match base16_solarized shell theme. You may also try to +use it with other Base16 Shell themes. To enable it: > + + let g:airline_base16_solarized = 1 +< + *airline-theme-onedark* + +*g:onedark_termcolors* + +Set to 256 for 256-color mode (the default), or 16 for 16-color mode. +Has no effect if using true/24-bit color. To enable 16-color mode: > + + let g:onedark_termcolors = 16 +< + +16-color mode is intended to be used with specific terminal colors as +described in the installation notes for the joshdick/onedark.vim colorscheme: +(https://github.com/joshdick/onedark.vim#installation) + + *airline-theme-deus* + +*g:deus_termcolors* + +Set to 256 for 256-color mode (the default), or 16 for 16-color mode. +Has no effect if using true/24-bit color. To enable 16-color mode: > + + let g:onedark_termcolors = 16 +< +============================================================================== +CONTRIBUTIONS *airline-themes-contributions* + +Contributions and pull requests are welcome. + +============================================================================== +LICENSE *airline-themes-license* + +MIT License. Copyright © 2013-2016 Bailey Ling, et al + + vim:tw=78:ts=8:ft=help:norl: diff --git a/.vim/plugged/vim-airline-themes/plugin/airline-themes.vim b/.vim/plugged/vim-airline-themes/plugin/airline-themes.vim new file mode 100644 index 0000000..1be6b47 --- /dev/null +++ b/.vim/plugged/vim-airline-themes/plugin/airline-themes.vim @@ -0,0 +1,7 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling & Contributors. +" vim: et ts=2 sts=2 sw=2 + +if (exists('g:loaded_airline_themes') && g:loaded_airline_themes) + finish +endif +let g:loaded_airline_themes = 1 diff --git a/.vim/plugged/vim-airline/.gitignore b/.vim/plugged/vim-airline/.gitignore new file mode 100644 index 0000000..38ec5a0 --- /dev/null +++ b/.vim/plugged/vim-airline/.gitignore @@ -0,0 +1,4 @@ +doc/tags +*.lock +.vim-flavor +*.swp diff --git a/.vim/plugged/vim-airline/.travis.yml b/.vim/plugged/vim-airline/.travis.yml new file mode 100644 index 0000000..54deccf --- /dev/null +++ b/.vim/plugged/vim-airline/.travis.yml @@ -0,0 +1,8 @@ +language: ruby +before_install: + - curl -f -L "https://raw.githubusercontent.com/vim-airline/vim-airline-themes/master/autoload/airline/themes/simple.vim" -o autoload/airline/themes/simple.vim + - curl -f -L "https://raw.githubusercontent.com/vim-airline/vim-airline-themes/master/autoload/airline/themes/molokai.vim" -o autoload/airline/themes/molokai.vim + - mkdir colors && curl -f -L 'https://raw.githubusercontent.com/tomasr/molokai/master/colors/molokai.vim' -o colors/molokai.vim +rvm: + - 1.9.3 +script: rake ci diff --git a/.vim/plugged/vim-airline/CHANGELOG.md b/.vim/plugged/vim-airline/CHANGELOG.md new file mode 100644 index 0000000..b37ee18 --- /dev/null +++ b/.vim/plugged/vim-airline/CHANGELOG.md @@ -0,0 +1,120 @@ +# Change Log + +This is the Changelog for the vim-airline project. + +## [Unreleased] + +## [0.8] - 2016-03-09 +- Changes + - Airline converted to an organization and moved to new [repository](https://github.com/vim-airline/vim-airline) + - Themes have been split into an separate repository [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes) +- Improvements + - Extensions + - branch: support Git and Mercurial simultaneously, untracked files + - whitespace: new mixed-indent rule + - Windows support + - Many bug fixes + - Support for Neovim +- New features + - Many new themes + - Extensions/integration + - [taboo](https://github.com/gcmt/taboo.vim) + - [vim-ctrlspace](https://github.com/szw/vim-ctrlspace) + - [quickfixsigns](https://github.com/tomtom/quickfixsigns_vim) + - [YouCompleteMe](https://github.com/Valloric/YouCompleteMe) + - [po.vim](http://www.vim.org/scripts/script.php?script_id=695) + - [unicode.vim](https://github.com/chrisbra/unicode.vim) + - wordcount + - crypt indicator + - byte order mark indicator + - Tabline's tab mode can display splits simultaneously + +## [0.7] - 2014-12-10 +- New features + - accents support; allowing multiple colors/styles in the same section + - extensions: eclim + - themes: understated, monochrome, murmur, sol, lucius +- Improvements + - solarized theme; support for 8 color terminals + - tabline resizes dynamically based on number of open buffers + - miscellaneous bug fixes + +## [0.6] - 2013-10-08 + +- New features + - accents support; allowing multiple colors/styles in the same section + - extensions: eclim + - themes: understated, monochrome, murmur, sol, lucius +- Improvements + - solarized theme; support for 8 color terminals + - tabline resizes dynamically based on number of open buffers + - miscellaneous bug fixes + +## [0.5] - 2013-09-13 + +- New features + - smart tabline extension which displays all buffers when only one tab is visible + - automatic section truncation when the window resizes + - support for a declarative style of configuration, allowing parts to contain metadata such as minimum window width or conditional visibility + - themes: zenburn, serene +- Other + - a sizable chunk of vim-airline is now running through a unit testing suite, automated via Travis CI + +## [0.4] - 2013-08-26 + + - New features + - integration with csv.vim and vim-virtualenv + - hunks extension for vim-gitgutter and vim-signify + - automatic theme switching with matching colorschemes + - commands: AirlineToggle + - themes: base16 (all variants) + - Improvements + - integration with undotree, tagbar, and unite + - Other + - refactored core and exposed statusline builder and pipeline + - all extension related g:airline_variables have been deprecated in favor of g:airline#extensions# variables + - extensions found in the runtimepath outside of the default distribution will be automatically loaded + +## [0.3] - 2013-08-12 + +- New features + - first-class integration with tagbar + - white space detection for trailing spaces and mixed indentation + - introduced warning section for syntastic and white space detection + - improved ctrlp integration: colors are automatically selected based on the current airline theme + - new themes: molokai, bubblegum, jellybeans, tomorrow +- Bug fixes + - improved handling of eventignore used by other plugins +- Other + - code cleaned up for clearer separation between core functionality and extensions + - introduced color extraction from highlight groups, allowing themes to be generated off of the active colorscheme (e.g. jellybeans and tomorrow) + - License changed to MIT + +## [0.2] - 2013-07-28 + +- New features + - iminsert detection + - integration with vimshell, vimfiler, commandt, lawrencium + - enhanced bufferline theming + - support for ctrlp theming + - support for custom window excludes +- New themes + - luna and wombat +- Bug fixes + - refresh branch name after switching with a shell command + +## [0.1] - 2013-07-17 + +- Initial release + - integration with other plugins: netrw, unite, nerdtree, undotree, gundo, tagbar, minibufexplr, ctrlp + - support for themes: 8 included + +[Unreleased]: https://github.com/vim-airline/vim-airline/compare/v0.8...HEAD +[0.8]: https://github.com/vim-airline/vim-airline/compare/v0.7...v0.8 +[0.7]: https://github.com/vim-airline/vim-airline/compare/v0.6...v0.7 +[0.6]: https://github.com/vim-airline/vim-airline/compare/v0.5...v0.6 +[0.5]: https://github.com/vim-airline/vim-airline/compare/v0.4...v0.5 +[0.4]: https://github.com/vim-airline/vim-airline/compare/v0.3...v0.4 +[0.3]: https://github.com/vim-airline/vim-airline/compare/v0.2...v0.3 +[0.2]: https://github.com/vim-airline/vim-airline/compare/v0.1...v0.2 +[0.1]: https://github.com/vim-airline/vim-airline/releases/tag/v0.1 diff --git a/.vim/plugged/vim-airline/CONTRIBUTING.md b/.vim/plugged/vim-airline/CONTRIBUTING.md new file mode 100644 index 0000000..f97699e --- /dev/null +++ b/.vim/plugged/vim-airline/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributions + +Contributions and pull requests are welcome. Please take note of the following guidelines: + +* Adhere to the existing style as much as possible; notably, 2 space indents and long-form keywords. +* Keep the history clean! Squash your branches before you submit a pull request. `pull --rebase` is your friend. +* Any changes to the core should be tested against Vim 7.2. + +# Bugs + +Tracking down bugs can take a very long time due to different configurations, versions, and operating systems. To ensure a timely response, please help me out by doing the following: + +* Reproduce it with this [minivimrc][7] repository to rule out any configuration conflicts. Even better, create a `gist` of your vimrc that is compatible with [pathogen][11]. +* And to make it easier to reproduce, please supply the following: + * the `:version` of vim + * the commit of vim-airline you're using + * the OS that you're using, including terminal emulator, GUI vs non-GUI + +# Themes + +* If you submit a theme, please create a screenshot so it can be added to the [Wiki][14]. +* In the majority of cases, modifications to colors of existing themes will likely be rejected. Themes are a subjective thing, so while you may prefer that a particular color be darker, another user will prefer it to be lighter, or something entirely different. The more popular the theme, the more unlikely the change will be accepted. However, it's pretty simple to create your own theme; copy the theme to `~/.vim/autoload/airline/themes` under a new name with your modifications, and it can be used. + +# Maintenance + +If you would like to take a more active role in improving vim-airline, please consider [becoming a maintainer][43]. + + +[7]: https://github.com/bling/minivimrc +[11]: https://github.com/tpope/vim-pathogen +[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots +[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer diff --git a/.vim/plugged/vim-airline/Gemfile b/.vim/plugged/vim-airline/Gemfile new file mode 100644 index 0000000..088f22e --- /dev/null +++ b/.vim/plugged/vim-airline/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'vim-flavor', '~> 1.1' diff --git a/.vim/plugged/vim-airline/ISSUE_TEMPLATE.md b/.vim/plugged/vim-airline/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..a0a1a05 --- /dev/null +++ b/.vim/plugged/vim-airline/ISSUE_TEMPLATE.md @@ -0,0 +1,21 @@ +#### environment + +- vim: ???? +- vim-airline: ???? +- OS: ???? +- Have you reproduced with a minimal vimrc: ??? +- What is your airline configuration: ??? +if you are using terminal: +- terminal: ???? +- $TERM variable: ??? +- color configuration (:set t_Co?): +if you are using Neovim: +- does it happen in Vim: ??? + +#### actual behavior + +???? + +#### expected behavior + +???? diff --git a/.vim/plugged/vim-airline/LICENSE b/.vim/plugged/vim-airline/LICENSE new file mode 100644 index 0000000..875acca --- /dev/null +++ b/.vim/plugged/vim-airline/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2016 Bailey Ling + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.vim/plugged/vim-airline/README.md b/.vim/plugged/vim-airline/README.md new file mode 100644 index 0000000..9b654af --- /dev/null +++ b/.vim/plugged/vim-airline/README.md @@ -0,0 +1,318 @@ +# vim-airline [![Build Status](https://travis-ci.org/vim-airline/vim-airline.png)](https://travis-ci.org/vim-airline/vim-airline) + +Lean & mean status/tabline for vim that's light as air. + +![img](https://github.com/vim-airline/vim-airline/wiki/screenshots/demo.gif) + +When the plugin is correctly loaded, Vim will draw a nice statusline at the +bottom of each window. + +That line consists of several sections, each one displaying some piece of +information. By default (without configuration) this line will look like this: + +``` ++-----------------------------------------------------------------------------+ +|~ | +|~ | +|~ VIM - Vi IMproved | +|~ | +|~ version 8.0 | +|~ by Bram Moolenaar et al. | +|~ Vim is open source and freely distributable | +|~ | +|~ type :h :q to exit | +|~ type :help or for on-line help | +|~ type :help version8 for version info | +|~ | +|~ | ++-----------------------------------------------------------------------------+ +| A | B | C X | Y | Z | [...] | ++-----------------------------------------------------------------------------+ +``` + +The statusline is the colored line at the bottom, which contains the sections +(possibly in different colors): + +section|meaning (example) +-------|------------------ + A | displays the mode + additional flags like crypt/spell/paste (INSERT) + B | VCS information (branch, hunk summary) (master) + C | filename + read-only flag (~/.vim/vimrc RO) + X | filetype (vim) + Y | file encoding[fileformat] (utf-8[unix]) + Z | current position in the file + [...] | additional sections (warning/errors/statistics) from external plugins (e.g. YCM, syntastic, ...) + +The information in Section Z looks like this: + +`10% ☰ 10/100 ln : 20` + +This means: +``` +10% - 10 percent down the top of the file +☰ 10 - current line 10 +/100 ln - of 100 lines +: 20 - current column 20 +``` + +For a better look, those sections can be colored differently, depending on various conditions +(e.g. the mode or whether the current file is 'modified') + +# Features + +* Tiny core written with extensibility in mind ([open/closed principle][8]). +* Integrates with a variety of plugins, including: [vim-bufferline][6], + [fugitive][4], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16], + [undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29], + [vim-signify][30], [quickfixsigns][39], [syntastic][5], [eclim][34], + [lawrencium][21], [virtualenv][31], [tmuxline][35], [taboo.vim][37], + [ctrlspace][38], [vim-bufmru][47], [vimagit][50], [denite][51] and more. +* Looks good with regular fonts and provides configuration points so you can use unicode or powerline symbols. +* Optimized for speed; it loads in under a millisecond. +* Extensive suite of themes for popular color schemes including [solarized][23] (dark and light), [tomorrow][24] (all variants), [base16][32] (all variants), [molokai][25], [jellybeans][26] and others. + Note these are now external to this plugin. See [below][46] for detail. +* Supports 7.2 as the minimum Vim version. +* The master branch tries to be as stable as possible, and new features are merged in only after they have gone through a [full regression test][33]. +* Unit testing suite. + +## Straightforward customization + +If you don't like the defaults, you can replace all sections with standard `statusline` syntax. Give your statusline that you've built over the years a face lift. + +![image](https://f.cloud.github.com/assets/306502/1009429/d69306da-0b38-11e3-94bf-7c6e3eef41e9.png) + +## Themes + +Themes have moved to +another repository as of [this commit][45]. + +Install the themes as you would this plugin (Vundle example): + +```vim +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' +``` + +See https://github.com/vim-airline/vim-airline-themes for more. + +## Automatic truncation + +Sections and parts within sections can be configured to automatically hide when the window size shrinks. + +![image](https://f.cloud.github.com/assets/306502/1060831/05c08aac-11bc-11e3-8470-a506a3037f45.png) + +## Smarter tab line + +Automatically displays all buffers when there's only one tab open. + +![tabline](https://f.cloud.github.com/assets/306502/1072623/44c292a0-1495-11e3-9ce6-dcada3f1c536.gif) + +This is disabled by default; add the following to your vimrc to enable the extension: + + let g:airline#extensions#tabline#enabled = 1 + +Separators can be configured independently for the tabline, so here is how you can define "straight" tabs: + + let g:airline#extensions#tabline#left_sep = ' ' + let g:airline#extensions#tabline#left_alt_sep = '|' + +## Seamless integration + +vim-airline integrates with a variety of plugins out of the box. These extensions will be lazily loaded if and only if you have the other plugins installed (and of course you can turn them off). + +#### [ctrlp.vim][10] +![image](https://f.cloud.github.com/assets/306502/962258/7345a224-04ec-11e3-8b5a-f11724a47437.png) + +#### [unite.vim][9] +![image](https://f.cloud.github.com/assets/306502/962319/4d7d3a7e-04ed-11e3-9d59-ab29cb310ff8.png) + +#### [denite.nvim][51] +![image](https://cloud.githubusercontent.com/assets/246230/23939717/f65bce6e-099c-11e7-85c3-918dbc839392.png) + +#### [tagbar][19] +![image](https://f.cloud.github.com/assets/306502/962150/7e7bfae6-04ea-11e3-9e28-32af206aed80.png) + +#### [csv.vim][28] +![image](https://f.cloud.github.com/assets/306502/962204/cfc1210a-04eb-11e3-8a93-42e6bcd21efa.png) + +#### [syntastic][5] +![image](https://f.cloud.github.com/assets/306502/962864/9824c484-04f7-11e3-9928-da94f8c7da5a.png) + +#### hunks ([vim-gitgutter][29] & [vim-signify][30]) +![image](https://f.cloud.github.com/assets/306502/995185/73fc7054-09b9-11e3-9d45-618406c6ed98.png) + +#### [vimagit][50] +![vim-airline-vimagit-demo](https://cloud.githubusercontent.com/assets/533068/22107273/2ea85ba0-de4d-11e6-9fa8-331103b88df4.gif) + +#### [virtualenv][31] +![image](https://f.cloud.github.com/assets/390964/1022566/cf81f830-0d98-11e3-904f-cf4fe3ce201e.png) + +#### [tmuxline][35] +![image](https://f.cloud.github.com/assets/1532071/1559276/4c28fbac-4fc7-11e3-90ef-7e833d980f98.gif) + +#### [promptline][36] +![airline-promptline-sc](https://f.cloud.github.com/assets/1532071/1871900/7d4b28a0-789d-11e3-90e4-16f37269981b.gif) + +#### [ctrlspace][38] +![papercolor_with_ctrlspace](https://cloud.githubusercontent.com/assets/493242/12912041/7fc3c6ec-cf16-11e5-8775-8492b9c64ebf.png) + +#### [xkb-switch][48]/[xkb-layout][49] +![image](https://cloud.githubusercontent.com/assets/5715281/22061422/347e7842-ddb8-11e6-8bdb-7abbd418653c.gif) + +#### [vimtex][53] +![image](https://cloud.githubusercontent.com/assets/1798172/25799740/e77d5c2e-33ee-11e7-8660-d34ce4c5f13f.png) + +## Extras + +vim-airline also supplies some supplementary stand-alone extensions. In addition to the tabline extension mentioned earlier, there is also: + +#### whitespace +![image](https://f.cloud.github.com/assets/306502/962401/2a75385e-04ef-11e3-935c-e3b9f0e954cc.png) + +## Configurable and extensible + +#### Fine-tuned configuration + +Every section is composed of parts, and you can reorder and reconfigure them at will. + +![image](https://f.cloud.github.com/assets/306502/1073278/f291dd4c-14a3-11e3-8a83-268e2753f97d.png) + +Sections can contain accents, which allows for very granular control of visuals (see configuration [here](https://github.com/vim-airline/vim-airline/issues/299#issuecomment-25772886)). + +![image](https://f.cloud.github.com/assets/306502/1195815/4bfa38d0-249d-11e3-823e-773cfc2ca894.png) + +#### Extensible pipeline + +Completely transform the statusline to your liking. Build out the statusline as you see fit by extracting colors from the current colorscheme's highlight groups. + +![allyourbase](https://f.cloud.github.com/assets/306502/1022714/e150034a-0da7-11e3-94a5-ca9d58a297e8.png) + +# Rationale + +There's already [powerline][2], why yet another statusline? + +* 100% vimscript; no python needed. + +What about [vim-powerline][1]? + +* vim-powerline has been deprecated in favor of the newer, unifying powerline, which is under active development; the new version is written in python at the core and exposes various bindings such that it can style statuslines not only in vim, but also tmux, bash, zsh, and others. + +# Where did the name come from? + +I wrote the initial version on an airplane, and since it's light as air it turned out to be a good name. Thanks for flying vim! + +# Installation + +This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers: + +| Plugin Manager | Install with... | +| ------------- | ------------- | +| [Pathogen][11] | `git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline`
Remember to run `:Helptags` to generate help tags | +| [NeoBundle][12] | `NeoBundle 'vim-airline/vim-airline'` | +| [Vundle][13] | `Plugin 'vim-airline/vim-airline'` | +| [Plug][40] | `Plug 'vim-airline/vim-airline'` | +| [VAM][22] | `call vam#ActivateAddons([ 'vim-airline' ])` | +| [Dein][52] | `call dein#add('vim-airline/vim-airline')` | +| [minpac][54] | `call minpac#add('vim-airline/vim-airline')` | +| pack feature (native Vim 8 package feature)| `git clone https://github.com/vim-airline/vim-airline ~/.vim/pack/dist/start/vim-airline`
Remember to run `:helptags` to generate help tags | +| manual | copy all of the files into your `~/.vim` directory | + +# Documentation + +`:help airline` + +# Integrating with powerline fonts + +For the nice looking powerline symbols to appear, you will need to install a patched font. Instructions can be found in the official powerline [documentation][20]. Prepatched fonts can be found in the [powerline-fonts][3] repository. + +Finally, you can add the convenience variable `let g:airline_powerline_fonts = 1` to your vimrc which will automatically populate the `g:airline_symbols` dictionary with the powerline symbols. + +# FAQ + +Solutions to common problems can be found in the [Wiki][27]. + +# Performance + +Whoa! Everything got slow all of a sudden... + +vim-airline strives to make it easy to use out of the box, which means that by default it will look for all compatible plugins that you have installed and enable the relevant extension. + +Many optimizations have been made such that the majority of users will not see any performance degradation, but it can still happen. For example, users who routinely open very large files may want to disable the `tagbar` extension, as it can be very expensive to scan for the name of the current function. + +The [minivimrc][7] project has some helper mappings to troubleshoot performance related issues. + +If you don't want all the bells and whistles enabled by default, you can define a value for `g:airline_extensions`. When this variable is defined, only the extensions listed will be loaded; an empty array would effectively disable all extensions (e.g. `:let g:airline_extensions = []`). + +Also, you can enable caching of the various syntax highlighting groups. This will try to prevent some of the more expensive `:hi` calls in Vim, which seem to be expensive in the Vim core at the expense of possibly not being hunderet percent correct all the times (especially if you often change highlighting groups yourself using `:hi` commands). To set this up do `:let g:airline_highlighting_cache = 1`. A `:AirlineRefresh` will however clear the cache. + +In addition you might want to check out the [dark_minimal theme][55], which does not change highlighting groups once they are defined. Also please check the [FAQ][27] for more information on how to diagnose and fix the problem. + +# Screenshots + +A full list of screenshots for various themes can be found in the [Wiki][14]. + +# Maintainers + +The project is currently being maintained by [Bailey Ling][41], [Christian Brabandt][42], and [Mike Hartington][44]. + +If you are interested in becoming a maintainer (we always welcome more maintainers), please [go here][43]. + +# License + +MIT License. Copyright (c) 2013-2017 Bailey Ling & Contributors. + +[1]: https://github.com/Lokaltog/vim-powerline +[2]: https://github.com/Lokaltog/powerline +[3]: https://github.com/Lokaltog/powerline-fonts +[4]: https://github.com/tpope/vim-fugitive +[5]: https://github.com/scrooloose/syntastic +[6]: https://github.com/bling/vim-bufferline +[7]: https://github.com/bling/minivimrc +[8]: http://en.wikipedia.org/wiki/Open/closed_principle +[9]: https://github.com/Shougo/unite.vim +[10]: https://github.com/ctrlpvim/ctrlp.vim +[11]: https://github.com/tpope/vim-pathogen +[12]: https://github.com/Shougo/neobundle.vim +[13]: https://github.com/VundleVim/Vundle.vim +[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots +[15]: https://github.com/techlivezheng/vim-plugin-minibufexpl +[16]: https://github.com/sjl/gundo.vim +[17]: https://github.com/mbbill/undotree +[18]: https://github.com/scrooloose/nerdtree +[19]: https://github.com/majutsushi/tagbar +[20]: https://powerline.readthedocs.org/en/master/installation.html#patched-fonts +[21]: https://bitbucket.org/ludovicchabant/vim-lawrencium +[22]: https://github.com/MarcWeber/vim-addon-manager +[23]: https://github.com/altercation/solarized +[24]: https://github.com/chriskempson/tomorrow-theme +[25]: https://github.com/tomasr/molokai +[26]: https://github.com/nanotech/jellybeans.vim +[27]: https://github.com/vim-airline/vim-airline/wiki/FAQ +[28]: https://github.com/chrisbra/csv.vim +[29]: https://github.com/airblade/vim-gitgutter +[30]: https://github.com/mhinz/vim-signify +[31]: https://github.com/jmcantrell/vim-virtualenv +[32]: https://github.com/chriskempson/base16-vim +[33]: https://github.com/vim-airline/vim-airline/wiki/Test-Plan +[34]: http://eclim.org +[35]: https://github.com/edkolev/tmuxline.vim +[36]: https://github.com/edkolev/promptline.vim +[37]: https://github.com/gcmt/taboo.vim +[38]: https://github.com/szw/vim-ctrlspace +[39]: https://github.com/tomtom/quickfixsigns_vim +[40]: https://github.com/junegunn/vim-plug +[41]: https://github.com/bling +[42]: https://github.com/chrisbra +[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer +[44]: https://github.com/mhartington +[45]: https://github.com/vim-airline/vim-airline/commit/d7fd8ca649e441b3865551a325b10504cdf0711b +[46]: https://github.com/vim-airline/vim-airline#themes +[47]: https://github.com/mildred/vim-bufmru +[48]: https://github.com/ierton/xkb-switch +[49]: https://github.com/vovkasm/input-source-switcher +[50]: https://github.com/jreybert/vimagit +[51]: https://github.com/Shougo/denite.nvim +[52]: https://github.com/Shougo/dein.vim +[53]: https://github.com/lervag/vimtex +[54]: https://github.com/k-takata/minpac/ +[55]: https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/dark_minimal.vim diff --git a/.vim/plugged/vim-airline/Rakefile b/.vim/plugged/vim-airline/Rakefile new file mode 100644 index 0000000..741cfc2 --- /dev/null +++ b/.vim/plugged/vim-airline/Rakefile @@ -0,0 +1,14 @@ +#!/usr/bin/env rake + +task :default => [:test] + +task :ci => [:dump, :test] + +task :dump do + sh 'vim --version' +end + +task :test do + sh 'bundle exec vim-flavor test' +end + diff --git a/.vim/plugged/vim-airline/autoload/airline.vim b/.vim/plugged/vim-airline/autoload/airline.vim new file mode 100644 index 0000000..ad9fcea --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline.vim @@ -0,0 +1,195 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let g:airline_statusline_funcrefs = get(g:, 'airline_statusline_funcrefs', []) + +let s:sections = ['a','b','c','gutter','x','y','z', 'error', 'warning'] +let s:inactive_funcrefs = [] + +function! airline#add_statusline_func(name) + call airline#add_statusline_funcref(function(a:name)) +endfunction + +function! airline#add_statusline_funcref(function) + if index(g:airline_statusline_funcrefs, a:function) >= 0 + echohl WarningMsg + echo 'The airline statusline funcref '.string(a:function).' has already been added.' + echohl NONE + return + endif + call add(g:airline_statusline_funcrefs, a:function) +endfunction + +function! airline#remove_statusline_func(name) + let i = index(g:airline_statusline_funcrefs, function(a:name)) + if i > -1 + call remove(g:airline_statusline_funcrefs, i) + endif +endfunction + +function! airline#add_inactive_statusline_func(name) + call add(s:inactive_funcrefs, function(a:name)) +endfunction + +function! airline#load_theme() + if exists('*airline#themes#{g:airline_theme}#refresh') + call airline#themes#{g:airline_theme}#refresh() + endif + + let palette = g:airline#themes#{g:airline_theme}#palette + call airline#themes#patch(palette) + + if exists('g:airline_theme_patch_func') + let Fn = function(g:airline_theme_patch_func) + call Fn(palette) + endif + + call airline#highlighter#load_theme() + call airline#extensions#load_theme() + call airline#update_statusline() +endfunction + +function! airline#switch_theme(name) + try + let palette = g:airline#themes#{a:name}#palette "also lazy loads the theme + let g:airline_theme = a:name + catch + echohl WarningMsg | echo 'The specified theme cannot be found.' | echohl NONE + if exists('g:airline_theme') + return + else + let g:airline_theme = 'dark' + endif + endtry + + let w:airline_lastmode = '' + call airline#load_theme() + + silent doautocmd User AirlineAfterTheme + + " this is required to prevent clobbering the startup info message, i don't know why... + call airline#check_mode(winnr()) +endfunction + +function! airline#switch_matching_theme() + if exists('g:colors_name') + let existing = g:airline_theme + let theme = substitute(tolower(g:colors_name), '-', '_', 'g') + try + let palette = g:airline#themes#{theme}#palette + call airline#switch_theme(theme) + return 1 + catch + for map in items(g:airline_theme_map) + if match(g:colors_name, map[0]) > -1 + try + let palette = g:airline#themes#{map[1]}#palette + call airline#switch_theme(map[1]) + catch + call airline#switch_theme(existing) + endtry + return 1 + endif + endfor + endtry + endif + return 0 +endfunction + +function! airline#update_statusline() + if airline#util#getwinvar(winnr(), 'airline_disabled', 0) + return + endif + for nr in filter(range(1, winnr('$')), 'v:val != winnr()') + if airline#util#getwinvar(nr, 'airline_disabled', 0) + continue + endif + call setwinvar(nr, 'airline_active', 0) + let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } + call s:invoke_funcrefs(context, s:inactive_funcrefs) + endfor + + unlet! w:airline_render_left w:airline_render_right + exe 'unlet! ' 'w:airline_section_'. join(s:sections, ' w:airline_section_') + + let w:airline_active = 1 + let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } + call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) +endfunction + +let s:contexts = {} +let s:core_funcrefs = [ + \ function('airline#extensions#apply'), + \ function('airline#extensions#default#apply') ] +function! s:invoke_funcrefs(context, funcrefs) + let builder = airline#builder#new(a:context) + let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context) + if err == 1 + let a:context.line = builder.build() + let s:contexts[a:context.winnr] = a:context + call setwinvar(a:context.winnr, '&statusline', '%!airline#statusline('.a:context.winnr.')') + endif +endfunction + +function! airline#statusline(winnr) + if has_key(s:contexts, a:winnr) + return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line + endif + + " in rare circumstances this happens...see #276 + return '' +endfunction + +function! airline#check_mode(winnr) + let context = s:contexts[a:winnr] + + if get(w:, 'airline_active', 1) + let l:m = mode() + if l:m ==# "i" + let l:mode = ['insert'] + elseif l:m ==# "R" + let l:mode = ['replace'] + elseif l:m =~# '\v(v|V||s|S|)' + let l:mode = ['visual'] + elseif l:m ==# "t" + let l:mode = ['terminal'] + else + let l:mode = ['normal'] + endif + let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m) + else + let l:mode = ['inactive'] + let w:airline_current_mode = get(g:airline_mode_map, '__') + endif + + if g:airline_detect_modified && &modified + call add(l:mode, 'modified') + endif + + if g:airline_detect_paste && &paste + call add(l:mode, 'paste') + endif + + if g:airline_detect_crypt && exists("+key") && !empty(&key) + call add(l:mode, 'crypt') + endif + + if g:airline_detect_spell && &spell + call add(l:mode, 'spell') + endif + + if &readonly || ! &modifiable + call add(l:mode, 'readonly') + endif + + let mode_string = join(l:mode) + if get(w:, 'airline_lastmode', '') != mode_string + call airline#highlighter#highlight_modified_inactive(context.bufnr) + call airline#highlighter#highlight(l:mode, context.bufnr) + let w:airline_lastmode = mode_string + endif + + return '' +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/async.vim b/.vim/plugged/vim-airline/autoload/airline/async.vim new file mode 100644 index 0000000..b7b72b5 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/async.vim @@ -0,0 +1,250 @@ +" MIT License. Copyright (c) 2013-2017 C.Brabandt +" vim: et ts=2 sts=2 sw=2 + +let s:untracked_jobs = {} +let s:mq_jobs = {} +let s:po_jobs = {} + +" Generic functions handling on exit event of the various async functions +function! s:untracked_output(dict, buf) + if a:buf =~? ('^'. a:dict.cfg['untracked_mark']) + let a:dict.cfg.untracked[a:dict.file] = get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists) + else + let a:dict.cfg.untracked[a:dict.file] = '' + endif +endfunction + +" also called from branch extension (for non-async vims) +function! airline#async#mq_output(buf, file) + let buf=a:buf + if !empty(a:buf) + if a:buf =~# 'no patches applied' || + \ a:buf =~# "unknown command 'qtop'" || + \ a:buf =~# "abort" + let buf = '' + elseif exists("b:mq") && b:mq isnot# buf + " make sure, statusline is updated + unlet! b:airline_head + endif + let b:mq = buf + endif + if has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif +endfunction + +function! s:po_output(buf, file) + if !empty(a:buf) + let b:airline_po_stats = printf("[%s]", a:buf) + else + let b:airline_po_stats = '' + endif + if has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif +endfunction + +function! s:valid_dir(dir) + if empty(a:dir) || !isdirectory(a:dir) + return getcwd() + endif + return a:dir +endfunction + +if v:version >= 800 && has("job") + " Vim 8.0 with Job feature + + function! s:on_stdout(channel, msg) dict abort + let self.buf .= a:msg + endfunction + + function! s:on_exit_mq(channel) dict abort + call airline#async#mq_output(self.buf, self.file) + endfunction + + function! s:on_exit_untracked(channel) dict abort + call s:untracked_output(self, self.buf) + if has_key(s:untracked_jobs, self.file) + call remove(s:untracked_jobs, self.file) + endif + endfunction + + function! s:on_exit_po(channel) dict abort + call s:po_output(self.buf, self.file) + call airline#extensions#po#shorten() + endfunction + + function! airline#async#get_mq_async(cmd, file) + if g:airline#init#is_windows && &shell =~ 'cmd' + let cmd = a:cmd + else + let cmd = ['sh', '-c', a:cmd] + endif + + let options = {'cmd': a:cmd, 'buf': '', 'file': a:file} + if has_key(s:mq_jobs, a:file) + if job_status(get(s:mq_jobs, a:file)) == 'run' + return + elseif has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_mq', options)}) + let s:mq_jobs[a:file] = id + endfunction + + function! airline#async#get_msgfmt_stat(cmd, file) + if g:airline#init#is_windows || !executable('msgfmt') + " no msgfmt on windows? + return + else + let cmd = ['sh', '-c', a:cmd. shellescape(a:file)] + endif + + let options = {'buf': '', 'file': a:file} + if has_key(s:po_jobs, a:file) + if job_status(get(s:po_jobs, a:file)) == 'run' + return + elseif has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_po', options)}) + let s:po_jobs[a:file] = id + endfunction + + function airline#async#vim_vcs_untracked(config, file) + if g:airline#init#is_windows && &shell =~ 'cmd' + let cmd = a:config['cmd'] . shellescape(a:file) + else + let cmd = ['sh', '-c', a:config['cmd'] . shellescape(a:file)] + endif + + let options = {'cfg': a:config, 'buf': '', 'file': a:file} + if has_key(s:untracked_jobs, a:file) + if job_status(get(s:untracked_jobs, a:file)) == 'run' + return + elseif has_key(s:untracked_jobs, a:file) + call remove(s:untracked_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_untracked', options)}) + let s:untracked_jobs[a:file] = id + endfunction + +elseif has("nvim") + " NVim specific functions + + function! s:nvim_output_handler(job_id, data, event) dict + if a:event == 'stdout' || a:event == 'stderr' + let self.buf .= join(a:data) + endif + endfunction + + function! s:nvim_untracked_job_handler(job_id, data, event) dict + if a:event == 'exit' + call s:untracked_output(self, self.buf) + if has_key(s:untracked_jobs, self.file) + call remove(s:untracked_jobs, self.file) + endif + endif + endfunction + + function! s:nvim_mq_job_handler(job_id, data, event) dict + if a:event == 'exit' + call airline#async#mq_output(self.buf, self.file) + endif + endfunction + + function! s:nvim_po_job_handler(job_id, data, event) dict + if a:event == 'exit' + call s:po_output(self.buf, self.file) + call airline#extensions#po#shorten() + endif + endfunction + + function! airline#async#nvim_get_mq_async(cmd, file) + let config = { + \ 'buf': '', + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')), + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_stderr': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_mq_job_handler') + \ } + if g:airline#init#is_windows && &shell =~ 'cmd' + let cmd = a:cmd + else + let cmd = ['sh', '-c', a:cmd] + endif + + if has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif + let id = jobstart(cmd, config) + let s:mq_jobs[a:file] = id + endfunction + + function! airline#async#nvim_get_msgfmt_stat(cmd, file) + let config = { + \ 'buf': '', + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')), + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_stderr': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_po_job_handler') + \ } + if g:airline#init#is_windows && &shell =~ 'cmd' + " no msgfmt on windows? + return + else + let cmd = ['sh', '-c', a:cmd. shellescape(a:file)] + endif + + if has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif + let id = jobstart(cmd, config) + let s:po_jobs[a:file] = id + endfunction + +endif + +" Should work in either Vim pre 8 or Nvim +function! airline#async#nvim_vcs_untracked(cfg, file, vcs) + let cmd = a:cfg.cmd . shellescape(a:file) + let id = -1 + let config = { + \ 'buf': '', + \ 'vcs': a:vcs, + \ 'cfg': a:cfg, + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')) + \ } + if has("nvim") + call extend(config, { + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_untracked_job_handler')}) + if has_key(s:untracked_jobs, config.file) + " still running + return + endif + let id = jobstart(cmd, config) + let s:untracked_jobs[a:file] = id + endif + " vim without job feature or nvim jobstart failed + if id < 1 + let output=system(cmd) + call s:untracked_output(config, output) + call airline#extensions#branch#update_untracked_config(a:file, a:vcs) + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/builder.vim b/.vim/plugged/vim-airline/autoload/airline/builder.vim new file mode 100644 index 0000000..7c74226 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/builder.vim @@ -0,0 +1,212 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:prototype = {} + +function! s:prototype.split(...) dict + call add(self._sections, ['|', a:0 ? a:1 : '%=']) +endfunction + +function! s:prototype.add_section_spaced(group, contents) dict + let spc = empty(a:contents) ? '' : g:airline_symbols.space + call self.add_section(a:group, spc.a:contents.spc) +endfunction + +function! s:prototype.add_section(group, contents) dict + call add(self._sections, [a:group, a:contents]) +endfunction + +function! s:prototype.add_raw(text) dict + call add(self._sections, ['', a:text]) +endfunction + +function! s:get_prev_group(sections, i) + let x = a:i - 1 + while x >= 0 + let group = a:sections[x][0] + if group != '' && group != '|' + return group + endif + let x = x - 1 + endwhile + return '' +endfunction + +function! s:prototype.build() dict + let side = 1 + let line = '' + let i = 0 + let length = len(self._sections) + let split = 0 + let is_empty = 0 + let prev_group = '' + + while i < length + let section = self._sections[i] + let group = section[0] + let contents = section[1] + let pgroup = prev_group + let prev_group = s:get_prev_group(self._sections, i) + if group ==# 'airline_c' && &buftype ==# 'terminal' && self._context.active + let group = 'airline_term' + elseif group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') + let group = 'airline_c'. self._context.bufnr + elseif prev_group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') + let prev_group = 'airline_c'. self._context.bufnr + endif + if is_empty + let prev_group = pgroup + endif + let is_empty = s:section_is_empty(self, contents) + + if is_empty + " need to fix highlighting groups, since we + " have skipped a section, we actually need + " the previous previous group and so the + " seperator goes from the previous previous group + " to the current group + let pgroup = group + endif + + if group == '' + let line .= contents + elseif group == '|' + let side = 0 + let line .= contents + let split = 1 + else + if prev_group == '' + let line .= '%#'.group.'#' + elseif split + if !is_empty + let line .= s:get_transitioned_seperator(self, prev_group, group, side) + endif + let split = 0 + else + if !is_empty + let line .= s:get_seperator(self, prev_group, group, side) + endif + endif + let line .= is_empty ? '' : s:get_accented_line(self, group, contents) + endif + + let i = i + 1 + endwhile + + if !self._context.active + "let line = substitute(line, '%#airline_c#', '%#airline_c'.self._context.bufnr.'#', '') + let line = substitute(line, '%#.\{-}\ze#', '\0_inactive', 'g') + endif + return line +endfunction + +function! s:should_change_group(group1, group2) + if a:group1 == a:group2 + return 0 + endif + let color1 = airline#highlighter#get_highlight(a:group1) + let color2 = airline#highlighter#get_highlight(a:group2) + if g:airline_gui_mode ==# 'gui' + return color1[1] != color2[1] || color1[0] != color2[0] + else + return color1[3] != color2[3] || color1[2] != color2[2] + endif +endfunction + +function! s:get_transitioned_seperator(self, prev_group, group, side) + let line = '' + call airline#highlighter#add_separator(a:prev_group, a:group, a:side) + let line .= '%#'.a:prev_group.'_to_'.a:group.'#' + let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep + let line .= '%#'.a:group.'#' + return line +endfunction + +function! s:get_seperator(self, prev_group, group, side) + if s:should_change_group(a:prev_group, a:group) + return s:get_transitioned_seperator(a:self, a:prev_group, a:group, a:side) + else + return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep + endif +endfunction + +function! s:get_accented_line(self, group, contents) + if a:self._context.active + let contents = [] + let content_parts = split(a:contents, '__accent') + for cpart in content_parts + let accent = matchstr(cpart, '_\zs[^#]*\ze') + call add(contents, cpart) + endfor + let line = join(contents, a:group) + let line = substitute(line, '__restore__', a:group, 'g') + else + let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g') + let line = substitute(line, '%#__restore__#', '', 'g') + endif + return line +endfunction + +function! s:section_is_empty(self, content) + let start=1 + + " do not check for inactive windows or the tabline + if a:self._context.active == 0 + return 0 + elseif get(a:self._context, 'tabline', 0) + return 0 + endif + + " only check, if airline#skip_empty_sections == 1 + if get(g:, 'airline_skip_empty_sections', 0) == 0 + return 0 + endif + + " only check, if airline#skip_empty_sections == 1 + if get(w:, 'airline_skip_empty_sections', -1) == 0 + return 0 + endif + " assume accents sections to be never empty + " (avoides, that on startup the mode message becomes empty) + if match(a:content, '%#__accent_[^#]*#.*__restore__#') > -1 + return 0 + endif + if empty(a:content) + return 1 + endif + let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) + if empty(list) + return 0 " no function in statusline text + endif + while len(list) > 0 + let expr = list[0] + try + " catch all exceptions, just in case + if !empty(eval(expr)) + return 0 + endif + catch + return 0 + endtry + let start += 1 + let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) + endw + return 1 +endfunction + +function! airline#builder#new(context) + let builder = copy(s:prototype) + let builder._context = a:context + let builder._sections = [] + + call extend(builder._context, { + \ 'left_sep': g:airline_left_sep, + \ 'left_alt_sep': g:airline_left_alt_sep, + \ 'right_sep': g:airline_right_sep, + \ 'right_alt_sep': g:airline_right_alt_sep, + \ }, 'keep') + return builder +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/debug.vim b/.vim/plugged/vim-airline/autoload/airline/debug.vim new file mode 100644 index 0000000..18fc126 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/debug.vim @@ -0,0 +1,52 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#debug#profile1() + profile start airline-profile-switch.log + profile func * + profile file * + split + for i in range(1, 1000) + wincmd w + redrawstatus + endfor + profile pause + noautocmd qall! +endfunction + +function! airline#debug#profile2() + profile start airline-profile-cursor.log + profile func * + profile file * + edit blank + call setline(1, 'all your base are belong to us') + call setline(2, 'all your base are belong to us') + let positions = [[1,2], [2,2], [1,2], [1,1]] + for i in range(1, 1000) + for pos in positions + call cursor(pos[0], pos[1]) + redrawstatus + endfor + endfor + profile pause + noautocmd qall! +endfunction + +function! airline#debug#profile3() + profile start airline-profile-mode.log + profile func * + profile file * + + for i in range(1000) + startinsert + redrawstatus + stopinsert + redrawstatus + endfor + + profile pause + noautocmd qall! +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions.vim b/.vim/plugged/vim-airline/autoload/airline/extensions.vim new file mode 100644 index 0000000..79f6bec --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions.vim @@ -0,0 +1,350 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:ext = {} +let s:ext._theme_funcrefs = [] + +function! s:ext.add_statusline_func(name) dict + call airline#add_statusline_func(a:name) +endfunction +function! s:ext.add_statusline_funcref(function) dict + call airline#add_statusline_funcref(a:function) +endfunction +function! s:ext.add_inactive_statusline_func(name) dict + call airline#add_inactive_statusline_func(a:name) +endfunction +function! s:ext.add_theme_func(name) dict + call add(self._theme_funcrefs, function(a:name)) +endfunction + +let s:script_path = tolower(resolve(expand(':p:h'))) + +let s:filetype_overrides = { + \ 'nerdtree': [ 'NERD', '' ], + \ 'gundo': [ 'Gundo', '' ], + \ 'vimfiler': [ 'vimfiler', '%{vimfiler#get_status_string()}' ], + \ 'minibufexpl': [ 'MiniBufExplorer', '' ], + \ 'startify': [ 'startify', '' ], + \ 'vim-plug': [ 'Plugins', '' ], + \ } + +let s:filetype_regex_overrides = {} + +function! s:check_defined_section(name) + if !exists('w:airline_section_{a:name}') + let w:airline_section_{a:name} = g:airline_section_{a:name} + endif +endfunction + +function! airline#extensions#append_to_section(name, value) + call check_defined_section(a:name) + let w:airline_section_{a:name} .= a:value +endfunction + +function! airline#extensions#prepend_to_section(name, value) + call check_defined_section(a:name) + let w:airline_section_{a:name} = a:value . w:airline_section_{a:name} +endfunction + +function! airline#extensions#apply_left_override(section1, section2) + let w:airline_section_a = a:section1 + let w:airline_section_b = a:section2 + let w:airline_section_c = airline#section#create(['readonly']) + let w:airline_render_left = 1 + let w:airline_render_right = 0 +endfunction + +let s:active_winnr = -1 +function! airline#extensions#apply(...) + let s:active_winnr = winnr() + + if s:is_excluded_window() + return -1 + endif + + if &buftype == 'help' + call airline#extensions#apply_left_override('Help', '%f') + let w:airline_section_x = '' + let w:airline_section_y = '' + let w:airline_render_right = 1 + endif + + if &previewwindow + let w:airline_section_a = 'Preview' + let w:airline_section_b = '' + let w:airline_section_c = bufname(winbufnr(winnr())) + endif + + if has_key(s:filetype_overrides, &ft) + let args = s:filetype_overrides[&ft] + call airline#extensions#apply_left_override(args[0], args[1]) + endif + + for item in items(s:filetype_regex_overrides) + if match(&ft, item[0]) >= 0 + call airline#extensions#apply_left_override(item[1][0], item[1][1]) + endif + endfor +endfunction + +function! s:is_excluded_window() + for matchft in g:airline_exclude_filetypes + if matchft ==# &ft + return 1 + endif + endfor + + for matchw in g:airline_exclude_filenames + if matchstr(expand('%'), matchw) ==# matchw + return 1 + endif + endfor + + if g:airline_exclude_preview && &previewwindow + return 1 + endif + + return 0 +endfunction + +function! airline#extensions#load_theme() + call airline#util#exec_funcrefs(s:ext._theme_funcrefs, g:airline#themes#{g:airline_theme}#palette) +endfunction + +function! s:sync_active_winnr() + if exists('#airline') && winnr() != s:active_winnr + call airline#update_statusline() + endif +endfunction + +function! airline#extensions#load() + let loaded_ext = [] + " non-trivial number of external plugins use eventignore=all, so we need to account for that + autocmd CursorMoved * call sync_active_winnr() + + if exists('g:airline_extensions') + for ext in g:airline_extensions + try + call airline#extensions#{ext}#init(s:ext) + catch /^Vim\%((\a\+)\)\=:E117/ " E117, function does not exist + call airline#util#warning("Extension '".ext."' not installed, ignoring!") + endtry + endfor + return + endif + + call airline#extensions#quickfix#init(s:ext) + call add(loaded_ext, 'quickfix') + + if get(g:, 'loaded_unite', 0) + call airline#extensions#unite#init(s:ext) + call add(loaded_ext, 'unite') + endif + + if get(g:, 'loaded_denite', 0) + call airline#extensions#denite#init(s:ext) + call add(loaded_ext, 'denite') + endif + + if exists(':NetrwSettings') + call airline#extensions#netrw#init(s:ext) + call add(loaded_ext, 'netrw') + endif + + if has("terminal") + call airline#extensions#term#init(s:ext) + call add(loaded_ext, 'term') + endif + + if get(g:, 'airline#extensions#ycm#enabled', 0) + call airline#extensions#ycm#init(s:ext) + call add(loaded_ext, 'ycm') + endif + + if get(g:, 'loaded_vimfiler', 0) + let g:vimfiler_force_overwrite_statusline = 0 + endif + + if get(g:, 'loaded_ctrlp', 0) + call airline#extensions#ctrlp#init(s:ext) + call add(loaded_ext, 'ctrlp') + endif + + if get(g:, 'CtrlSpaceLoaded', 0) + call airline#extensions#ctrlspace#init(s:ext) + call add(loaded_ext, 'ctrlspace') + endif + + if get(g:, 'command_t_loaded', 0) + call airline#extensions#commandt#init(s:ext) + call add(loaded_ext, 'commandt') + endif + + if exists(':UndotreeToggle') + call airline#extensions#undotree#init(s:ext) + call add(loaded_ext, 'undotree') + endif + + if get(g:, 'airline#extensions#hunks#enabled', 1) + \ && (exists('g:loaded_signify') || exists('g:loaded_gitgutter') || exists('g:loaded_changes') || exists('g:loaded_quickfixsigns')) + call airline#extensions#hunks#init(s:ext) + call add(loaded_ext, 'hunks') + endif + + if get(g:, 'airline#extensions#vimagit#enabled', 1) + \ && (exists('g:loaded_magit')) + call airline#extensions#vimagit#init(s:ext) + call add(loaded_ext, 'vimagit') + endif + + if get(g:, 'airline#extensions#tagbar#enabled', 1) + \ && exists(':TagbarToggle') + call airline#extensions#tagbar#init(s:ext) + call add(loaded_ext, 'tagbar') + endif + + if get(g:, 'airline#extensions#csv#enabled', 1) + \ && (get(g:, 'loaded_csv', 0) || exists(':Table')) + call airline#extensions#csv#init(s:ext) + call add(loaded_ext, 'csv') + endif + + if exists(':VimShell') + let s:filetype_overrides['vimshell'] = ['vimshell','%{vimshell#get_status_string()}'] + let s:filetype_regex_overrides['^int-'] = ['vimshell','%{substitute(&ft, "int-", "", "")}'] + endif + + if get(g:, 'airline#extensions#branch#enabled', 1) + \ && (exists('*fugitive#head') || exists('*lawrencium#statusline') || + \ (get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine'))) + call airline#extensions#branch#init(s:ext) + call add(loaded_ext, 'branch') + endif + + if get(g:, 'airline#extensions#bufferline#enabled', 1) + \ && exists('*bufferline#get_status_string') + call airline#extensions#bufferline#init(s:ext) + call add(loaded_ext, 'bufferline') + endif + + if (get(g:, 'airline#extensions#virtualenv#enabled', 1) && (exists(':VirtualEnvList') || isdirectory($VIRTUAL_ENV))) + call airline#extensions#virtualenv#init(s:ext) + call add(loaded_ext, 'virtualenv') + endif + + if (get(g:, 'airline#extensions#eclim#enabled', 1) && exists(':ProjectCreate')) + call airline#extensions#eclim#init(s:ext) + call add(loaded_ext, 'eclim') + endif + + if get(g:, 'airline#extensions#syntastic#enabled', 1) + \ && exists(':SyntasticCheck') + call airline#extensions#syntastic#init(s:ext) + call add(loaded_ext, 'syntastic') + endif + + if (get(g:, 'airline#extensions#ale#enabled', 1) && exists(':ALELint')) + call airline#extensions#ale#init(s:ext) + call add(loaded_ext, 'ale') + endif + + if get(g:, 'airline#extensions#whitespace#enabled', 1) + call airline#extensions#whitespace#init(s:ext) + call add(loaded_ext, 'whitespace') + endif + + if (get(g:, 'airline#extensions#neomake#enabled', 1) && exists(':Neomake')) + call airline#extensions#neomake#init(s:ext) + call add(loaded_ext, 'neomake') + endif + + if get(g:, 'airline#extensions#po#enabled', 1) && executable('msgfmt') + call airline#extensions#po#init(s:ext) + call add(loaded_ext, 'po') + endif + + if get(g:, 'airline#extensions#wordcount#enabled', 1) + call airline#extensions#wordcount#init(s:ext) + call add(loaded_ext, 'wordcount') + endif + + if get(g:, 'airline#extensions#tabline#enabled', 0) + call airline#extensions#tabline#init(s:ext) + call add(loaded_ext, 'tabline') + endif + + if get(g:, 'airline#extensions#tmuxline#enabled', 1) && exists(':Tmuxline') + call airline#extensions#tmuxline#init(s:ext) + call add(loaded_ext, 'tmuxline') + endif + + if get(g:, 'airline#extensions#promptline#enabled', 1) && exists(':PromptlineSnapshot') && len(get(g:, 'airline#extensions#promptline#snapshot_file', '')) + call airline#extensions#promptline#init(s:ext) + call add(loaded_ext, 'promptline') + endif + + if get(g:, 'airline#extensions#nrrwrgn#enabled', 1) && exists(':NR') == 2 + call airline#extensions#nrrwrgn#init(s:ext) + call add(loaded_ext, 'nrrwrgn') + endif + + if get(g:, 'airline#extensions#unicode#enabled', 1) && exists(':UnicodeTable') == 2 + call airline#extensions#unicode#init(s:ext) + call add(loaded_ext, 'nrrwrgn') + endif + + if (get(g:, 'airline#extensions#capslock#enabled', 1) && exists('*CapsLockStatusline')) + call airline#extensions#capslock#init(s:ext) + call add(loaded_ext, 'capslock') + endif + + if (get(g:, 'airline#extensions#xkblayout#enabled', 1) && exists('g:XkbSwitchLib')) + call airline#extensions#xkblayout#init(s:ext) + call add(loaded_ext, 'xkblayout') + endif + + if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) + call airline#extensions#keymap#init(s:ext) + call add(loaded_ext, 'keymap') + endif + + if (get(g:, 'airline#extensions#windowswap#enabled', 1) && get(g:, 'loaded_windowswap', 0)) + call airline#extensions#windowswap#init(s:ext) + call add(loaded_ext, 'windowswap') + endif + + if (get(g:, 'airline#extensions#obsession#enabled', 1) && exists('*ObsessionStatus')) + call airline#extensions#obsession#init(s:ext) + call add(loaded_ext, 'obsession') + endif + + runtime autoload/vimtex.vim + if (get(g:, 'airline#extensions#vimtex#enabled', 1)) && exists('*vimtex#init') + call airline#extensions#vimtex#init(s:ext) + call add(loaded_ext, 'vimtex') + endif + + if !get(g:, 'airline#extensions#disable_rtp_load', 0) + " load all other extensions, which are not part of the default distribution. + " (autoload/airline/extensions/*.vim outside of our s:script_path). + for file in split(globpath(&rtp, "autoload/airline/extensions/*.vim"), "\n") + " we have to check both resolved and unresolved paths, since it's possible + " that they might not get resolved properly (see #187) + if stridx(tolower(resolve(fnamemodify(file, ':p'))), s:script_path) < 0 + \ && stridx(tolower(fnamemodify(file, ':p')), s:script_path) < 0 + let name = fnamemodify(file, ':t:r') + if !get(g:, 'airline#extensions#'.name.'#enabled', 1) || + \ index(loaded_ext, name) > -1 + continue + endif + try + call airline#extensions#{name}#init(s:ext) + catch + endtry + endif + endfor + endif +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/ale.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/ale.vim new file mode 100644 index 0000000..51755b9 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/ale.vim @@ -0,0 +1,77 @@ +" MIT License. Copyright (c) 2013-2017 Bjorn Neergaard, w0rp +" vim: et ts=2 sts=2 sw=2 + +let s:error_symbol = get(g:, 'airline#extensions#ale#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#ale#warning_symbol', 'W:') + +function! s:airline_ale_count(cnt, symbol) + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! s:airline_ale_get_line_number(cnt, type) abort + if a:cnt == 0 + return '' + endif + + let buffer = bufnr('') + let problem_type = (a:type ==# 'error') ? 'E' : 'W' + let problems = copy(ale#engine#GetLoclist(buffer)) + + call filter(problems, 'v:val.bufnr is buffer && v:val.type is# problem_type') + + if empty(problems) + return '' + endif + + let open_lnum_symbol = get(g:, 'airline#extensions#ale#open_lnum_symbol', '(L') + let close_lnum_symbol = get(g:, 'airline#extensions#ale#close_lnum_symbol', ')') + + return open_lnum_symbol . problems[0].lnum . close_lnum_symbol +endfunction + +function! airline#extensions#ale#get(type) + if !exists(':ALELint') + return '' + endif + + let is_err = a:type ==# 'error' + let symbol = is_err ? s:error_symbol : s:warning_symbol + + let is_err = a:type ==# 'error' + let counts = ale#statusline#Count(bufnr('')) + let symbol = is_err ? s:error_symbol : s:warning_symbol + + if type(counts) == type({}) && has_key(counts, 'error') + " Use the current Dictionary format. + let errors = counts.error + counts.style_error + let num = is_err ? errors : counts.total - errors + else + " Use the old List format. + let num = is_err ? counts[0] : counts[1] + endif + + return s:airline_ale_count(num, symbol) . airline_ale_get_line_number(num, a:type) +endfunction + +function! airline#extensions#ale#get_warning() + return airline#extensions#ale#get('warning') +endfunction + +function! airline#extensions#ale#get_error() + return airline#extensions#ale#get('error') +endfunction + +function! airline#extensions#ale#init(ext) + call airline#parts#define_function('ale_error_count', 'airline#extensions#ale#get_error') + call airline#parts#define_function('ale_warning_count', 'airline#extensions#ale#get_warning') + augroup airline_ale + autocmd! + autocmd CursorHold,BufWritePost * call ale_refresh() + augroup END +endfunction + +function! s:ale_refresh() + if get(g:, 'airline_skip_empty_sections', 0) + exe ':AirlineRefresh' + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/branch.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/branch.vim new file mode 100644 index 0000000..c589bdd --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/branch.vim @@ -0,0 +1,336 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:has_fugitive = exists('*fugitive#head') +let s:has_lawrencium = exists('*lawrencium#statusline') +let s:has_vcscommand = get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine') + +if !s:has_fugitive && !s:has_lawrencium && !s:has_vcscommand + finish +endif + +" s:vcs_config contains static configuration of VCSes and their status relative +" to the active file. +" 'branch' - The name of currently active branch. This field is empty iff it +" has not been initialized yet or the current file is not in +" an active branch. +" 'untracked' - Cache of untracked files represented as a dictionary with files +" as keys. A file has a not exists symbol set as its value if it +" is untracked. A file is present in this dictionary iff its +" status is considered up to date. +" 'untracked_mark' - used as regexp to test against the output of 'cmd' +let s:vcs_config = { +\ 'git': { +\ 'exe': 'git', +\ 'cmd': 'git status --porcelain -- ', +\ 'untracked_mark': '??', +\ 'update_branch': 's:update_git_branch', +\ 'exclude': '\.git', +\ 'branch': '', +\ 'untracked': {}, +\ }, +\ 'mercurial': { +\ 'exe': 'hg', +\ 'cmd': 'hg status -u -- ', +\ 'untracked_mark': '?', +\ 'exclude': '\.hg', +\ 'update_branch': 's:update_hg_branch', +\ 'branch': '', +\ 'untracked': {}, +\ }, +\} + +" Initializes b:buffer_vcs_config. b:buffer_vcs_config caches the branch and +" untracked status of the file in the buffer. Caching those fields is necessary, +" because s:vcs_config may be updated asynchronously and s:vcs_config fields may +" be invalid during those updates. b:buffer_vcs_config fields are updated +" whenever corresponding fields in s:vcs_config are updated or an inconsistency +" is detected during update_* operation. +" +" b:airline_head caches the head string it is empty iff it needs to be +" recalculated. b:airline_head is recalculated based on b:buffer_vcs_config. +function! s:init_buffer() + let b:buffer_vcs_config = {} + for vcs in keys(s:vcs_config) + let b:buffer_vcs_config[vcs] = { + \ 'branch': '', + \ 'untracked': '', + \ } + endfor + unlet! b:airline_head +endfunction + +let s:head_format = get(g:, 'airline#extensions#branch#format', 0) +if s:head_format == 1 + function! s:format_name(name) + return fnamemodify(a:name, ':t') + endfunction +elseif s:head_format == 2 + function! s:format_name(name) + return pathshorten(a:name) + endfunction +elseif type(s:head_format) == type('') + function! s:format_name(name) + return call(s:head_format, [a:name]) + endfunction +else + function! s:format_name(name) + return a:name + endfunction +endif + +let s:git_dirs = {} + +function! s:update_git_branch(path) + if !s:has_fugitive + let s:vcs_config['git'].branch = '' + return + endif + + let name = fugitive#head(7) + if empty(name) + if has_key(s:git_dirs, a:path) + let s:vcs_config['git'].branch = s:git_dirs[a:path] + return + endif + + let dir = fugitive#extract_git_dir(a:path) + if empty(dir) + let name = '' + else + try + let line = join(readfile(dir . '/HEAD')) + if strpart(line, 0, 16) == 'ref: refs/heads/' + let name = strpart(line, 16) + else + " raw commit hash + let name = strpart(line, 0, 7) + endif + catch + let name = '' + endtry + endif + endif + + let s:git_dirs[a:path] = name + let s:vcs_config['git'].branch = name +endfunction + +function! s:update_hg_branch(...) + " path argument is not actually used, so we don't actually care about a:1 + " it is just needed, because update_git_branch needs it. + if s:has_lawrencium + let cmd='LC_ALL=C hg qtop' + let stl=lawrencium#statusline() + let file=expand('%:p') + if !empty(stl) && get(b:, 'airline_do_mq_check', 1) + if g:airline#init#vim_async + call airline#async#get_mq_async(cmd, file) + elseif has("nvim") + call airline#async#nvim_get_mq_async(cmd, file) + else + " remove \n at the end of the command + let output=system(cmd)[0:-2] + call airline#async#mq_output(output, file) + endif + endif + " do not do mq check anymore + let b:airline_do_mq_check = 0 + if exists("b:mq") && !empty(b:mq) + if stl is# 'default' + " Shorten default a bit + let stl='def' + endif + let stl.=' ['.b:mq.']' + endif + let s:vcs_config['mercurial'].branch = stl + else + let s:vcs_config['mercurial'].branch = '' + endif +endfunction + +function! s:update_branch() + let b:airline_fname_path = get(b:, 'airline_fname_path', + \ exists("*fnamemodify") ? fnamemodify(resolve(@%), ":p:h") : expand("%:p:h")) + for vcs in keys(s:vcs_config) + call {s:vcs_config[vcs].update_branch}(b:airline_fname_path) + if b:buffer_vcs_config[vcs].branch != s:vcs_config[vcs].branch + let b:buffer_vcs_config[vcs].branch = s:vcs_config[vcs].branch + unlet! b:airline_head + endif + endfor +endfunction + +function! airline#extensions#branch#update_untracked_config(file, vcs) + if !has_key(s:vcs_config[a:vcs].untracked, a:file) + return + elseif s:vcs_config[a:vcs].untracked[a:file] != b:buffer_vcs_config[a:vcs].untracked + let b:buffer_vcs_config[a:vcs].untracked = s:vcs_config[a:vcs].untracked[a:file] + unlet! b:airline_head + endif +endfunction + +function! s:update_untracked() + let file = expand("%:p") + if empty(file) || isdirectory(file) + return + endif + + let needs_update = 1 + for vcs in keys(s:vcs_config) + if file =~ s:vcs_config[vcs].exclude + " Skip check for files that live in the exclude directory + let needs_update = 0 + endif + if has_key(s:vcs_config[vcs].untracked, file) + let needs_update = 0 + call airline#extensions#branch#update_untracked_config(file, vcs) + endif + endfor + + if !needs_update + return + endif + + for vcs in keys(s:vcs_config) + let config = s:vcs_config[vcs] + if g:airline#init#vim_async + " Note that asynchronous update updates s:vcs_config only, and only + " s:update_untracked updates b:buffer_vcs_config. If s:vcs_config is + " invalidated again before s:update_untracked is called, then we lose the + " result of the previous call, i.e. the head string is not updated. It + " doesn't happen often in practice, so we let it be. + call airline#async#vim_vcs_untracked(config, file) + else + " nvim async or vim without job-feature + call airline#async#nvim_vcs_untracked(config, file, vcs) + endif + endfor +endfunction + +function! airline#extensions#branch#head() + if !exists('b:buffer_vcs_config') + call s:init_buffer() + endif + + call s:update_branch() + call s:update_untracked() + + if exists('b:airline_head') && !empty(b:airline_head) + return b:airline_head + endif + + let b:airline_head = '' + let vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"]) + + let heads = {} + for vcs in vcs_priority + if !empty(b:buffer_vcs_config[vcs].branch) + let heads[vcs] = b:buffer_vcs_config[vcs].branch + endif + endfor + + for vcs in keys(heads) + if !empty(b:airline_head) + let b:airline_head .= ' | ' + endif + let b:airline_head .= (len(heads) > 1 ? s:vcs_config[vcs].exe .':' : '') . s:format_name(heads[vcs]) + let b:airline_head .= b:buffer_vcs_config[vcs].untracked + endfor + + if empty(heads) + if s:has_vcscommand + call VCSCommandEnableBufferSetup() + if exists('b:VCSCommandBufferInfo') + let b:airline_head = s:format_name(get(b:VCSCommandBufferInfo, 0, '')) + endif + endif + endif + + if exists("g:airline#extensions#branch#displayed_head_limit") + let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit + if len(b:airline_head) > w:displayed_head_limit - 1 + let b:airline_head = b:airline_head[0:(w:displayed_head_limit - 1)].(&encoding ==? 'utf-8' ? '…' : '.') + endif + endif + + if has_key(heads, 'git') && !s:check_in_path() + let b:airline_head = '' + endif + let minwidth = empty(get(b:, 'airline_hunks', '')) ? 14 : 7 + let b:airline_head = airline#util#shorten(b:airline_head, 120, minwidth) + return b:airline_head +endfunction + +function! airline#extensions#branch#get_head() + let head = airline#extensions#branch#head() + let empty_message = get(g:, 'airline#extensions#branch#empty_message', '') + let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch) + return empty(head) + \ ? empty_message + \ : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head) +endfunction + +function! s:check_in_path() + if !exists('b:airline_file_in_root') + let root = get(b:, 'git_dir', get(b:, 'mercurial_dir', '')) + let bufferpath = resolve(fnamemodify(expand('%'), ':p')) + + if !filereadable(root) "not a file + " if .git is a directory, it's the old submodule format + if match(root, '\.git$') >= 0 + let root = expand(fnamemodify(root, ':h')) + else + " else it's the newer format, and we need to guesstimate + " 1) check for worktrees + if match(root, 'worktrees') > -1 + " worktree can be anywhere, so simply assume true here + return 1 + endif + " 2) check for submodules + let pattern = '\.git[\\/]\(modules\)[\\/]' + if match(root, pattern) >= 0 + let root = substitute(root, pattern, '', '') + endif + endif + endif + + let b:airline_file_in_root = stridx(bufferpath, root) > -1 + endif + return b:airline_file_in_root +endfunction + +function! s:reset_untracked_cache(shellcmdpost) + " shellcmdpost - whether function was called as a result of ShellCmdPost hook + if !g:airline#init#vim_async && !has('nvim') + if a:shellcmdpost + " Clear cache only if there was no error or the script uses an + " asynchronous interface. Otherwise, cache clearing would overwrite + " v:shell_error with a system() call inside get_*_untracked. + if v:shell_error + return + endif + endif + endif + + let file = expand("%:p") + for vcs in keys(s:vcs_config) + " Dump the value of the cache for the current file. Partially mitigates the + " issue of cache invalidation happening before a call to + " s:update_untracked() + call airline#extensions#branch#update_untracked_config(file, vcs) + let s:vcs_config[vcs].untracked = {} + endfor +endfunction + +function! airline#extensions#branch#init(ext) + call airline#parts#define_function('branch', 'airline#extensions#branch#get_head') + + autocmd BufReadPost * unlet! b:airline_file_in_root + autocmd ShellCmdPost,CmdwinLeave * unlet! b:airline_head b:airline_do_mq_check b:airline_fname_path + autocmd User AirlineBeforeRefresh unlet! b:airline_head b:airline_do_mq_check b:airline_fname_path + autocmd BufWritePost * call s:reset_untracked_cache(0) + autocmd ShellCmdPost * call s:reset_untracked_cache(1) +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/bufferline.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/bufferline.vim new file mode 100644 index 0000000..f2bfbbb --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/bufferline.vim @@ -0,0 +1,29 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*bufferline#get_status_string') + finish +endif + +let s:overwrite = get(g:, 'airline#extensions#bufferline#overwrite_variables', 1) + +function! airline#extensions#bufferline#init(ext) + if s:overwrite + highlight bufferline_selected gui=bold cterm=bold term=bold + highlight link bufferline_selected_inactive airline_c_inactive + let g:bufferline_inactive_highlight = 'airline_c' + let g:bufferline_active_highlight = 'bufferline_selected' + let g:bufferline_active_buffer_left = '' + let g:bufferline_active_buffer_right = '' + let g:bufferline_separator = g:airline_symbols.space + endif + + if exists("+autochdir") && &autochdir == 1 + " if 'acd' is set, vim-airline uses the path section, so we need ot redefine this here as well + call airline#parts#define_raw('path', '%{bufferline#refresh_status()}'.bufferline#get_status_string()) + else + call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string()) + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/capslock.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/capslock.vim new file mode 100644 index 0000000..d79c24e --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/capslock.vim @@ -0,0 +1,17 @@ +" MIT License. Copyright (c) 2014 Mathias Andersson. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*CapsLockStatusline') + finish +endif + +function! airline#extensions#capslock#status() + return tolower(CapsLockStatusline()) == '[caps]' ? 'CAPS' : '' +endfunction + +function! airline#extensions#capslock#init(ext) + call airline#parts#define_function('capslock', 'airline#extensions#capslock#status') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/commandt.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/commandt.vim new file mode 100644 index 0000000..93c6572 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/commandt.vim @@ -0,0 +1,18 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'command_t_loaded', 0) + finish +endif + +function! airline#extensions#commandt#apply(...) + if bufname('%') ==# 'GoToFile' + call airline#extensions#apply_left_override('CommandT', '') + endif +endfunction + +function! airline#extensions#commandt#init(ext) + call a:ext.add_statusline_func('airline#extensions#commandt#apply') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/csv.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/csv.vim new file mode 100644 index 0000000..b95aacd --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/csv.vim @@ -0,0 +1,33 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_csv', 0) && !exists(':Table') + finish +endif + +let s:column_display = get(g:, 'airline#extensions#csv#column_display', 'Number') + +function! airline#extensions#csv#get_column() + if exists('*CSV_WCol') + if s:column_display ==# 'Name' + return '['.CSV_WCol('Name').CSV_WCol().']' + else + return '['.CSV_WCol().']' + endif + endif + return '' +endfunction + +function! airline#extensions#csv#apply(...) + if &ft ==# "csv" + call airline#extensions#prepend_to_section('gutter', + \ g:airline_left_alt_sep.' %{airline#extensions#csv#get_column()}') + endif +endfunction + +function! airline#extensions#csv#init(ext) + call a:ext.add_statusline_func('airline#extensions#csv#apply') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/ctrlp.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/ctrlp.vim new file mode 100644 index 0000000..3781108 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/ctrlp.vim @@ -0,0 +1,82 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:color_template = get(g:, 'airline#extensions#ctrlp#color_template', 'insert') + +function! airline#extensions#ctrlp#generate_color_map(dark, light, white) + return { + \ 'CtrlPdark' : a:dark, + \ 'CtrlPlight' : a:light, + \ 'CtrlPwhite' : a:white, + \ 'CtrlParrow1' : [ a:light[1] , a:white[1] , a:light[3] , a:white[3] , '' ] , + \ 'CtrlParrow2' : [ a:white[1] , a:light[1] , a:white[3] , a:light[3] , '' ] , + \ 'CtrlParrow3' : [ a:light[1] , a:dark[1] , a:light[3] , a:dark[3] , '' ] , + \ } +endfunction + +function! airline#extensions#ctrlp#load_theme(palette) + if exists('a:palette.ctrlp') + let theme = a:palette.ctrlp + else + let s:color_template = has_key(a:palette, s:color_template) ? s:color_template : 'insert' + let theme = airline#extensions#ctrlp#generate_color_map( + \ a:palette[s:color_template]['airline_c'], + \ a:palette[s:color_template]['airline_b'], + \ a:palette[s:color_template]['airline_a']) + endif + for key in keys(theme) + call airline#highlighter#exec(key, theme[key]) + endfor +endfunction + +" Arguments: focus, byfname, regexp, prv, item, nxt, marked +function! airline#extensions#ctrlp#ctrlp_airline(...) + let b = airline#builder#new({'active': 1}) + if a:2 == 'file' + call b.add_section_spaced('CtrlPlight', 'by fname') + endif + if a:3 + call b.add_section_spaced('CtrlPlight', 'regex') + endif + if get(g:, 'airline#extensions#ctrlp#show_adjacent_modes', 1) + call b.add_section_spaced('CtrlPlight', a:4) + call b.add_section_spaced('CtrlPwhite', a:5) + call b.add_section_spaced('CtrlPlight', a:6) + else + call b.add_section_spaced('CtrlPwhite', a:5) + endif + call b.add_section_spaced('CtrlPdark', a:7) + call b.split() + call b.add_section_spaced('CtrlPdark', a:1) + call b.add_section_spaced('CtrlPdark', a:2) + call b.add_section_spaced('CtrlPlight', '%{getcwd()}') + return b.build() +endfunction + +" Argument: len +function! airline#extensions#ctrlp#ctrlp_airline_status(...) + let len = '%#CtrlPdark# '.a:1 + let dir = '%=%<%#CtrlParrow3#'.g:airline_right_sep.'%#CtrlPlight# '.getcwd().' %*' + return len.dir +endfunction + +function! airline#extensions#ctrlp#apply(...) + " disable statusline overwrite if ctrlp already did it + return match(&statusline, 'CtrlPwhite') >= 0 ? -1 : 0 +endfunction + +function! airline#extensions#ctrlp#init(ext) + let g:ctrlp_status_func = { + \ 'main': 'airline#extensions#ctrlp#ctrlp_airline', + \ 'prog': 'airline#extensions#ctrlp#ctrlp_airline_status', + \ } + call a:ext.add_statusline_func('airline#extensions#ctrlp#apply') + call a:ext.add_theme_func('airline#extensions#ctrlp#load_theme') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/ctrlspace.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/ctrlspace.vim new file mode 100644 index 0000000..a7e00ba --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/ctrlspace.vim @@ -0,0 +1,20 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space +let s:padding = s:spc . s:spc . s:spc +let s:cs = ctrlspace#context#Configuration().Symbols.CS + +function! airline#extensions#ctrlspace#statusline(...) + let b = airline#builder#new({ 'active': 1 }) + call b.add_section('airline_b', s:cs . s:padding . ctrlspace#api#StatuslineModeSegment(s:padding)) + call b.split() + call b.add_section('airline_x', s:spc . ctrlspace#api#StatuslineTabSegment() . s:spc) + return b.build() +endfunction + +function! airline#extensions#ctrlspace#init(ext) + let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()" +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/default.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/default.vim new file mode 100644 index 0000000..7c209a1 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/default.vim @@ -0,0 +1,101 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:section_use_groups = get(g:, 'airline#extensions#default#section_use_groupitems', 1) +let s:section_truncate_width = get(g:, 'airline#extensions#default#section_truncate_width', { + \ 'b': 79, + \ 'x': 60, + \ 'y': 88, + \ 'z': 45, + \ 'warning': 80, + \ 'error': 80, + \ }) +let s:layout = get(g:, 'airline#extensions#default#layout', [ + \ [ 'a', 'b', 'c' ], + \ [ 'x', 'y', 'z', 'warning', 'error' ] + \ ]) + +function! s:get_section(winnr, key, ...) + if has_key(s:section_truncate_width, a:key) + if winwidth(a:winnr) < s:section_truncate_width[a:key] + return '' + endif + endif + let spc = g:airline_symbols.space + if !exists('g:airline_section_{a:key}') + return '' + endif + let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key}) + let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')] + return empty(text) ? '' : prefix.text.suffix +endfunction + +function! s:build_sections(builder, context, keys) + for key in a:keys + if (key == 'warning' || key == 'error') && !a:context.active + continue + endif + call s:add_section(a:builder, a:context, key) + endfor +endfunction + +" There still is a highlighting bug when using groups %(%) in the statusline, +" deactivate it, unless it is fixed (7.4.1511) +if s:section_use_groups && (v:version >= 704 || (v:version >= 703 && has('patch81'))) + function! s:add_section(builder, context, key) + let condition = (a:key is# "warning" || a:key is# "error") && + \ (v:version == 704 && !has("patch1511")) + " i have no idea why the warning section needs special treatment, but it's + " needed to prevent separators from showing up + if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) + return + endif + if condition + call a:builder.add_raw('%(') + endif + call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) + if condition + call a:builder.add_raw('%)') + endif + endfunction +else + " older version don't like the use of %(%) + function! s:add_section(builder, context, key) + if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) + return + endif + if a:key == 'warning' + call a:builder.add_raw('%#airline_warning#'.s:get_section(a:context.winnr, a:key)) + elseif a:key == 'error' + call a:builder.add_raw('%#airline_error#'.s:get_section(a:context.winnr, a:key)) + else + call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) + endif + endfunction +endif + +function! airline#extensions#default#apply(builder, context) + let winnr = a:context.winnr + let active = a:context.active + + if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) + call s:build_sections(a:builder, a:context, s:layout[0]) + else + let text = s:get_section(winnr, 'c') + if empty(text) + let text = ' %f%m ' + endif + call a:builder.add_section('airline_c'.(a:context.bufnr), text) + endif + + call a:builder.split(s:get_section(winnr, 'gutter', '', '')) + + if airline#util#getwinvar(winnr, 'airline_render_right', 1) + call s:build_sections(a:builder, a:context, s:layout[1]) + endif + + return 1 +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/denite.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/denite.vim new file mode 100644 index 0000000..25a2f1d --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/denite.vim @@ -0,0 +1,42 @@ +" MIT License. Copyright (c) 2017 Thomas Dy +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_denite', 0) + finish +endif + +" Denite does not use vim's built-in modal editing but has a custom prompt +" that implements its own insert/normal mode so we have to handle changing the +" highlight +function! airline#extensions#denite#check_denite_mode(bufnr) + if &filetype != 'denite' + return '' + endif + let mode = split(denite#get_status_mode(), ' ') + let mode = tolower(mode[1]) + if !exists('b:denite_mode_cache') || mode != b:denite_mode_cache + call airline#highlighter#highlight([mode], a:bufnr) + let b:denite_mode_cache = mode + endif + return '' +endfunction + +function! airline#extensions#denite#apply(...) + if &ft == 'denite' + let w:airline_skip_empty_sections = 0 + call a:1.add_section('airline_a', ' Denite %{airline#extensions#denite#check_denite_mode('.a:2['bufnr'].')}') + call a:1.add_section('airline_c', ' %{denite#get_status_sources()}') + call a:1.split() + call a:1.add_section('airline_y', ' %{denite#get_status_path()} ') + call a:1.add_section('airline_z', ' %{denite#get_status_linenr()} ') + return 1 + endif +endfunction + +function! airline#extensions#denite#init(ext) + call denite#custom#option('_', 'statusline', 0) + call a:ext.add_statusline_func('airline#extensions#denite#apply') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/eclim.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/eclim.vim new file mode 100644 index 0000000..44f1bb5 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/eclim.vim @@ -0,0 +1,62 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':ProjectCreate') + finish +endif + +function! airline#extensions#eclim#creat_line(...) + if &filetype == "tree" + let builder = a:1 + call builder.add_section('airline_a', ' Project ') + call builder.add_section('airline_b', ' %f ') + call builder.add_section('airline_c', '') + return 1 + endif +endfunction + +function! airline#extensions#eclim#get_warnings() + " Cache vavlues, so that it isn't called too often + if exists("s:eclim_errors") && + \ get(b:, 'airline_changenr', 0) == changenr() + return s:eclim_errors + endif + let eclimList = eclim#display#signs#GetExisting() + let s:eclim_errors = '' + + if !empty(eclimList) + " Remove any non-eclim signs (see eclim#display#signs#Update) + " First check for just errors since they are more important. + " If there are no errors, then check for warnings. + let errorList = filter(copy(eclimList), 'v:val.name =~ "^\\(qf_\\)\\?\\(error\\)$"') + + if (empty(errorList)) + " use the warnings + call filter(eclimList, 'v:val.name =~ "^\\(qf_\\)\\?\\(warning\\)$"') + let type = 'W' + else + " Use the errors + let eclimList = errorList + let type = 'E' + endif + + if !empty(eclimList) + let errorsLine = eclimList[0]['line'] + let errorsNumber = len(eclimList) + let errors = "[Eclim:" . type . " line:".string(errorsLine)." (".string(errorsNumber).")]" + if !exists(':SyntasticCheck') || SyntasticStatuslineFlag() == '' + let s:eclim_errors = errors.(g:airline_symbols.space) + endif + endif + endif + let b:airline_changenr = changenr() + return s:eclim_errors +endfunction + +function! airline#extensions#eclim#init(ext) + call airline#parts#define_function('eclim', 'airline#extensions#eclim#get_warnings') + call a:ext.add_statusline_func('airline#extensions#eclim#creat_line') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/example.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/example.vim new file mode 100644 index 0000000..c81f6c3 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/example.vim @@ -0,0 +1,56 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +" we don't actually want this loaded :P +finish + +" Due to some potential rendering issues, the use of the `space` variable is +" recommended. +let s:spc = g:airline_symbols.space + +" Extension specific variables can be defined the usual fashion. +if !exists('g:airline#extensions#example#number_of_cats') + let g:airline#extensions#example#number_of_cats = 42 +endif + +" First we define an init function that will be invoked from extensions.vim +function! airline#extensions#example#init(ext) + + " Here we define a new part for the plugin. This allows users to place this + " extension in arbitrary locations. + call airline#parts#define_raw('cats', '%{airline#extensions#example#get_cats()}') + + " Next up we add a funcref so that we can run some code prior to the + " statusline getting modifed. + call a:ext.add_statusline_func('airline#extensions#example#apply') + + " You can also add a funcref for inactive statuslines. + " call a:ext.add_inactive_statusline_func('airline#extensions#example#unapply') +endfunction + +" This function will be invoked just prior to the statusline getting modified. +function! airline#extensions#example#apply(...) + " First we check for the filetype. + if &filetype == "nyancat" + + " Let's say we want to append to section_c, first we check if there's + " already a window-local override, and if not, create it off of the global + " section_c. + let w:airline_section_c = get(w:, 'airline_section_c', g:airline_section_c) + + " Then we just append this extenion to it, optionally using separators. + let w:airline_section_c .= s:spc.g:airline_left_alt_sep.s:spc.'%{airline#extensions#example#get_cats()}' + endif +endfunction + +" Finally, this function will be invoked from the statusline. +function! airline#extensions#example#get_cats() + let cats = '' + for i in range(1, g:airline#extensions#example#number_of_cats) + let cats .= ' (,,,)=(^.^)=(,,,) ' + endfor + return cats +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/hunks.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/hunks.vim new file mode 100644 index 0000000..4bb4b4f --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/hunks.vim @@ -0,0 +1,93 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_signify', 0) && !get(g:, 'loaded_gitgutter', 0) && !get(g:, 'loaded_changes', 0) && !get(g:, 'loaded_quickfixsigns', 0) + finish +endif + +let s:non_zero_only = get(g:, 'airline#extensions#hunks#non_zero_only', 0) +let s:hunk_symbols = get(g:, 'airline#extensions#hunks#hunk_symbols', ['+', '~', '-']) + +function! s:get_hunks_signify() + let hunks = sy#repo#get_stats() + if hunks[0] >= 0 + return hunks + endif + return [] +endfunction + +function! s:is_branch_empty() + return exists('*airline#extensions#branch#head') && + \ empty(get(b:, 'airline_head', '')) +endfunction + +function! s:get_hunks_gitgutter() + if !get(g:, 'gitgutter_enabled', 0) || s:is_branch_empty() + return '' + endif + return GitGutterGetHunkSummary() +endfunction + +function! s:get_hunks_changes() + if !get(b:, 'changes_view_enabled', 0) || s:is_branch_empty() + return [] + endif + let hunks = changes#GetStats() + return hunks == [0, 0, 0] ? [] : hunks +endfunction + +function! s:get_hunks_empty() + return '' +endfunction + +function! s:get_hunks() + if !exists('b:source_func') || get(b:, 'source_func', '') is# 's:get_hunks_empty' + if get(g:, 'loaded_signify') && sy#buffer_is_active() + let b:source_func = 's:get_hunks_signify' + elseif exists('*GitGutterGetHunkSummary') + let b:source_func = 's:get_hunks_gitgutter' + elseif exists('*changes#GetStats') + let b:source_func = 's:get_hunks_changes' + elseif exists('*quickfixsigns#vcsdiff#GetHunkSummary') + let b:source_func = 'quickfixsigns#vcsdiff#GetHunkSummary' + else + let b:source_func = 's:get_hunks_empty' + endif + endif + return {b:source_func}() +endfunction + +function! airline#extensions#hunks#get_hunks() + if !get(w:, 'airline_active', 0) + return '' + endif + " Cache values, so that it isn't called too often + if exists("b:airline_hunks") && + \ get(b:, 'airline_changenr', 0) == b:changedtick && + \ winwidth(0) == get(s:, 'airline_winwidth', 0) && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_signify' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_gitgutter' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_empty' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_changes' + return b:airline_hunks + endif + let hunks = s:get_hunks() + let string = '' + if !empty(hunks) + for i in [0, 1, 2] + if (s:non_zero_only == 0 && winwidth(0) > 100) || hunks[i] > 0 + let string .= printf('%s%s ', s:hunk_symbols[i], hunks[i]) + endif + endfor + endif + let b:airline_hunks = string + let b:airline_changenr = b:changedtick + let s:airline_winwidth = winwidth(0) + return string +endfunction + +function! airline#extensions#hunks#init(ext) + call airline#parts#define_function('hunks', 'airline#extensions#hunks#get_hunks') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim new file mode 100644 index 0000000..2ecbd45 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim @@ -0,0 +1,20 @@ +" MIT License. Copyright (c) 2013-2017 Doron Behar, C.Brabandt +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !has('keymap') + finish +endif + +function! airline#extensions#keymap#status() + if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) + return printf('%s', (!empty(&keymap) ? (g:airline_symbols.keymap . ' '. &keymap) : '')) + else + return '' + endif +endfunction + +function! airline#extensions#keymap#init(ext) + call airline#parts#define_function('keymap', 'airline#extensions#keymap#status') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/neomake.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/neomake.vim new file mode 100644 index 0000000..08fe5bc --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/neomake.vim @@ -0,0 +1,35 @@ +" vim: et ts=2 sts=2 sw=2 + +if !exists(':Neomake') + finish +endif + +let s:error_symbol = get(g:, 'airline#extensions#neomake#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#neomake#warning_symbol', 'W:') + +function! s:get_counts() + let l:counts = neomake#statusline#LoclistCounts() + + if empty(l:counts) + return neomake#statusline#QflistCounts() + else + return l:counts + endif +endfunction + +function! airline#extensions#neomake#get_warnings() + let counts = s:get_counts() + let warnings = get(counts, 'W', 0) + return warnings ? s:warning_symbol.warnings : '' +endfunction + +function! airline#extensions#neomake#get_errors() + let counts = s:get_counts() + let errors = get(counts, 'E', 0) + return errors ? s:error_symbol.errors : '' +endfunction + +function! airline#extensions#neomake#init(ext) + call airline#parts#define_function('neomake_warning_count', 'airline#extensions#neomake#get_warnings') + call airline#parts#define_function('neomake_error_count', 'airline#extensions#neomake#get_errors') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim new file mode 100644 index 0000000..0535f5c --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim @@ -0,0 +1,34 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':NetrwSettings') + finish +endif + +function! airline#extensions#netrw#apply(...) + if &ft == 'netrw' + let spc = g:airline_symbols.space + + call a:1.add_section('airline_a', spc.'netrw'.spc) + if exists('*airline#extensions#branch#get_head') + call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) + endif + call a:1.add_section('airline_c', spc.'%f'.spc) + call a:1.split() + call a:1.add_section('airline_y', spc.'%{airline#extensions#netrw#sortstring()}'.spc) + return 1 + endif +endfunction + +function! airline#extensions#netrw#init(ext) + let g:netrw_force_overwrite_statusline = 0 + call a:ext.add_statusline_func('airline#extensions#netrw#apply') +endfunction + + +function! airline#extensions#netrw#sortstring() + let order = (get(g:, 'netrw_sort_direction', 'n') =~ 'n') ? '+' : '-' + return g:netrw_sort_by . (g:airline_symbols.space) . '[' . order . ']' +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/nrrwrgn.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/nrrwrgn.vim new file mode 100644 index 0000000..4629915 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/nrrwrgn.vim @@ -0,0 +1,57 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_nrrw_rgn', 0) + finish +endif + +function! airline#extensions#nrrwrgn#apply(...) + if exists(":WidenRegion") == 2 + let spc = g:airline_symbols.space + if !exists("*nrrwrgn#NrrwRgnStatus()") || empty(nrrwrgn#NrrwRgnStatus()) + call a:1.add_section('airline_a', printf('%s[Narrowed%s#%d]', spc, spc, b:nrrw_instn)) + let bufname=(get(b:, 'orig_buf', 0) ? bufname(b:orig_buf) : substitute(bufname('%'), '^Nrrwrgn_\zs.*\ze_\d\+$', submatch(0), '')) + call a:1.add_section('airline_c', spc.bufname.spc) + call a:1.split() + else + let dict=nrrwrgn#NrrwRgnStatus() + let vmode = { 'v': 'Char ', 'V': 'Line ', '': 'Block '} + let mode = dict.visual ? vmode[dict.visual] : vmode['V'] + let winwidth = winwidth(0) + if winwidth < 80 + let mode = mode[0] + endif + let title = (winwidth < 80 ? "Nrrw" : "Narrowed ") + let multi = (winwidth < 80 ? 'M' : 'Multi') + call a:1.add_section('airline_a', printf('[%s%s%s#%d]%s', (dict.multi ? multi : ""), + \ title, mode, b:nrrw_instn, spc)) + let name = dict.fullname + if name !=# '[No Name]' + if winwidth > 100 + " need some space + let name = fnamemodify(dict.fullname, ':~') + if strlen(name) > 8 + " shorten name + let name = substitute(name, '\(.\)[^/\\]*\([/\\]\)', '\1\2', 'g') + endif + else + let name = fnamemodify(dict.fullname, ':t') + endif + endif + let range=(dict.multi ? '' : printf("[%d-%d]", dict.start[1], dict.end[1])) + call a:1.add_section('airline_c', printf("%s %s %s", name, range, + \ dict.enabled ? (&encoding ==? 'utf-8' ? "\u2713" : '') : '!')) + call a:1.split() + call a:1.add_section('airline_x', get(g:, 'airline_section_x').spc) + call a:1.add_section('airline_y', spc.get(g:, 'airline_section_y').spc) + call a:1.add_section('airline_z', spc.get(g:, 'airline_section_z')) + endif + return 1 + endif +endfunction + +function! airline#extensions#nrrwrgn#init(ext) + call a:ext.add_statusline_func('airline#extensions#nrrwrgn#apply') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/obsession.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/obsession.vim new file mode 100644 index 0000000..ca0fc16 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/obsession.vim @@ -0,0 +1,22 @@ +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*ObsessionStatus') + finish +endif + +let s:spc = g:airline_symbols.space + +if !exists('g:airline#extensions#obsession#indicator_text') + let g:airline#extensions#obsession#indicator_text = '$' +endif + +function! airline#extensions#obsession#init(ext) + call airline#parts#define_function('obsession', 'airline#extensions#obsession#get_status') +endfunction + +function! airline#extensions#obsession#get_status() + return ObsessionStatus((g:airline#extensions#obsession#indicator_text . s:spc), '') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/po.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/po.vim new file mode 100644 index 0000000..65beda7 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/po.vim @@ -0,0 +1,50 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#po#shorten() + if exists("g:airline#extensions#po#displayed_limit") + let w:displayed_po_limit = g:airline#extensions#po#displayed_limit + if len(b:airline_po_stats) > w:displayed_po_limit - 1 + let b:airline_po_stats = b:airline_po_stats[0:(w:displayed_po_limit - 2)].(&encoding==?'utf-8' ? '…' : '.'). ']' + endif + endif +endfunction + +function! airline#extensions#po#apply(...) + if &ft ==# 'po' + call airline#extensions#prepend_to_section('z', '%{airline#extensions#po#stats()}') + autocmd airline BufWritePost * unlet! b:airline_po_stats + endif +endfunction + +function! airline#extensions#po#stats() + if exists('b:airline_po_stats') && !empty(b:airline_po_stats) + return b:airline_po_stats + endif + + let cmd = 'msgfmt --statistics -o /dev/null -- ' + if g:airline#init#vim_async + call airline#async#get_msgfmt_stat(cmd, expand('%:p')) + elseif has("nvim") + call airline#async#nvim_get_msgfmt_stat(cmd, expand('%:p')) + else + let airline_po_stats = system(cmd. shellescape(expand('%:p'))) + if v:shell_error + return '' + endif + try + let b:airline_po_stats = '['. split(airline_po_stats, '\n')[0]. ']' + let b:airline_po_stats = substitute(b:airline_po_stats, ' \(message\|translation\)s*\.*', '', 'g') + catch + let b:airline_po_stats = '' + endtry + call airline#extensions#po#shorten() + endif + return get(b:, 'airline_po_stats', '') +endfunction + +function! airline#extensions#po#init(ext) + call a:ext.add_statusline_func('airline#extensions#po#apply') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/promptline.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/promptline.vim new file mode 100644 index 0000000..9b76a1a --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/promptline.vim @@ -0,0 +1,35 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':PromptlineSnapshot') + finish +endif + +if !exists('airline#extensions#promptline#snapshot_file') || !len('airline#extensions#promptline#snapshot_file') + finish +endif + +let s:prompt_snapshot_file = get(g:, 'airline#extensions#promptline#snapshot_file', '') +let s:color_template = get(g:, 'airline#extensions#promptline#color_template', 'normal') + +function! airline#extensions#promptline#init(ext) + call a:ext.add_theme_func('airline#extensions#promptline#set_prompt_colors') +endfunction + +function! airline#extensions#promptline#set_prompt_colors(palette) + let color_template = has_key(a:palette, s:color_template) ? s:color_template : 'normal' + let mode_palette = a:palette[color_template] + + if !has_key(g:, 'promptline_symbols') + let g:promptline_symbols = { + \ 'left' : g:airline_left_sep, + \ 'right' : g:airline_right_sep, + \ 'left_alt' : g:airline_left_alt_sep, + \ 'right_alt' : g:airline_right_alt_sep} + endif + + let promptline_theme = promptline#api#create_theme_from_airline(mode_palette) + call promptline#api#create_snapshot_with_theme(s:prompt_snapshot_file, promptline_theme) +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim new file mode 100644 index 0000000..3441c3d --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim @@ -0,0 +1,53 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let g:airline#extensions#quickfix#quickfix_text = 'Quickfix' +let g:airline#extensions#quickfix#location_text = 'Location' + +function! airline#extensions#quickfix#apply(...) + if &buftype == 'quickfix' + let w:airline_section_a = s:get_text() + let w:airline_section_b = '%{get(w:, "quickfix_title", "")}' + let w:airline_section_c = '' + let w:airline_section_x = '' + endif +endfunction + +function! airline#extensions#quickfix#init(ext) + call a:ext.add_statusline_func('airline#extensions#quickfix#apply') + call a:ext.add_inactive_statusline_func('airline#extensions#quickfix#inactive_qf_window') +endfunction + +function! airline#extensions#quickfix#inactive_qf_window(...) + if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(airline#util#getwinvar(a:2.winnr, 'quickfix_title', '')) + call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m') + endif +endfunction + +function! s:get_text() + if exists("*win_getid") && exists("*getwininfo") + let dict = getwininfo(win_getid()) + if len(dict) > 0 && get(dict[0], 'quickfix', 0) && !get(dict[0], 'loclist', 0) + return g:airline#extensions#quickfix#quickfix_text + elseif len(dict) > 0 && get(dict[0], 'quickfix', 0) && get(dict[0], 'loclist', 0) + return g:airline#extensions#quickfix#location_text + endif + endif + redir => buffers + silent ls + redir END + + let nr = bufnr('%') + for buf in split(buffers, '\n') + if match(buf, '\v^\s*'.nr) > -1 + if match(buf, '\cQuickfix') > -1 + return g:airline#extensions#quickfix#quickfix_text + else + return g:airline#extensions#quickfix#location_text + endif + endif + endfor + return '' +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/syntastic.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/syntastic.vim new file mode 100644 index 0000000..7d8b7e6 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/syntastic.vim @@ -0,0 +1,43 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':SyntasticCheck') + finish +endif + +let s:error_symbol = get(g:, 'airline#extensions#syntastic#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#syntastic#warning_symbol', 'W:') + +function! airline#extensions#syntastic#get_warning() + return airline#extensions#syntastic#get('warning') +endfunction + +function! airline#extensions#syntastic#get_error() + return airline#extensions#syntastic#get('error') +endfunction + +function! airline#extensions#syntastic#get(type) + let _backup = get(g:, 'syntastic_stl_format', '') + let is_err = (a:type is# 'error') + if is_err + let g:syntastic_stl_format = get(g:, 'airline#extensions#syntastic#stl_format_err', '%E{[%e(#%fe)]}') + else + let g:syntastic_stl_format = get(g:, 'airline#extensions#syntastic#stl_format_warn', '%W{[%w(#%fw)]}') + endif + let cnt = SyntasticStatuslineFlag() + if !empty(_backup) + let g:syntastic_stl_format = _backup + endif + if empty(cnt) + return '' + else + return (is_err ? s:error_symbol : s:warning_symbol).cnt + endif +endfunction + +function! airline#extensions#syntastic#init(ext) + call airline#parts#define_function('syntastic-warn', 'airline#extensions#syntastic#get_warning') + call airline#parts#define_function('syntastic-err', 'airline#extensions#syntastic#get_error') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim new file mode 100644 index 0000000..bfa5bc5 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim @@ -0,0 +1,200 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') +let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) +let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) +let s:ignore_bufadd_pat = get(g:, 'airline#extensions#tabline#ignore_bufadd_pat', '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree') + +let s:taboo = get(g:, 'airline#extensions#taboo#enabled', 1) && get(g:, 'loaded_taboo', 0) +if s:taboo + let g:taboo_tabline = 0 +endif + +let s:ctrlspace = get(g:, 'CtrlSpaceLoaded', 0) + +function! airline#extensions#tabline#init(ext) + if has('gui_running') + set guioptions-=e + endif + + autocmd User AirlineToggledOn call s:toggle_on() + autocmd User AirlineToggledOff call s:toggle_off() + + call s:toggle_on() + call a:ext.add_theme_func('airline#extensions#tabline#load_theme') +endfunction + +function! s:toggle_off() + call airline#extensions#tabline#autoshow#off() + call airline#extensions#tabline#tabs#off() + call airline#extensions#tabline#buffers#off() + if s:ctrlspace + call airline#extensions#tabline#ctrlspace#off() + endif +endfunction + +function! s:toggle_on() + call airline#extensions#tabline#autoshow#on() + call airline#extensions#tabline#tabs#on() + call airline#extensions#tabline#buffers#on() + if s:ctrlspace + call airline#extensions#tabline#ctrlspace#on() + endif + + set tabline=%!airline#extensions#tabline#get() +endfunction + +function! s:update_tabline() + if get(g:, 'airline#extensions#tabline#disable_refresh', 0) + return + endif + let match = expand('') + if pumvisible() + return + elseif !get(g:, 'airline#extensions#tabline#enabled', 0) + return + " return, if buffer matches ignore pattern or is directory (netrw) + elseif empty(match) + \ || match(match, s:ignore_bufadd_pat) > -1 + \ || isdirectory(expand("")) + return + endif + doautocmd User BufMRUChange + " sometimes, the tabline is not correctly updated see #1580 + " so force redraw here + let &tabline = &tabline +endfunction + +function! airline#extensions#tabline#load_theme(palette) + if pumvisible() + return + endif + let colors = get(a:palette, 'tabline', {}) + " Theme for tabs on the left + let l:tab = get(colors, 'airline_tab', a:palette.normal.airline_b) + let l:tabsel = get(colors, 'airline_tabsel', a:palette.normal.airline_a) + let l:tabtype = get(colors, 'airline_tabtype', a:palette.visual.airline_a) + let l:tabfill = get(colors, 'airline_tabfill', a:palette.normal.airline_c) + let l:tabmod = get(colors, 'airline_tabmod', a:palette.insert.airline_a) + let l:tabhid = get(colors, 'airline_tabhid', a:palette.normal.airline_c) + if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c') + let l:tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal_modified.airline_c) + else + "Fall back to normal airline_c if modified airline_c isn't present + let l:tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal.airline_c) + endif + call airline#highlighter#exec('airline_tab', l:tab) + call airline#highlighter#exec('airline_tabsel', l:tabsel) + call airline#highlighter#exec('airline_tabtype', l:tabtype) + call airline#highlighter#exec('airline_tabfill', l:tabfill) + call airline#highlighter#exec('airline_tabmod', l:tabmod) + call airline#highlighter#exec('airline_tabmod_unsel', l:tabmodu) + call airline#highlighter#exec('airline_tabhid', l:tabhid) + + " Theme for tabs on the right + let l:tabsel_right = get(colors, 'airline_tabsel_right', a:palette.normal.airline_a) + let l:tab_right = get(colors, 'airline_tab_right', a:palette.inactive.airline_c) + let l:tabmod_right = get(colors, 'airline_tabmod_right', a:palette.insert.airline_a) + let l:tabhid_right = get(colors, 'airline_tabhid_right', a:palette.normal.airline_c) + if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c') + let l:tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal_modified.airline_c) + else + "Fall back to normal airline_c if modified airline_c isn't present + let l:tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal.airline_c) + endif + call airline#highlighter#exec('airline_tab_right', l:tab_right) + call airline#highlighter#exec('airline_tabsel_right', l:tabsel_right) + call airline#highlighter#exec('airline_tabmod_right', l:tabmod_right) + call airline#highlighter#exec('airline_tabhid_right', l:tabhid_right) + call airline#highlighter#exec('airline_tabmod_unsel_right', l:tabmodu_right) +endfunction + +let s:current_tabcnt = -1 +function! airline#extensions#tabline#get() + let curtabcnt = tabpagenr('$') + if curtabcnt != s:current_tabcnt + let s:current_tabcnt = curtabcnt + call airline#extensions#tabline#tabs#invalidate() + call airline#extensions#tabline#buffers#invalidate() + call airline#extensions#tabline#ctrlspace#invalidate() + endif + + if !exists('#airline#BufAdd#*') + autocmd airline BufAdd * call update_tabline() + endif + if s:ctrlspace + return airline#extensions#tabline#ctrlspace#get() + elseif s:show_buffers && curtabcnt == 1 || !s:show_tabs + return airline#extensions#tabline#buffers#get() + else + return airline#extensions#tabline#tabs#get() + endif +endfunction + +function! airline#extensions#tabline#title(n) + let title = '' + if s:taboo + let title = TabooTabTitle(a:n) + endif + + if empty(title) && exists('*gettabvar') + let title = gettabvar(a:n, 'title') + endif + + if empty(title) + let buflist = tabpagebuflist(a:n) + let winnr = tabpagewinnr(a:n) + let all_buffers = airline#extensions#tabline#buflist#list() + return airline#extensions#tabline#get_buffer_name( + \ buflist[winnr - 1], + \ filter(buflist, 'index(all_buffers, v:val) != -1')) + endif + + return title +endfunction + +function! airline#extensions#tabline#get_buffer_name(nr, ...) + let buffers = a:0 ? a:1 : airline#extensions#tabline#buflist#list() + return airline#extensions#tabline#formatters#{s:formatter}#format(a:nr, buffers) +endfunction + +function! airline#extensions#tabline#new_builder() + let builder_context = { + \ 'active' : 1, + \ 'tabline' : 1, + \ 'right_sep' : get(g:, 'airline#extensions#tabline#right_sep' , g:airline_right_sep), + \ 'right_alt_sep' : get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), + \ } + if get(g:, 'airline_powerline_fonts', 0) + let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , g:airline_left_sep) + let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , g:airline_left_alt_sep) + else + let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') + let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') + endif + + return airline#builder#new(builder_context) +endfunction + +function! airline#extensions#tabline#group_of_bufnr(tab_bufs, bufnr) + let cur = bufnr('%') + if cur == a:bufnr + if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') + let group = 'airline_tabmod' + else + let group = 'airline_tabsel' + endif + else + if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') + let group = 'airline_tabmod_unsel' + elseif index(a:tab_bufs, a:bufnr) > -1 + let group = 'airline_tab' + else + let group = 'airline_tabhid' + endif + endif + return group +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim new file mode 100644 index 0000000..a6782a8 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim @@ -0,0 +1,55 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) +let s:buf_min_count = get(g:, 'airline#extensions#tabline#buffer_min_count', 0) +let s:tab_min_count = get(g:, 'airline#extensions#tabline#tab_min_count', 0) + +function! airline#extensions#tabline#autoshow#off() + if exists('s:original_tabline') + let &tabline = s:original_tabline + let &showtabline = s:original_showtabline + endif + + augroup airline_tabline_autoshow + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#autoshow#on() + let [ s:original_tabline, s:original_showtabline ] = [ &tabline, &showtabline ] + + augroup airline_tabline_autoshow + autocmd! + if s:buf_min_count <= 0 && s:tab_min_count <= 1 + if &lines > 3 + set showtabline=2 + endif + else + if s:show_buffers == 1 + autocmd BufEnter * call show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list())) + autocmd BufUnload * call show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list()) - 1) + else + autocmd TabEnter * call show_tabline(s:tab_min_count, tabpagenr('$')) + endif + endif + + " Invalidate cache. This has to come after the BufUnload for + " s:show_buffers, to invalidate the cache for BufEnter. + autocmd BufLeave,BufAdd,BufUnload * call airline#extensions#tabline#buflist#invalidate() + augroup END +endfunction + +function! s:show_tabline(min_count, total_count) + if a:total_count >= a:min_count + if &showtabline != 2 && &lines > 3 + set showtabline=2 + endif + else + if &showtabline != 0 + set showtabline=0 + endif + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim new file mode 100644 index 0000000..74bff1f --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim @@ -0,0 +1,252 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:buffer_idx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) +let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1) +let s:buffers_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') +let s:keymap_ignored_filetypes = get(g:, 'airline#extensions#tabline#keymap_ignored_filetypes', ['vimfiler', 'nerdtree']) +let s:spc = g:airline_symbols.space + +let s:current_bufnr = -1 +let s:current_modified = 0 +let s:current_tabline = '' +let s:current_visible_buffers = [] + +let s:number_map = { + \ '0': '⁰', + \ '1': '¹', + \ '2': '²', + \ '3': '³', + \ '4': '⁴', + \ '5': '⁵', + \ '6': '⁶', + \ '7': '⁷', + \ '8': '⁸', + \ '9': '⁹' + \ } +let s:number_map = &encoding == 'utf-8' + \ ? get(g:, 'airline#extensions#tabline#buffer_idx_format', s:number_map) + \ : {} + +function! airline#extensions#tabline#buffers#off() + augroup airline_tabline_buffers + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#buffers#on() + augroup airline_tabline_buffers + autocmd! + autocmd BufDelete * call airline#extensions#tabline#buffers#invalidate() + autocmd User BufMRUChange call airline#extensions#tabline#buflist#invalidate() + autocmd User BufMRUChange call airline#extensions#tabline#buffers#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#buffers#invalidate() + let s:current_bufnr = -1 +endfunction + +function! airline#extensions#tabline#buffers#get() + call map_keys() + let cur = bufnr('%') + if cur == s:current_bufnr + if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let l:index = 1 + let b = airline#extensions#tabline#new_builder() + let tab_bufs = tabpagebuflist(tabpagenr()) + for nr in s:get_visible_buffers() + if nr < 0 + call b.add_raw('%#airline_tabhid#...') + continue + endif + + let group = airline#extensions#tabline#group_of_bufnr(tab_bufs, nr) + + if nr == cur + let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 + endif + + " Neovim feature: Have clickable buffers + if has("tablineat") + call b.add_raw('%'.nr.'@airline#extensions#tabline#buffers#clickbuf@') + endif + if s:buffer_idx_mode + if len(s:number_map) > 0 + call b.add_section(group, s:spc . get(s:number_map, l:index, '') . '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)' . s:spc) + else + call b.add_section(group, '['.l:index.s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.']') + endif + let l:index = l:index + 1 + else + call b.add_section(group, s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.s:spc) + endif + if has("tablineat") + call b.add_raw('%X') + endif + endfor + + call b.add_section('airline_tabfill', '') + call b.split() + call b.add_section('airline_tabfill', '') + if s:show_tab_type + call b.add_section_spaced('airline_tabtype', s:buffers_label) + endif + if tabpagenr('$') > 1 + call b.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) + endif + + let s:current_bufnr = cur + let s:current_tabline = b.build() + return s:current_tabline +endfunction + +function! s:get_visible_buffers() + let buffers = airline#extensions#tabline#buflist#list() + let cur = bufnr('%') + + let total_width = 0 + let max_width = 0 + + for nr in buffers + let width = len(airline#extensions#tabline#get_buffer_name(nr)) + 4 + let total_width += width + let max_width = max([max_width, width]) + endfor + + " only show current and surrounding buffers if there are too many buffers + let position = index(buffers, cur) + let vimwidth = &columns + if total_width > vimwidth && position > -1 + let buf_count = len(buffers) + + " determine how many buffers to show based on the longest buffer width, + " use one on the right side and put the rest on the left + let buf_max = vimwidth / max_width + let buf_right = 1 + let buf_left = max([0, buf_max - buf_right]) + + let start = max([0, position - buf_left]) + let end = min([buf_count, position + buf_right]) + + " fill up available space on the right + if position < buf_left + let end += (buf_left - position) + endif + + " fill up available space on the left + if end > buf_count - 1 - buf_right + let start -= max([0, buf_right - (buf_count - 1 - position)]) + endif + + let buffers = eval('buffers[' . start . ':' . end . ']') + + if start > 0 + call insert(buffers, -1, 0) + endif + + if end < buf_count - 1 + call add(buffers, -1) + endif + endif + + let s:current_visible_buffers = buffers + return buffers +endfunction + +function! s:select_tab(buf_index) + " no-op when called in 'keymap_ignored_filetypes' + if count(s:keymap_ignored_filetypes, &ft) + return + endif + + let idx = a:buf_index + if s:current_visible_buffers[0] == -1 + let idx = idx + 1 + endif + + let buf = get(s:current_visible_buffers, idx, 0) + if buf != 0 + exec 'b!' . buf + endif +endfunction + +function! s:jump_to_tab(offset) + let l = s:current_visible_buffers + let i = index(l, bufnr('%')) + if i > -1 + exec 'b!' . l[float2nr(fmod(i + a:offset, len(l)))] + endif +endfunction + +function! s:map_keys() + if s:buffer_idx_mode + noremap AirlineSelectTab1 :call select_tab(0) + noremap AirlineSelectTab2 :call select_tab(1) + noremap AirlineSelectTab3 :call select_tab(2) + noremap AirlineSelectTab4 :call select_tab(3) + noremap AirlineSelectTab5 :call select_tab(4) + noremap AirlineSelectTab6 :call select_tab(5) + noremap AirlineSelectTab7 :call select_tab(6) + noremap AirlineSelectTab8 :call select_tab(7) + noremap AirlineSelectTab9 :call select_tab(8) + noremap AirlineSelectPrevTab :call jump_to_tab(-v:count1) + noremap AirlineSelectNextTab :call jump_to_tab(v:count1) + endif +endfunction + +function! airline#extensions#tabline#buffers#clickbuf(minwid, clicks, button, modifiers) abort + " Clickable buffers + " works only in recent NeoVim with has('tablineat') + + " single mouse button click without modifiers pressed + if a:clicks == 1 && a:modifiers !~# '[^ ]' + if a:button is# 'l' + " left button - switch to buffer + silent execute 'buffer' a:minwid + elseif a:button is# 'm' + " middle button - delete buffer + + if get(g:, 'airline#extensions#tabline#middle_click_preserves_windows', 0) == 0 + " just simply delete the clicked buffer. This will cause windows + " associated with the clicked buffer to be closed. + silent execute 'bdelete' a:minwid + else + " find windows displaying the clicked buffer and open an new + " buffer in them. + let current_window = bufwinnr("%") + let window_number = bufwinnr(a:minwid) + let last_window_visited = -1 + + " Set to 1 if the clicked buffer was open in any windows. + let buffer_in_window = 0 + + " Find the next window with the clicked buffer open. If bufwinnr() + " returns the same window number, this is because we clicked a new + " buffer, and then tried editing a new buffer. Vim won't create a + " new empty buffer for the same window, so we get the same window + " number from bufwinnr(). In this case we just give up and don't + " delete the buffer. + " This could be made cleaner if we could check if the clicked buffer + " is a new buffer, but I don't know if there is a way to do that. + while window_number != -1 && window_number != last_window_visited + let buffer_in_window = 1 + silent execute window_number . 'wincmd w' + silent execute 'enew' + let last_window_visited = window_number + let window_number = bufwinnr(a:minwid) + endwhile + silent execute current_window . 'wincmd w' + if window_number != last_window_visited || buffer_in_window == 0 + silent execute 'bdelete' a:minwid + endif + endif + endif + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim new file mode 100644 index 0000000..f49eabc --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim @@ -0,0 +1,44 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#buflist#invalidate() + unlet! s:current_buffer_list +endfunction + +function! airline#extensions#tabline#buflist#list() + if exists('s:current_buffer_list') + return s:current_buffer_list + endif + + let excludes = get(g:, 'airline#extensions#tabline#excludes', []) + let exclude_preview = get(g:, 'airline#extensions#tabline#exclude_preview', 1) + + let list = (exists('g:did_bufmru') && g:did_bufmru) ? BufMRUList() : range(1, bufnr("$")) + + let buffers = [] + " If this is too slow, we can switch to a different algorithm. + " Basically branch 535 already does it, but since it relies on + " BufAdd autocommand, I'd like to avoid this if possible. + for nr in list + if buflisted(nr) + " Do not add to the bufferlist, if either + " 1) buffername matches exclude pattern + " 2) buffer is a quickfix buffer + " 3) exclude preview windows (if 'bufhidden' == wipe + " and 'buftype' == nofile + if (!empty(excludes) && match(bufname(nr), join(excludes, '\|')) > -1) || + \ (getbufvar(nr, 'current_syntax') == 'qf') || + \ (exclude_preview && getbufvar(nr, '&bufhidden') == 'wipe' + \ && getbufvar(nr, '&buftype') == 'nofile') + continue + endif + call add(buffers, nr) + endif + endfor + + let s:current_buffer_list = buffers + return buffers +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim new file mode 100644 index 0000000..b509f0d --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim @@ -0,0 +1,175 @@ +" MIT License. Copyright (c) 2016 Kevin Sapper +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:current_bufnr = -1 +let s:current_tabnr = -1 +let s:current_tabline = '' + +let s:buffers_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') +let s:tabs_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs') +let s:switch_buffers_and_tabs = get(g:, 'airline#extensions#tabline#switch_buffers_and_tabs', 0) +let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) +let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + +function! airline#extensions#tabline#ctrlspace#off() + augroup airline_tabline_ctrlspace + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#ctrlspace#on() + augroup airline_tabline_ctrlspace + autocmd! + autocmd BufDelete * call airline#extensions#tabline#ctrlspace#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#ctrlspace#invalidate() + let s:current_bufnr = -1 + let s:current_tabnr = -1 +endfunction + +function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pos) + if a:pos == 0 + let pos_extension = '' + else + let pos_extension = '_right' + endif + + let s:buffer_list = ctrlspace#api#BufferList(a:cur_tab) + " add by tenfy(tenfyzhong@qq.com) + " if the current buffer no in the buffer list + " return false and no redraw tabline. + " Fixes #1515. if there a BufEnter autocmd execute redraw. The tabline may no update. + let bufnr_list = map(copy(s:buffer_list), 'v:val["index"]') + if index(bufnr_list, a:cur_buf) == -1 + return 0 + endif + + for buffer in s:buffer_list + if a:cur_buf == buffer.index + if buffer.modified + let group = 'airline_tabmod'.pos_extension + else + let group = 'airline_tabsel'.pos_extension + endif + else + if buffer.modified + let group = 'airline_tabmod_unsel'.pos_extension + elseif buffer.visible + let group = 'airline_tab'.pos_extension + else + let group = 'airline_tabhid'.pos_extension + endif + endif + + let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.index.')}%)' + + if has("tablineat") + let buf_name = '%'.buffer.index.'@airline#extensions#tabline#buffers#clickbuf@'.buf_name.'%X' + endif + + call a:builder.add_section_spaced(group, buf_name) + endfor + " add by tenfy(tenfyzhong@qq.com) + " if the selected buffer was updated + " return true + return 1 +endfunction + +function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pos) + if a:pos == 0 + let pos_extension = '' + else + let pos_extension = '_right' + endif + + for tab in s:tab_list + if tab.current + if tab.modified + let group = 'airline_tabmod'.pos_extension + else + let group = 'airline_tabsel'.pos_extension + endif + else + if tab.modified + let group = 'airline_tabmod_unsel'.pos_extension + else + let group = 'airline_tabhid'.pos_extension + endif + endif + + call a:builder.add_section_spaced(group, '%'.tab.index.'T'.tab.title.ctrlspace#api#TabBuffersNumber(tab.index).'%T') + endfor +endfunction + +function! airline#extensions#tabline#ctrlspace#get() + let cur_buf = bufnr('%') + + call airline#extensions#tabline#tabs#map_keys() + let s:tab_list = ctrlspace#api#TabList() + for tab in s:tab_list + if tab.current + let cur_tab = tab.index + endif + endfor + + if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr + return s:current_tabline + endif + + let builder = airline#extensions#tabline#new_builder() + + " Add left tabline content + if s:show_buffers == 0 + call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 0) + elseif s:show_tabs == 0 + " add by tenfy(tenfyzhong@qq.com) + " if current buffer no in the buffer list, does't update tabline + if airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 0) == 0 + return s:current_tabline + endif + else + if s:switch_buffers_and_tabs == 0 + call builder.add_section_spaced('airline_tabtype', s:buffers_label) + " add by tenfy(tenfyzhong@qq.com) + " if current buffer no in the buffer list, does't update tabline + if airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 0) == 0 + return s:current_tabline + endif + else + call builder.add_section_spaced('airline_tabtype', s:tabs_label) + call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 0) + endif + endif + + call builder.add_section('airline_tabfill', '') + call builder.split() + call builder.add_section('airline_tabfill', '') + + " Add right tabline content + if s:show_buffers == 0 + call builder.add_section_spaced('airline_tabtype', s:tabs_label) + elseif s:show_tabs == 0 + call builder.add_section_spaced('airline_tabtype', s:buffers_label) + else + if s:switch_buffers_and_tabs == 0 + call airline#extensions#tabline#ctrlspace#add_tab_section(builder, 1) + call builder.add_section_spaced('airline_tabtype', s:tabs_label) + else + " add by tenfy(tenfyzhong@qq.com) + " if current buffer no in the buffer list, does't update tabline + if airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, 0) == 0 + return s:current_tabline + endif + call builder.add_section_spaced('airline_tabtype', s:buffers_label) + endif + endif + + let s:current_bufnr = cur_buf + let s:current_tabnr = cur_tab + let s:current_tabline = builder.build() + return s:current_tabline +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim new file mode 100644 index 0000000..1ecce32 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim @@ -0,0 +1,41 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:fnamecollapse = get(g:, 'airline#extensions#tabline#fnamecollapse', 1) +let s:fnametruncate = get(g:, 'airline#extensions#tabline#fnametruncate', 0) +let s:buf_nr_format = get(g:, 'airline#extensions#tabline#buffer_nr_format', '%s: ') +let s:buf_nr_show = get(g:, 'airline#extensions#tabline#buffer_nr_show', 0) +let s:buf_modified_symbol = g:airline_symbols.modified + +function! airline#extensions#tabline#formatters#default#format(bufnr, buffers) + let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.') + let _ = '' + + let name = bufname(a:bufnr) + if empty(name) + let _ .= '[No Name]' + else + if s:fnamecollapse + let _ .= substitute(fnamemodify(name, fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g') + else + let _ .= fnamemodify(name, fmod) + endif + if a:bufnr != bufnr('%') && s:fnametruncate && strlen(_) > s:fnametruncate + let _ = strpart(_, 0, s:fnametruncate) + endif + endif + + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) +endfunction + +function! airline#extensions#tabline#formatters#default#wrap_name(bufnr, buffer_name) + let _ = s:buf_nr_show ? printf(s:buf_nr_format, a:bufnr) : '' + let _ .= substitute(a:buffer_name, '\\', '/', 'g') + + if getbufvar(a:bufnr, '&modified') == 1 + let _ .= s:buf_modified_symbol + endif + return _ +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim new file mode 100644 index 0000000..9bf8fdf --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim @@ -0,0 +1,40 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#unique_tail#format(bufnr, buffers) + let duplicates = {} + let tails = {} + let map = {} + for nr in a:buffers + let name = bufname(nr) + if empty(name) + let map[nr] = '[No Name]' + else + let tail = fnamemodify(name, ':s?/\+$??:t') + if has_key(tails, tail) + let duplicates[nr] = nr + endif + let tails[tail] = 1 + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, tail) + endif + endfor + + let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':p:.') + for nr in values(duplicates) + let fnamecollapse = get(g:, 'airline#extensions#tabline#fnamecollapse', 1) + if fnamecollapse + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, substitute(fnamemodify(name, fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g')) + else + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, fnamemodify(bufname(nr), fmod)) + endif + endfor + + if has_key(map, a:bufnr) + return map[a:bufnr] + endif + + " if we get here, the buffer list isn't in sync with the selected buffer yet, fall back to the default + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim new file mode 100644 index 0000000..e860bd8 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim @@ -0,0 +1,91 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:skip_symbol = '…' + +function! airline#extensions#tabline#formatters#unique_tail_improved#format(bufnr, buffers) + if len(a:buffers) <= 1 " don't need to compare bufnames if has less than one buffer opened + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) + endif + + let curbuf_tail = fnamemodify(bufname(a:bufnr), ':t') + let do_deduplicate = 0 + let path_tokens = {} + + for nr in a:buffers + let name = bufname(nr) + if !empty(name) && nr != a:bufnr && fnamemodify(name, ':t') == curbuf_tail " only perform actions if curbuf_tail isn't unique + let do_deduplicate = 1 + let tokens = reverse(split(substitute(fnamemodify(name, ':p:h'), '\\', '/', 'g'), '/')) + let token_index = 0 + for token in tokens + if token == '' | continue | endif + if token == '.' | break | endif + if !has_key(path_tokens, token_index) + let path_tokens[token_index] = {} + endif + let path_tokens[token_index][token] = 1 + let token_index += 1 + endfor + endif + endfor + + if do_deduplicate == 1 + let path = [] + let token_index = 0 + for token in reverse(split(substitute(fnamemodify(bufname(a:bufnr), ':p:h'), '\\', '/', 'g'), '/')) + if token == '.' | break | endif + let duplicated = 0 + let uniq = 1 + let single = 1 + if has_key(path_tokens, token_index) + let duplicated = 1 + if len(keys(path_tokens[token_index])) > 1 | let single = 0 | endif + if has_key(path_tokens[token_index], token) | let uniq = 0 | endif + endif + call insert(path, {'token': token, 'duplicated': duplicated, 'uniq': uniq, 'single': single}) + let token_index += 1 + endfor + + let buf_name = [curbuf_tail] + let has_uniq = 0 + let has_skipped = 0 + for token1 in reverse(path) + if !token1['duplicated'] && len(buf_name) > 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + break + endif + + if has_uniq == 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + break + endif + + if token1['uniq'] == 0 && token1['single'] == 1 + let has_skipped = 1 + else + if has_skipped == 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + endif + call insert(buf_name, token1['token']) + endif + + if token1['uniq'] == 1 + let has_uniq = 1 + endif + endfor + + if has_skipped == 1 + call insert(buf_name, s:skip_symbol) + endif + + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, join(buf_name, '/')) + else + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim new file mode 100644 index 0000000..b2ddf87 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim @@ -0,0 +1,116 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:show_close_button = get(g:, 'airline#extensions#tabline#show_close_button', 1) +let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1) +let s:show_tab_nr = get(g:, 'airline#extensions#tabline#show_tab_nr', 1) +let s:tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0) +let s:close_symbol = get(g:, 'airline#extensions#tabline#close_symbol', 'X') +let s:tabs_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs') +let s:show_splits = get(g:, 'airline#extensions#tabline#show_splits', 1) +let s:spc = g:airline_symbols.space + +let s:current_bufnr = -1 +let s:current_tabnr = -1 +let s:current_modified = 0 + +function! airline#extensions#tabline#tabs#off() + augroup airline_tabline_tabs + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#tabs#on() + augroup airline_tabline_tabs + autocmd! + autocmd BufDelete * call airline#extensions#tabline#tabs#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#tabs#invalidate() + let s:current_bufnr = -1 +endfunction + +function! airline#extensions#tabline#tabs#get() + let curbuf = bufnr('%') + let curtab = tabpagenr() + call airline#extensions#tabline#tabs#map_keys() + if curbuf == s:current_bufnr && curtab == s:current_tabnr + if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let b = airline#extensions#tabline#new_builder() + + for i in range(1, tabpagenr('$')) + if i == curtab + let group = 'airline_tabsel' + if g:airline_detect_modified + for bi in tabpagebuflist(i) + if getbufvar(bi, '&modified') + let group = 'airline_tabmod' + endif + endfor + endif + let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 + else + let group = 'airline_tab' + endif + let val = '%(' + if s:show_tab_nr + if s:tab_nr_type == 0 + let val .= (g:airline_symbols.space).'%{len(tabpagebuflist('.i.'))}' + elseif s:tab_nr_type == 1 + let val .= (g:airline_symbols.space).i + else "== 2 + let val .= (g:airline_symbols.space).i.'.%{len(tabpagebuflist('.i.'))}' + endif + endif + call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)') + endfor + + call b.add_section('airline_tabfill', '') + call b.split() + call b.add_section('airline_tabfill', '') + + if s:show_close_button + call b.add_section('airline_tab_right', ' %999X'.s:close_symbol.' ') + endif + + if s:show_splits == 1 + let buffers = tabpagebuflist(curtab) + for nr in buffers + let group = airline#extensions#tabline#group_of_bufnr(buffers, nr) . "_right" + call b.add_section_spaced(group, '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)') + endfor + elseif s:show_tab_type == 1 + call b.add_section_spaced('airline_tabtype', s:tabs_label) + endif + + let s:current_bufnr = curbuf + let s:current_tabnr = curtab + let s:current_tabline = b.build() + return s:current_tabline +endfunction + +function! airline#extensions#tabline#tabs#map_keys() + if exists("s:airline_tabline_map_key") + return + endif + noremap AirlineSelectTab1 :1tabn + noremap AirlineSelectTab2 :2tabn + noremap AirlineSelectTab3 :3tabn + noremap AirlineSelectTab4 :4tabn + noremap AirlineSelectTab5 :5tabn + noremap AirlineSelectTab6 :6tabn + noremap AirlineSelectTab7 :7tabn + noremap AirlineSelectTab8 :8tabn + noremap AirlineSelectTab9 :9tabn + noremap AirlineSelectPrevTab gT + " tabn {count} goes to count tab does not go {count} tab pages forward! + noremap AirlineSelectNextTab :exe repeat(':tabn\|', v:count1) + let s:airline_tabline_map_key = 1 +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tagbar.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tagbar.vim new file mode 100644 index 0000000..53c9edc --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tagbar.vim @@ -0,0 +1,59 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':TagbarToggle') + finish +endif + +let s:flags = get(g:, 'airline#extensions#tagbar#flags', '') +let s:spc = g:airline_symbols.space +let s:init=0 + +" Arguments: current, sort, fname +function! airline#extensions#tagbar#get_status(...) + let builder = airline#builder#new({ 'active': a:1 }) + call builder.add_section('airline_a', s:spc.'Tagbar'.s:spc) + call builder.add_section('airline_b', s:spc.a:2.s:spc) + call builder.add_section('airline_c', s:spc.a:3.s:spc) + return builder.build() +endfunction + +function! airline#extensions#tagbar#inactive_apply(...) + if getwinvar(a:2.winnr, '&filetype') == 'tagbar' + return -1 + endif +endfunction + +let s:airline_tagbar_last_lookup_time = 0 +let s:airline_tagbar_last_lookup_val = '' +function! airline#extensions#tagbar#currenttag() + if get(w:, 'airline_active', 0) + if !s:init + try + " try to load the plugin, if filetypes are disabled, + " this will cause an error, so try only once + let a=tagbar#currenttag('%', '', '') + catch + endtry + unlet! a + let s:init=1 + endif + " function tagbar#currenttag does not exist, if filetype is not enabled + if s:airline_tagbar_last_lookup_time != localtime() && exists("*tagbar#currenttag") + let s:airline_tagbar_last_lookup_val = tagbar#currenttag('%s', '', s:flags) + let s:airline_tagbar_last_lookup_time = localtime() + endif + return s:airline_tagbar_last_lookup_val + endif + return '' +endfunction + +function! airline#extensions#tagbar#init(ext) + call a:ext.add_inactive_statusline_func('airline#extensions#tagbar#inactive_apply') + let g:tagbar_status_func = 'airline#extensions#tagbar#get_status' + + call airline#parts#define_function('tagbar', 'airline#extensions#tagbar#currenttag') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/term.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/term.vim new file mode 100644 index 0000000..d9fd180 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/term.vim @@ -0,0 +1,22 @@ +" MIT License. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#term#apply(...) + if &buftype == 'terminal' + let spc = g:airline_symbols.space + + call a:1.add_section('airline_a', spc.'TERMINAL'.spc) + call a:1.add_section('airline_b', '') + call a:1.add_section('airline_c', spc.'%f') + call a:1.split() + call a:1.add_section('airline_y', '') + call a:1.add_section('airline_z', spc.airline#section#create_right(['linenr', 'maxlinenr'])) + return 1 + endif +endfunction + +function! airline#extensions#term#init(ext) + call a:ext.add_statusline_func('airline#extensions#term#apply') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/tmuxline.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/tmuxline.vim new file mode 100644 index 0000000..078d5dc --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/tmuxline.vim @@ -0,0 +1,28 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':Tmuxline') + finish +endif + +let s:tmuxline_snapshot_file = get(g:, 'airline#extensions#tmuxline#snapshot_file', '') +let s:color_template = get(g:, 'airline#extensions#tmuxline#color_template', 'normal') + +function! airline#extensions#tmuxline#init(ext) + call a:ext.add_theme_func('airline#extensions#tmuxline#set_tmux_colors') +endfunction + +function! airline#extensions#tmuxline#set_tmux_colors(palette) + let color_template = has_key(a:palette, s:color_template) ? s:color_template : 'normal' + let mode_palette = a:palette[color_template] + + let tmuxline_theme = tmuxline#api#create_theme_from_airline(mode_palette) + call tmuxline#api#set_theme(tmuxline_theme) + + if strlen(s:tmuxline_snapshot_file) + call tmuxline#api#snapshot(s:tmuxline_snapshot_file) + endif +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/undotree.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/undotree.vim new file mode 100644 index 0000000..36f8b9b --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/undotree.vim @@ -0,0 +1,29 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':UndotreeToggle') + finish +endif + +function! airline#extensions#undotree#apply(...) + if exists('t:undotree') + if &ft == 'undotree' + if exists('*t:undotree.GetStatusLine') + call airline#extensions#apply_left_override('undo', '%{t:undotree.GetStatusLine()}') + else + call airline#extensions#apply_left_override('undotree', '%f') + endif + endif + + if &ft == 'diff' && exists('*t:diffpanel.GetStatusLine') + call airline#extensions#apply_left_override('diff', '%{t:diffpanel.GetStatusLine()}') + endif + endif +endfunction + +function! airline#extensions#undotree#init(ext) + call a:ext.add_statusline_func('airline#extensions#undotree#apply') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/unicode.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/unicode.vim new file mode 100644 index 0000000..6a6dea5 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/unicode.vim @@ -0,0 +1,24 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_unicodePlugin', 0) + finish +endif + +function! airline#extensions#unicode#apply(...) + if exists(":UnicodeTable") == 2 && bufname('') ==# 'UnicodeTable' + call airline#parts#define('unicode', { + \ 'text': '[UnicodeTable]', + \ 'accent': 'bold' }) + let w:airline_section_a = airline#section#create(['unicode']) + let w:airline_section_b = '' + let w:airline_section_c = ' ' + let w:airline_section_y = '' + endif +endfunction + +function! airline#extensions#unicode#init(ext) + call a:ext.add_statusline_func('airline#extensions#unicode#apply') +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/unite.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/unite.vim new file mode 100644 index 0000000..9467a7d --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/unite.vim @@ -0,0 +1,25 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_unite', 0) + finish +endif + +function! airline#extensions#unite#apply(...) + if &ft == 'unite' + call a:1.add_section('airline_a', ' Unite ') + call a:1.add_section('airline_b', ' %{get(unite#get_context(), "buffer_name", "")} ') + call a:1.add_section('airline_c', ' %{unite#get_status_string()} ') + call a:1.split() + call a:1.add_section('airline_y', ' %{get(unite#get_context(), "real_buffer_name", "")} ') + return 1 + endif +endfunction + +function! airline#extensions#unite#init(ext) + let g:unite_force_overwrite_statusline = 0 + call a:ext.add_statusline_func('airline#extensions#unite#apply') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/vimagit.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/vimagit.vim new file mode 100644 index 0000000..814c1db --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/vimagit.vim @@ -0,0 +1,34 @@ +" MIT License. Copyright (c) 2016 Jerome Reybert +" vim: et ts=2 sts=2 sw=2 + +" This plugin replace the whole section_a when in vimagit buffer +scriptencoding utf-8 + +if !get(g:, 'loaded_magit', 0) + finish +endif + +function! airline#extensions#vimagit#init(ext) + call a:ext.add_statusline_func('airline#extensions#vimagit#apply') +endfunction + +function! airline#extensions#vimagit#get_mode() + if ( exists("*magit#get_current_mode") ) + return magit#get_current_mode() + else + if ( b:magit_current_commit_mode == '' ) + return "STAGING" + elseif ( b:magit_current_commit_mode == 'CC' ) + return "COMMIT" + elseif ( b:magit_current_commit_mode == 'CA' ) + return "AMEND" + else + return "???" + endif +endfunction + +function! airline#extensions#vimagit#apply(...) + if ( &filetype == 'magit' ) + let w:airline_section_a = '%{airline#extensions#vimagit#get_mode()}' + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/vimtex.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/vimtex.vim new file mode 100644 index 0000000..ed44795 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/vimtex.vim @@ -0,0 +1,81 @@ +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space + +function! s:SetDefault(var, val) + if !exists(a:var) + execute 'let ' . a:var . '=' . string(a:val) + endif +endfunction + +" Left and right delimiters (added only when status string is not empty) +call s:SetDefault( 'g:airline#extensions#vimtex#left', "{") +call s:SetDefault( 'g:airline#extensions#vimtex#right', "}") + +" The current tex file is the main project file +call s:SetDefault( 'g:airline#extensions#vimtex#main', "" ) +" +" The current tex file is a subfile of the project +" and the compilation is set for the main file +call s:SetDefault( 'g:airline#extensions#vimtex#sub_main', "m") +" +" The current tex file is a subfile of the project +" and the compilation is set for this subfile +call s:SetDefault( 'g:airline#extensions#vimtex#sub_local', "l") +" +" Compilation is running and continuous compilation is off +call s:SetDefault( 'g:airline#extensions#vimtex#compiled', "c₁") + +" Compilation is running and continuous compilation is on +call s:SetDefault( 'g:airline#extensions#vimtex#continuous', "c") + +" Viewer is opened +call s:SetDefault( 'g:airline#extensions#vimtex#viewer', "v") + +function! airline#extensions#vimtex#init(ext) + call airline#parts#define_raw('vimtex', '%{airline#extensions#vimtex#get_scope()}') + call a:ext.add_statusline_func('airline#extensions#vimtex#apply') +endfunction + +function! airline#extensions#vimtex#apply(...) + if exists("b:vimtex") + let w:airline_section_x = get(w:, 'airline_section_x', g:airline_section_x) + let w:airline_section_x.=s:spc.g:airline_left_alt_sep.s:spc.'%{airline#extensions#vimtex#get_scope()}' + endif +endfunction + +function! airline#extensions#vimtex#get_scope() + let l:status = '' + + let vt_local = get(b:, 'vimtex_local', {}) + if empty(vt_local) + let l:status .= g:airline#extensions#vimtex#main + else + if get(vt_local, 'active') + let l:status .= g:airline#extensions#vimtex#sub_local + else + let l:status .= g:airline#extensions#vimtex#sub_main + endif + endif + + if get(get(get(b:, 'vimtex', {}), 'viewer', {}), 'xwin_id') + let l:status .= g:airline#extensions#vimtex#viewer + endif + + let l:compiler = get(get(b:, 'vimtex', {}), 'compiler', {}) + if !empty(l:compiler) + if has_key(l:compiler, 'is_running') && b:vimtex.compiler.is_running() + if get(l:compiler, 'continuous') + let l:status .= g:airline#extensions#vimtex#continuous + else + let l:status .= g:airline#extensions#vimtex#compiled + endif + endif + endif + + if !empty(l:status) + let l:status = g:airline#extensions#vimtex#left . l:status . g:airline#extensions#vimtex#right + endif + return l:status +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/virtualenv.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/virtualenv.vim new file mode 100644 index 0000000..0364434 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/virtualenv.vim @@ -0,0 +1,31 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space + +function! airline#extensions#virtualenv#init(ext) + call a:ext.add_statusline_func('airline#extensions#virtualenv#apply') +endfunction + +function! airline#extensions#virtualenv#apply(...) + if &filetype =~# "python" + if get(g:, 'virtualenv_loaded', 0) + let statusline = virtualenv#statusline() + else + let statusline = fnamemodify($VIRTUAL_ENV, ':t') + endif + if !empty(statusline) + call airline#extensions#append_to_section('x', + \ s:spc.g:airline_right_alt_sep.s:spc.statusline) + endif + endif +endfunction + +function! airline#extensions#virtualenv#update() + if &filetype =~# "python" + call airline#extensions#virtualenv#apply() + call airline#update_statusline() + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/whitespace.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/whitespace.vim new file mode 100644 index 0000000..599ec2d --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/whitespace.vim @@ -0,0 +1,168 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +" http://got-ravings.blogspot.com/2008/10/vim-pr0n-statusline-whitespace-flags.html + +scriptencoding utf-8 + +let s:show_message = get(g:, 'airline#extensions#whitespace#show_message', 1) +let s:symbol = get(g:, 'airline#extensions#whitespace#symbol', g:airline_symbols.whitespace) +let s:default_checks = ['indent', 'trailing', 'mixed-indent-file'] + +let s:enabled = get(g:, 'airline#extensions#whitespace#enabled', 1) +let s:skip_check_ft = {'make': ['indent', 'mixed-indent-file'] } + +function! s:check_mixed_indent() + let indent_algo = get(g:, 'airline#extensions#whitespace#mixed_indent_algo', 0) + if indent_algo == 1 + " [] + " spaces before or between tabs are not allowed + let t_s_t = '(^\t* +\t\s*\S)' + " ( x count) + " count of spaces at the end of tabs should be less than tabstop value + let t_l_s = '(^\t+ {' . &ts . ',}' . '\S)' + return search('\v' . t_s_t . '|' . t_l_s, 'nw') + elseif indent_algo == 2 + return search('\v(^\t* +\t\s*\S)', 'nw') + else + return search('\v(^\t+ +)|(^ +\t+)', 'nw') + endif +endfunction + +function! s:check_mixed_indent_file() + let c_like_langs = get(g:, 'airline#extensions#c_like_langs', + \ [ 'c', 'cpp', 'cuda', 'go', 'javascript', 'ld', 'php' ]) + if index(c_like_langs, &ft) > -1 + " for C-like languages: allow /** */ comment style with one space before the '*' + let head_spc = '\v(^ +\*@!)' + else + let head_spc = '\v(^ +)' + endif + let indent_tabs = search('\v(^\t+)', 'nw') + let indent_spc = search(head_spc, 'nw') + if indent_tabs > 0 && indent_spc > 0 + return printf("%d:%d", indent_tabs, indent_spc) + else + return '' + endif +endfunction + +function! airline#extensions#whitespace#check() + let max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000) + if &readonly || !&modifiable || !s:enabled || line('$') > max_lines + \ || get(b:, 'airline_whitespace_disabled', 0) + return '' + endif + + if !exists('b:airline_whitespace_check') + let b:airline_whitespace_check = '' + let checks = get(b:, 'airline_whitespace_checks', get(g:, 'airline#extensions#whitespace#checks', s:default_checks)) + + let trailing = 0 + if index(checks, 'trailing') > -1 + try + let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$') + let trailing = search(regexp, 'nw') + catch + echomsg 'airline#whitespace: error occurred evaluating '. regexp + echomsg v:exception + return '' + endtry + endif + + let mixed = 0 + let check = 'indent' + if index(checks, check) > -1 && index(get(s:skip_check_ft, &ft, []), check) < 0 + let mixed = s:check_mixed_indent() + endif + + let mixed_file = '' + let check = 'mixed-indent-file' + if index(checks, check) > -1 && index(get(s:skip_check_ft, &ft, []), check) < 0 + let mixed_file = s:check_mixed_indent_file() + endif + + let long = 0 + if index(checks, 'long') > -1 && &tw > 0 + let long = search('\%>'.&tw.'v.\+', 'nw') + endif + + if trailing != 0 || mixed != 0 || long != 0 || !empty(mixed_file) + let b:airline_whitespace_check = s:symbol + if strlen(s:symbol) > 0 + let space = (g:airline_symbols.space) + else + let space = '' + endif + + if s:show_message + if trailing != 0 + let trailing_fmt = get(g:, 'airline#extensions#whitespace#trailing_format', '[%s]trailing') + let b:airline_whitespace_check .= space.printf(trailing_fmt, trailing) + endif + if mixed != 0 + let mixed_indent_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_format', '[%s]mixed-indent') + let b:airline_whitespace_check .= space.printf(mixed_indent_fmt, mixed) + endif + if long != 0 + let long_fmt = get(g:, 'airline#extensions#whitespace#long_format', '[%s]long') + let b:airline_whitespace_check .= space.printf(long_fmt, long) + endif + if !empty(mixed_file) + let mixed_indent_file_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_file_format', '[%s]mix-indent-file') + let b:airline_whitespace_check .= space.printf(mixed_indent_file_fmt, mixed_file) + endif + endif + endif + endif + return airline#util#shorten(b:airline_whitespace_check, 120, 9) +endfunction + +function! airline#extensions#whitespace#toggle() + if s:enabled + augroup airline_whitespace + autocmd! + augroup END + augroup! airline_whitespace + let s:enabled = 0 + else + call airline#extensions#whitespace#init() + let s:enabled = 1 + endif + + if exists("g:airline#extensions#whitespace#enabled") + let g:airline#extensions#whitespace#enabled = s:enabled + if s:enabled && match(g:airline_section_warning, '#whitespace#check') < 0 + let g:airline_section_warning .= airline#section#create(['whitespace']) + call airline#update_statusline() + endif + endif + echo 'Whitespace checking: '.(s:enabled ? 'Enabled' : 'Disabled') +endfunction + +function! airline#extensions#whitespace#disable() + if s:enabled + call airline#extensions#whitespace#toggle() + endif +endfunction + +function! airline#extensions#whitespace#init(...) + call airline#parts#define_function('whitespace', 'airline#extensions#whitespace#check') + + unlet! b:airline_whitespace_check + augroup airline_whitespace + autocmd! + autocmd CursorHold,BufWritePost * call ws_refresh() + augroup END +endfunction + +function! s:ws_refresh() + if get(b:, 'airline_ws_changedtick', 0) == b:changedtick + return + endif + unlet! b:airline_whitespace_check + if get(g:, 'airline_skip_empty_sections', 0) + exe ':AirlineRefresh' + endif + let b:airline_ws_changedtick = b:changedtick +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/windowswap.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/windowswap.vim new file mode 100644 index 0000000..fde010d --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/windowswap.vim @@ -0,0 +1,29 @@ +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('g:loaded_windowswap') + finish +endif + +let s:spc = g:airline_symbols.space + +if !exists('g:airline#extensions#windowswap#indicator_text') + let g:airline#extensions#windowswap#indicator_text = 'WS' +endif + +function! airline#extensions#windowswap#init(ext) + call airline#parts#define_function('windowswap', 'airline#extensions#windowswap#get_status') +endfunction + +function! airline#extensions#windowswap#get_status() + " use new tab-aware api if WS is up to date + let s:mark = exists('*WindowSwap#IsCurrentWindowMarked') ? + \WindowSwap#IsCurrentWindowMarked() : + \(WindowSwap#HasMarkedWindow() && WindowSwap#GetMarkedWindowNum() == winnr()) + if s:mark + return g:airline#extensions#windowswap#indicator_text.s:spc + endif + return '' +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/wordcount.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/wordcount.vim new file mode 100644 index 0000000..bfdb425 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/wordcount.vim @@ -0,0 +1,43 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:formatter = get(g:, 'airline#extensions#wordcount#formatter', 'default') +let g:airline#extensions#wordcount#filetypes = get(g:, 'airline#extensions#wordcount#filetypes', + \ '\vhelp|markdown|rst|org|text|asciidoc|tex|mail') + +function! s:wordcount_update() + if empty(bufname('')) + return + endif + if match(&ft, get(g:, 'airline#extensions#wordcount#filetypes')) > -1 + let l:mode = mode() + if l:mode ==# 'v' || l:mode ==# 'V' || l:mode ==# 's' || l:mode ==# 'S' + let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() + let b:airline_change_tick = b:changedtick + else + if get(b:, 'airline_wordcount_cache', '') is# '' || + \ b:airline_wordcount_cache isnot# get(b:, 'airline_wordcount', '') || + \ get(b:, 'airline_change_tick', 0) != b:changedtick || + \ get(b:, 'airline_winwidth', 0) != winwidth(0) + " cache data + let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() + let b:airline_wordcount_cache = b:airline_wordcount + let b:airline_change_tick = b:changedtick + let b:airline_winwidth = winwidth(0) + endif + endif + endif +endfunction + +function! airline#extensions#wordcount#apply(...) + if match(&ft, get(g:, 'airline#extensions#wordcount#filetypes')) > -1 + call airline#extensions#prepend_to_section('z', '%{get(b:, "airline_wordcount", "")}') + endif +endfunction + +function! airline#extensions#wordcount#init(ext) + call a:ext.add_statusline_func('airline#extensions#wordcount#apply') + autocmd BufReadPost,CursorMoved,CursorMovedI * call s:wordcount_update() +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim new file mode 100644 index 0000000..5a25bcf --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim @@ -0,0 +1,66 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#wordcount#formatters#default#format() + let fmt = get(g:, 'airline#extensions#wordcount#formatter#default#fmt', '%s words') + let fmt_short = get(g:, 'airline#extensions#wordcount#formatter#default#fmt_short', fmt == '%s words' ? '%sW' : fmt) + let words = string(s:wordcount()) + if empty(words) + return + endif + let result = g:airline_symbols.space . g:airline_right_alt_sep . g:airline_symbols.space + if winwidth(0) >= 80 + let separator = s:get_decimal_group() + if words > 999 && !empty(separator) + " Format number according to locale, e.g. German: 1.245 or English: 1,245 + let words = substitute(words, '\d\@<=\(\(\d\{3\}\)\+\)$', separator.'&', 'g') + endif + let result = printf(fmt, words). result + else + let result = printf(fmt_short, words). result + endif + return result +endfunction + +function! s:wordcount() + if exists("*wordcount") + let l:mode = mode() + if l:mode ==# 'v' || l:mode ==# 'V' || l:mode ==# 's' || l:mode ==# 'S' + let l:visual_words = wordcount()['visual_words'] + if l:visual_words != '' + return l:visual_words + else + return 0 + endif + else + return wordcount()['words'] + endif + elseif mode() =~? 's' + return + else + let old_status = v:statusmsg + let position = getpos(".") + exe "silent normal! g\" + let stat = v:statusmsg + call setpos('.', position) + let v:statusmsg = old_status + + let parts = split(stat) + if len(parts) > 11 + return str2nr(parts[11]) + else + return + endif + endif +endfunction + +function! s:get_decimal_group() + if match(v:lang, '\v\cC|en') > -1 + return ',' + elseif match(v:lang, '\v\cde|dk|fr|pt') > -1 + return '.' + endif + return '' +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/xkblayout.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/xkblayout.vim new file mode 100644 index 0000000..a9aef83 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/xkblayout.vim @@ -0,0 +1,25 @@ +" MIT License. Copyright (c) 2017 YoungHoon Rhiu. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('g:XkbSwitchLib') + finish +endif + +function! airline#extensions#xkblayout#status() + let keyboard_layout = libcall(g:XkbSwitchLib, 'Xkb_Switch_getXkbLayout', '') + let keyboard_layout = split(keyboard_layout, '\.')[-1] + let short_codes = {'2SetKorean': 'KR', 'Chinese': 'CN', 'Japanese': 'JP'} + + if has_key(short_codes, keyboard_layout) + let keyboard_layout = short_codes[keyboard_layout] + endif + + return keyboard_layout +endfunction + +function! airline#extensions#xkblayout#init(ext) + call airline#parts#define_function('xkblayout', 'airline#extensions#xkblayout#status') +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/extensions/ycm.vim b/.vim/plugged/vim-airline/autoload/airline/extensions/ycm.vim new file mode 100644 index 0000000..a254b4b --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/extensions/ycm.vim @@ -0,0 +1,38 @@ +" MIT License. Copyright (c) 2015 Evgeny Firsov. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space +let s:error_symbol = get(g:, 'airline#extensions#ycm#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#ycm#warning_symbol', 'W:') + +function! airline#extensions#ycm#init(ext) + call airline#parts#define_function('ycm_error_count', 'airline#extensions#ycm#get_error_count') + call airline#parts#define_function('ycm_warning_count', 'airline#extensions#ycm#get_warning_count') +endfunction + +function! airline#extensions#ycm#get_error_count() + if exists(':YcmDiag') && exists("*youcompleteme#GetErrorCount") + let cnt = youcompleteme#GetErrorCount() + + if cnt != 0 + return s:error_symbol.cnt + endif + endif + + return '' +endfunction + +function! airline#extensions#ycm#get_warning_count() + if exists(':YcmDiag') && exists("*youcompleteme#GetWarningCount") + let cnt = youcompleteme#GetWarningCount() + + if cnt != 0 + return s:warning_symbol.cnt.s:spc + endif + endif + + return '' +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/highlighter.vim b/.vim/plugged/vim-airline/autoload/airline/highlighter.vim new file mode 100644 index 0000000..579ecfe --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/highlighter.vim @@ -0,0 +1,267 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:is_win32term = (has('win32') || has('win64')) && + \ !has('gui_running') && + \ (empty($CONEMUBUILD) || &term !=? 'xterm') && + \ !(exists("+termguicolors") && &termguicolors) + +let s:separators = {} +let s:accents = {} +let s:hl_groups = {} + +function! s:gui2cui(rgb, fallback) + if a:rgb == '' + return a:fallback + elseif match(a:rgb, '^\%(NONE\|[fb]g\)$') > -1 + return a:rgb + endif + let rgb = map(split(a:rgb[1:], '..\zs'), '0 + ("0x".v:val)') + return airline#msdos#round_msdos_colors(rgb) +endfunction + +function! s:get_syn(group, what) + if !exists("g:airline_gui_mode") + let g:airline_gui_mode = airline#init#gui_mode() + endif + let color = '' + if hlexists(a:group) + let color = synIDattr(synIDtrans(hlID(a:group)), a:what, g:airline_gui_mode) + endif + if empty(color) || color == -1 + " should always exists + let color = synIDattr(synIDtrans(hlID('Normal')), a:what, g:airline_gui_mode) + " however, just in case + if empty(color) || color == -1 + let color = 'NONE' + endif + endif + return color +endfunction + +function! s:get_array(fg, bg, opts) + let opts=empty(a:opts) ? '' : join(a:opts, ',') + return g:airline_gui_mode ==# 'gui' + \ ? [ a:fg, a:bg, '', '', opts ] + \ : [ '', '', a:fg, a:bg, opts ] +endfunction + +function! airline#highlighter#reset_hlcache() + let s:hl_groups = {} +endfunction + +function! airline#highlighter#get_highlight(group, ...) + if get(g:, 'airline_highlighting_cache', 0) && has_key(s:hl_groups, a:group) + return s:hl_groups[a:group] + else + let fg = s:get_syn(a:group, 'fg') + let bg = s:get_syn(a:group, 'bg') + let reverse = g:airline_gui_mode ==# 'gui' + \ ? synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'gui') + \ : synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'cterm') + \|| synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'term') + let bold = synIDattr(synIDtrans(hlID(a:group)), 'bold') + let opts = a:000 + if bold + let opts = ['bold'] + endif + let res = reverse ? s:get_array(bg, fg, opts) : s:get_array(fg, bg, opts) + endif + let s:hl_groups[a:group] = res + return res +endfunction + +function! airline#highlighter#get_highlight2(fg, bg, ...) + let fg = s:get_syn(a:fg[0], a:fg[1]) + let bg = s:get_syn(a:bg[0], a:bg[1]) + return s:get_array(fg, bg, a:000) +endfunction + +function! s:hl_group_exists(group) + if !hlexists(a:group) + return 0 + elseif empty(synIDattr(hlID(a:group), 'fg')) + return 0 + endif + return 1 +endfunction + +function! airline#highlighter#exec(group, colors) + if pumvisible() + return + endif + let colors = a:colors + if s:is_win32term + let colors[2] = s:gui2cui(get(colors, 0, ''), get(colors, 2, '')) + let colors[3] = s:gui2cui(get(colors, 1, ''), get(colors, 3, '')) + endif + let old_hi = airline#highlighter#get_highlight(a:group) + if len(colors) == 4 + call add(colors, '') + endif + if g:airline_gui_mode ==# 'gui' + let new_hi = [colors[0], colors[1], '', '', colors[4]] + else + let new_hi = ['', '', printf("%s", colors[2]), printf("%s", colors[3]), colors[4]] + endif + let colors = s:CheckDefined(colors) + if old_hi != new_hi || !s:hl_group_exists(a:group) + let cmd = printf('hi %s %s %s %s %s %s %s %s', + \ a:group, s:Get(colors, 0, 'guifg='), s:Get(colors, 1, 'guibg='), + \ s:Get(colors, 2, 'ctermfg='), s:Get(colors, 3, 'ctermbg='), + \ s:Get(colors, 4, 'gui='), s:Get(colors, 4, 'cterm='), + \ s:Get(colors, 4, 'term=')) + exe cmd + if has_key(s:hl_groups, a:group) + let s:hl_groups[a:group] = colors + endif + endif +endfunction + +function! s:CheckDefined(colors) + " Checks, whether the definition of the colors is valid and is not empty or NONE + " e.g. if the colors would expand to this: + " hi airline_c ctermfg=NONE ctermbg=NONE + " that means to clear that highlighting group, therefore, fallback to Normal + " highlighting group for the cterm values + + " This only works, if the Normal highlighting group is actually defined, so + " return early, if it has been cleared + if !exists("g:airline#highlighter#normal_fg_hi") + let g:airline#highlighter#normal_fg_hi = synIDattr(synIDtrans(hlID('Normal')), 'fg', 'cterm') + endif + if empty(g:airline#highlighter#normal_fg_hi) || g:airline#highlighter#normal_fg_hi < 0 + return a:colors + endif + + for val in a:colors + if !empty(val) && val !=# 'NONE' + return a:colors + endif + endfor + " this adds the bold attribute to the term argument of the :hi command, + " but at least this makes sure, the group will be defined + let fg = g:airline#highlighter#normal_fg_hi + let bg = synIDattr(synIDtrans(hlID('Normal')), 'bg', 'cterm') + if bg < 0 + " in case there is no background color defined for Normal + let bg = a:colors[3] + endif + return a:colors[0:1] + [fg, bg] + [a:colors[4]] +endfunction + +function! s:Get(dict, key, prefix) + let res=get(a:dict, a:key, '') + if res is '' + return '' + else + return a:prefix. res + endif +endfunction + +function! s:exec_separator(dict, from, to, inverse, suffix) + if pumvisible() + return + endif + let l:from = airline#themes#get_highlight(a:from.a:suffix) + let l:to = airline#themes#get_highlight(a:to.a:suffix) + let group = a:from.'_to_'.a:to.a:suffix + if a:inverse + let colors = [ l:from[1], l:to[1], l:from[3], l:to[3] ] + else + let colors = [ l:to[1], l:from[1], l:to[3], l:from[3] ] + endif + let a:dict[group] = colors + call airline#highlighter#exec(group, colors) +endfunction + +function! airline#highlighter#load_theme() + if pumvisible() + return + endif + for winnr in filter(range(1, winnr('$')), 'v:val != winnr()') + call airline#highlighter#highlight_modified_inactive(winbufnr(winnr)) + endfor + call airline#highlighter#highlight(['inactive']) + if getbufvar( bufnr('%'), '&modified' ) + call airline#highlighter#highlight(['normal', 'modified']) + else + call airline#highlighter#highlight(['normal']) + endif +endfunction + +function! airline#highlighter#add_separator(from, to, inverse) + let s:separators[a:from.a:to] = [a:from, a:to, a:inverse] + call exec_separator({}, a:from, a:to, a:inverse, '') +endfunction + +function! airline#highlighter#add_accent(accent) + let s:accents[a:accent] = 1 +endfunction + +function! airline#highlighter#highlight_modified_inactive(bufnr) + if getbufvar(a:bufnr, '&modified') + let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c') + \ ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c : [] + else + let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c') + \ ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c : [] + endif + + if !empty(colors) + call airline#highlighter#exec('airline_c'.(a:bufnr).'_inactive', colors) + endif +endfunction + +function! airline#highlighter#highlight(modes, ...) + let bufnr = a:0 ? a:1 : '' + let p = g:airline#themes#{g:airline_theme}#palette + + " draw the base mode, followed by any overrides + let mapped = map(a:modes, 'v:val == a:modes[0] ? v:val : a:modes[0]."_".v:val') + let suffix = a:modes[0] == 'inactive' ? '_inactive' : '' + for mode in mapped + if mode == 'inactive' && winnr('$') == 1 + " there exist no inactive windows, don't need to create all those + " highlighting groups + continue + endif + if exists('g:airline#themes#{g:airline_theme}#palette[mode]') + let dict = g:airline#themes#{g:airline_theme}#palette[mode] + for kvp in items(dict) + let mode_colors = kvp[1] + let name = kvp[0] + if name is# 'airline_c' && !empty(bufnr) && suffix is# '_inactive' + let name = 'airline_c'.bufnr + endif + call airline#highlighter#exec(name.suffix, mode_colors) + + for accent in keys(s:accents) + if !has_key(p.accents, accent) + continue + endif + let colors = copy(mode_colors) + if p.accents[accent][0] != '' + let colors[0] = p.accents[accent][0] + endif + if p.accents[accent][2] != '' + let colors[2] = p.accents[accent][2] + endif + if len(colors) >= 5 + let colors[4] = get(p.accents[accent], 4, '') + else + call add(colors, get(p.accents[accent], 4, '')) + endif + call airline#highlighter#exec(name.suffix.'_'.accent, colors) + endfor + endfor + + " TODO: optimize this + for sep in items(s:separators) + call exec_separator(dict, sep[1][0], sep[1][1], sep[1][2], suffix) + endfor + endif + endfor +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/init.vim b/.vim/plugged/vim-airline/autoload/airline/init.vim new file mode 100644 index 0000000..57a24cb --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/init.vim @@ -0,0 +1,201 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! s:check_defined(variable, default) + if !exists(a:variable) + let {a:variable} = a:default + endif +endfunction + +let s:loaded = 0 +function! airline#init#bootstrap() + if s:loaded + return + endif + let s:loaded = 1 + + let g:airline#init#bootstrapping = 1 + + let g:airline#init#vim_async = (v:version >= 800 && has('job')) + let g:airline#init#is_windows = has('win32') || has('win64') + + call s:check_defined('g:airline_detect_modified', 1) + call s:check_defined('g:airline_detect_paste', 1) + call s:check_defined('g:airline_detect_crypt', 1) + call s:check_defined('g:airline_detect_spell', 1) + call s:check_defined('g:airline_detect_spelllang', 1) + call s:check_defined('g:airline_detect_iminsert', 0) + call s:check_defined('g:airline_inactive_collapse', 1) + call s:check_defined('g:airline_exclude_filenames', ['DebuggerWatch','DebuggerStack','DebuggerStatus']) + call s:check_defined('g:airline_exclude_filetypes', []) + call s:check_defined('g:airline_exclude_preview', 0) + call s:check_defined('g:airline_gui_mode', airline#init#gui_mode()) + + call s:check_defined('g:airline_mode_map', {}) + call extend(g:airline_mode_map, { + \ '__' : '------', + \ 'n' : 'NORMAL', + \ 'i' : 'INSERT', + \ 'R' : 'REPLACE', + \ 'v' : 'VISUAL', + \ 'V' : 'V-LINE', + \ 'c' : 'COMMAND', + \ '' : 'V-BLOCK', + \ 's' : 'SELECT', + \ 'S' : 'S-LINE', + \ '' : 'S-BLOCK', + \ 't' : 'TERMINAL', + \ }, 'keep') + + call s:check_defined('g:airline_theme_map', {}) + call extend(g:airline_theme_map, { + \ '\CTomorrow': 'tomorrow', + \ 'base16': 'base16', + \ 'mo[l|n]okai': 'molokai', + \ 'wombat': 'wombat', + \ 'zenburn': 'zenburn', + \ 'solarized': 'solarized', + \ 'flattened': 'solarized', + \ '\CNeoSolarized': 'solarized', + \ }, 'keep') + + call s:check_defined('g:airline_symbols', {}) + " First define the symbols, + " that are common in Powerline/Unicode/ASCII mode, + " then add specific symbols for either mode + call extend(g:airline_symbols, { + \ 'paste': 'PASTE', + \ 'spell': 'SPELL', + \ 'modified': '+', + \ 'space': ' ', + \ 'keymap': 'Keymap:' + \ }, 'keep') + + if get(g:, 'airline_powerline_fonts', 0) + " Symbols for Powerline terminals + call s:check_defined('g:airline_left_sep', "\ue0b0") "  + call s:check_defined('g:airline_left_alt_sep', "\ue0b1") "  + call s:check_defined('g:airline_right_sep', "\ue0b2") "  + call s:check_defined('g:airline_right_alt_sep', "\ue0b3") "  + " ro=, ws=☲, lnr=☰, mlnr=, br=, nx=Ɇ, crypt=🔒 + call extend(g:airline_symbols, { + \ 'readonly': "\ue0a2", + \ 'whitespace': "\u2632", + \ 'linenr': "\u2630 ", + \ 'maxlinenr': " \ue0a1", + \ 'branch': "\ue0a0", + \ 'notexists': "\u0246", + \ 'crypt': nr2char(0x1F512), + \ }, 'keep') + elseif &encoding==?'utf-8' && !get(g:, "airline_symbols_ascii", 0) + " Symbols for Unicode terminals + call s:check_defined('g:airline_left_sep', "") + call s:check_defined('g:airline_left_alt_sep', "") + call s:check_defined('g:airline_right_sep', "") + call s:check_defined('g:airline_right_alt_sep', "") + " ro=⊝, ws=☲, lnr=☰, mlnr=㏑, br=ᚠ, nx=Ɇ, crypt=🔒 + call extend(g:airline_symbols, { + \ 'readonly': "\u229D", + \ 'whitespace': "\u2632", + \ 'linenr': "\u2630 ", + \ 'maxlinenr': " \u33D1", + \ 'branch': "\u16A0", + \ 'notexists': "\u0246", + \ 'crypt': nr2char(0x1F512), + \ }, 'keep') + else + " Symbols for ASCII terminals + call s:check_defined('g:airline_left_sep', "") + call s:check_defined('g:airline_left_alt_sep', "") + call s:check_defined('g:airline_right_sep', "") + call s:check_defined('g:airline_right_alt_sep', "") + call extend(g:airline_symbols, { + \ 'readonly': 'RO', + \ 'whitespace': '!', + \ 'linenr': 'ln ', + \ 'maxlinenr': ' :', + \ 'branch': '', + \ 'notexists': '?', + \ 'crypt': 'cr', + \ }, 'keep') + endif + + call airline#parts#define('mode', { + \ 'function': 'airline#parts#mode', + \ 'accent': 'bold', + \ }) + call airline#parts#define_function('iminsert', 'airline#parts#iminsert') + call airline#parts#define_function('paste', 'airline#parts#paste') + call airline#parts#define_function('crypt', 'airline#parts#crypt') + call airline#parts#define_function('spell', 'airline#parts#spell') + call airline#parts#define_function('filetype', 'airline#parts#filetype') + call airline#parts#define('readonly', { + \ 'function': 'airline#parts#readonly', + \ 'accent': 'red', + \ }) + call airline#parts#define_raw('file', '%f%m') + call airline#parts#define_raw('path', '%F%m') + call airline#parts#define('linenr', { + \ 'raw': '%{g:airline_symbols.linenr}%4l', + \ 'accent': 'bold'}) + call airline#parts#define('maxlinenr', { + \ 'raw': '/%L%{g:airline_symbols.maxlinenr}', + \ 'accent': 'bold'}) + call airline#parts#define_function('ffenc', 'airline#parts#ffenc') + call airline#parts#define_empty(['hunks', 'branch', 'obsession', 'tagbar', + \ 'syntastic-warn', 'syntastic-err', 'eclim', 'whitespace','windowswap', + \ 'ycm_error_count', 'ycm_warning_count', 'neomake_error_count', + \ 'neomake_warning_count', 'ale_error_count', 'ale_warning_count']) + call airline#parts#define_text('capslock', '') + call airline#parts#define_text('xkblayout', '') + call airline#parts#define_text('keymap', '') + + unlet g:airline#init#bootstrapping +endfunction + +function! airline#init#gui_mode() + return ((has('nvim') && exists('$NVIM_TUI_ENABLE_TRUE_COLOR') && !exists("+termguicolors")) + \ || has('gui_running') || (has("termtruecolor") && &guicolors == 1) || (has("termguicolors") && &termguicolors == 1)) ? + \ 'gui' : 'cterm' +endfunction + +function! airline#init#sections() + let spc = g:airline_symbols.space + if !exists('g:airline_section_a') + let g:airline_section_a = airline#section#create_left(['mode', 'crypt', 'paste', 'keymap', 'spell', 'capslock', 'xkblayout', 'iminsert']) + endif + if !exists('g:airline_section_b') + let g:airline_section_b = airline#section#create(['hunks', 'branch']) + endif + if !exists('g:airline_section_c') + if exists("+autochdir") && &autochdir == 1 + let g:airline_section_c = airline#section#create(['%<', 'path', spc, 'readonly']) + else + let g:airline_section_c = airline#section#create(['%<', 'file', spc, 'readonly']) + endif + endif + if !exists('g:airline_section_gutter') + let g:airline_section_gutter = airline#section#create(['%=']) + endif + if !exists('g:airline_section_x') + let g:airline_section_x = airline#section#create_right(['tagbar', 'filetype']) + endif + if !exists('g:airline_section_y') + let g:airline_section_y = airline#section#create_right(['ffenc']) + endif + if !exists('g:airline_section_z') + if winwidth(0) > 80 + let g:airline_section_z = airline#section#create(['windowswap', 'obsession', '%3p%%'.spc, 'linenr', 'maxlinenr', spc.':%3v']) + else + let g:airline_section_z = airline#section#create(['%3p%%'.spc, 'linenr', ':%3v']) + endif + endif + if !exists('g:airline_section_error') + let g:airline_section_error = airline#section#create(['ycm_error_count', 'syntastic-err', 'eclim', 'neomake_error_count', 'ale_error_count']) + endif + if !exists('g:airline_section_warning') + let g:airline_section_warning = airline#section#create(['ycm_warning_count', 'syntastic-warn', 'neomake_warning_count', 'ale_warning_count', 'whitespace']) + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/msdos.vim b/.vim/plugged/vim-airline/autoload/airline/msdos.vim new file mode 100644 index 0000000..0757de5 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/msdos.vim @@ -0,0 +1,59 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +" basic 16 msdos from MSDOS +" see output of color, should be +" 0 Black +" 1 DarkBlue +" 2 DarkGreen +" 3 DarkCyan +" 4 DarkRed +" 5 DarkMagenta +" 6 Brown +" 7 LightGray +" 8 DarkGray +" 9 Blue +" 10 Green +" 11 Cyan +" 12 Red +" 13 Magenta +" 14 Yellow +" 15 White + +let s:basic16 = [ + \ [ 0x00, 0x00, 0x00 ], + \ [ 0x00, 0x00, 0x80 ], + \ [ 0x00, 0x80, 0x00 ], + \ [ 0x00, 0x80, 0x80 ], + \ [ 0x80, 0x00, 0x00 ], + \ [ 0x80, 0x00, 0x80 ], + \ [ 0x80, 0x80, 0x00 ], + \ [ 0xC0, 0xC0, 0xC0 ], + \ [ 0x80, 0x80, 0x80 ], + \ [ 0x00, 0x00, 0xFF ], + \ [ 0x00, 0xFF, 0x00 ], + \ [ 0x00, 0xFF, 0xFF ], + \ [ 0xFF, 0x00, 0x00 ], + \ [ 0xFF, 0x00, 0xFF ], + \ [ 0xFF, 0xFF, 0x00 ], + \ [ 0xFF, 0xFF, 0xFF ] + \ ] + +function! airline#msdos#round_msdos_colors(rgblist) + " Check for values from MSDOS 16 color terminal + let best = [] + let min = 100000 + let list = s:basic16 + for value in list + let t = abs(value[0] - a:rgblist[0]) + + \ abs(value[1] - a:rgblist[1]) + + \ abs(value[2] - a:rgblist[2]) + if min > t + let min = t + let best = value + endif + endfor + return index(s:basic16, best) +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/parts.vim b/.vim/plugged/vim-airline/autoload/airline/parts.vim new file mode 100644 index 0000000..98de731 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/parts.vim @@ -0,0 +1,109 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:parts = {} + +" PUBLIC API {{{ + +function! airline#parts#define(key, config) + let s:parts[a:key] = get(s:parts, a:key, {}) + if exists('g:airline#init#bootstrapping') + call extend(s:parts[a:key], a:config, 'keep') + else + call extend(s:parts[a:key], a:config, 'force') + endif +endfunction + +function! airline#parts#define_function(key, name) + call airline#parts#define(a:key, { 'function': a:name }) +endfunction + +function! airline#parts#define_text(key, text) + call airline#parts#define(a:key, { 'text': a:text }) +endfunction + +function! airline#parts#define_raw(key, raw) + call airline#parts#define(a:key, { 'raw': a:raw }) +endfunction + +function! airline#parts#define_minwidth(key, width) + call airline#parts#define(a:key, { 'minwidth': a:width }) +endfunction + +function! airline#parts#define_condition(key, predicate) + call airline#parts#define(a:key, { 'condition': a:predicate }) +endfunction + +function! airline#parts#define_accent(key, accent) + call airline#parts#define(a:key, { 'accent': a:accent }) +endfunction + +function! airline#parts#define_empty(keys) + for key in a:keys + call airline#parts#define_raw(key, '') + endfor +endfunction + +function! airline#parts#get(key) + return get(s:parts, a:key, {}) +endfunction + +" }}} + +function! airline#parts#mode() + return airline#util#shorten(get(w:, 'airline_current_mode', ''), 79, 1) +endfunction + +function! airline#parts#crypt() + return g:airline_detect_crypt && exists("+key") && !empty(&key) ? g:airline_symbols.crypt : '' +endfunction + +function! airline#parts#paste() + return g:airline_detect_paste && &paste ? g:airline_symbols.paste : '' +endfunction + +function! airline#parts#spell() + let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : '' + if g:airline_detect_spell && &spell + if winwidth(0) >= 90 + return g:airline_symbols.spell . spelllang + elseif winwidth(0) >= 70 + return g:airline_symbols.spell + else + return split(g:airline_symbols.spell, '\zs')[0] + endif + endif + return '' +endfunction + +function! airline#parts#iminsert() + if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name') + return toupper(b:keymap_name) + endif + return '' +endfunction + +function! airline#parts#readonly() + if &readonly && !filereadable(bufname('%')) + return '[noperm]' + else + return &readonly ? g:airline_symbols.readonly : '' + endif +endfunction + +function! airline#parts#filetype() + return winwidth(0) < 90 && strlen(&filetype) > 3 ? matchstr(&filetype, '...'). (&encoding is? 'utf-8' ? '…' : '>') : &filetype +endfunction + +function! airline#parts#ffenc() + let expected = get(g:, 'airline#parts#ffenc#skip_expected_string', '') + let bomb = &l:bomb ? '[BOM]' : '' + let ff = strlen(&ff) ? '['.&ff.']' : '' + if expected is# &fenc.bomb.ff + return '' + else + return &fenc.bomb.ff + endif +endfunction diff --git a/.vim/plugged/vim-airline/autoload/airline/section.vim b/.vim/plugged/vim-airline/autoload/airline/section.vim new file mode 100644 index 0000000..8d08230 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/section.vim @@ -0,0 +1,85 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +call airline#init#bootstrap() +let s:spc = g:airline_symbols.space + +function! s:wrap_accent(part, value) + if exists('a:part.accent') + call airline#highlighter#add_accent(a:part.accent) + return '%#__accent_'.(a:part.accent).'#'.a:value.'%#__restore__#' + endif + return a:value +endfunction + +function! s:create(parts, append) + let _ = '' + for idx in range(len(a:parts)) + let part = airline#parts#get(a:parts[idx]) + let val = '' + let add_sep = get(l:, 'add_sep', 0) + + if exists('part.function') + let func = (part.function).'()' + elseif exists('part.text') + let func = '"'.(part.text).'"' + else + if a:append > 0 && idx != 0 + let val .= s:spc.g:airline_left_alt_sep.s:spc + endif + if a:append < 0 && idx != 0 + let t = '' + if !add_sep + let t = s:spc.g:airline_right_alt_sep.s:spc + endif + let val = t.val + endif + if exists('part.raw') + let _ .= s:wrap_accent(part, val.(part.raw)) + continue + else + let _ .= s:wrap_accent(part, val.a:parts[idx]) + continue + endif + endif + + let minwidth = get(part, 'minwidth', 0) + + if a:append > 0 && idx != 0 + let partval = printf('%%{airline#util#append(%s,%s)}', func, minwidth) + " will add an extra separator, if minwidth is zero + let add_sep = (minwidth == 0) + elseif a:append < 0 && idx != len(a:parts) - 1 + let partval = printf('%%{airline#util#prepend(%s,%s)}', func, minwidth) + " will add an extra separator, if minwidth is zero + let add_sep = (minwidth == 0) + else + let partval = printf('%%{airline#util#wrap(%s,%s)}', func, minwidth) + let add_sep = 0 + endif + + if exists('part.condition') + let partval = substitute(partval, '{', '\="{".(part.condition)." ? "', '') + let partval = substitute(partval, '}', ' : ""}', '') + endif + + let val .= s:wrap_accent(part, partval) + let _ .= val + endfor + return _ +endfunction + +function! airline#section#create(parts) + return s:create(a:parts, 0) +endfunction + +function! airline#section#create_left(parts) + return s:create(a:parts, 1) +endfunction + +function! airline#section#create_right(parts) + return s:create(a:parts, -1) +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/themes.vim b/.vim/plugged/vim-airline/autoload/airline/themes.vim new file mode 100644 index 0000000..1de4c38 --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/themes.vim @@ -0,0 +1,77 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +" generates a dictionary which defines the colors for each highlight group +function! airline#themes#generate_color_map(sect1, sect2, sect3, ...) + let palette = { + \ 'airline_a': [ a:sect1[0] , a:sect1[1] , a:sect1[2] , a:sect1[3] , get(a:sect1 , 4 , '') ] , + \ 'airline_b': [ a:sect2[0] , a:sect2[1] , a:sect2[2] , a:sect2[3] , get(a:sect2 , 4 , '') ] , + \ 'airline_c': [ a:sect3[0] , a:sect3[1] , a:sect3[2] , a:sect3[3] , get(a:sect3 , 4 , '') ] , + \ } + + if a:0 > 0 + call extend(palette, { + \ 'airline_x': [ a:1[0] , a:1[1] , a:1[2] , a:1[3] , get(a:1 , 4 , '' ) ] , + \ 'airline_y': [ a:2[0] , a:2[1] , a:2[2] , a:2[3] , get(a:2 , 4 , '' ) ] , + \ 'airline_z': [ a:3[0] , a:3[1] , a:3[2] , a:3[3] , get(a:3 , 4 , '' ) ] , + \ }) + else + call extend(palette, { + \ 'airline_x': [ a:sect3[0] , a:sect3[1] , a:sect3[2] , a:sect3[3] , '' ] , + \ 'airline_y': [ a:sect2[0] , a:sect2[1] , a:sect2[2] , a:sect2[3] , '' ] , + \ 'airline_z': [ a:sect1[0] , a:sect1[1] , a:sect1[2] , a:sect1[3] , '' ] , + \ }) + endif + + return palette +endfunction + +function! airline#themes#get_highlight(group, ...) + return call('airline#highlighter#get_highlight', [a:group] + a:000) +endfunction + +function! airline#themes#get_highlight2(fg, bg, ...) + return call('airline#highlighter#get_highlight2', [a:fg, a:bg] + a:000) +endfunction + +function! airline#themes#patch(palette) + for mode in keys(a:palette) + if !has_key(a:palette[mode], 'airline_warning') + let a:palette[mode]['airline_warning'] = [ '#000000', '#df5f00', 232, 166 ] + endif + if !has_key(a:palette[mode], 'airline_error') + let a:palette[mode]['airline_error'] = [ '#000000', '#990000', 232, 160 ] + endif + if !has_key(a:palette[mode], 'airline_term') + "let a:palette[mode]['airline_term'] = [ '#9cffd3', '#202020', 85, 232] + let a:palette[mode]['airline_term'] = airline#highlighter#get_highlight('airline_c') + endif + endfor + + let a:palette.accents = get(a:palette, 'accents', {}) + let a:palette.accents.none = [ '', '', '', '', '' ] + let a:palette.accents.bold = [ '', '', '', '', 'bold' ] + let a:palette.accents.italic = [ '', '', '', '', 'italic' ] + + if !has_key(a:palette.accents, 'red') + let a:palette.accents.red = [ '#ff0000' , '' , 160 , '' ] + endif + if !has_key(a:palette.accents, 'green') + let a:palette.accents.green = [ '#008700' , '' , 22 , '' ] + endif + if !has_key(a:palette.accents, 'blue') + let a:palette.accents.blue = [ '#005fff' , '' , 27 , '' ] + endif + if !has_key(a:palette.accents, 'yellow') + let a:palette.accents.yellow = [ '#dfff00' , '' , 190 , '' ] + endif + if !has_key(a:palette.accents, 'orange') + let a:palette.accents.orange = [ '#df5f00' , '' , 166 , '' ] + endif + if !has_key(a:palette.accents, 'purple') + let a:palette.accents.purple = [ '#af00df' , '' , 128 , '' ] + endif +endfunction + diff --git a/.vim/plugged/vim-airline/autoload/airline/themes/dark.vim b/.vim/plugged/vim-airline/autoload/airline/themes/dark.vim new file mode 100644 index 0000000..c242d7b --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/themes/dark.vim @@ -0,0 +1,103 @@ +scriptencoding utf-8 + +" Each theme is contained in its own file and declares variables scoped to the +" file. These variables represent the possible "modes" that airline can +" detect. The mode is the return value of mode(), which gets converted to a +" readable string. The following is a list currently supported modes: normal, +" insert, replace, visual, and inactive. +" +" Each mode can also have overrides. These are small changes to the mode that +" don't require a completely different look. "modified" and "paste" are two +" such supported overrides. These are simply suffixed to the major mode, +" separated by an underscore. For example, "normal_modified" would be normal +" mode where the current buffer is modified. +" +" The theming algorithm is a 2-pass system where the mode will draw over all +" parts of the statusline, and then the override is applied after. This means +" it is possible to specify a subset of the theme in overrides, as it will +" simply overwrite the previous colors. If you want simultaneous overrides, +" then they will need to change different parts of the statusline so they do +" not conflict with each other. +" +" First, let's define an empty dictionary and assign it to the "palette" +" variable. The # is a separator that maps with the directory structure. If +" you get this wrong, Vim will complain loudly. +let g:airline#themes#dark#palette = {} + +" First let's define some arrays. The s: is just a VimL thing for scoping the +" variables to the current script. Without this, these variables would be +" declared globally. Now let's declare some colors for normal mode and add it +" to the dictionary. The array is in the format: +" [ guifg, guibg, ctermfg, ctermbg, opts ]. See "help attr-list" for valid +" values for the "opt" value. +let s:N1 = [ '#00005f' , '#dfff00' , 17 , 190 ] +let s:N2 = [ '#ffffff' , '#444444' , 255 , 238 ] +let s:N3 = [ '#9cffd3' , '#202020' , 85 , 234 ] +let g:airline#themes#dark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +" Here we define overrides for when the buffer is modified. This will be +" applied after g:airline#themes#dark#palette.normal, hence why only certain keys are +" declared. +let g:airline#themes#dark#palette.normal_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } + + +let s:I1 = [ '#00005f' , '#00dfff' , 17 , 45 ] +let s:I2 = [ '#ffffff' , '#005fff' , 255 , 27 ] +let s:I3 = [ '#ffffff' , '#000080' , 15 , 17 ] +let g:airline#themes#dark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#dark#palette.insert_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } +let g:airline#themes#dark#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#dark#palette.replace = copy(g:airline#themes#dark#palette.insert) +let g:airline#themes#dark#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] +let g:airline#themes#dark#palette.replace_modified = g:airline#themes#dark#palette.insert_modified + + +let s:V1 = [ '#000000' , '#ffaf00' , 232 , 214 ] +let s:V2 = [ '#000000' , '#ff5f00' , 232 , 202 ] +let s:V3 = [ '#ffffff' , '#5f0000' , 15 , 52 ] +let g:airline#themes#dark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#dark#palette.visual_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } + + +let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] +let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] +let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] +let g:airline#themes#dark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#dark#palette.inactive_modified = { + \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , + \ } + + +" Accents are used to give parts within a section a slightly different look or +" color. Here we are defining a "red" accent, which is used by the 'readonly' +" part by default. Only the foreground colors are specified, so the background +" colors are automatically extracted from the underlying section colors. What +" this means is that regardless of which section the part is defined in, it +" will be red instead of the section's foreground color. You can also have +" multiple parts with accents within a section. +let g:airline#themes#dark#palette.accents = { + \ 'red': [ '#ff0000' , '' , 160 , '' ] + \ } + + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#dark#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], + \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], + \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ]) +endif + diff --git a/.vim/plugged/vim-airline/autoload/airline/util.vim b/.vim/plugged/vim-airline/autoload/airline/util.vim new file mode 100644 index 0000000..06cba7a --- /dev/null +++ b/.vim/plugged/vim-airline/autoload/airline/util.vim @@ -0,0 +1,88 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +" TODO: Try to cache winwidth(0) function +" e.g. store winwidth per window and access that, only update it, if the size +" actually changed. +scriptencoding utf-8 + +call airline#init#bootstrap() +let s:spc = g:airline_symbols.space + +function! airline#util#shorten(text, winwidth, minwidth, ...) + if winwidth(0) < a:winwidth && len(split(a:text, '\zs')) > a:minwidth + if get(a:000, 0, 0) + " shorten from tail + return '…'.matchstr(a:text, '.\{'.a:minwidth.'}$') + else + " shorten from beginning of string + return matchstr(a:text, '^.\{'.a:minwidth.'}').'…' + endif + else + return a:text + endif +endfunction + +function! airline#util#wrap(text, minwidth) + if a:minwidth > 0 && winwidth(0) < a:minwidth + return '' + endif + return a:text +endfunction + +function! airline#util#append(text, minwidth) + if a:minwidth > 0 && winwidth(0) < a:minwidth + return '' + endif + let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc + return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text +endfunction + +function! airline#util#warning(msg) + echohl WarningMsg + echomsg "airline: ".a:msg + echohl Normal +endfunction + +function! airline#util#prepend(text, minwidth) + if a:minwidth > 0 && winwidth(0) < a:minwidth + return '' + endif + return empty(a:text) ? '' : a:text.s:spc.g:airline_right_alt_sep.s:spc +endfunction + +if v:version >= 704 + function! airline#util#getwinvar(winnr, key, def) + return getwinvar(a:winnr, a:key, a:def) + endfunction +else + function! airline#util#getwinvar(winnr, key, def) + let winvals = getwinvar(a:winnr, '') + return get(winvals, a:key, a:def) + endfunction +endif + +if v:version >= 704 + function! airline#util#exec_funcrefs(list, ...) + for Fn in a:list + let code = call(Fn, a:000) + if code != 0 + return code + endif + endfor + return 0 + endfunction +else + function! airline#util#exec_funcrefs(list, ...) + " for 7.2; we cannot iterate the list, hence why we use range() + " for 7.3-[97, 328]; we cannot reuse the variable, hence the {} + for i in range(0, len(a:list) - 1) + let Fn{i} = a:list[i] + let code = call(Fn{i}, a:000) + if code != 0 + return code + endif + endfor + return 0 + endfunction +endif diff --git a/.vim/plugged/vim-airline/doc/airline.txt b/.vim/plugged/vim-airline/doc/airline.txt new file mode 100644 index 0000000..dba5c53 --- /dev/null +++ b/.vim/plugged/vim-airline/doc/airline.txt @@ -0,0 +1,1289 @@ +*airline.txt* Lean and mean status/tabline that's light as air +*airline* *vim-airline* + _ _ _ _ ~ + __ _(_)_ __ ___ __ _(_)_ __| (_)_ __ ___ ~ + \ \ / / | '_ ` _ \ _____ / _` | | '__| | | '_ \ / _ \ ~ + \ V /| | | | | | |_____| (_| | | | | | | | | | __/ ~ + \_/ |_|_| |_| |_| \__,_|_|_| |_|_|_| |_|\___| ~ + ~ +============================================================================== +CONTENTS *airline-contents* + + 01. Intro ............................................... |airline-intro| + 02. Features ......................................... |airline-features| + 03. Name ................................................. |airline-name| + 04. Configuration ............................... |airline-configuration| + 05. Commands ......................................... |airline-commands| + 06. Autocommands ................................. |airline-autocommands| + 07. Customization ............................... |airline-customization| + 08. Extensions ..................................... |airline-extensions| + 09. Advanced Customization ............. |airline-advanced-customization| + 10. Funcrefs ......................................... |airline-funcrefs| + 11. Pipeline ......................................... |airline-pipeline| + 12. Writing Extensions ..................... |airline-writing-extensions| + 13. Writing Themes ..................................... |airline-themes| + 14. Troubleshooting ........................... |airline-troubleshooting| + 15. Contributions ............................... |airline-contributions| + 16. License ........................................... |airline-license| + +============================================================================== +INTRODUCTION *airline-intro* + +vim-airline is a fast and lightweight alternative to powerline, written +in 100% vimscript with no outside dependencies. + +When the plugin is correctly loaded, Vim will draw a nice statusline at the +bottom of each window. + +That line consists of several sections, each one displaying some piece of +information. By default (without configuration) this line will look like this: > + ++-----------------------------------------------------------------------------+ +|~ | +|~ | +|~ VIM - Vi IMproved | +|~ | +|~ version 8.0 | +|~ by Bram Moolenaar et al. | +|~ Vim is open source and freely distributable | +|~ | +|~ type :h :q to exit | +|~ type :help or for on-line help | +|~ type :help version8 for version info | +|~ | +|~ | ++-----------------------------------------------------------------------------+ +| A | B | C X | Y | Z | [...] | ++-----------------------------------------------------------------------------+ + +The statusline is the colored line at the bottom, which contains the sections +(possibly in different colors): + +section meaning (example)~ +-------------------------- + A displays the mode + additional flags like crypt/spell/paste (INSERT) + B VCS information (branch, hunk summary) (master) + C filename + read-only flag (~/.vim/vimrc RO) + X filetype (vim) + Y file encoding[fileformat] (utf-8[unix]) + Z current position in the file + percentage % ☰ current line/number of lines ln : column + So this: 10% ☰ 10/100 ln : 20 means: > + 10% - 10 percent + ☰ 10 - current line 10 + /100 ln - of 100 lines + : 20 - current column 20 +< + [...] additional sections (warning/errors/statistics) + from external plugins (e.g. YCM/syntastic/...) + +For a better look, those sections can be colored differently, depending on the mode and +whether the current file is 'modified' + +Additionally, several extensions exists, that can provide additional feature (e.g. the +tabline extension provides an extra statusline on the top of the Vim window and can +display loaded buffers and tabs in the current Vim session). + +Most of this is customizable and the default sections can be configured using the vim +variables g:airline_section_ (see |airline-default-sections|) + +============================================================================== +FEATURES *airline-features* + +* tiny core written with extensibility in mind. +* integrates with many popular plugins. +* looks good with regular fonts, and provides configuration points so you + can use unicode or powerline symbols. +* optimized for speed; it loads in under a millisecond. +* fully customizable; if you know a little 'statusline' syntax you can + tweak it to your needs. +* extremely easy to write themes. + +============================================================================== +NAME *airline-name* + +Where did the name come from? + +I wrote this on an airplane, and since it's light as air it turned out to be a +good name :-) + +============================================================================== +CONFIGURATION *airline-configuration* + +There are a couple configuration values available (shown with their default +values): + +* the separator used on the left side > + let g:airline_left_sep='>' +< +* the separator used on the right side > + let g:airline_right_sep='<' +< +* enable modified detection > + let g:airline_detect_modified=1 + +* enable paste detection > + let g:airline_detect_paste=1 +< +* enable crypt detection > + let g:airline_detect_crypt=1 + +* enable spell detection > + let g:airline_detect_spell=1 + +* display spelling language when spell detection is enabled + (if enough space is available) > + let g:airline_detect_spelllang=1 +< +* enable iminsert detection > + let g:airline_detect_iminsert=0 +< +* determine whether inactive windows should have the left section collapsed to + only the filename of that buffer. > + let g:airline_inactive_collapse=1 +< +* themes are automatically selected based on the matching colorscheme. this + can be overridden by defining a value. > + let g:airline_theme='dark' +< + Note: Only the dark theme is distributed with vim-airline. For more themes, + checkout the vim-airline-themes repository + (github.com/vim-airline/vim-airline-themes) + +* if you want to patch the airline theme before it gets applied, you can + supply the name of a function where you can modify the palette. > + let g:airline_theme_patch_func = 'AirlineThemePatch' + function! AirlineThemePatch(palette) + if g:airline_theme == 'badwolf' + for colors in values(a:palette.inactive) + let colors[3] = 245 + endfor + endif + endfunction +< +* By default, airline will use unicode symbols if your encoding matches + utf-8. If you want the powerline symbols set this variable: > + let g:airline_powerline_fonts = 1 +< + If you want to use plain ascii symbols, set this variable: > + let g:airline_symbols_ascii = 1 +< +* define the set of text to display for each mode. > + let g:airline_mode_map = {} " see source for the defaults + + " or copy paste the following into your vimrc for shortform text + let g:airline_mode_map = { + \ '__' : '-', + \ 'n' : 'N', + \ 'i' : 'I', + \ 'R' : 'R', + \ 'c' : 'C', + \ 'v' : 'V', + \ 'V' : 'V', + \ '' : 'V', + \ 's' : 'S', + \ 'S' : 'S', + \ '' : 'S', + \ } +< +* define the set of filename match queries which excludes a window from having + its statusline modified > + let g:airline_exclude_filenames = [] " see source for current list +< +* define the set of filetypes which are excluded from having its window + statusline modified > + let g:airline_exclude_filetypes = [] " see source for current list +< +* defines whether the preview window should be excluded from have its window + statusline modified (may help with plugins which use the preview window + heavily) > + let g:airline_exclude_preview = 0 +< +* disable the Airline customization for selective windows (this is a + window-local variable so you can disable it for only some windows) > + let w:airline_disabled = 1 + +* Do not draw separators for empty sections (only for the active window) > + let g:airline_skip_empty_sections = 1 +< + This variable can be overriden by setting a window-local variable with + the same name (in the correct window): > + let w:airline_skip_empty_sections = 0 +< +* Caches the changes to the highlighting groups, should therefore be faster. + Set this to one, if you experience a sluggish Vim: > + let g:airline_highlighting_cache = 0 +< +============================================================================== +COMMANDS *airline-commands* + +:AirlineTheme {theme-name} *:AirlineTheme* + Displays or changes the current theme. + +:AirlineToggleWhitespace *:AirlineToggleWhitespace* + Toggles whitespace detection. + +:AirlineToggle *:AirlineToggle* + Toggles between the standard 'statusline' and airline. + +:AirlineRefresh *:AirlineRefresh* + Refreshes all highlight groups and redraws the statusline. + +============================================================================== +AUTOCOMMANDS *airline-autocommands* + +Airline comes with some user-defined autocommands. + +|AirlineAfterInit| after plugin is initialized, but before the statusline + is replaced +|AirlineAfterTheme| after theme of the statusline has been changed +|AirlineToggledOn| after airline is activated and replaced the statusline +|AirlineToggledOff| after airline is deactivated and the statusline is + restored to the original + +============================================================================== +CUSTOMIZATION *airline-customization* + +The following are some unicode symbols for customizing the left/right +separators, as well as the powerline font glyphs. + +Note: You must define the dictionary first before setting values. Also, it's a +good idea to check whether it exists as to avoid accidentally overwriting +its contents. > + if !exists('g:airline_symbols') + let g:airline_symbols = {} + endif + + " unicode symbols + let g:airline_left_sep = '»' + let g:airline_left_sep = '▶' + let g:airline_right_sep = '«' + let g:airline_right_sep = '◀' + let g:airline_symbols.crypt = '🔒' + let g:airline_symbols.linenr = '☰' + let g:airline_symbols.linenr = '␊' + let g:airline_symbols.linenr = '␤' + let g:airline_symbols.linenr = '¶' + let g:airline_symbols.maxlinenr = '' + let g:airline_symbols.maxlinenr = '㏑' + let g:airline_symbols.branch = '⎇' + let g:airline_symbols.paste = 'ρ' + let g:airline_symbols.paste = 'Þ' + let g:airline_symbols.paste = '∥' + let g:airline_symbols.spell = 'Ꞩ' + let g:airline_symbols.notexists = '∄' + let g:airline_symbols.whitespace = 'Ξ' + + " powerline symbols + let g:airline_left_sep = '' + let g:airline_left_alt_sep = '' + let g:airline_right_sep = '' + let g:airline_right_alt_sep = '' + let g:airline_symbols.branch = '' + let g:airline_symbols.readonly = '' + let g:airline_symbols.linenr = '☰' + let g:airline_symbols.maxlinenr = '' + + " old vim-powerline symbols + let g:airline_left_sep = '⮀' + let g:airline_left_alt_sep = '⮁' + let g:airline_right_sep = '⮂' + let g:airline_right_alt_sep = '⮃' + let g:airline_symbols.branch = '⭠' + let g:airline_symbols.readonly = '⭤' + let g:airline_symbols.linenr = '⭡' +< + +For more intricate customizations, you can replace the predefined sections +with the usual statusline syntax. + +Note: If you define any section variables it will replace the default values +entirely. If you want to disable only certain parts of a section you can try +using variables defined in the |airline-configuration| or |airline-extensions| +section. + |airline-default-sections| +> + variable names default contents + ---------------------------------------------------------------------------- + let g:airline_section_a (mode, crypt, paste, spell, iminsert) + let g:airline_section_b (hunks, branch) + let g:airline_section_c (bufferline or filename) + let g:airline_section_gutter (readonly, csv) + let g:airline_section_x (tagbar, filetype, virtualenv) + let g:airline_section_y (fileencoding, fileformat) + let g:airline_section_z (percentage, line number, column number) + let g:airline_section_error (ycm_error_count, syntastic-err, eclim) + let g:airline_section_warning (ycm_warning_count, syntastic-warn, whitespace) + + " here is an example of how you could replace the branch indicator with + " the current working directory (limited to 10 characters), + " followed by the filename. + let g:airline_section_b = '%-0.10{getcwd()}' + let g:airline_section_c = '%t' +< +============================================================================== +EXTENSIONS *airline-extensions* + +Most extensions are enabled by default and lazily loaded when the +corresponding plugin (if any) is detected. + +By default, airline will attempt to load any extension it can find in the +'runtimepath'. On some systems this can result in an undesirable startup +cost. You can disable the check with the following flag. > + let g:airline#extensions#disable_rtp_load = 1 +< + Note: Third party plugins that rely on this behavior will be affected. You + will need to manually load them. + +Alternatively, if you want a minimalistic setup and would rather opt-in which +extensions get loaded instead of disabling each individually, you can declare +the following list variable: > + " an empty list disables all extensions + let g:airline_extensions = [] + + " or only load what you want + let g:airline_extensions = ['branch', 'tabline'] +< +------------------------------------- *airline-default* +The default extension understands all of the `g:` variables in the +|airline-configuration| section, however it also has some more fine-tuned +configuration values that you can use. + +* control which sections get truncated and at what width. > + let g:airline#extensions#default#section_truncate_width = { + \ 'b': 79, + \ 'x': 60, + \ 'y': 88, + \ 'z': 45, + \ 'warning': 80, + \ 'error': 80, + \ } + + " Note: set to an empty dictionary to disable truncation. + let g:airline#extensions#default#section_truncate_width = {} +< +* configure the layout of the sections by specifying an array of two arrays + (first array is the left side, second array is the right side). > + let g:airline#extensions#default#layout = [ + \ [ 'a', 'b', 'c' ], + \ [ 'x', 'y', 'z', 'error', 'warning' ] + \ ] +< +* configure the layout to not use %(%) grouping items in the statusline. + Try setting this to zero, if you notice bleeding color artifacts > + let airline#extensions#default#section_use_groupitems = 1 +< +* configure the fileformat output + By default, it will display something like 'utf-8[unix]', however, you can + skip displaying it, if the output matches a configured string. To do so, + set > + let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]' +< +------------------------------------- *airline-quickfix* +The quickfix extension is a simple built-in extension which determines +whether the buffer is a quickfix or location list buffer, and adjusts the +title accordingly. + +* configure the title text for quickfix buffers > + let g:airline#extensions#quickfix#quickfix_text = 'Quickfix' +< +* configure the title text for location list buffers > + let g:airline#extensions#quickfix#location_text = 'Location' +< + +------------------------------------- *airline-bufferline* +vim-bufferline + +* enable/disable bufferline integration > + let g:airline#extensions#bufferline#enabled = 1 +< +* determine whether bufferline will overwrite customization variables > + let g:airline#extensions#bufferline#overwrite_variables = 1 +< +------------------------------------- *airline-branch* + +vim-airline will display the branch-indicator together with the branch name in +the statusline, if one of the following plugins is installed: + +fugitive.vim +lawrencium +vcscommand + +If a file is edited, that is not yet in the repository, the +notexists symbol will be displayed after the branch name. + +* enable/disable fugitive/lawrencium integration > + let g:airline#extensions#branch#enabled = 1 +< +* change the text for when no branch is detected > + let g:airline#extensions#branch#empty_message = '' +< +* define the order in which the branches of different vcs systems will be + displayed on the statusline (currently only for fugitive and lawrencium) > + let g:airline#extensions#branch#vcs_priority = ["git", "mercurial"] +< +* use vcscommand.vim if available > + let g:airline#extensions#branch#use_vcscommand = 0 +< +* truncate long branch names to a fixed length > + let g:airline#extensions#branch#displayed_head_limit = 10 +< +* customize formatting of branch name > + " default value leaves the name unmodifed + let g:airline#extensions#branch#format = 0 + + " to only show the tail, e.g. a branch 'feature/foo' becomes 'foo', use + let g:airline#extensions#branch#format = 1 + + " to truncate all path sections but the last one, e.g. a branch + " 'foo/bar/baz' becomes 'f/b/baz', use + let g:airline#extensions#branch#format = 2 + + " if a string is provided, it should be the name of a function that + " takes a string and returns the desired value + let g:airline#extensions#branch#format = 'CustomBranchName' + function! CustomBranchName(name) + return '[' . a:name . ']' + endfunction +< +------------------------------------- *airline-syntastic* +syntastic + +* enable/disable syntastic integration > + let g:airline#extensions#syntastic#enabled = 1 + + Note: The recommendation from syntastic to modify the statusline directly + does not apply, if you use vim-airline, since it will take care for you of + adjusting the statusline. + +* syntastic error_symbol > + let airline#extensions#syntastic#error_symbol = 'E:' +< +* syntastic statusline error format (see |syntastic_stl_format|) > + let airline#extensions#syntastic#stl_format_err = '%E{[%e(#%fe)]}' + +* syntastic warning > + let airline#extensions#syntastic#warning_symbol = 'W:' +< +* syntastic statusline warning format (see |syntastic_stl_format|) > + let airline#extensions#syntastic#stl_format_err = '%W{[%w(#%fw)]}' +< +------------------------------------- *airline-tagbar* +tagbar + +* enable/disable tagbar integration > + let g:airline#extensions#tagbar#enabled = 1 +< +* change how tags are displayed (:help tagbar-statusline) > + let g:airline#extensions#tagbar#flags = '' (default) + let g:airline#extensions#tagbar#flags = 'f' + let g:airline#extensions#tagbar#flags = 's' + let g:airline#extensions#tagbar#flags = 'p' +< +------------------------------------- *airline-csv* +csv.vim + +* enable/disable csv integration for displaying the current column. > + let g:airline#extensions#csv#enabled = 1 +< +* change how columns are displayed. > + let g:airline#extensions#csv#column_display = 'Number' (default) + let g:airline#extensions#csv#column_display = 'Name' +< +------------------------------------- *airline-hunks* +vim-gitgutter +vim-signify +changesPlugin +quickfixsigns + +* enable/disable showing a summary of changed hunks under source control. > + let g:airline#extensions#hunks#enabled = 1 +< +* enable/disable showing only non-zero hunks. > + let g:airline#extensions#hunks#non_zero_only = 0 +< +* set hunk count symbols. > + let g:airline#extensions#hunks#hunk_symbols = ['+', '~', '-'] +< +------------------------------------- *airline-vimagit* +vimagit + +* enable/disable vimagit integration > + let g:airline#extensions#vimagit#enabled = 1 +< +------------------------------------- *airline-ctrlp* +ctrlp + +* configure which mode colors should ctrlp window use (takes effect + only if the active airline theme doesn't define ctrlp colors) > + let g:airline#extensions#ctrlp#color_template = 'insert' (default) + let g:airline#extensions#ctrlp#color_template = 'normal' + let g:airline#extensions#ctrlp#color_template = 'visual' + let g:airline#extensions#ctrlp#color_template = 'replace' +< + +* configure whether to show the previous and next modes (mru, buffer, etc...) +> + let g:airline#extensions#ctrlp#show_adjacent_modes = 1 +< +------------------------------------- *airline-virtualenv* +virtualenv + +* enable/disable virtualenv integration > + let g:airline#extensions#virtualenv#enabled = 1 +< +------------------------------------- *airline-eclim* +eclim + +* enable/disable eclim integration, which works well with the + |airline-syntastic| extension. > + let g:airline#extensions#eclim#enabled = 1 + +------------------------------------- *airline-wordcount* +* enable/disable word counting. > + let g:airline#extensions#wordcount#enabled = 1 +< +* regex of filetypes to enable word counting. > + " the default value matches filetypes typically used for documentation + " such as markdown and help files. + let g:airline#extensions#wordcount#filetypes = ... + (default: markdown,rst,org,help,text,tex,mail) + +* defines the name of a formatter for word count will be displayed: > + " The default will try to guess LC_NUMERIC and format number accordingly + " e.g. 1,042 in English and 1.042 in German locale + let g:airline#extensions#wordcount#formatter = 'default' + + " here is how you can define a 'foo' formatter: + " create a file in the dir autoload/airline/extensions/wordcount/formatters/ + " called foo.vim + " this example needs at least Vim > 7.4.1042 + function! airline#extensions#wordcount#formatters#foo#format(format,fmt) + return (wordcount()['words'] == 0 ? 'NONE' : + \ wordcount()['words'] > 100 ? 'okay' : 'not enough') + endfunction + let g:airline#extensions#wordline#formatter = 'foo' + +* defines how to display the wordcount statistics for the default formatter: > + " Defaults are below. If fmt_short isn't defined, fmt is used. + " '%s' will be substituted by the word count + " fmt_short is displayed when window width is less than 80 + let g:airline#extensions#wordcount#formatter#default#fmt = '%s words' + let g:airline#extensions#wordcount#formatter#default#fmt_short = '%sW' +< +------------------------------------- *airline-whitespace* +* enable/disable detection of whitespace errors. > + let g:airline#extensions#whitespace#enabled = 1 +< +* disable detection of whitespace errors. > + " useful to call for particular file types (e.g., in "ftplugin/*") + silent! call airline#extensions#whitespace#disable() +< +* customize the type of mixed indent checking to perform. > + " must be all spaces or all tabs before the first non-whitespace character + let g:airline#extensions#whitespace#mixed_indent_algo = 0 (default) + + " certain number of spaces are allowed after tabs, but not in between + " this algorithm works well for /** */ style comments in a tab-indented file + let g:airline#extensions#whitespace#mixed_indent_algo = 1 + + " spaces are allowed after tabs, but not in between + " this algorithm works well with programming styles that use tabs for + " indentation and spaces for alignment + let g:airline#extensions#whitespace#mixed_indent_algo = 2 +< +* customize the whitespace symbol. > + let g:airline#extensions#whitespace#symbol = '!' +< +* configure which whitespace checks to enable. > + " indent: mixed indent within a line + " long: overlong lines + " trailing: trailing whitespace + " mixed-indent-file: different indentation in different lines + let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing', 'long', 'mixed-indent-file' ] + + " this can also be configured for an individual buffer + let b:airline_whitespace_checks = [ 'indent', 'trailing', 'long', 'mixed-indent-file' ] +< +* configure the maximum number of lines where whitespace checking is enabled. > + let g:airline#extensions#whitespace#max_lines = 20000 +< +* configure whether a message should be displayed. > + let g:airline#extensions#whitespace#show_message = 1 +< +* configure the formatting of the warning messages. > + let g:airline#extensions#whitespace#trailing_format = 'trailing[%s]' + let g:airline#extensions#whitespace#mixed_indent_format = 'mixed-indent[%s]' + let g:airline#extensions#whitespace#long_format = 'long[%s]' + let g:airline#extensions#whitespace#mixed_indent_file_format = 'mix-indent-file[%s]' + +* configure custom trailing whitespace regexp rule > + let g:airline#extensions#whitespace#trailing_regexp = '\s$' + +* configure, which filetypes have special treatment of /* */ comments, + matters for mix-indent-file algorithm: > + let airline#extensions#c_like_langs = ['c', 'cpp', 'cuda', 'go', 'javascript', 'ld', 'php'] +< +* disable whitespace checking for an individual buffer > + " Checking is enabled by default because b:airline_whitespace_disabled + " is by default not defined: + unlet b:airline_whitespace_disabled + + " If b:airline_whitespace_disabled is defined and is non-zero for a buffer, + " then whitespace checking will be disabled for that buffer; for example: + " let b:airline_whitespace_disabled = 1 +< +------------------------------------- *airline-tabline* +Note: If you're using the ctrlspace tabline only the option marked with (c) +are supported! + +* enable/disable enhanced tabline. (c) > + let g:airline#extensions#tabline#enabled = 0 + +* enable/disable displaying open splits per tab (only when tabs are opened). > + let g:airline#extensions#tabline#show_splits = 1 + * +* switch position of buffers and tabs on splited tabline (c) + (only supported for ctrlspace plugin). > + let g:airline#extensions#tabline#switch_buffers_and_tabs = 0 +< +* enable/disable displaying buffers with a single tab. (c) > + let g:airline#extensions#tabline#show_buffers = 1 +< + +Note: If you are using neovim (has('tablineat') = 1), then you can click +on the tabline with the left mouse button to switch to that buffer, and +with the middle mouse button to delete that buffer. + +* enable/disable displaying tabs, regardless of number. (c) > + let g:airline#extensions#tabline#show_tabs = 1 +< +* configure filename match rules to exclude from the tabline. > + let g:airline#extensions#tabline#excludes = [] + +* enable/disable display preview window buffer in the tabline. > + let g:airline#extensions#tabline#exclude_preview = 1 + +* configure how numbers are displayed in tab mode. > + let g:airline#extensions#tabline#tab_nr_type = 0 " # of splits (default) + let g:airline#extensions#tabline#tab_nr_type = 1 " tab number + let g:airline#extensions#tabline#tab_nr_type = 2 " splits and tab number +< +* enable/disable displaying tab number in tabs mode. > + let g:airline#extensions#tabline#show_tab_nr = 1 + +* enable/disable displaying tab type (far right) > + let g:airline#extensions#tabline#show_tab_type = 1 + + Note: The tab-type will only be displayed in tab-mode, + if there are no splits shown. (See: g:airline#extensions#tabline#show_splits) + +* rename label for buffers (default: 'buffers') (c) > + let g:airline#extensions#tabline#buffers_label = 'b' + +* rename label for tabs (default: 'tabs') (c) > + let g:airline#extensions#tabline#tabs_label = 't' + +* enable/disable displaying index of the buffer. + + When enabled, numbers will be displayed in the tabline and mappings will be + exposed to allow you to select a buffer directly. Up to 9 mappings will be + exposed. > + + let g:airline#extensions#tabline#buffer_idx_mode = 1 + nmap 1 AirlineSelectTab1 + nmap 2 AirlineSelectTab2 + nmap 3 AirlineSelectTab3 + nmap 4 AirlineSelectTab4 + nmap 5 AirlineSelectTab5 + nmap 6 AirlineSelectTab6 + nmap 7 AirlineSelectTab7 + nmap 8 AirlineSelectTab8 + nmap 9 AirlineSelectTab9 + nmap - AirlineSelectPrevTab + nmap + AirlineSelectNextTab + + Note: Mappings will be ignored within "g:airline#extensions#tabline#keymap_ignored_filetypes". + + Note: In buffer_idx_mode these mappings won't change the + current tab, but switch to the buffer visible in that tab. + Use |gt| for switching tabs. + In tabmode, those mappings will switch to the specified tab. + +* define the set of filetypes which are ignored selectTab keymappings + let g:airline#extensions#tabline#keymap_ignored_filetypes = ['vimfiler', 'nerdtree'] + +* change the display format of the buffer index > + let g:airline#extensions#tabline#buffer_idx_format = { + \ '0': '0 ', + \ '1': '1 ', + \ '2': '2 ', + \ '3': '3 ', + \ '4': '4 ', + \ '5': '5 ', + \ '6': '6 ', + \ '7': '7 ', + \ '8': '8 ', + \ '9': '9 ' + \} +< + +* defines the name of a formatter for how buffer names are displayed. (c) > + let g:airline#extensions#tabline#formatter = 'default' + + " here is how you can define a 'foo' formatter: + " create a file in the dir autoload/airline/extensions/tabline/formatters/ + " called foo.vim > + function! airline#extensions#tabline#formatters#foo#format(bufnr, buffers) + return fnamemodify(bufname(a:bufnr), ':t') + endfunction + let g:airline#extensions#tabline#formatter = 'foo' +< + + Note: the following variables are used by the 'default' formatter. + When no disambiguation is needed, both 'unique_tail_improved' and + 'unique_tail' delegate formatting to 'default', so these variables also + control rendering of unique filenames when using these formatters. + + * configure whether buffer numbers should be shown. > + let g:airline#extensions#tabline#buffer_nr_show = 0 +< + * configure how buffer numbers should be formatted with |printf()|. > + let g:airline#extensions#tabline#buffer_nr_format = '%s: ' +< + * configure the formatting of filenames (see |filename-modifiers|). > + let g:airline#extensions#tabline#fnamemod = ':p:.' +< + * configure collapsing parent directories in buffer name. > + let g:airline#extensions#tabline#fnamecollapse = 1 +< + * configure truncating non-active buffer names to specified length. > + let g:airline#extensions#tabline#fnametruncate = 0 + + " The `unique_tail` algorithm will display the tail of the filename, unless + " there is another file of the same name, in which it will display it along + " with the containing parent directory. + let g:airline#extensions#tabline#formatter = 'unique_tail' + + " The following variables are also used by `unique_tail` formatter. + " the meanings are the same as the ones in default formatter. + + let g:airline#extensions#tabline#fnamemod = ':p:.' + let g:airline#extensions#tabline#fnamecollapse = 1 + + " The `unique_tail_improved` - another algorithm, that will smartly uniquify + " buffers names with similar filename, suppressing common parts of paths. + let g:airline#extensions#tabline#formatter = 'unique_tail_improved' +< +* configure the minimum number of buffers needed to show the tabline. > + let g:airline#extensions#tabline#buffer_min_count = 0 +< + Note: this setting only applies to a single tab and when `show_buffers` is + true. + +* configure the minimum number of tabs needed to show the tabline. > + let g:airline#extensions#tabline#tab_min_count = 0 +< + Note: this setting only applies when `show_buffers` is false. + +* configure separators for the tabline only. > + let g:airline#extensions#tabline#left_sep = '' + let g:airline#extensions#tabline#left_alt_sep = '' + let g:airline#extensions#tabline#right_sep = '' + let g:airline#extensions#tabline#right_alt_sep = '' + +* configure whether close button should be shown: > + let g:airline#extensions#tabline#show_close_button = 1 + +* configure symbol used to represent close button > + let g:airline#extensions#tabline#close_symbol = 'X' + +* configure pattern to be ignored on BufAdd autocommand > + " fixes unnecessary redraw, when e.g. opening Gundo window + let airline#extensions#tabline#ignore_bufadd_pat = + \ '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree' + +Note: Enabling this extension will modify 'showtabline' and 'guioptions'. + +* enable Refresh of tabline buffers on |BufAdd| autocommands + (set this to one, if you note 'AirlineTablineRefresh', however, this + won't update airline on |:badd| commands) > + let airline#extensions#tabline#disable_refresh = 0 + +* preserve windows when closing a buffer from the bufferline (default: 0) > + + let airline#extensions#tabline#middle_click_preserves_windows = 1 +< +------------------------------------- *airline-tmuxline* +tmuxline + +* enable/disable tmuxline integration > + let g:airline#extensions#tmuxline#enabled = 0 +< +* configure which mode colors should be used in tmux statusline > + let airline#extensions#tmuxline#color_template = 'normal' (default) + let airline#extensions#tmuxline#color_template = 'insert' + let airline#extensions#tmuxline#color_template = 'visual' + let airline#extensions#tmuxline#color_template = 'replace' +< +* if specified, setting this option will trigger writing to the file whenever the + airline theme is applied, i.e. when :AirlineTheme is executed and on vim + startup > + airline#extensions#tmuxline#snapshot_file = "~/.tmux-statusline-colors.conf" +< +------------------------------------- *airline-promptline* +promptline + +* configure the path to the snapshot .sh file. Mandatory option. The created + file should be sourced by the shell on login > + " in .vimrc + airline#extensions#promptline#snapshot_file = "~/.shell_prompt.sh" + + " in .bashrc/.zshrc + [ -f ~/.shell_prompt.sh ] && source ~/.shell_prompt.sh +< +* enable/disable promptline integration > + let g:airline#extensions#promptline#enabled = 0 +< +* configure which mode colors should be used in prompt > + let airline#extensions#promptline#color_template = 'normal' (default) + let airline#extensions#promptline#color_template = 'insert' + let airline#extensions#promptline#color_template = 'visual' + let airline#extensions#promptline#color_template = 'replace' +< +------------------------------------- *airline-nrrwrgn* +NrrwRgn + +* enable/disable NrrwRgn integration > + let g:airline#extensions#nrrwrgn#enabled = 1 + +------------------------------------- *airline-capslock* +vim-capslock + +* enable/disable vim-capslock integration > + let g:airline#extensions#capslock#enabled = 1 + +------------------------------------- *airline-xkblayout* +vim-xkblayout + +* enable/disable vim-xkblayout extension > + let g:airline#extensions#xkblayout#enabled = 1 + +* define path to the backend switcher library + Linux (Install https://github.com/ierton/xkb-switch): > + let g:XkbSwitchLib = '/usr/local/lib/libxkbswitch.so' +< + macOS (Install https://github.com/vovkasm/input-source-switcher): > + let g:XkbSwitchLib = '/usr/local/lib/libInputSourceSwitcher.dylib' + +------------------------------------- *airline-keymap* +vim-keymap + +* enable/disable vim-keymap extension > + let g:airline#extensions#keymap#enabled = 1 + +------------------------------------- *airline-windowswap* +vim-windowswap + +* enable/disable vim-windowswap integration > + let g:airline#extensions#windowswap#enabled = 1 + +* set marked window indicator string > + let g:airline#extensions#windowswap#indicator_text = 'WS' +< +------------------------------------- *airline-obsession* +vim-obsession + +* enable/disable vim-obsession integration > + let g:airline#extensions#obsession#enabled = 1 + +* set marked window indicator string > + let g:airline#extensions#obsession#indicator_text = '$' +< +------------------------------------- *airline-taboo* +taboo.vim + +* enable/disable taboo.vim integration > + let g:airline#extensions#taboo#enabled = 1 +< +------------------------------------- *airline-ctrlspace* +vim-ctrlspace + +* enable/disable vim-ctrlspace integration > + let g:airline#extensions#ctrlspace#enabled = 1 +< + To make the vim-ctrlspace integration work you will need to make the + ctrlspace statusline function call the correct airline function. Therefore + add the following line into your .vimrc: > + + let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()" +< +------------------------------------- *airline-ycm* +YouCompleteMe + +Shows number of errors and warnings in the current file detected by YCM. + +* enable/disable YCM integration > + let g:airline#extensions#ycm#enabled = 1 + +* set error count prefix > + let g:airline#extensions#ycm#error_symbol = 'E:' + +* set warning count prefix > + let g:airline#extensions#ycm#warning_symbol = 'W:' +< +------------------------------------- *airline-po* +po.vim + +* enable/disable po integration > + let g:airline#extensions#po#enabled = 1 +< +* truncate width names to a fixed length > + let g:airline#extensions#po#displayed_limit = 0 + +------------------------------------- *airline-vimtex* +vimtex + +Shows the current file's vimtex related info. + +* enable/disable vimtex integration > + let g:airline#extensions#vimtex#enabled = 1 +< +* left and right delimiters (shown only when status string is not empty) > + let g:airline#extensions#vimtex#left = "{" + let g:airline#extensions#vimtex#right = "}" + +State indicators: + +* the current tex file is the main project file (nothing is shown by default) > + let g:airline#extensions#vimtex#main = "" + +* the current tex file is a subfile of the project + and the compilation is set for the main file > + let g:airline#extensions#vimtex#sub_main = "m" + +* the current tex file is a subfile of the project + and the compilation is set for this subfile > + let g:airline#extensions#vimtex#sub_local = "l" + +* single compilation is running > + let g:airline#extensions#vimtex#compiled = "c₁" + +* continuousr compilation is running > + let g:airline#extensions#vimtex#continuous = "c" + +* viewer is opened > + let g:airline#extensions#vimtex#viewer = "v" + +------------------------------------- *airline-ale* +ale + +* enable/disable ale integration > + let g:airline#extensions#ale#enabled = 1 + +* ale error_symbol > + let airline#extensions#ale#error_symbol = 'E:' +< +* ale warning > + let airline#extensions#ale#warning_symbol = 'W:' +< +* ale open_lnum_symbol > + let airline#extensions#ale#open_lnum_symbol = '(L' +< +* ale close_lnum_symbol > + let airline#extensions#ale#close_lnum_symbol = ')' +< +------------------------------------- *airline-neomake* +neomake + +* enable/disable neomake integration > + let g:airline#extensions#neomake#enabled = 1 + +* neomake error_symbol > + let airline#extensions#neomake#error_symbol = 'E:' +< +* neomake warning > + let airline#extensions#neomake#warning_symbol = 'W:' +< +============================================================================== +ADVANCED CUSTOMIZATION *airline-advanced-customization* + +The defaults will accommodate the mass majority of users with minimal +configuration. However, if you want to reposition sections or contents you can +do so with built-in helper functions, which makes it possible to create +sections in a more declarative style. + +------------------------------------- *airline-parts* +A part is something that contains metadata that eventually gets rendered into +the statusline. You can define parts that contain constant strings or +functions. Defining parts is needed if you want to use features like automatic +insertion of separators or hiding based on window width. + +For example, this is how you would define a part function: > + call airline#parts#define_function('foo', 'GetFooText') +< +Here is how you would define a part that is visible only if the window width +greater than a minimum width. > + call airline#parts#define_minwidth('foo', 50) +< +Parts can be configured to be visible conditionally. > + call airline#parts#define_condition('foo', 'getcwd() =~ "work_dir"') +< + +Now add part "foo" to section section airline_section_y: > + let g:airline_section_y = airline#section#create_right(['ffenc','foo']) +< +Note: Part definitions are combinative; e.g. the two examples above modify the +same `foo` part. + +Note: Look at the source code and tests for the full API. + +------------------------------------- *airline-predefined-parts* +Before is a list of parts that are predefined by vim-airline. + +* `mode` displays the current mode +* `iminsert` displays the current insert method +* `paste` displays the paste indicator +* `crypt` displays the crypted indicator +* `spell` displays the spell indicator +* `filetype` displays the file type +* `readonly` displays the read only indicator +* `file` displays the filename and modified indicator +* `path` displays the filename (absolute path) and modifier indicator +* `linenr` displays the current line number +* `maxlinenr` displays the number of lines in the buffer +* `ffenc` displays the file format and encoding + +And the following are defined for their respective extensions: + +`ale_error_count` `ale_warning_count` `branch` `eclim` `hunks` +`neomake_error_count` `neomake_warning_count` `obsession` +`syntastic-warn` `syntastic-err` `tagbar` `whitespace` +`windowswap` `ycm_error_count` `ycm_warning_count` + +------------------------------------- *airline-accents* +Accents can be defined on any part, like so: > + call airline#parts#define_accent('foo', 'red') +< +This will override the colors of that part by using what is defined in that +particular accent. In the above example, the `red` accent is used, which means +regardless of which section the part is used in, it will have red foreground +colors instead of the section's default foreground color. + +The following accents are defined by default. Themes can define their variants +of the colors, but defaults will be provided if missing. > + bold, italic, red, green, blue, yellow, orange, purple, none +< +The defaults configure the mode and line number parts to be bold, and the +readonly part to be red. + +"none" is special. This can be used, to remove a bold accent from an existing +theme. For example, usually the mode part of the statusline is usually defined +to be bold. However, it can be hard to remove an existing bold accent from the +default configuration. Therefore, you can use the none accent to remove +existing accents, so if you put > + call airline#parts#define_accent('mode', 'none') +the mode section will be set to non-bold font style. + +------------------------------------- *airline-sections* +Once a part is defined, you can use helper functions to generate the +statuslines for each section. For example, to use the part above, we could +define a section like this: > + function! AirlineInit() + let g:airline_section_a = airline#section#create(['mode', ' ', 'foo']) + let g:airline_section_b = airline#section#create_left(['ffenc','file']) + let g:airline_section_c = airline#section#create(['%{getcwd()}']) + endfunction + autocmd User AirlineAfterInit call AirlineInit() +< +This will create a section with the `mode`, followed by a space, and our `foo` +part in section `a`. Section `b` will have two parts with a left-side +separator. And section `c` will contain the current path. You may notice that +the space and cwd are not defined parts. For convenience, if a part of that +key does not exist, it will be inserted as is. The unit tests will be a good +resource for possibilities. + +Note: The use of |User| is important, because most extensions are lazily +loaded, so we must give them a chance to define their parts before we can use +them. Also this autocommand is only triggered, after the airline functions are +actually available on startup. + +Note: The `airline#section#create` function and friends will do its best to +create a section with the appropriate separators, but it only works for +function and text parts. Special 'statusline' items like %f or raw/undefined +parts will not work as it is not possible to inspect their widths/contents +before rendering to the statusline. + +============================================================================== +FUNCREFS *airline-funcrefs* + +vim-airline internally uses funcrefs to integrate with third party plugins, +and you can tap into this functionality to extend it for you needs. This is +the most powerful way to customize the statusline, and sometimes it may be +easier to go this route than the above methods. + +Every section can have two values. The default value is the global `g:` +variable which is used in the absence of a `w:` value. This makes it very easy +to override only certain parts of the statusline by only defining window-local +variables for a subset of all sections. + +------------------------------------- *add_statusline_func* +The following is an example of how you can extend vim-airline to support a +new plugin. > + function! MyPlugin(...) + if &filetype == 'MyPluginFileType' + let w:airline_section_a = 'MyPlugin' + let w:airline_section_b = '%f' + let w:airline_section_c = '%{MyPlugin#function()}' + let g:airline_variable_referenced_in_statusline = 'foo' + endif + endfunction + call airline#add_statusline_func('MyPlugin') +< +Notice that only the left side of the statusline is overwritten. This means +the right side (the line/column numbers, etc) will be intact. + +------------------------------------- *remove_statusline_func* +You can also remove a function as well, which is useful for when you want a +temporary override. > + call airline#remove_statusline_func('MyPlugin') +< +============================================================================== +PIPELINE *airline-pipeline* + +Sometimes you want to do more than just use overrides. The statusline funcref +is invoked and passed two arguments. The first of these arguments is the +statusline builder. You can use this to build completely custom statuslines +to your liking. Here is an example: > +> + function! MyPlugin(...) + " first variable is the statusline builder + let builder = a:1 + + " WARNING: the API for the builder is not finalized and may change + call builder.add_section('Normal', '%f') + call builder.add_section('WarningMsg', '%{getcwd()}') + call builder.split() + call builder.add_section('airline_z', '%p%%') + + " tell the core to use the contents of the builder + return 1 + endfunction +< +The above example uses various example highlight groups to demonstrate +that you can use any combination from the loaded colorscheme. However, if +you want colors to change between modes, you should use one of the section +highlight groups, e.g. `airline_a` and `airline_b`. + +The second variable is the context, which is a dictionary containing various +values such as whether the statusline is active or not, and the window number. +> + context = { + 'winnr': 'the window number for the statusline', + 'active': 'whether the window is active or not', + 'bufnr': 'the current buffer for this window', + } +< +------------------------------------- *airline-pipeline-return-codes* +The pipeline accepts various return codes and can be used to determine the +next action. The following are the supported codes: > + 0 the default, continue on with the next funcref + -1 do not modify the statusline + 1 modify the statusline with the current contents of the builder +< +Note: Any value other than 0 will halt the pipeline and prevent the next +funcref from executing. + +============================================================================== +WRITING EXTENSIONS *airline-writing-extensions* + +For contributions into the plugin, here are the following guidelines: + +1. For simple 'filetype' checks, they can be added directly into the +`extensions.vim` file. + +2. Pretty much everything else should live as a separate file under the +`extensions/` directory. + + a. Inside `extensions.vim`, add a check for some variable or command that + is always available (these must be defined in `plugin/`, and _not_ + `autoload/` of the other plugin). If it exists, then initialize the + extension. This ensures that the extension is loaded if and only if the + user has the other plugin installed. Also, a check to + `airline#extensions#foo_plugin#enabled` should be performed to allow the + user to disable it. + + b. Configuration variables for the extension should reside in the + extension, e.g. `g:airline#extensions#foo_plugin#bar_variable`. + +See the source of |example.vim| for documented code of how to write one. +Looking at the other extensions is also a good resource. + +============================================================================== +WRITING THEMES *airline-themes* + +Themes are written "close to the metal" -- you will need to know some basic +VimL syntax to write a theme, but if you've written in any programming +language before it will be easy to pick up. + +The |dark.vim| theme fully documents this procedure and will guide you through +the process. + +For other examples, you can visit the official themes repository at +. It also includes +examples such as |jellybeans.vim| which define colors by extracting highlight +groups from the underlying colorscheme. + +============================================================================== +TROUBLESHOOTING *airline-troubleshooting* + +Q. There are no colors. +A. You need to set up your terminal correctly. For more details, see + . Alternatively, if you want + to bypass the automatic detection of terminal colors, you can force Vim + into 256 color mode with this: > + set t_Co=256 +< +Q. The statusline does not appear until I create a split. +A. This is the default setting of 'laststatus'. If you want it to appear all + the time, add the following to your vimrc: > + set laststatus=2 +< +Q. Powerline symbols are not showing up. +A. First, you must install patched powerline fonts. Second, you must enable + unicode in vim. > + set encoding=utf-8 +< +Q. There is a pause when leaving insert mode. +A. Add the following to your vimrc. > + set ttimeoutlen=50 +< +Q. The colors look a little off for some themes. +A. Certain themes are derived from the active colorscheme by extracting colors + from predefined highlight groups. These airline themes will look good for + their intended matching colorschemes, but will be hit or miss when loaded + with other colorschemes. + +Q. Themes are missing +A. Themes have been extracted into the vim-airlines-themes repository. Simply + clone https://github.com/vim-airline/vim-airline-themes and everything + should work again. + +Q. Performance is bad +A. Check the question at the wiki: + https://github.com/vim-airline/vim-airline/wiki/FAQ#i-have-a-performance-problem + +Solutions to other common problems can be found in the Wiki: + + +============================================================================== +CONTRIBUTIONS *airline-contributions* + +Contributions and pull requests are welcome. + +============================================================================== +LICENSE *airline-license* + +MIT License. Copyright © 2013-2017 Bailey Ling, Christian Brabandt + + vim:tw=78:ts=8:ft=help:norl: diff --git a/.vim/plugged/vim-airline/plugin/airline.vim b/.vim/plugged/vim-airline/plugin/airline.vim new file mode 100644 index 0000000..0817a6b --- /dev/null +++ b/.vim/plugged/vim-airline/plugin/airline.vim @@ -0,0 +1,156 @@ +" MIT License. Copyright (c) 2013-2016 Bailey Ling. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if &cp || v:version < 702 || (exists('g:loaded_airline') && g:loaded_airline) + finish +endif +let g:loaded_airline = 1 + +let s:airline_initialized = 0 +function! s:init() + if s:airline_initialized + return + endif + let s:airline_initialized = 1 + + call airline#extensions#load() + call airline#init#sections() + + let s:theme_in_vimrc = exists('g:airline_theme') + if s:theme_in_vimrc + try + let palette = g:airline#themes#{g:airline_theme}#palette + catch + echom 'Could not resolve airline theme "' . g:airline_theme . '". Themes have been migrated to github.com/vim-airline/vim-airline-themes.' + let g:airline_theme = 'dark' + endtry + silent call airline#switch_theme(g:airline_theme) + else + let g:airline_theme = 'dark' + silent call s:on_colorscheme_changed() + endif + + silent doautocmd User AirlineAfterInit +endfunction + +function! s:on_window_changed() + if pumvisible() && (!&previewwindow || g:airline_exclude_preview) + return + endif + " Handle each window only once, since we might come here several times for + " different autocommands. + let l:key = [bufnr('%'), winnr(), winnr('$'), tabpagenr(), &ft] + if get(g:, 'airline_last_window_changed', []) == l:key + \ && &stl is# '%!airline#statusline('.winnr().')' + \ && &ft !~? 'gitcommit' + " fugitive is special, it changes names and filetypes several times, + " make sure the caching does not get into its way + return + endif + let g:airline_last_window_changed = l:key + call s:init() + call airline#update_statusline() +endfunction + +function! s:on_colorscheme_changed() + call s:init() + unlet! g:airline#highlighter#normal_fg_hi + call airline#highlighter#reset_hlcache() + let g:airline_gui_mode = airline#init#gui_mode() + if !s:theme_in_vimrc + call airline#switch_matching_theme() + endif + + " couldn't find a match, or theme was defined, just refresh + call airline#load_theme() +endfunction + +function! airline#cmdwinenter(...) + call airline#extensions#apply_left_override('Command Line', '') +endfunction + +function! s:airline_toggle() + if exists("#airline") + augroup airline + au! + augroup END + augroup! airline + + if exists("s:stl") + let &stl = s:stl + endif + call airline#highlighter#reset_hlcache() + + silent doautocmd User AirlineToggledOff + else + let s:stl = &statusline + augroup airline + autocmd! + + autocmd CmdwinEnter * + \ call airline#add_statusline_func('airline#cmdwinenter') + \ | call on_window_changed() + autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter') + + autocmd GUIEnter,ColorScheme * call on_colorscheme_changed() + autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload * + \ call on_window_changed() + if exists('#CompleteDone') + autocmd CompleteDone * call on_window_changed() + endif + + autocmd VimResized * unlet! w:airline_lastmode | :call airline_refresh() + autocmd TabEnter * :unlet! w:airline_lastmode | let w:airline_active=1 + autocmd BufWritePost */autoload/airline/themes/*.vim + \ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), "\n")[0] + \ | call airline#load_theme() + augroup END + + if &laststatus < 2 + set laststatus=2 + endif + if s:airline_initialized + call s:on_window_changed() + endif + + silent doautocmd User AirlineToggledOn + endif +endfunction + +function! s:get_airline_themes(a, l, p) + let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:a.'*'), "\n") + return map(files, 'fnamemodify(v:val, ":t:r")') +endfunction + +function! s:airline_theme(...) + if a:0 + call airline#switch_theme(a:1) + else + echo g:airline_theme + endif +endfunction + +function! s:airline_refresh() + if !exists("#airline") + " disabled + return + endif + let nomodeline='' + if v:version > 703 || v:version == 703 && has("patch438") + let nomodeline = '' + endif + exe printf("silent doautocmd %s User AirlineBeforeRefresh", nomodeline) + call airline#highlighter#reset_hlcache() + call airline#load_theme() + call airline#update_statusline() +endfunction + +command! -bar -nargs=? -complete=customlist,get_airline_themes AirlineTheme call airline_theme() +command! -bar AirlineToggleWhitespace call airline#extensions#whitespace#toggle() +command! -bar AirlineToggle call s:airline_toggle() +command! -bar AirlineRefresh call s:airline_refresh() + +call airline#init#bootstrap() +call s:airline_toggle() diff --git a/.vim/plugged/vim-airline/t/airline.vim b/.vim/plugged/vim-airline/t/airline.vim new file mode 100644 index 0000000..6e66aec --- /dev/null +++ b/.vim/plugged/vim-airline/t/airline.vim @@ -0,0 +1,87 @@ +let g:airline_theme = 'dark' + +source plugin/airline.vim +doautocmd VimEnter + +function! MyFuncref(...) + call a:1.add_raw('hello world') + return 1 +endfunction + +function! MyIgnoreFuncref(...) + return -1 +endfunction + +function! MyAppend1(...) + call a:1.add_raw('hello') +endfunction + +function! MyAppend2(...) + call a:1.add_raw('world') +endfunction + +describe 'airline' + before + let g:airline_statusline_funcrefs = [] + end + + it 'should run user funcrefs first' + call airline#add_statusline_func('MyFuncref') + let &statusline = '' + call airline#update_statusline() + Expect airline#statusline(1) =~ 'hello world' + end + + it 'should not change the statusline with -1' + call airline#add_statusline_funcref(function('MyIgnoreFuncref')) + let &statusline = 'foo' + call airline#update_statusline() + Expect &statusline == 'foo' + end + + it 'should support multiple chained funcrefs' + call airline#add_statusline_func('MyAppend1') + call airline#add_statusline_func('MyAppend2') + call airline#update_statusline() + Expect airline#statusline(1) =~ 'helloworld' + end + + it 'should allow users to redefine sections' + let g:airline_section_a = airline#section#create(['mode', 'mode']) + call airline#update_statusline() + Expect airline#statusline(1) =~ '%{airline#util#wrap(airline#parts#mode(),0)}%#airline_a#%#airline_a_bold#%{airline#util#wrap(airline#parts#mode(),0)}%#airline_a#' + end + + it 'should remove funcrefs properly' + let c = len(g:airline_statusline_funcrefs) + call airline#add_statusline_func('MyIgnoreFuncref') + call airline#remove_statusline_func('MyIgnoreFuncref') + Expect len(g:airline_statusline_funcrefs) == c + end + + it 'should overwrite the statusline with active and inactive splits' + wincmd s + Expect airline#statusline(1) !~ 'inactive' + Expect airline#statusline(2) =~ 'inactive' + wincmd c + end + + it 'should collapse the inactive split if the variable is set true' + let g:airline_inactive_collapse = 1 + wincmd s + Expect getwinvar(2, '&statusline') !~ 'airline#parts#mode' + wincmd c + end + + it 'should not collapse the inactive split if the variable is set false' + let g:airline_inactive_collapse = 0 + wincmd s + Expect getwinvar(2, '&statusline') != 'airline#parts#mode' + wincmd c + end + + it 'should include check_mode' + Expect airline#statusline(1) =~ 'airline#check_mode' + end +end + diff --git a/.vim/plugged/vim-airline/t/builder.vim b/.vim/plugged/vim-airline/t/builder.vim new file mode 100644 index 0000000..0b07df7 --- /dev/null +++ b/.vim/plugged/vim-airline/t/builder.vim @@ -0,0 +1,108 @@ +let g:airline_theme = 'dark' +call airline#init#bootstrap() + +describe 'active builder' + before + let s:builder = airline#builder#new({'active': 1}) + end + + it 'should start with an empty statusline' + let stl = s:builder.build() + Expect stl == '' + end + + it 'should transition colors from one to the next' + call s:builder.add_section('Normal', 'hello') + call s:builder.add_section('Search', 'world') + let stl = s:builder.build() + Expect stl =~ '%#Normal#hello%#Normal_to_Search#%#Search#world' + end + + it 'should reuse highlight group if background colors match' + call airline#highlighter#reset_hlcache() + highlight Foo1 ctermfg=1 ctermbg=2 + highlight Foo2 ctermfg=1 ctermbg=2 + call s:builder.add_section('Foo1', 'hello') + call s:builder.add_section('Foo2', 'world') + let stl = s:builder.build() + Expect stl =~ '%#Foo1#helloworld' + end + + it 'should switch highlight groups if foreground colors differ' + call airline#highlighter#reset_hlcache() + highlight Foo1 ctermfg=1 ctermbg=2 + highlight Foo2 ctermfg=2 ctermbg=2 + call s:builder.add_section('Foo1', 'hello') + call s:builder.add_section('Foo2', 'world') + let stl = s:builder.build() + Expect stl =~ '%#Foo1#hello%#Foo1_to_Foo2#%#Foo2#world' + end + + it 'should split left/right sections' + call s:builder.split() + let stl = s:builder.build() + Expect stl =~ '%=' + end + + it 'after split, sections use the right separator' + call s:builder.split() + call s:builder.add_section('Normal', 'hello') + call s:builder.add_section('Search', 'world') + let stl = s:builder.build() + Expect stl =~ 'hello%#Normal_to_Search#%#Search#world' + end + + it 'should not repeat the same highlight group' + call s:builder.add_section('Normal', 'hello') + call s:builder.add_section('Normal', 'hello') + let stl = s:builder.build() + Expect stl == '%#Normal#hellohello' + end + + it 'should replace accent groups with the specified group' + call s:builder.add_section('Normal', '%#__accent_foo#hello') + let stl = s:builder.build() + Expect stl == '%#Normal#%#Normal_foo#hello' + end + + it 'should replace two accent groups with correct groups' + call s:builder.add_section('Normal', '%#__accent_foo#hello%#__accent_bar#world') + let stl = s:builder.build() + Expect stl =~ '%#Normal_foo#hello%#Normal_bar#world' + end + + it 'should special restore group should go back to previous group' + call s:builder.add_section('Normal', '%#__restore__#') + let stl = s:builder.build() + Expect stl !~ '%#__restore__#' + Expect stl =~ '%#Normal#' + end + + it 'should blend colors from the left through the split to the right' + call s:builder.add_section('Normal', 'hello') + call s:builder.split() + call s:builder.add_section('Search', 'world') + let stl = s:builder.build() + Expect stl =~ 'Normal_to_Search' + end +end + +describe 'inactive builder' + before + let s:builder = airline#builder#new({'active': 0}) + end + + it 'should transition colors from one to the next' + call s:builder.add_section('Normal', 'hello') + call s:builder.add_section('Search', 'world') + let stl = s:builder.build() + Expect stl =~ '%#Normal_inactive#hello%#Normal_to_Search_inactive#%#Search_inactive#world' + end + + it 'should not render accents' + call s:builder.add_section('Normal', '%#__accent_foo#hello%#foo#foo%#__accent_bar#world') + let stl = s:builder.build() + Expect stl == '%#Normal_inactive#hello%#foo_inactive#fooworld' + end +end + diff --git a/.vim/plugged/vim-airline/t/commands.vim b/.vim/plugged/vim-airline/t/commands.vim new file mode 100644 index 0000000..0f4bcb6 --- /dev/null +++ b/.vim/plugged/vim-airline/t/commands.vim @@ -0,0 +1,35 @@ +source plugin/airline.vim +doautocmd VimEnter + +describe 'commands' + it 'should toggle off and on' + execute 'AirlineToggle' + Expect exists('#airline') to_be_false + execute 'AirlineToggle' + Expect exists('#airline') to_be_true + end + + it 'should toggle whitespace off and on' + call airline#extensions#load() + execute 'AirlineToggleWhitespace' + Expect exists('#airline_whitespace') to_be_false + execute 'AirlineToggleWhitespace' + Expect exists('#airline_whitespace') to_be_true + end + + it 'should display theme name with no args' + execute 'AirlineTheme simple' + Expect g:airline_theme == 'simple' + execute 'AirlineTheme dark' + Expect g:airline_theme == 'dark' + execute 'AirlineTheme doesnotexist' + Expect g:airline_theme == 'dark' + colors molokai + Expect g:airline_theme == 'molokai' + end + + it 'should have a refresh command' + Expect exists(':AirlineRefresh') to_be_true + end +end + diff --git a/.vim/plugged/vim-airline/t/extensions_default.vim b/.vim/plugged/vim-airline/t/extensions_default.vim new file mode 100644 index 0000000..e60d651 --- /dev/null +++ b/.vim/plugged/vim-airline/t/extensions_default.vim @@ -0,0 +1,31 @@ +let g:airline#extensions#default#layout = [ + \ [ 'c', 'a', 'b', 'warning' ], + \ [ 'x', 'z', 'y' ] + \ ] + +source plugin/airline.vim +doautocmd VimEnter + +describe 'default' + before + let s:builder = airline#builder#new({'active': 1}) + end + + it 'should use the layout' + call airline#extensions#default#apply(s:builder, { 'winnr': 1, 'active': 1 }) + let stl = s:builder.build() + Expect stl =~ 'airline_c_to_airline_a' + Expect stl =~ 'airline_a_to_airline_b' + Expect stl =~ 'airline_b_to_airline_warning' + Expect stl =~ 'airline_x_to_airline_z' + Expect stl =~ 'airline_z_to_airline_y' + end + + it 'should only render warning section in active splits' + wincmd s + Expect airline#statusline(1) =~ 'warning' + Expect airline#statusline(2) !~ 'warning' + wincmd c + end +end + diff --git a/.vim/plugged/vim-airline/t/highlighter.vim b/.vim/plugged/vim-airline/t/highlighter.vim new file mode 100644 index 0000000..a1ed490 --- /dev/null +++ b/.vim/plugged/vim-airline/t/highlighter.vim @@ -0,0 +1,21 @@ +let g:airline_theme = 'dark' + +describe 'highlighter' + it 'should create separator highlight groups' + hi Foo1 ctermfg=1 ctermbg=2 + hi Foo2 ctermfg=3 ctermbg=4 + call airline#highlighter#add_separator('Foo1', 'Foo2', 0) + let hl = airline#highlighter#get_highlight('Foo1_to_Foo2') + Expect hl == [ '', '', '4', '2', '' ] + end + + it 'should populate accent colors' + Expect exists('g:airline#themes#dark#palette.normal.airline_c_red') to_be_false + Expect hlID('airline_c_red') == 0 + call airline#themes#patch(g:airline#themes#dark#palette) + call airline#highlighter#add_accent('red') + call airline#highlighter#highlight(['normal']) + Expect hlID('airline_c_red') != 0 + end +end + diff --git a/.vim/plugged/vim-airline/t/init.vim b/.vim/plugged/vim-airline/t/init.vim new file mode 100644 index 0000000..da795d4 --- /dev/null +++ b/.vim/plugged/vim-airline/t/init.vim @@ -0,0 +1,87 @@ +let s:sections = ['a', 'b', 'c', 'gutter', 'x', 'y', 'z', 'warning'] + +function! s:clear() + for key in s:sections + unlet! g:airline_section_{key} + endfor +endfunction + +call airline#init#bootstrap() + +describe 'init sections' + before + call s:clear() + call airline#init#sections() + end + + after + call s:clear() + end + + it 'section a should have mode, paste, spell, iminsert' + Expect g:airline_section_a =~ 'mode' + Expect g:airline_section_a =~ 'paste' + Expect g:airline_section_a =~ 'spell' + Expect g:airline_section_a =~ 'iminsert' + end + + it 'section b should be blank because no extensions are installed' + Expect g:airline_section_b == '' + end + + it 'section c should be file' + Expect g:airline_section_c == '%<%f%m %#__accent_red#%{airline#util#wrap(airline#parts#readonly(),0)}%#__restore__#' + end + + it 'section x should be filetype' + Expect g:airline_section_x == '%{airline#util#wrap(airline#parts#filetype(),0)}' + end + + it 'section y should be fenc and ff' + Expect g:airline_section_y =~ 'ff' + Expect g:airline_section_y =~ 'fenc' + end + + it 'section z should be line numbers' + Expect g:airline_section_z =~ '%3p%%' + Expect g:airline_section_z =~ '%4l' + Expect g:airline_section_z =~ '%3v' + end + + it 'should not redefine sections already defined' + for s in s:sections + let g:airline_section_{s} = s + endfor + call airline#init#bootstrap() + for s in s:sections + Expect g:airline_section_{s} == s + endfor + end + + it 'all default statusline extensions should be blank' + Expect airline#parts#get('ale_error_count').raw == '' + Expect airline#parts#get('ale_warning_count').raw == '' + Expect airline#parts#get('hunks').raw == '' + Expect airline#parts#get('branch').raw == '' + Expect airline#parts#get('eclim').raw == '' + Expect airline#parts#get('neomake_error_count').raw == '' + Expect airline#parts#get('neomake_warning_count').raw == '' + Expect airline#parts#get('obsession').raw == '' + Expect airline#parts#get('syntastic-err').raw == '' + Expect airline#parts#get('syntastic-warn').raw == '' + Expect airline#parts#get('tagbar').raw == '' + Expect airline#parts#get('whitespace').raw == '' + Expect airline#parts#get('windowswap').raw == '' + Expect airline#parts#get('ycm_error_count').raw == '' + Expect airline#parts#get('ycm_warning_count').raw == '' + end +end + +describe 'init parts' + it 'should not redefine parts already defined' + call airline#parts#define_raw('linenr', 'bar') + call airline#init#sections() + Expect g:airline_section_z =~ 'bar' + end +end + diff --git a/.vim/plugged/vim-airline/t/parts.vim b/.vim/plugged/vim-airline/t/parts.vim new file mode 100644 index 0000000..ee7c92e --- /dev/null +++ b/.vim/plugged/vim-airline/t/parts.vim @@ -0,0 +1,39 @@ +describe 'parts' + it 'overwrites existing values' + call airline#parts#define('foo', { 'test': '123' }) + Expect airline#parts#get('foo').test == '123' + call airline#parts#define('foo', { 'test': '321' }) + Expect airline#parts#get('foo').test == '321' + end + + it 'can define a function part' + call airline#parts#define_function('func', 'bar') + Expect airline#parts#get('func').function == 'bar' + end + + it 'can define a text part' + call airline#parts#define_text('text', 'bar') + Expect airline#parts#get('text').text == 'bar' + end + + it 'can define a raw part' + call airline#parts#define_raw('raw', 'bar') + Expect airline#parts#get('raw').raw == 'bar' + end + + it 'can define a minwidth' + call airline#parts#define_minwidth('mw', 123) + Expect airline#parts#get('mw').minwidth == 123 + end + + it 'can define a condition' + call airline#parts#define_condition('part', '1') + Expect airline#parts#get('part').condition == '1' + end + + it 'can define a accent' + call airline#parts#define_accent('part', 'red') + Expect airline#parts#get('part').accent == 'red' + end +end + diff --git a/.vim/plugged/vim-airline/t/section.vim b/.vim/plugged/vim-airline/t/section.vim new file mode 100644 index 0000000..d692f5d --- /dev/null +++ b/.vim/plugged/vim-airline/t/section.vim @@ -0,0 +1,81 @@ +function! SectionSpec() +endfunction + +describe 'section' + before + call airline#parts#define_text('text', 'text') + call airline#parts#define_raw('raw', 'raw') + call airline#parts#define_function('func', 'SectionSpec') + end + + it 'should be able to reference default parts' + let s = airline#section#create(['paste']) + Expect s == '%{airline#util#wrap(airline#parts#paste(),0)}' + end + + it 'should create sections with no separators' + let s = airline#section#create(['text', 'raw', 'func']) + Expect s == '%{airline#util#wrap("text",0)}raw%{airline#util#wrap(SectionSpec(),0)}' + end + + it 'should create left sections with separators' + let s = airline#section#create_left(['text', 'text']) + Expect s == '%{airline#util#wrap("text",0)}%{airline#util#append("text",0)}' + end + + it 'should create right sections with separators' + let s = airline#section#create_right(['text', 'text']) + Expect s == '%{airline#util#prepend("text",0)}%{airline#util#wrap("text",0)}' + end + + it 'should prefix with accent group if provided and restore afterwards' + call airline#parts#define('hi', { + \ 'raw': 'hello', + \ 'accent': 'red', + \ }) + let s = airline#section#create(['hi']) + Expect s == '%#__accent_red#hello%#__restore__#' + end + + it 'should accent functions' + call airline#parts#define_function('hi', 'Hello') + call airline#parts#define_accent('hi', 'bold') + let s = airline#section#create(['hi']) + Expect s == '%#__accent_bold#%{airline#util#wrap(Hello(),0)}%#__restore__#' + end + + it 'should parse out a section from the distro' + call airline#extensions#load() + let s = airline#section#create(['whitespace']) + Expect s =~ 'airline#extensions#whitespace#check' + end + + it 'should use parts as is if they are not found' + let s = airline#section#create(['asdf', 'func']) + Expect s == 'asdf%{airline#util#wrap(SectionSpec(),0)}' + end + + it 'should force add separators for raw and missing keys' + let s = airline#section#create_left(['asdf', 'raw']) + Expect s == 'asdf raw' + let s = airline#section#create_left(['asdf', 'aaaa', 'raw']) + Expect s == 'asdf aaaa raw' + let s = airline#section#create_right(['raw', '%f']) + Expect s == 'raw %f' + let s = airline#section#create_right(['%t', 'asdf', '%{getcwd()}']) + Expect s == '%t asdf %{getcwd()}' + end + + it 'should empty out parts that do not pass their condition' + call airline#parts#define_text('conditional', 'conditional') + call airline#parts#define_condition('conditional', '0') + let s = airline#section#create(['conditional']) + Expect s == '%{0 ? airline#util#wrap("conditional",0) : ""}' + end + + it 'should not draw two separators after another' + let s = airline#section#create_right(['ffenc','%{strftime("%H:%M")}']) + Expect s == '%{airline#util#prepend(airline#parts#ffenc(),0)}%{strftime("%H:%M")}' + end +end + diff --git a/.vim/plugged/vim-airline/t/themes.vim b/.vim/plugged/vim-airline/t/themes.vim new file mode 100644 index 0000000..b8a8fb2 --- /dev/null +++ b/.vim/plugged/vim-airline/t/themes.vim @@ -0,0 +1,73 @@ +describe 'themes' + after + highlight clear Foo + highlight clear Normal + end + + it 'should extract correct colors' + call airline#highlighter#reset_hlcache() + highlight Foo ctermfg=1 ctermbg=2 + let colors = airline#themes#get_highlight('Foo') + Expect colors[2] == '1' + Expect colors[3] == '2' + end + + it 'should extract from normal if colors unavailable' + call airline#highlighter#reset_hlcache() + highlight Normal ctermfg=100 ctermbg=200 + highlight Foo ctermbg=2 + let colors = airline#themes#get_highlight('Foo') + Expect colors[2] == '100' + Expect colors[3] == '2' + end + + it 'should flip target group if it is reversed' + call airline#highlighter#reset_hlcache() + highlight Foo ctermbg=222 ctermfg=103 term=reverse + let colors = airline#themes#get_highlight('Foo') + Expect colors[2] == '222' + Expect colors[3] == '103' + end + + it 'should pass args through correctly' + call airline#highlighter#reset_hlcache() + hi clear Normal + let hl = airline#themes#get_highlight('Foo', 'bold', 'italic') + Expect hl == ['', '', 'NONE', 'NONE', 'bold,italic'] + + let hl = airline#themes#get_highlight2(['Foo','bg'], ['Foo','fg'], 'italic', 'bold') + Expect hl == ['', '', 'NONE', 'NONE', 'italic,bold'] + end + + it 'should generate color map with mirroring' + let map = airline#themes#generate_color_map( + \ [ 1, 1, 1, 1, '1' ], + \ [ 2, 2, 2, 2, '2' ], + \ [ 3, 3, 3, 3, '3' ], + \ ) + Expect map.airline_a[0] == 1 + Expect map.airline_b[0] == 2 + Expect map.airline_c[0] == 3 + Expect map.airline_x[0] == 3 + Expect map.airline_y[0] == 2 + Expect map.airline_z[0] == 1 + end + + it 'should generate color map with full set of colors' + let map = airline#themes#generate_color_map( + \ [ 1, 1, 1, 1, '1' ], + \ [ 2, 2, 2, 2, '2' ], + \ [ 3, 3, 3, 3, '3' ], + \ [ 4, 4, 4, 4, '4' ], + \ [ 5, 5, 5, 5, '5' ], + \ [ 6, 6, 6, 6, '6' ], + \ ) + Expect map.airline_a[0] == 1 + Expect map.airline_b[0] == 2 + Expect map.airline_c[0] == 3 + Expect map.airline_x[0] == 4 + Expect map.airline_y[0] == 5 + Expect map.airline_z[0] == 6 + end +end + diff --git a/.vim/plugged/vim-airline/t/util.vim b/.vim/plugged/vim-airline/t/util.vim new file mode 100644 index 0000000..14c1d91 --- /dev/null +++ b/.vim/plugged/vim-airline/t/util.vim @@ -0,0 +1,54 @@ +call airline#init#bootstrap() + +function! Util1() + let g:count += 1 +endfunction +function! Util2() + let g:count += 2 +endfunction +function! Util3(...) + let g:count = a:0 +endfunction + +describe 'util' + before + let g:count = 0 + end + + it 'has append wrapper function' + Expect airline#util#append('', 0) == '' + Expect airline#util#append('1', 0) == ' 1' + end + + it 'has prepend wrapper function' + Expect airline#util#prepend('', 0) == '' + Expect airline#util#prepend('1', 0) == '1 ' + end + + it 'has getwinvar function' + Expect airline#util#getwinvar(1, 'asdf', '123') == '123' + call setwinvar(1, 'vspec', 'is cool') + Expect airline#util#getwinvar(1, 'vspec', '') == 'is cool' + end + + it 'has exec funcrefs helper functions' + call airline#util#exec_funcrefs([function('Util1'), function('Util2')]) + Expect g:count == 3 + + call airline#util#exec_funcrefs([function('Util3')], 1, 2, 3, 4) + Expect g:count == 4 + end + + it 'should ignore minwidth if less than 0' + Expect airline#util#append('foo', -1) == ' foo' + Expect airline#util#prepend('foo', -1) == 'foo ' + Expect airline#util#wrap('foo', -1) == 'foo' + end + + it 'should return empty if winwidth() > minwidth' + Expect airline#util#append('foo', 99999) == '' + Expect airline#util#prepend('foo', 99999) == '' + Expect airline#util#wrap('foo', 99999) == '' + end +end + diff --git a/.vim/plugin/snipMate.vim b/.vim/plugin/snipMate.vim new file mode 100644 index 0000000..3efee2a --- /dev/null +++ b/.vim/plugin/snipMate.vim @@ -0,0 +1,247 @@ +" File: snipMate.vim +" Author: Michael Sanders +" Last Updated: July 13, 2009 +" Version: 0.83 +" Description: snipMate.vim implements some of TextMate's snippets features in +" Vim. A snippet is a piece of often-typed text that you can +" insert into your document using a trigger word followed by a "". +" +" For more help see snipMate.txt; you can do this by using: +" :helptags ~/.vim/doc +" :h snipMate.txt + +if exists('loaded_snips') || &cp || version < 700 + finish +endif +let loaded_snips = 1 +if !exists('snips_author') | let snips_author = 'Me' | endif + +au BufRead,BufNewFile *.snippets\= set ft=snippet +au FileType snippet setl noet fdm=indent + +let s:snippets = {} | let s:multi_snips = {} + +if !exists('snippets_dir') + let snippets_dir = substitute(globpath(&rtp, 'snippets/'), "\n", ',', 'g') +endif + +fun! MakeSnip(scope, trigger, content, ...) + let multisnip = a:0 && a:1 != '' + let var = multisnip ? 's:multi_snips' : 's:snippets' + if !has_key({var}, a:scope) | let {var}[a:scope] = {} | endif + if !has_key({var}[a:scope], a:trigger) + let {var}[a:scope][a:trigger] = multisnip ? [[a:1, a:content]] : a:content + elseif multisnip | let {var}[a:scope][a:trigger] += [[a:1, a:content]] + else + echom 'Warning in snipMate.vim: Snippet '.a:trigger.' is already defined.' + \ .' See :h multi_snip for help on snippets with multiple matches.' + endif +endf + +fun! ExtractSnips(dir, ft) + for path in split(globpath(a:dir, '*'), "\n") + if isdirectory(path) + let pathname = fnamemodify(path, ':t') + for snipFile in split(globpath(path, '*.snippet'), "\n") + call s:ProcessFile(snipFile, a:ft, pathname) + endfor + elseif fnamemodify(path, ':e') == 'snippet' + call s:ProcessFile(path, a:ft) + endif + endfor +endf + +" Processes a single-snippet file; optionally add the name of the parent +" directory for a snippet with multiple matches. +fun s:ProcessFile(file, ft, ...) + let keyword = fnamemodify(a:file, ':t:r') + if keyword == '' | return | endif + try + let text = join(readfile(a:file), "\n") + catch /E484/ + echom "Error in snipMate.vim: couldn't read file: ".a:file + endtry + return a:0 ? MakeSnip(a:ft, a:1, text, keyword) + \ : MakeSnip(a:ft, keyword, text) +endf + +fun! ExtractSnipsFile(file, ft) + if !filereadable(a:file) | return | endif + let text = readfile(a:file) + let inSnip = 0 + for line in text + ["\n"] + if inSnip && (line[0] == "\t" || line == '') + let content .= strpart(line, 1)."\n" + continue + elseif inSnip + call MakeSnip(a:ft, trigger, content[:-2], name) + let inSnip = 0 + endif + + if line[:6] == 'snippet' + let inSnip = 1 + let trigger = strpart(line, 8) + let name = '' + let space = stridx(trigger, ' ') + 1 + if space " Process multi snip + let name = strpart(trigger, space) + let trigger = strpart(trigger, 0, space - 1) + endif + let content = '' + endif + endfor +endf + +fun! ResetSnippets() + let s:snippets = {} | let s:multi_snips = {} | let g:did_ft = {} +endf + +let g:did_ft = {} +fun! GetSnippets(dir, filetypes) + for ft in split(a:filetypes, '\.') + if has_key(g:did_ft, ft) | continue | endif + call s:DefineSnips(a:dir, ft, ft) + if ft == 'objc' || ft == 'cpp' || ft == 'cs' + call s:DefineSnips(a:dir, 'c', ft) + elseif ft == 'xhtml' + call s:DefineSnips(a:dir, 'html', 'xhtml') + endif + let g:did_ft[ft] = 1 + endfor +endf + +" Define "aliasft" snippets for the filetype "realft". +fun s:DefineSnips(dir, aliasft, realft) + for path in split(globpath(a:dir, a:aliasft.'/')."\n". + \ globpath(a:dir, a:aliasft.'-*/'), "\n") + call ExtractSnips(path, a:realft) + endfor + for path in split(globpath(a:dir, a:aliasft.'.snippets')."\n". + \ globpath(a:dir, a:aliasft.'-*.snippets'), "\n") + call ExtractSnipsFile(path, a:realft) + endfor +endf + +fun! TriggerSnippet() + if exists('g:SuperTabMappingForward') + if g:SuperTabMappingForward == "" + let SuperTabKey = "\" + elseif g:SuperTabMappingBackward == "" + let SuperTabKey = "\" + endif + endif + + if pumvisible() " Update snippet if completion is used, or deal with supertab + if exists('SuperTabKey') + call feedkeys(SuperTabKey) | return '' + endif + call feedkeys("\a", 'n') " Close completion menu + call feedkeys("\") | return '' + endif + + if exists('g:snipPos') | return snipMate#jumpTabStop(0) | endif + + let word = matchstr(getline('.'), '\S\+\%'.col('.').'c') + for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] + let [trigger, snippet] = s:GetSnippet(word, scope) + " If word is a trigger for a snippet, delete the trigger & expand + " the snippet. + if snippet != '' + let col = col('.') - len(trigger) + sil exe 's/\V'.escape(trigger, '/.').'\%#//' + return snipMate#expandSnip(snippet, col) + endif + endfor + + if exists('SuperTabKey') + call feedkeys(SuperTabKey) + return '' + endif + return "\" +endf + +fun! BackwardsSnippet() + if exists('g:snipPos') | return snipMate#jumpTabStop(1) | endif + + if exists('g:SuperTabMappingForward') + if g:SuperTabMappingBackward == "" + let SuperTabKey = "\" + elseif g:SuperTabMappingForward == "" + let SuperTabKey = "\" + endif + endif + if exists('SuperTabKey') + call feedkeys(SuperTabKey) + return '' + endif + return "\" +endf + +" Check if word under cursor is snippet trigger; if it isn't, try checking if +" the text after non-word characters is (e.g. check for "foo" in "bar.foo") +fun s:GetSnippet(word, scope) + let word = a:word | let snippet = '' + while snippet == '' + if exists('s:snippets["'.a:scope.'"]["'.escape(word, '\"').'"]') + let snippet = s:snippets[a:scope][word] + elseif exists('s:multi_snips["'.a:scope.'"]["'.escape(word, '\"').'"]') + let snippet = s:ChooseSnippet(a:scope, word) + if snippet == '' | break | endif + else + if match(word, '\W') == -1 | break | endif + let word = substitute(word, '.\{-}\W', '', '') + endif + endw + if word == '' && a:word != '.' && stridx(a:word, '.') != -1 + let [word, snippet] = s:GetSnippet('.', a:scope) + endif + return [word, snippet] +endf + +fun s:ChooseSnippet(scope, trigger) + let snippet = [] + let i = 1 + for snip in s:multi_snips[a:scope][a:trigger] + let snippet += [i.'. '.snip[0]] + let i += 1 + endfor + if i == 2 | return s:multi_snips[a:scope][a:trigger][0][1] | endif + let num = inputlist(snippet) - 1 + return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1] +endf + +fun! ShowAvailableSnips() + let line = getline('.') + let col = col('.') + let word = matchstr(getline('.'), '\S\+\%'.col.'c') + let words = [word] + if stridx(word, '.') + let words += split(word, '\.', 1) + endif + let matchlen = 0 + let matches = [] + for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] + let triggers = has_key(s:snippets, scope) ? keys(s:snippets[scope]) : [] + if has_key(s:multi_snips, scope) + let triggers += keys(s:multi_snips[scope]) + endif + for trigger in triggers + for word in words + if word == '' + let matches += [trigger] " Show all matches if word is empty + elseif trigger =~ '^'.word + let matches += [trigger] + let len = len(word) + if len > matchlen | let matchlen = len | endif + endif + endfor + endfor + endfor + + " This is to avoid a bug with Vim when using complete(col - matchlen, matches) + " (Issue#46 on the Google Code snipMate issue tracker). + call setline(line('.'), substitute(line, repeat('.', matchlen).'\%'.col.'c', '', '')) + call complete(col, matches) + return '' +endf +" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/scripts/closetag.vim b/.vim/scripts/closetag.vim new file mode 100644 index 0000000..b986b56 --- /dev/null +++ b/.vim/scripts/closetag.vim @@ -0,0 +1,327 @@ +" File: closetag.vim +" Summary: Functions and mappings to close open HTML/XML tags +" Uses: -- close matching open tag +" Author: Steven Mueller +" Last Modified: Tue May 24 13:29:48 PDT 2005 +" Version: 0.9.1 +" XXX - breaks if close attempted while XIM is in preedit mode +" TODO - allow usability as a global plugin - +" Add g:unaryTagsStack - always contains html tags settings +" and g:closetag_default_xml - user should define this to default to xml +" When a close is attempted but b:unaryTagsStack undefined, +" use b:closetag_html_style to determine if the file is to be treated +" as html or xml. Failing that, check the filetype for xml or html. +" Finally, default to g:closetag_html_style. +" If the file is html, let b:unaryTagsStack=g:unaryTagsStack +" otherwise, let b:unaryTagsStack="" +" TODO - make matching work for all comments +" -- kinda works now, but needs syn sync minlines to be very long +" -- Only check whether in syntax in the beginning, then store comment tags +" in the tagstacks to determine whether to move into or out of comment mode +" TODO - The new normal mode mapping clears recent messages with its , and +" it doesn't fix the null-undo issue for vim 5.7 anyway. +" TODO - make use of the following neat features: +" -- the ternary ?: operator +" -- :echomsg and :echoerr +" -- curly brace expansion for variables and function name definitions? +" -- check up on map \FuncName +" +" Description: +" This script eases redundant typing when writing html or xml files (even if +" you're very good with ctrl-p and ctrl-n :). Hitting ctrl-_ will initiate a +" search for the most recent open tag above that is not closed in the +" intervening space and then insert the matching close tag at the cursor. In +" normal mode, the close tag is inserted one character after cursor rather than +" at it, as if a had been used. This allows putting close tags at the +" ends of lines while in normal mode, but disallows inserting them in the +" first column. +" +" For HTML, a configurable list of tags are ignored in the matching process. +" By default, the following tags will not be matched and thus not closed +" automatically: area, base, br, dd, dt, hr, img, input, link, meta, and +" param. +" +" For XML, all tags must have a closing match or be terminated by />, as in +" . These empty element tags are ignored for matching. +" +" Comment checking is now handled by vim's internal syntax checking. If tag +" closing is initiated outside a comment, only tags outside of comments will +" be matched. When closing tags in comments, only tags within comments will +" be matched, skipping any non-commented out code (wee!). However, the +" process of determining the syntax ID of an arbitrary position can still be +" erroneous if a comment is not detected because the syntax highlighting is +" out of sync, or really slow if syn sync minlines is large. +" Set the b:closetag_disable_synID variable to disable this feature if you +" have really big chunks of comment in your code and closing tags is too slow. +" +" If syntax highlighting is not enabled, comments will not be handled very +" well. Commenting out HTML in certain ways may cause a "tag mismatch" +" message and no completion. For example, '' +" between the cursor and the most recent unclosed open tag above causes +" trouble. Properly matched well formed tags in comments don't cause a +" problem. +" +" Install: +" To use, place this file in your standard vim scripts directory, and source +" it while editing the file you wish to close tags in. If the filetype is not +" set or the file is some sort of template with embedded HTML, you may force +" HTML style tag matching by first defining the b:closetag_html_style buffer +" variable. Otherwise, the default is XML style tag matching. +" +" Example: +" :let b:closetag_html_style=1 +" :source ~/.vim/scripts/closetag.vim +" +" For greater convenience, load this script in an autocommand: +" :au Filetype html,xml,xsl source ~/.vim/scripts/closetag.vim +" +" Also, set noignorecase for html files or edit b:unaryTagsStack to match your +" capitalization style. You may set this variable before or after loading the +" script, or simply change the file itself. +" +" Configuration Variables: +" +" b:unaryTagsStack Buffer local string containing a whitespace +" seperated list of element names that should be +" ignored while finding matching closetags. Checking +" is done according to the current setting of the +" ignorecase option. +" +" b:closetag_html_style Define this (as with let b:closetag_html_style=1) +" and source the script again to set the +" unaryTagsStack to its default value for html. +" +" b:closetag_disable_synID Define this to disable comment checking if tag +" closing is too slow. This can be set or unset +" without having to source again. +" +" Changelog: +" May 24, 2005 Tuesday +" * Changed function names to be script-local to avoid conflicts with other +" scripts' stack implementations. +" +" June 07, 2001 Thursday +" * Added comment handling. Currently relies on synID, so if syn sync +" minlines is small, the chance for failure is high, but if minlines is +" large, tagclosing becomes rather slow... +" +" * Changed normal mode closetag mapping to use in insert mode +" rather than p in normal mode. This has 2 implications: +" - Tag closing no longer clobbers the unnamed register +" - When tag closing fails or finds no match, no longer adds to the undo +" buffer for recent vim 6.0 development versions. +" - However, clears the last message when closing tags in normal mode +" +" * Changed the closetag_html_style variable to be buffer-local rather than +" global. +" +" * Expanded documentation + +"------------------------------------------------------------------------------ +" User configurable settings +"------------------------------------------------------------------------------ + +" if html, don't close certain tags. Works best if ignorecase is set. +" otherwise, capitalize these elements according to your html editing style +if !exists("b:unaryTagsStack") || exists("b:closetag_html_style") + if &filetype == "html" || &filetype == "tpl" || exists("b:closetag_html_style") + let b:unaryTagsStack="area base br dd dt hr img input link meta param" + else " for xsl and xsl + let b:unaryTagsStack="" + endif +endif + +" Has this already been loaded? +if exists("loaded_closetag") + finish +endif +let loaded_closetag=1 + +" set up mappings for tag closing +inoremap =GetCloseTag() +map a + +"------------------------------------------------------------------------------ +" Tag closer - uses the stringstack implementation below +"------------------------------------------------------------------------------ + +" Returns the most recent unclosed tag-name +" (ignores tags in the variable referenced by a:unaryTagsStack) +function! GetLastOpenTag(unaryTagsStack) + " Search backwards through the file line by line using getline() + " Overall strategy (moving backwards through the file from the cursor): + " Push closing tags onto a stack. + " On an opening tag, if the tag matches the stack top, discard both. + " -- if the tag doesn't match, signal an error. + " -- if the stack is empty, use this tag + let linenum=line(".") + let lineend=col(".") - 1 " start: cursor position + let first=1 " flag for first line searched + let b:TagStack="" " main stack of tags + let startInComment=s:InComment() + + let tagpat='' + " Search for: closing tags + while (linenum>0) + " Every time we see an end-tag, we push it on the stack. When we see an + " open tag, if the stack isn't empty, we pop it and see if they match. + " If no, signal an error. + " If yes, continue searching backwards. + " If stack is empty, return this open tag as the one that needs closing. + let line=getline(linenum) + if first + let line=strpart(line,0,lineend) + else + let lineend=strlen(line) + endif + let b:lineTagStack="" + let mpos=0 + let b:TagCol=0 + " Search the current line in the forward direction, pushing any tags + " onto a special stack for the current line + while (mpos > -1) + let mpos=matchend(line,tagpat) + if mpos > -1 + let b:TagCol=b:TagCol+mpos + let tag=matchstr(line,tagpat) + + if exists("b:closetag_disable_synID") || startInComment==s:InCommentAt(linenum, b:TagCol) + let b:TagLine=linenum + call s:Push(matchstr(tag,'[^<>]\+'),"b:lineTagStack") + endif + "echo "Tag: ".tag." ending at position ".mpos." in '".line."'." + let lineend=lineend-mpos + let line=strpart(line,mpos,lineend) + endif + endwhile + " Process the current line stack + while (!s:EmptystackP("b:lineTagStack")) + let tag=s:Pop("b:lineTagStack") + if match(tag, "^/") == 0 "found end tag + call s:Push(tag,"b:TagStack") + "echo linenum." ".b:TagStack + elseif s:EmptystackP("b:TagStack") && !s:Instack(tag, a:unaryTagsStack) "found unclosed tag + return tag + else + let endtag=s:Peekstack("b:TagStack") + if endtag == "/".tag || endtag == "/" + call s:Pop("b:TagStack") "found a open/close tag pair + "echo linenum." ".b:TagStack + elseif !s:Instack(tag, a:unaryTagsStack) "we have a mismatch error + echohl Error + echon "\rError:" + echohl None + echo " tag mismatch: <".tag."> doesn't match <".endtag.">. (Line ".linenum." Tagstack: ".b:TagStack.")" + return "" + endif + endif + endwhile + let linenum=linenum-1 | let first=0 + endwhile + " At this point, we have exhausted the file and not found any opening tag + echo "No opening tags." + return "" +endfunction + +" Returns closing tag for most recent unclosed tag, respecting the +" current setting of b:unaryTagsStack for tags that should not be closed +function! GetCloseTag() + let tag=GetLastOpenTag("b:unaryTagsStack") + if tag == "" + return "" + else + return "" + endif +endfunction + +" return 1 if the cursor is in a syntactically identified comment field +" (fails for empty lines: always returns not-in-comment) +function! s:InComment() + return synIDattr(synID(line("."), col("."), 0), "name") =~ 'Comment' +endfunction + +" return 1 if the position specified is in a syntactically identified comment field +function! s:InCommentAt(line, col) + return synIDattr(synID(a:line, a:col, 0), "name") =~ 'Comment' +endfunction + +"------------------------------------------------------------------------------ +" String Stacks +"------------------------------------------------------------------------------ +" These are strings of whitespace-separated elements, matched using the \< and +" \> patterns after setting the iskeyword option. +" +" The sname argument should contain a symbolic reference to the stack variable +" on which method should operate on (i.e., sname should be a string containing +" a fully qualified (ie: g:, b:, etc) variable name.) + +" Helper functions +function! s:SetKeywords() + let g:IsKeywordBak=&iskeyword + let &iskeyword="33-255" +endfunction + +function! s:RestoreKeywords() + let &iskeyword=g:IsKeywordBak +endfunction + +" Push el onto the stack referenced by sname +function! s:Push(el, sname) + if !s:EmptystackP(a:sname) + exe "let ".a:sname."=a:el.' '.".a:sname + else + exe "let ".a:sname."=a:el" + endif +endfunction + +" Check whether the stack is empty +function! s:EmptystackP(sname) + exe "let stack=".a:sname + if match(stack,"^ *$") == 0 + return 1 + else + return 0 + endif +endfunction + +" Return 1 if el is in stack sname, else 0. +function! s:Instack(el, sname) + exe "let stack=".a:sname + call s:SetKeywords() + let m=match(stack, "\\<".a:el."\\>") + call s:RestoreKeywords() + if m < 0 + return 0 + else + return 1 + endif +endfunction + +" Return the first element in the stack +function! s:Peekstack(sname) + call s:SetKeywords() + exe "let stack=".a:sname + let top=matchstr(stack, "\\<.\\{-1,}\\>") + call s:RestoreKeywords() + return top +endfunction + +" Remove and return the first element in the stack +function! s:Pop(sname) + if s:EmptystackP(a:sname) + echo "Error! Stack ".a:sname." is empty and can't be popped." + return "" + endif + exe "let stack=".a:sname + " Find the first space, loc is 0-based. Marks the end of 1st elt in stack. + call s:SetKeywords() + let loc=matchend(stack,"\\<.\\{-1,}\\>") + exe "let ".a:sname."=strpart(stack, loc+1, strlen(stack))" + let top=strpart(stack, match(stack, "\\<"), loc) + call s:RestoreKeywords() + return top +endfunction + +function! s:Clearstack(sname) + exe "let ".a:sname."=''" +endfunction diff --git a/.vim/snippets/_.snippets b/.vim/snippets/_.snippets new file mode 100644 index 0000000..c3925a5 --- /dev/null +++ b/.vim/snippets/_.snippets @@ -0,0 +1,7 @@ +# Global snippets + +# (c) holds no legal value ;) +snippet c) + `&enc[:2] == "utf" ? "©" : "(c)"` Copyright `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2} +snippet date + `strftime("%Y-%m-%d")` diff --git a/.vim/snippets/autoit.snippets b/.vim/snippets/autoit.snippets new file mode 100644 index 0000000..690018c --- /dev/null +++ b/.vim/snippets/autoit.snippets @@ -0,0 +1,66 @@ +snippet if + If ${1:condition} Then + ${2:; True code} + EndIf +snippet el + Else + ${1} +snippet elif + ElseIf ${1:condition} Then + ${2:; True code} +# If/Else block +snippet ifel + If ${1:condition} Then + ${2:; True code} + Else + ${3:; Else code} + EndIf +# If/ElseIf/Else block +snippet ifelif + If ${1:condition 1} Then + ${2:; True code} + ElseIf ${3:condition 2} Then + ${4:; True code} + Else + ${5:; Else code} + EndIf +# Switch block +snippet switch + Switch (${1:condition}) + Case {$2:case1}: + {$3:; Case 1 code} + Case Else: + {$4:; Else code} + EndSwitch +# Select block +snippet select + Select (${1:condition}) + Case {$2:case1}: + {$3:; Case 1 code} + Case Else: + {$4:; Else code} + EndSelect +# While loop +snippet while + While (${1:condition}) + ${2:; code...} + WEnd +# For loop +snippet for + For ${1:n} = ${3:1} to ${2:count} + ${4:; code...} + Next +# New Function +snippet func + Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): + ${4:Return} + EndFunc +# Message box +snippet msg + MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"}) +# Debug Message +snippet debug + MsgBox(0, "Debug", ${1:"Debug Message"}) +# Show Variable Debug Message +snippet showvar + MsgBox(0, "${1:VarName}", $1) diff --git a/.vim/snippets/c.snippets b/.vim/snippets/c.snippets new file mode 100644 index 0000000..89b81ba --- /dev/null +++ b/.vim/snippets/c.snippets @@ -0,0 +1,110 @@ +# main() +snippet main + int main(int argc, const char *argv[]) + { + ${1} + return 0; + } +# #include <...> +snippet inc + #include <${1:stdio}.h>${2} +# #include "..." +snippet Inc + #include "${1:`Filename("$1.h")`}"${2} +# #ifndef ... #define ... #endif +snippet Def + #ifndef $1 + #define ${1:SYMBOL} ${2:value} + #endif${3} +snippet def + #define +snippet ifdef + #ifdef ${1:FOO} + ${2:#define } + #endif +snippet #if + #if ${1:FOO} + ${2} + #endif +# Header Include-Guard +# (the randomizer code is taken directly from TextMate; it could probably be +# cleaner, I don't know how to do it in vim script) +snippet once + #ifndef ${1:`toupper(Filename('', 'UNTITLED').'_'.system("/usr/bin/ruby -e 'print (rand * 2821109907455).round.to_s(36)'"))`} + + #define $1 + + ${2} + + #endif /* end of include guard: $1 */ +# If Condition +snippet if + if (${1:/* condition */}) { + ${2:/* code */} + } +snippet el + else { + ${1} + } +# Tertiary conditional +snippet t + ${1:/* condition */} ? ${2:a} : ${3:b} +# Do While Loop +snippet do + do { + ${2:/* code */} + } while (${1:/* condition */}); +# While Loop +snippet wh + while (${1:/* condition */}) { + ${2:/* code */} + } +# For Loop +snippet for + for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { + ${4:/* code */} + } +# Custom For Loop +snippet forr + for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { + ${5:/* code */} + } +# Function +snippet fun + ${1:void} ${2:function_name}(${3}) + { + ${4:/* code */} + } +# Function Declaration +snippet fund + ${1:void} ${2:function_name}(${3});${4} +# Typedef +snippet td + typedef ${1:int} ${2:MyCustomType};${3} +# Struct +snippet st + struct ${1:`Filename('$1_t', 'name')`} { + ${2:/* data */} + }${3: /* optional variable list */};${4} +# Typedef struct +snippet tds + typedef struct ${2:_$1 }{ + ${3:/* data */} + } ${1:`Filename('$1_t', 'name')`}; +# Typdef enum +snippet tde + typedef enum { + ${1:/* data */} + } ${2:foo}; +# printf +# unfortunately version this isn't as nice as TextMates's, given the lack of a +# dynamic `...` +snippet pr + printf("${1:%s}\n"${2});${3} +# fprintf (again, this isn't as nice as TextMate's version, but it works) +snippet fpr + fprintf(${1:stderr}, "${2:%s}\n"${3});${4} +snippet . + [${1}]${2} +snippet un + unsigned diff --git a/.vim/snippets/cpp.snippets b/.vim/snippets/cpp.snippets new file mode 100644 index 0000000..e4850cd --- /dev/null +++ b/.vim/snippets/cpp.snippets @@ -0,0 +1,30 @@ +# Read File Into Vector +snippet readfile + std::vector v; + if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) { + char buf[1024]; + while (size_t len = fread(buf, 1, sizeof(buf), $2)) + v.insert(v.end(), buf, buf + len); + fclose($2); + }${3} +# std::map +snippet map + std::map<${1:key}, ${2:value}> map${3}; +# std::vector +snippet vector + std::vector<${1:char}> v${2}; +# Namespace +snippet ns + namespace ${1:`Filename('', 'my')`} { + ${2} + } /* $1 */ +# Class +snippet cl + class ${1:`Filename('$1_t', 'name')`} { + public: + $1 (${2:arguments}); + virtual ~$1 (); + + private: + ${3:/* data */} + }; diff --git a/.vim/snippets/html.snippets b/.vim/snippets/html.snippets new file mode 100644 index 0000000..aefb9db --- /dev/null +++ b/.vim/snippets/html.snippets @@ -0,0 +1,190 @@ +# Some useful Unicode entities +# Non-Breaking Space +snippet nbs +   +# ← +snippet left + ← +# → +snippet right + → +# ↑ +snippet up + ↑ +# ↓ +snippet down + ↓ +# ↩ +snippet return + ↩ +# ⇤ +snippet backtab + ⇤ +# ⇥ +snippet tab + ⇥ +# ⇧ +snippet shift + ⇧ +# ⌃ +snippet control + ⌃ +# ⌅ +snippet enter + ⌅ +# ⌘ +snippet command + ⌘ +# ⌥ +snippet option + ⌥ +# ⌦ +snippet delete + ⌦ +# ⌫ +snippet backspace + ⌫ +# ⎋ +snippet escape + ⎋ +# Generic Doctype +snippet doctype HTML 4.01 Strict + +snippet doctype HTML 4.01 Transitional + +snippet doctype HTML 5 + +snippet doctype XHTML 1.0 Frameset + +snippet doctype XHTML 1.0 Strict + +snippet doctype XHTML 1.0 Transitional + +snippet doctype XHTML 1.1 + +# HTML Doctype 4.01 Strict +snippet docts + +# HTML Doctype 4.01 Transitional +snippet doct + +# HTML Doctype 5 +snippet doct5 + +# XHTML Doctype 1.0 Frameset +snippet docxf + +# XHTML Doctype 1.0 Strict +snippet docxs + +# XHTML Doctype 1.0 Transitional +snippet docxt + +# XHTML Doctype 1.1 +snippet docx + +snippet html + + ${1} + +snippet xhtml + + ${1} + +snippet body + + ${1} + +snippet head + + + + ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`} + ${2} + +snippet title + ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}${2} +snippet script + ${2} +snippet scriptsrc + ${2} +snippet style + ${3} +snippet base + +snippet r + +snippet div +
+ ${2} +
+# Embed QT Movie +snippet movie + + + + + + ${6} +snippet fieldset +
+ ${1:name} + + ${3} +
+snippet form +
+ ${3} + + +

+
+snippet h1 +

${2:$1}

+snippet input + ${4} +snippet label + ${7} +snippet link + ${4} +snippet mailto + ${3:email me} +snippet meta + ${3} +snippet opt + ${3} +snippet optt + ${2} +snippet select + ${5} +snippet table + + + +
${2:Header}
${3:Data}
${4} +snippet textarea + ${5} diff --git a/.vim/snippets/java.snippets b/.vim/snippets/java.snippets new file mode 100644 index 0000000..fd705cb --- /dev/null +++ b/.vim/snippets/java.snippets @@ -0,0 +1,78 @@ +snippet main + public static void main (String [] args) + { + ${1:/* code */} + } +snippet pu + public +snippet po + protected +snippet pr + private +snippet st + static +snippet fi + final +snippet ab + abstract +snippet re + return +snippet br + break; +snippet de + default: + ${1} +snippet ca + catch(${1:Exception} ${2:e}) ${3} +snippet th + throw +snippet sy + synchronized +snippet im + import +snippet j.u + java.util +snippet j.i + java.io. +snippet j.b + java.beans. +snippet j.n + java.net. +snippet j.m + java.math. +snippet if + if (${1}) ${2} +snippet el + else +snippet elif + else if (${1}) ${2} +snippet wh + while (${1}) ${2} +snippet for + for (${1}; ${2}; ${3}) ${4} +snippet fore + for (${1} : ${2}) ${3} +snippet sw + switch (${1}) ${2} +snippet cs + case ${1}: + ${2} + ${3} +snippet tc + public class ${1:`Filename()`} extends ${2:TestCase} +snippet t + public void test${1:Name}() throws Exception ${2} +snippet cl + class ${1:`Filename("", "untitled")`} ${2} +snippet in + interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3} +snippet m + ${1:void} ${2:method}(${3}) ${4:throws }${5} +snippet v + ${1:String} ${2:var}${3: = null}${4};${5} +snippet co + static public final ${1:String} ${2:var} = ${3};${4} +snippet cos + static public final String ${1:var} = "${2}";${3} +snippet as + assert ${1:test} : "${2:Failure message}";${3} diff --git a/.vim/snippets/javascript.snippets b/.vim/snippets/javascript.snippets new file mode 100644 index 0000000..51f5e05 --- /dev/null +++ b/.vim/snippets/javascript.snippets @@ -0,0 +1,74 @@ +# Prototype +snippet proto + ${1:class_name}.prototype.${2:method_name} = + function(${3:first_argument}) { + ${4:// body...} + }; +# Function +snippet fun + function ${1:function_name} (${2:argument}) { + ${3:// body...} + } +# Anonymous Function +snippet f + function(${1}) {${2}}; +# if +snippet if + if (${1:true}) {${2}}; +# if ... else +snippet ife + if (${1:true}) {${2}} + else{${3}}; +# tertiary conditional +snippet t + ${1:/* condition */} ? ${2:a} : ${3:b} +# switch +snippet switch + switch(${1:expression}) { + case '${3:case}': + ${4:// code} + break; + ${5} + default: + ${2:// code} + } +# case +snippet case + case '${1:case}': + ${2:// code} + break; + ${3} +# for (...) {...} +snippet for + for (var ${2:i} = 0; $2 < ${1:Things}.length; $2${3:++}) { + ${4:$1[$2]} + }; +# for (...) {...} (Improved Native For-Loop) +snippet forr + for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) { + ${4:$1[$2]} + }; +# while (...) {...} +snippet wh + while (${1:/* condition */}) { + ${2:/* code */} + } +# do...while +snippet do + do { + ${2:/* code */} + } while (${1:/* condition */}); +# Object Method +snippet :f + ${1:method_name}: function(${2:attribute}) { + ${4} + }${3:,} +# setTimeout function +snippet timeout + setTimeout(function() {${3}}${2}, ${1:10}; +# Get Elements +snippet get + getElementsBy${1:TagName}('${2}')${3} +# Get Element +snippet gett + getElementBy${1:Id}('${2}')${3} diff --git a/.vim/snippets/mako.snippets b/.vim/snippets/mako.snippets new file mode 100644 index 0000000..2a0aef9 --- /dev/null +++ b/.vim/snippets/mako.snippets @@ -0,0 +1,54 @@ +snippet def + <%def name="${1:name}"> + ${2:} + +snippet call + <%call expr="${1:name}"> + ${2:} + +snippet doc + <%doc> + ${1:} + +snippet text + <%text> + ${1:} + +snippet for + % for ${1:i} in ${2:iter}: + ${3:} + % endfor +snippet if if + % if ${1:condition}: + ${2:} + % endif +snippet if if/else + % if ${1:condition}: + ${2:} + % else: + ${3:} + % endif +snippet try + % try: + ${1:} + % except${2:}: + ${3:pass} + % endtry +snippet wh + % while ${1:}: + ${2:} + % endwhile +snippet $ + ${ ${1:} } +snippet <% + <% ${1:} %> +snippet +snippet inherit + <%inherit file="${1:filename}" /> +snippet include + <%include file="${1:filename}" /> +snippet namespace + <%namespace file="${1:name}" /> +snippet page + <%page args="${1:}" /> diff --git a/.vim/snippets/objc.snippets b/.vim/snippets/objc.snippets new file mode 100644 index 0000000..4749bb7 --- /dev/null +++ b/.vim/snippets/objc.snippets @@ -0,0 +1,184 @@ +# #import <...> +snippet Imp + #import <${1:Cocoa/Cocoa.h}>${2} +# #import "..." +snippet imp + #import "${1:`Filename()`.h}"${2} +# @selector(...) +snippet sel + @selector(${1:method}:)${3} +# @"..." string +snippet s + @"${1}"${2} +# Object +snippet o + ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5} +# NSLog(...) +snippet log + NSLog(@"${1:%@}"${2});${3} +# Class +snippet objc + @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} + { + } + @end + + @implementation $1 + ${3} + @end +# Class Interface +snippet int + @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} + {${3} + } + ${4} + @end +# Class Implementation +snippet impl + @implementation ${1:`Filename('', 'someClass')`} + ${2} + @end +snippet init + - (id)init + { + [super init]; + return self; + } +snippet ifself + if (self = [super init]) { + ${1:/* code */} + } + return self; +snippet ibo + IBOutlet ${1:NSSomeClass} *${2:$1};${3} +# Category +snippet cat + @interface ${1:NSObject} (${2:Category}) + @end + + @implementation $1 ($2) + ${3} + @end +# Category Interface +snippet cath + @interface ${1:NSObject} (${2:Category}) + ${3} + @end +# NSArray +snippet array + NSMutableArray *${1:array} = [NSMutable array];${2} +# NSDictionary +snippet dict + NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2} +# NSBezierPath +snippet bez + NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2} +# Method +snippet m + - (${1:id})${2:method} + { + ${3} + } +# Method declaration +snippet md + - (${1:id})${2:method};${3} +# IBAction declaration +snippet ibad + - (IBAction)${1:method}:(${2:id})sender;${3} +# IBAction method +snippet iba + - (IBAction)${1:method}:(${2:id})sender + { + ${3} + } +# awakeFromNib method +snippet wake + - (void)awakeFromNib + { + ${1} + } +# Class Method +snippet M + + (${1:id})${2:method} + {${3} + return nil; + } +# Sub-method (Call super) +snippet sm + - (${1:id})${2:method} + { + [super $2];${3} + return self; + } +# Method: Initialize +snippet I + + (void) initialize + { + [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys: + ${1}@"value", @"key", + nil]]; + } +# Accessor Methods For: +# Object +snippet objacc + - (${1:id})${2:thing} + { + return $2; + } + + - (void)set$2:($1)${3:new$2} + { + [$3 retain]; + [$2 release]; + $2 = $3; + }${4} +# for (object in array) +snippet forin + for (${1:Class} *${2:some$1} in ${3:array}) { + ${4} + } +snippet forarray + unsigned int ${1:object}Count = [${2:array} count]; + + for (unsigned int index = 0; index < $1Count; index++) { + ${3:id} $1 = [$2 $1AtIndex:index]; + ${4} + } +# IBOutlet +# @property (Objective-C 2.0) +snippet prop + @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4} +# @synthesize (Objective-C 2.0) +snippet syn + @synthesize ${1:property};${2} +# [[ alloc] init] +snippet alloc + [[${1:foo} alloc] init${2}];${3} +# retain +snippet ret + [${1:foo} retain];${2} +# release +snippet rel + [${1:foo} release]; + ${2:$1 = nil;} +# autorelease +snippet arel + [${1:foo} autorelease]; +# autorelease pool +snippet pool + NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init]; + ${2:/* code */} + [$1 drain]; +# Throw an exception +snippet except + NSException *${1:badness}; + $1 = [NSException exceptionWithName:@"${2:$1Name}" + reason:@"${3}" + userInfo:nil]; + [$1 raise]; +snippet prag + #pragma mark ${1:foo} +snippet cl + @class ${1:Foo};${2} +snippet color + [[NSColor ${1:blackColor}] set]; diff --git a/.vim/snippets/perl.snippets b/.vim/snippets/perl.snippets new file mode 100644 index 0000000..cf8f9fc --- /dev/null +++ b/.vim/snippets/perl.snippets @@ -0,0 +1,91 @@ +# #!/usr/bin/perl +snippet #! + #!/usr/bin/perl + +# Hash Pointer +snippet . + => +# Function +snippet sub + sub ${1:function_name} { + ${2:#body ...} + } +# Conditional +snippet if + if (${1}) { + ${2:# body...} + } +# Conditional if..else +snippet ife + if (${1}) { + ${2:# body...} + } else { + ${3:# else...} + } +# Conditional if..elsif..else +snippet ifee + if (${1}) { + ${2:# body...} + } elsif (${3}) { + ${4:# elsif...} + } else { + ${5:# else...} + } +# Conditional One-line +snippet xif + ${1:expression} if ${2:condition};${3} +# Unless conditional +snippet unless + unless (${1}) { + ${2:# body...} + } +# Unless conditional One-line +snippet xunless + ${1:expression} unless ${2:condition};${3} +# Try/Except +snippet eval + eval { + ${1:# do something risky...} + }; + if ($@) { + ${2:# handle failure...} + } +# While Loop +snippet wh + while (${1}) { + ${2:# body...} + } +# While Loop One-line +snippet xwh + ${1:expression} while ${2:condition};${3} +# For Loop +snippet for + for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { + ${4:# body...} + } +# Foreach Loop +snippet fore + foreach my $${1:x} (@${2:array}) { + ${3:# body...} + } +# Foreach Loop One-line +snippet xfore + ${1:expression} foreach @${2:array};${3} +# Package +snippet cl + package ${1:ClassName}; + + use base qw(${2:ParentClass}); + + sub new { + my $class = shift; + $class = ref $class if ref $class; + my $self = bless {}, $class; + $self; + } + + 1;${3} +# Read File +snippet slurp + my $${1:var}; + { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = ; close FILE }${3} diff --git a/.vim/snippets/php.snippets b/.vim/snippets/php.snippets new file mode 100644 index 0000000..d79408a --- /dev/null +++ b/.vim/snippets/php.snippets @@ -0,0 +1,236 @@ +snippet php + +snippet ec + echo "${1:string}"${2}; +snippet inc + include '${1:file}';${2} +snippet inc1 + include_once '${1:file}';${2} +snippet req + require '${1:file}';${2} +snippet req1 + require_once '${1:file}';${2} +# $GLOBALS['...'] +snippet globals + $GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5} +snippet $_ COOKIE['...'] + $_COOKIE['${1:variable}']${2} +snippet $_ ENV['...'] + $_ENV['${1:variable}']${2} +snippet $_ FILES['...'] + $_FILES['${1:variable}']${2} +snippet $_ Get['...'] + $_GET['${1:variable}']${2} +snippet $_ POST['...'] + $_POST['${1:variable}']${2} +snippet $_ REQUEST['...'] + $_REQUEST['${1:variable}']${2} +snippet $_ SERVER['...'] + $_SERVER['${1:variable}']${2} +snippet $_ SESSION['...'] + $_SESSION['${1:variable}']${2} +# Start Docblock +snippet /* + /** + * ${1} + */ +# Class - post doc +snippet doc_cp + /** + * ${1:undocumented class} + * + * @package ${2:default} + */${3} +# Class Variable - post doc +snippet doc_vp + /** + * ${1:undocumented class variable} + * + * @var ${2:string} + */${3} +# Class Variable +snippet doc_v + /** + * ${3:undocumented class variable} + * + * @var ${4:string} + */ + ${1:var} $${2};${5} +# Class +snippet doc_c + /** + * Class $2 ${3:provides ...} + **/ + ${1:}class ${2:} { + ${4} + } +# Constant Definition - post doc +snippet doc_dp + /** + * ${1:undocumented constant} + **/${2} +# Constant Definition +snippet doc_d + /** + * ${3:undocumented constant} + **/ + define(${1}, ${2});${4} +# Function - post doc +snippet doc_fp + /** + * ${1:undocumented function} + * + * @return ${2:void} + * @author ${3:`g:snips_author`} + **/${4} +# Function signature +snippet doc_s + /** + * ${4:undocumented function} + * + * @return ${5:void} + * @author ${6:`g:snips_author`} + **/ + ${1}function ${2}(${3});${7} +# Function +snippet doc_f + /** + * ${4:undocumented function} + * + * @return ${5:void} + * @author ${6:`g:snips_author`} + **/ + ${1:protected }function ${2}(${3}) { + ${7} + } +# Header +snippet doc_h + /** + * ${1} + * + * @author ${2:`g:snips_author`} + * @version ${3:$Id$} + * @copyright ${4:$2}, `strftime('%d %B, %Y')` + * @package ${5:default} + **/ + + /** + * Define DocBlock + *// +# Interface +snippet doc_i + /** + * ${2:undocumented class} + * + * @package ${3:default} + * @author ${4:`g:snips_author`} + **/ + interface ${1:} + {${5} + } // END interface $1 +# class ... +snippet class + /** + * Class $1 ${2:provides ...} + **/ + class ${1:ClassName} { + /** + * $1 constructor + * @param $3 ${4} + */ + function __construct(${3:$arg}) + { + ${5} + } + } +# define(...) +snippet def + define('${1}'${2});${3} +# defined(...) +snippet def? + ${1}defined('${2}')${3} +snippet wh + while (${1:/* condition */}) { + ${2:// code...} + } +# do ... while +snippet do + do { + ${2:// code... } + } while (${1:/* condition */}); +snippet if + if (${1:/* condition */}) { + ${2:// code...} + } +snippet ife + if (${1:/* condition */}) { + ${2:// code...} + } else { + ${3:// code...} + } + ${4} +snippet else + else { + ${1:// code...} + } +snippet elseif + elseif (${1:/* condition */}) { + ${2:// code...} + } +# Tertiary conditional +snippet t + $${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5} +snippet switch + switch ($${1:variable}) { + case '${2:value}': + ${3:// code...} + break; + ${5} + default: + ${4:// code...} + break; + } +snippet case + case '${1:value}': + ${2:// code...} + break;${3} +snippet for + for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) { + ${4} + } +snippet fore + foreach ($${1:variable} as $${2:key}) { + ${3:} + } +snippet fun + /** + * ${4} + */ + ${1:public }function ${2:f}(${3}) { + ${5:throw new Exception("Not implemented yet.");} + } +# $... = array (...) +snippet array + $${1:arrayName} = array('${2}' => ${3});${4} +snippet p + public +snippet pri + private +snippet pr + private +snippet pro + protected +snippet public + // ${2:$1} + public $${1:v}; +snippet try + try { + ${3:// code...} + } catch (${1:Exception} $${2:e}) { + die((string)$$2); + } +snippet cw + print_r(${1}); + diff --git a/.vim/snippets/python.snippets b/.vim/snippets/python.snippets new file mode 100644 index 0000000..d511184 --- /dev/null +++ b/.vim/snippets/python.snippets @@ -0,0 +1,86 @@ +snippet #! + #!/usr/bin/python + +snippet imp + import ${1:module} +# Module Docstring +snippet docs + ''' + File: ${1:`Filename('$1.py', 'foo.py')`} + Author: ${2:`g:snips_author`} + Description: ${3} + ''' +snippet wh + while ${1:condition}: + ${2:# code...} +snippet for + for ${1:needle} in ${2:haystack}: + ${3:# code...} +# New Class +snippet cl + class ${1:ClassName}(${2:object}): + """${3:docstring for $1}""" + def __init__(self, ${4:arg}): + ${5:super($1, self).__init__()} + self.$4 = $4 + ${6} +# New Function +snippet def + def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): + """${3:docstring for $1}""" + ${4:pass} +snippet deff + def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): + ${3} +# New Method +snippet defs + def ${1:mname}(self, ${2:arg}): + ${3:pass} +# New Property +snippet property + def ${1:foo}(): + doc = "${2:The $1 property.}" + def fget(self): + ${3:return self._$1} + def fset(self, value): + ${4:self._$1 = value} +# Lambda +snippet ld + ${1:var} = lambda ${2:vars} : ${3:action} +snippet . + self. +snippet try Try/Except + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} +snippet try Try/Except/Else + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + else: + ${5:pass} +snippet try Try/Except/Finally + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + finally: + ${5:pass} +snippet try Try/Except/Else/Finally + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + else: + ${5:pass} + finally: + ${6:pass} +# if __name__ == '__main__': +snippet ifmain + if __name__ == '__main__': + ${1:main()} +# __magic__ +snippet _ + __${1:init}__${2} diff --git a/.vim/snippets/ruby.snippets b/.vim/snippets/ruby.snippets new file mode 100644 index 0000000..bf1d7f1 --- /dev/null +++ b/.vim/snippets/ruby.snippets @@ -0,0 +1,420 @@ +# #!/usr/bin/ruby +snippet #! + #!/usr/bin/ruby + +# New Block +snippet =b + =begin rdoc + ${1} + =end +snippet y + :yields: ${1:arguments} +snippet rb + #!/usr/bin/env ruby -wKU + +snippet req + require "${1}"${2} +snippet # + # => +snippet end + __END__ +snippet case + case ${1:object} + when ${2:condition} + ${3} + end +snippet when + when ${1:condition} + ${2} +snippet def + def ${1:method_name} + ${2} + end +snippet deft + def test_${1:case_name} + ${2} + end +snippet if + if ${1:condition} + ${2} + end +snippet ife + if ${1:condition} + ${2} + else + ${3} + end +snippet elsif + elsif ${1:condition} + ${2} +snippet unless + unless ${1:condition} + ${2} + end +snippet while + while ${1:condition} + ${2} + end +snippet until + until ${1:condition} + ${2} + end +snippet cla class .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} + ${2} + end +snippet cla class .. initialize .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} + def initialize(${2:args}) + ${3} + end + + + end +snippet cla class .. < ParentClass .. initialize .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} < ${2:ParentClass} + def initialize(${3:args}) + ${4} + end + + + end +snippet cla ClassName = Struct .. do .. end + ${1:`substitute(Filename(), '^.', '\u&', '')`} = Struct.new(:${2:attr_names}) do + def ${3:method_name} + ${4} + end + + + end +snippet cla class BlankSlate .. initialize .. end + class ${1:BlankSlate} + instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } +snippet cla class << self .. end + class << ${1:self} + ${2} + end +# class .. < DelegateClass .. initialize .. end +snippet cla- + class ${1:`substitute(Filename(), '^.', '\u&', '')`} < DelegateClass(${2:ParentClass}) + def initialize(${3:args}) + super(${4:del_obj}) + + ${5} + end + + + end +snippet mod module .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + ${2} + end +snippet mod module .. module_function .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + module_function + + ${2} + end +snippet mod module .. ClassMethods .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + module ClassMethods + ${2} + end + + module InstanceMethods + + end + + def self.included(receiver) + receiver.extend ClassMethods + receiver.send :include, InstanceMethods + end + end +# attr_reader +snippet r + attr_reader :${1:attr_names} +# attr_writer +snippet w + attr_writer :${1:attr_names} +# attr_accessor +snippet rw + attr_accessor :${1:attr_names} +# include Enumerable +snippet Enum + include Enumerable + + def each(&block) + ${1} + end +# include Comparable +snippet Comp + include Comparable + + def <=>(other) + ${1} + end +# extend Forwardable +snippet Forw- + extend Forwardable +# def self +snippet defs + def self.${1:class_method_name} + ${2} + end +# def method_missing +snippet defmm + def method_missing(meth, *args, &blk) + ${1} + end +snippet defd + def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name} +snippet defds + def_delegators :${1:@del_obj}, :${2:del_methods} +snippet am + alias_method :${1:new_name}, :${2:old_name} +snippet app + if __FILE__ == $PROGRAM_NAME + ${1} + end +# usage_if() +snippet usai + if ARGV.${1} + abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} + end +# usage_unless() +snippet usau + unless ARGV.${1} + abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} + end +snippet array + Array.new(${1:10}) { |${2:i}| ${3} } +snippet hash + Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} } +snippet file File.foreach() { |line| .. } + File.foreach(${1:"path/to/file"}) { |${2:line}| ${3} } +snippet file File.read() + File.read(${1:"path/to/file"})${2} +snippet Dir Dir.global() { |file| .. } + Dir.glob(${1:"dir/glob/*"}) { |${2:file}| ${3} } +snippet Dir Dir[".."] + Dir[${1:"glob/**/*.rb"}]${2} +snippet dir + Filename.dirname(__FILE__) +snippet deli + delete_if { |${1:e}| ${2} } +snippet fil + fill(${1:range}) { |${2:i}| ${3} } +# flatten_once() +snippet flao + inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3} +snippet zip + zip(${1:enums}) { |${2:row}| ${3} } +# downto(0) { |n| .. } +snippet dow + downto(${1:0}) { |${2:n}| ${3} } +snippet ste + step(${1:2}) { |${2:n}| ${3} } +snippet tim + times { |${1:n}| ${2} } +snippet upt + upto(${1:1.0/0.0}) { |${2:n}| ${3} } +snippet loo + loop { ${1} } +snippet ea + each { |${1:e}| ${2} } +snippet eab + each_byte { |${1:byte}| ${2} } +snippet eac- each_char { |chr| .. } + each_char { |${1:chr}| ${2} } +snippet eac- each_cons(..) { |group| .. } + each_cons(${1:2}) { |${2:group}| ${3} } +snippet eai + each_index { |${1:i}| ${2} } +snippet eak + each_key { |${1:key}| ${2} } +snippet eal + each_line { |${1:line}| ${2} } +snippet eap + each_pair { |${1:name}, ${2:val}| ${3} } +snippet eas- + each_slice(${1:2}) { |${2:group}| ${3} } +snippet eav + each_value { |${1:val}| ${2} } +snippet eawi + each_with_index { |${1:e}, ${2:i}| ${3} } +snippet reve + reverse_each { |${1:e}| ${2} } +snippet inj + inject(${1:init}) { |${2:mem}, ${3:var}| ${4} } +snippet map + map { |${1:e}| ${2} } +snippet mapwi- + enum_with_index.map { |${1:e}, ${2:i}| ${3} } +snippet sor + sort { |a, b| ${1} } +snippet sorb + sort_by { |${1:e}| ${2} } +snippet ran + sort_by { rand } +snippet all + all? { |${1:e}| ${2} } +snippet any + any? { |${1:e}| ${2} } +snippet cl + classify { |${1:e}| ${2} } +snippet col + collect { |${1:e}| ${2} } +snippet det + detect { |${1:e}| ${2} } +snippet fet + fetch(${1:name}) { |${2:key}| ${3} } +snippet fin + find { |${1:e}| ${2} } +snippet fina + find_all { |${1:e}| ${2} } +snippet gre + grep(${1:/pattern/}) { |${2:match}| ${3} } +snippet sub + ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} } +snippet sca + scan(${1:/pattern/}) { |${2:match}| ${3} } +snippet max + max { |a, b|, ${1} } +snippet min + min { |a, b|, ${1} } +snippet par + partition { |${1:e}|, ${2} } +snippet rej + reject { |${1:e}|, ${2} } +snippet sel + select { |${1:e}|, ${2} } +snippet lam + lambda { |${1:args}| ${2} } +snippet do + do |${1:variable}| + ${2} + end +snippet : + :${1:key} => ${2:"value"}${3} +snippet ope + open(${1:"path/or/url/or/pipe"}, "${2:w}") { |${3:io}| ${4} } +# path_from_here() +snippet patfh + File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2} +# unix_filter {} +snippet unif + ARGF.each_line${1} do |${2:line}| + ${3} + end +# option_parse {} +snippet optp + require "optparse" + + options = {${1:default => "args"}} + + ARGV.options do |opts| + opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} +snippet opt + opts.on( "-${1:o}", "--${2:long-option-name}", ${3:String}, + "${4:Option description.}") do |${5:opt}| + ${6} + end +snippet tc + require "test/unit" + + require "${1:library_file_name}" + + class Test${2:$1} < Test::Unit::TestCase + def test_${3:case_name} + ${4} + end + end +snippet ts + require "test/unit" + + require "tc_${1:test_case_file}" + require "tc_${2:test_case_file}"${3} +snippet as + assert(${1:test}, "${2:Failure message.}")${3} +snippet ase + assert_equal(${1:expected}, ${2:actual})${3} +snippet asne + assert_not_equal(${1:unexpected}, ${2:actual})${3} +snippet asid + assert_in_delta(${1:expected_float}, ${2:actual_float}, ${3:2 ** -20})${4} +snippet asio + assert_instance_of(${1:ExpectedClass}, ${2:actual_instance})${3} +snippet asko + assert_kind_of(${1:ExpectedKind}, ${2:actual_instance})${3} +snippet asn + assert_nil(${1:instance})${2} +snippet asnn + assert_not_nil(${1:instance})${2} +snippet asm + assert_match(/${1:expected_pattern}/, ${2:actual_string})${3} +snippet asnm + assert_no_match(/${1:unexpected_pattern}/, ${2:actual_string})${3} +snippet aso + assert_operator(${1:left}, :${2:operator}, ${3:right})${4} +snippet asr + assert_raise(${1:Exception}) { ${2} } +snippet asnr + assert_nothing_raised(${1:Exception}) { ${2} } +snippet asrt + assert_respond_to(${1:object}, :${2:method})${3} +snippet ass assert_same(..) + assert_same(${1:expected}, ${2:actual})${3} +snippet ass assert_send(..) + assert_send([${1:object}, :${2:message}, ${3:args}])${4} +snippet asns + assert_not_same(${1:unexpected}, ${2:actual})${3} +snippet ast + assert_throws(:${1:expected}) { ${2} } +snippet asnt + assert_nothing_thrown { ${1} } +snippet fl + flunk("${1:Failure message.}")${2} +# Benchmark.bmbm do .. end +snippet bm- + TESTS = ${1:10_000} + Benchmark.bmbm do |results| + ${2} + end +snippet rep + results.report("${1:name}:") { TESTS.times { ${2} }} +# Marshal.dump(.., file) +snippet Md + File.open(${1:"path/to/file.dump"}, "wb") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4} +# Mashal.load(obj) +snippet Ml + File.open(${1:"path/to/file.dump"}, "rb") { |${2:file}| Marshal.load($2) }${3} +# deep_copy(..) +snippet deec + Marshal.load(Marshal.dump(${1:obj_to_copy}))${2} +snippet Pn- + PStore.new(${1:"file_name.pstore"})${2} +snippet tra + transaction(${1:true}) { ${2} } +# xmlread(..) +snippet xml- + REXML::Document.new(File.read(${1:"path/to/file"}))${2} +# xpath(..) { .. } +snippet xpa + elements.each(${1:"//Xpath"}) do |${2:node}| + ${3} + end +# class_from_name() +snippet clafn + split("::").inject(Object) { |par, const| par.const_get(const) } +# singleton_class() +snippet sinc + class << self; self end +snippet nam + namespace :${1:`Filename()`} do + ${2} + end +snippet tas + desc "${1:Task description\}" + task :${2:task_name => [:dependent, :tasks]} do + ${3} + end diff --git a/.vim/snippets/sh.snippets b/.vim/snippets/sh.snippets new file mode 100644 index 0000000..f035126 --- /dev/null +++ b/.vim/snippets/sh.snippets @@ -0,0 +1,28 @@ +# #!/bin/bash +snippet #! + #!/bin/bash + +snippet if + if [[ ${1:condition} ]]; then + ${2:#statements} + fi +snippet elif + elif [[ ${1:condition} ]]; then + ${2:#statements} +snippet for + for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do + ${3:#statements} + done +snippet wh + while [[ ${1:condition} ]]; do + ${2:#statements} + done +snippet until + until [[ ${1:condition} ]]; do + ${2:#statements} + done +snippet case + case ${1:word} in + ${2:pattern}) + ${3};; + esac diff --git a/.vim/snippets/snippet.snippets b/.vim/snippets/snippet.snippets new file mode 100644 index 0000000..854c058 --- /dev/null +++ b/.vim/snippets/snippet.snippets @@ -0,0 +1,7 @@ +# snippets for making snippets :) +snippet snip + snippet ${1:trigger} + ${2} +snippet msnip + snippet ${1:trigger} ${2:description} + ${3} diff --git a/.vim/snippets/tcl.snippets b/.vim/snippets/tcl.snippets new file mode 100644 index 0000000..bee2ef8 --- /dev/null +++ b/.vim/snippets/tcl.snippets @@ -0,0 +1,92 @@ +# #!/usr/bin/tclsh +snippet #! + #!/usr/bin/tclsh + +# Process +snippet pro + proc ${1:function_name} {${2:args}} { + ${3:#body ...} + } +#xif +snippet xif + ${1:expr}? ${2:true} : ${3:false} +# Conditional +snippet if + if {${1}} { + ${2:# body...} + } +# Conditional if..else +snippet ife + if {${1}} { + ${2:# body...} + } else { + ${3:# else...} + } +# Conditional if..elsif..else +snippet ifee + if {${1}} { + ${2:# body...} + } elseif {${3}} { + ${4:# elsif...} + } else { + ${5:# else...} + } +# If catch then +snippet ifc + if { [catch {${1:#do something...}} ${2:err}] } { + ${3:# handle failure...} + } +# Catch +snippet catch + catch {${1}} ${2:err} ${3:options} +# While Loop +snippet wh + while {${1}} { + ${2:# body...} + } +# For Loop +snippet for + for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { + ${4:# body...} + } +# Foreach Loop +snippet fore + foreach ${1:x} {${2:#list}} { + ${3:# body...} + } +# after ms script... +snippet af + after ${1:ms} ${2:#do something} +# after cancel id +snippet afc + after cancel ${1:id or script} +# after idle +snippet afi + after idle ${1:script} +# after info id +snippet afin + after info ${1:id} +# Expr +snippet exp + expr {${1:#expression here}} +# Switch +snippet sw + switch ${1:var} { + ${3:pattern 1} { + ${4:#do something} + } + default { + ${2:#do something} + } + } +# Case +snippet ca + ${1:pattern} { + ${2:#do something} + }${3} +# Namespace eval +snippet ns + namespace eval ${1:path} {${2:#script...}} +# Namespace current +snippet nsc + namespace current diff --git a/.vim/snippets/tex.snippets b/.vim/snippets/tex.snippets new file mode 100644 index 0000000..22f7316 --- /dev/null +++ b/.vim/snippets/tex.snippets @@ -0,0 +1,115 @@ +# \begin{}...\end{} +snippet begin + \begin{${1:env}} + ${2} + \end{$1} +# Tabular +snippet tab + \begin{${1:tabular}}{${2:c}} + ${3} + \end{$1} +# Align(ed) +snippet ali + \begin{align${1:ed}} + ${2} + \end{align$1} +# Gather(ed) +snippet gat + \begin{gather${1:ed}} + ${2} + \end{gather$1} +# Equation +snippet eq + \begin{equation} + ${1} + \end{equation} +# Unnumbered Equation +snippet \ + \\[ + ${1} + \\] +# Enumerate +snippet enum + \begin{enumerate} + \item ${1} + \end{enumerate} +# Itemize +snippet item + \begin{itemize} + \item ${1} + \end{itemize} +# Description +snippet desc + \begin{description} + \item[${1}] ${2} + \end{description} +# Matrix +snippet mat + \begin{${1:p/b/v/V/B/small}matrix} + ${2} + \end{$1matrix} +# Cases +snippet cas + \begin{cases} + ${1:equation}, &\text{ if }${2:case}\\ + ${3} + \end{cases} +# Split +snippet spl + \begin{split} + ${1} + \end{split} +# Part +snippet part + \part{${1:part name}} % (fold) + \label{prt:${2:$1}} + ${3} + % part $2 (end) +# Chapter +snippet cha + \chapter{${1:chapter name}} % (fold) + \label{cha:${2:$1}} + ${3} + % chapter $2 (end) +# Section +snippet sec + \section{${1:section name}} % (fold) + \label{sec:${2:$1}} + ${3} + % section $2 (end) +# Sub Section +snippet sub + \subsection{${1:subsection name}} % (fold) + \label{sub:${2:$1}} + ${3} + % subsection $2 (end) +# Sub Sub Section +snippet subs + \subsubsection{${1:subsubsection name}} % (fold) + \label{ssub:${2:$1}} + ${3} + % subsubsection $2 (end) +# Paragraph +snippet par + \paragraph{${1:paragraph name}} % (fold) + \label{par:${2:$1}} + ${3} + % paragraph $2 (end) +# Sub Paragraph +snippet subp + \subparagraph{${1:subparagraph name}} % (fold) + \label{subp:${2:$1}} + ${3} + % subparagraph $2 (end) +snippet itd + \item[${1:description}] ${2:item} +snippet figure + ${1:Figure}~\ref{${2:fig:}}${3} +snippet table + ${1:Table}~\ref{${2:tab:}}${3} +snippet listing + ${1:Listing}~\ref{${2:list}}${3} +snippet section + ${1:Section}~\ref{${2:sec:}}${3} +snippet page + ${1:page}~\pageref{${2}}${3} diff --git a/.vim/snippets/vim.snippets b/.vim/snippets/vim.snippets new file mode 100644 index 0000000..64e7807 --- /dev/null +++ b/.vim/snippets/vim.snippets @@ -0,0 +1,32 @@ +snippet header + " File: ${1:`expand('%:t')`} + " Author: ${2:`g:snips_author`} + " Description: ${3} + ${4:" Last Modified: `strftime("%B %d, %Y")`} +snippet guard + if exists('${1:did_`Filename()`}') || &cp${2: || version < 700} + finish + endif + let $1 = 1${3} +snippet f + fun ${1:function_name}(${2}) + ${3:" code} + endf +snippet for + for ${1:needle} in ${2:haystack} + ${3:" code} + endfor +snippet wh + while ${1:condition} + ${2:" code} + endw +snippet if + if ${1:condition} + ${2:" code} + endif +snippet ife + if ${1:condition} + ${2} + else + ${3} + endif diff --git a/.vim/snippets/zsh.snippets b/.vim/snippets/zsh.snippets new file mode 100644 index 0000000..7aee05b --- /dev/null +++ b/.vim/snippets/zsh.snippets @@ -0,0 +1,58 @@ +# #!/bin/zsh +snippet #! + #!/bin/zsh + +snippet if + if ${1:condition}; then + ${2:# statements} + fi +snippet ife + if ${1:condition}; then + ${2:# statements} + else + ${3:# statements} + fi +snippet elif + elif ${1:condition} ; then + ${2:# statements} +snippet for + for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do + ${3:# statements} + done +snippet fore + for ${1:item} in ${2:list}; do + ${3:# statements} + done +snippet wh + while ${1:condition}; do + ${2:# statements} + done +snippet until + until ${1:condition}; do + ${2:# statements} + done +snippet repeat + repeat ${1:integer}; do + ${2:# statements} + done +snippet case + case ${1:word} in + ${2:pattern}) + ${3};; + esac +snippet select + select ${1:answer} in ${2:choices}; do + ${3:# statements} + done +snippet ( + ( ${1:#statements} ) +snippet { + { ${1:#statements} } +snippet [ + [[ ${1:test} ]] +snippet always + { ${1:try} } always { ${2:always} } +snippet fun + function ${1:name} (${2:args}) { + ${3:# body} + } diff --git a/.vim/swap/.swp b/.vim/swap/.swp new file mode 100644 index 0000000000000000000000000000000000000000..545b1b528c44c364aaa76eb7ac386d951d457dfa GIT binary patch literal 12288 zcmeI2&2G~`5P-K_P^l0I#1Ux+>8 zcmp`_I?Sf2YzO7Qr6tl>nXHl-&(3@^V=2l`?N6r@81{XJ*JJZ`ef@mE*hQ5lBD?u! z`zmskrfR#MG(><1+%bVlhrQAMnddsTiR9&rLwNe+?2dz??TG*pAOb{y2oM1xKm>>Y z5x7kPI^Sboal?D-P50O9-p0EANDC1l0z`la5CI}U1c(3;AOb{y2oM1xu!97|oUv~Q zjQv6}|Nr0o{{Q`mF&70;o}nC|^d2(y9OXXB%6 zvp8Aean~er`WJb`U!8s!^Vf5^5PX`7ihrENMG|U$GC3df&my}@dkb@l7Qpw$@J3F- z3Gj97yHH&A^Q_L5j^#qaI~6JPh?dvKZowHi8#jcZEOZ$wT+p&^OkHc#GTng?F?~I) ziU<=y1Wh7C>!_88fduuKzm+97c(^~~D$e9dDv~AdzzVFv#*K-HMOC8v#ydFfhEXk( z3{4`o!p{q(A(N5N$rn>x7OCD`W?E=D>qkk*T9Ja=_2ogck87b$gkd2vx#(63oNiG) z&|;~kNs9hk-rXSRMCw7iahjd}?vX|pSibRbyS?|{6t*>ISt+`7ouQ%IZ<&~xV}-`a zUe&$E30sY~&mg_xWv&Xn?j~%N2Jw;AooNqRH3WB4nJio5jq{B`EO}}gJFqW@b~i|H vhud1<{duRY9cwgcKUuu0X3%S*bS--flONv;d87b749H@)?rBy;Q$gr1;{AL&Wva5owZ}h5_ar(ove4G*lU*T7*f;ydb)P1 ztDEX-ujAIhF%k%gYYxC=;lKf;2y$8p2@5F_9FX7uSA;ksgpiOx2){wJjDqmjir08U%Z<{`uDWKR+22#$J>8oo@t%E z{TS~3+En1&dKQ)`8CT35WLC=&ePw7B#dH3<k27UzW1CIc||4mQ|OR^@(VqsL6I8mBN6j+v ztgD}QoRvjEVtz1~4)CM>oQ#_WLmDYl)rM8U>?{E^_ek@`Ec)UKV#1I5$Ew^`<2b$R?7s z6I6%-wnH3ZBvMpRD%MC9xgsqJ92OK2Bzhvp8Ce$3=5Bc15jO?mp(DNs{jh`;*W@nU zVmU!@RYG$ZK;i(haJw$exC0O4mm`jC4wF(xYD6N14kA9jZ+Wh`X{0ffr0kV3DMyCq zZKdMqu76?=Smm4;;)?{&<#mcI!aR{2zY+7y!nGh55;OEqM{@8ALnU*jX$XZ7wc>@X z>+t0`OL5W>H#JEe@ht1};_>}(99x8d5%35o=H<2$&J=_MZetBvnp=`MD~^Vtxj9Ko&|&SmXqr4GkrkUgU|GNdCG(es=?)#>BSA_Ru; zFj~D@yc}d0m%&EoowT*KdR?qWG)h2vNxoo_mCB7RO{b zZXK_|(d_f3Rr_VSmiP0iS)l2tbfmyKJ0f_iXzd`O;7WWWmewT)0hhe1#GIoNoU3DN zh>6khJ$?KJQU;&h%))I2d#nekzO623NFEZK>F_GI&&)iNs2Ig&S#0mF^_G_U{XW|N ztJu9$t?T((SCB)v$^&VuT+5IqRUJ;gZoSpVG*7As2KDAUVl}r)i}`ME@%*Tw9Ns~t zn^bFrLKDZ!Vl}c<6w`1)+T5xpx})%(gk3R&AseQ&&rEfm&Cl zE#3*1xk{dB`BX(F)CDS@l`gZBYSr*TW1c#_LwX%L@x*$T=cMz}j2)Mn2zAJT1IIfW z+y{Y2?#UBEPq#@p8s*woR8;Xx3t>8`&i}OgXbWa5m*uIn*n1{bLNZE7jS{fJ_t0)q z#aZTxvC4UD7DeqsaqQPK!c3PbDg@;n^q*bQYkwllKipN3OC}W^kU1wL7?eyyIOhH4 zRB2{n$JaeAU&%^`WaMZkgHSj#&zR0DLQyDGW>&D})h)Ti_O&7}Py6N2ztq@PFgS^pkhjO%_{(+{3|!9+ zDCM`A`EK{=mRQAZE3seWHH3ryIcZACeZ2*YO`OY@=jKMJA*kXV#6`O;?$nQ87-bo< nCzVQf;1Ex)e_5bPr06bEpZ9Sgq726k?`$V4PFnWQZxq8oOASfL`S3Pn!lO~$R`F}6p^bO8%a z0UUuN&=bH7dI2QZvO+@QO+NTqgf-Q(^v`7c#*Y1yvWVhA`^o)Bd^c<}Y*!gOy>@o+ z?dwf;1K%GNN(x;SRySdCrSjF!RMi*r2_s|kBN%!YxuF$C>QR)6%vzE3VIa!>u>z@u zEi~HS9Jo~C|);9R{_5Iajs7eAPKmsH{0wh2JBtQZr zaIOTrSz|A8M;8{mT3=k({<crYT5QUd% zp&sLXV8jT*VXi%B-{keok5y=dbzpHwRm2e%o)_S}tCkwnGVhJ+MbTt339Iwyt;Kot zllgh{1R~d(pI3(jY;>Fta04gNuoK@_+gtG++illyHI+uyoX2(ZTexNqhRwS0rIetO zd2QA=$)tkCvv>D6=%mLINPjuarfF7%=4_@)D7E>R58M`)W0T{D{IPSk=v;0NK{ukp Q*=QhjWJ;gqx*Kk@A3h4h;Q#;t literal 0 HcmV?d00001 diff --git a/.vim/syntax/php.vim b/.vim/syntax/php.vim new file mode 100644 index 0000000..d50a208 --- /dev/null +++ b/.vim/syntax/php.vim @@ -0,0 +1,649 @@ +" Vim syntax file +" Language: php PHP 3/4/5 +" Maintainer: Peter Hodge +" Last Change: June 9, 2006 +" URL: http://www.vim.org/scripts/script.php?script_id=1571 +" +" Former Maintainer: Debian VIM Maintainers +" Former URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/php.vim?op=file&rev=0&sc=0 +" +" Note: If you are using a colour terminal with dark background, you will probably find +" the 'elflord' colorscheme is much better for PHP's syntax than the default +" colourscheme, because elflord's colours will better highlight the break-points +" (Statements) in your code. +" +" Options: php_sql_query = 1 for SQL syntax highlighting inside strings +" php_htmlInStrings = 1 for HTML syntax highlighting inside strings +" php_baselib = 1 for highlighting baselib functions +" php_asp_tags = 1 for highlighting ASP-style short tags +" php_parent_error_close = 1 for highlighting parent error ] or ) +" php_parent_error_open = 1 for skipping an php end tag, if there exists an open ( or [ without a closing one +" php_oldStyle = 1 for using old colorstyle +" php_noShortTags = 1 don't sync as php +" php_folding = 1 for folding classes and functions +" php_folding = 2 for folding all { } regions +" php_sync_method = x +" x=-1 to sync by search ( default ) +" x>0 to sync at least x lines backwards +" x=0 to sync from start +" +" Added by Peter Hodge On June 9, 2006: +" php_special_functions = 1|0 to highlight functions with abnormal behaviour +" php_alt_comparisons = 1|0 to highlight comparison operators in an alternate colour +" php_alt_assignByReference = 1|0 to highlight '= &' in an alternate colour +" +" Note: these all default to 1 (On), so you would set them to '0' to turn them off. +" E.g., in your .vimrc or _vimrc file: +" let php_special_functions = 0 +" let php_alt_comparisons = 0 +" let php_alt_assignByReference = 0 +" Unletting these variables will revert back to their default (On). +" +" +" Note: +" Setting php_folding=1 will match a closing } by comparing the indent +" before the class or function keyword with the indent of a matching }. +" Setting php_folding=2 will match all of pairs of {,} ( see known +" bugs ii ) + +" Known Bugs: +" - setting php_parent_error_close on and php_parent_error_open off +" has these two leaks: +" i) A closing ) or ] inside a string match to the last open ( or [ +" before the string, when the the closing ) or ] is on the same line +" where the string started. In this case a following ) or ] after +" the string would be highlighted as an error, what is incorrect. +" ii) Same problem if you are setting php_folding = 2 with a closing +" } inside an string on the first line of this string. +" +" - A double-quoted string like this: +" "$foo->someVar->someOtherVar->bar" +" will highight '->someOtherVar->bar' as though they will be parsed +" as object member variables, but PHP only recognizes the first +" object member variable ($foo->someVar). +" +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'php' +endif + +if version < 600 + unlet! php_folding + if exists("php_sync_method") && !php_sync_method + let php_sync_method=-1 + endif + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +" accept old options +if !exists("php_sync_method") + if exists("php_minlines") + let php_sync_method=php_minlines + else + let php_sync_method=-1 + endif +endif + +if exists("php_parentError") && !exists("php_parent_error_open") && !exists("php_parent_error_close") + let php_parent_error_close=1 + let php_parent_error_open=1 +endif + +syn cluster htmlPreproc add=phpRegion,phpRegionAsp,phpRegionSc + +if version < 600 + syn include @sqlTop :p:h/sql.vim +else + syn include @sqlTop syntax/sql.vim +endif +syn sync clear +unlet b:current_syntax +syn cluster sqlTop remove=sqlString,sqlComment +if exists( "php_sql_query") + syn cluster phpAddStrings contains=@sqlTop +endif + +if exists( "php_htmlInStrings") + syn cluster phpAddStrings add=@htmlTop +endif + +syn case match + +" Env Variables +syn keyword phpEnvVar GATEWAY_INTERFACE SERVER_NAME SERVER_SOFTWARE SERVER_PROTOCOL REQUEST_METHOD QUERY_STRING DOCUMENT_ROOT HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_REFERER HTTP_USER_AGENT REMOTE_ADDR REMOTE_PORT SCRIPT_FILENAME SERVER_ADMIN SERVER_PORT SERVER_SIGNATURE PATH_TRANSLATED SCRIPT_NAME REQUEST_URI contained + +" Internal Variables +syn keyword phpIntVar GLOBALS PHP_ERRMSG PHP_SELF HTTP_GET_VARS HTTP_POST_VARS HTTP_COOKIE_VARS HTTP_POST_FILES HTTP_ENV_VARS HTTP_SERVER_VARS HTTP_SESSION_VARS HTTP_RAW_POST_DATA HTTP_STATE_VARS _GET _POST _COOKIE _FILES _SERVER _ENV _SERVER _REQUEST _SESSION contained + +" Constants +syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_ALL contained + +syn case ignore + +syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ contained + + +" Function and Methods ripped from php_manual_de.tar.gz Jan 2003 +syn keyword phpFunctions apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual contained +syn keyword phpFunctions array_change_key_case array_chunk array_combine array_count_values array_diff_assoc array_diff_uassoc array_diff array_fill array_filter array_flip array_intersect_assoc array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_unique array_unshift array_values array_walk array arsort asort compact count current each end extract in_array key krsort ksort list natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort contained +syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained +syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained +syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained +syn keyword phpFunctions cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days frenchtojd gregoriantojd jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd juliantojd unixtojd contained +syn keyword phpFunctions ccvs_add ccvs_auth ccvs_command ccvs_count ccvs_delete ccvs_done ccvs_init ccvs_lookup ccvs_new ccvs_report ccvs_return ccvs_reverse ccvs_sale ccvs_status ccvs_textvalue ccvs_void contained +syn keyword phpFunctions call_user_method_array call_user_method class_exists get_class_methods get_class_vars get_class get_declared_classes get_object_vars get_parent_class is_a is_subclass_of method_exists contained +syn keyword phpFunctions com VARIANT com_addref com_get com_invoke com_isenum com_load_typelib com_load com_propget com_propput com_propset com_release com_set contained +syn keyword phpFunctions cpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setlinecap cpdf_setlinejoin cpdf_setlinewidth cpdf_setmiterlimit cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_show_xy cpdf_show cpdf_stringwidth cpdf_stroke cpdf_text cpdf_translate contained +syn keyword phpFunctions crack_check crack_closedict crack_getlastmessage crack_opendict contained +syn keyword phpFunctions ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit contained +syn keyword phpFunctions curl_close curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt curl_version contained +syn keyword phpFunctions cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr contained +syn keyword phpFunctions cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind contained +syn keyword phpFunctions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime strtotime time contained +syn keyword phpFunctions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync contained +syn keyword phpFunctions dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record contained +syn keyword phpFunctions dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace contained +syn keyword phpFunctions dbplus_add dbplus_aql dbplus_chdir dbplus_close dbplus_curr dbplus_errcode dbplus_errno dbplus_find dbplus_first dbplus_flush dbplus_freealllocks dbplus_freelock dbplus_freerlocks dbplus_getlock dbplus_getunique dbplus_info dbplus_last dbplus_lockrel dbplus_next dbplus_open dbplus_prev dbplus_rchperm dbplus_rcreate dbplus_rcrtexact dbplus_rcrtlike dbplus_resolve dbplus_restorepos dbplus_rkeys dbplus_ropen dbplus_rquery dbplus_rrename dbplus_rsecindex dbplus_runlink dbplus_rzap dbplus_savepos dbplus_setindex dbplus_setindexbynumber dbplus_sql dbplus_tcl dbplus_tremove dbplus_undo dbplus_undoprepare dbplus_unlockrel dbplus_unselect dbplus_update dbplus_xlockrel dbplus_xunlockrel contained +syn keyword phpFunctions dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort contained +syn keyword phpFunctions dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write contained +syn keyword phpFunctions chdir chroot dir closedir getcwd opendir readdir rewinddir scandir contained +syn keyword phpFunctions domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet xpath_eval_expression xpath_eval xpath_new_context xptr_eval xptr_new_context contained +syn keyword phpMethods name specified value create_attribute create_cdata_section create_comment create_element_ns create_element create_entity_reference create_processing_instruction create_text_node doctype document_element dump_file dump_mem get_element_by_id get_elements_by_tagname html_dump_mem xinclude entities internal_subset name notations public_id system_id get_attribute_node get_attribute get_elements_by_tagname has_attribute remove_attribute set_attribute tagname add_namespace append_child append_sibling attributes child_nodes clone_node dump_node first_child get_content has_attributes has_child_nodes insert_before is_blank_node last_child next_sibling node_name node_type node_value owner_document parent_node prefix previous_sibling remove_child replace_child replace_node set_content set_name set_namespace unlink_node data target process result_dump_file result_dump_mem contained +syn keyword phpFunctions dotnet_load contained +syn keyword phpFunctions debug_backtrace debug_print_backtrace error_log error_reporting restore_error_handler set_error_handler trigger_error user_error contained +syn keyword phpFunctions escapeshellarg escapeshellcmd exec passthru proc_close proc_get_status proc_nice proc_open proc_terminate shell_exec system contained +syn keyword phpFunctions fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor contained +syn keyword phpFunctions fbsql_affected_rows fbsql_autocommit fbsql_change_user fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_select_db fbsql_set_lob_mode fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_tablename fbsql_username fbsql_warnings contained +syn keyword phpFunctions fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version contained +syn keyword phpFunctions filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro contained +syn keyword phpFunctions basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink contained +syn keyword phpFunctions fribidi_log2vis contained +syn keyword phpFunctions ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype contained +syn keyword phpFunctions call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function contained +syn keyword phpFunctions bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain contained +syn keyword phpFunctions gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_sqrtrm gmp_strval gmp_sub gmp_xor contained +syn keyword phpFunctions header headers_list headers_sent setcookie contained +syn keyword phpFunctions hw_api_attribute hwapi_hgcsp hw_api_content hw_api_object contained +syn keyword phpMethods key langdepvalue value values checkin checkout children mimetype read content copy dbstat dcstat dstanchors dstofsrcanchors count reason find ftstat hwstat identify info insert insertanchor insertcollection insertdocument link lock move assign attreditable count insert remove title value object objectbyanchor parents description type remove replace setcommitedversion srcanchors srcsofdst unlock user userlist contained +syn keyword phpFunctions hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who contained +syn keyword phpFunctions ibase_add_user ibase_affected_rows ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_rollback_ret ibase_rollback ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event contained +syn keyword phpFunctions iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler contained +syn keyword phpFunctions ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob contained +syn keyword phpFunctions exif_imagetype exif_read_data exif_thumbnail gd_info getimagesize image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefontheight imagefontwidth imageftbbox imagefttext imagegammacorrect imagegd2 imagegd imagegif imageinterlace imageistruecolor imagejpeg imageline imageloadfont imagepalettecopy imagepng imagepolygon imagepsbbox imagepscopyfont imagepsencodefont imagepsextendfont imagepsfreefont imagepsloadfont imagepsslantfont imagepstext imagerectangle imagerotate imagesavealpha imagesetbrush imagesetpixel imagesetstyle imagesetthickness imagesettile imagestring imagestringup imagesx imagesy imagetruecolortopalette imagettfbbox imagettftext imagetypes imagewbmp iptcembed iptcparse jpeg2wbmp png2wbmp read_exif_data contained +syn keyword phpFunctions imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8 contained +syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var get_current_user get_defined_constants get_extension_funcs get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime get_required_files getenv getlastmod getmygid getmyinode getmypid getmyuid getopt getrusage ini_alter ini_get_all ini_get ini_restore ini_set main memory_get_usage php_ini_scanned_files php_logo_guid php_sapi_name php_uname phpcredits phpinfo phpversion putenv restore_include_path set_include_path set_magic_quotes_runtime set_time_limit version_compare zend_logo_guid zend_version contained +syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained +syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained +syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained +syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained +syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained +syn keyword phpFunctions ezmlm_hash mail contained +syn keyword phpFunctions mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all contained +syn keyword phpFunctions abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh contained +syn keyword phpFunctions mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_strlen mb_strpos mb_strrpos mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr contained +syn keyword phpFunctions mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year contained +syn keyword phpFunctions mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic contained +syn keyword phpFunctions mcve_adduser mcve_adduserarg mcve_bt mcve_checkstatus mcve_chkpwd mcve_chngpwd mcve_completeauthorizations mcve_connect mcve_connectionerror mcve_deleteresponse mcve_deletetrans mcve_deleteusersetup mcve_deluser mcve_destroyconn mcve_destroyengine mcve_disableuser mcve_edituser mcve_enableuser mcve_force mcve_getcell mcve_getcellbynum mcve_getcommadelimited mcve_getheader mcve_getuserarg mcve_getuserparam mcve_gft mcve_gl mcve_gut mcve_initconn mcve_initengine mcve_initusersetup mcve_iscommadelimited mcve_liststats mcve_listusers mcve_maxconntimeout mcve_monitor mcve_numcolumns mcve_numrows mcve_override mcve_parsecommadelimited mcve_ping mcve_preauth mcve_preauthcompletion mcve_qc mcve_responseparam mcve_return mcve_returncode mcve_returnstatus mcve_sale mcve_setblocking mcve_setdropfile mcve_setip mcve_setssl_files mcve_setssl mcve_settimeout mcve_settle mcve_text_avs mcve_text_code mcve_text_cv mcve_transactionauth mcve_transactionavs mcve_transactionbatch mcve_transactioncv mcve_transactionid mcve_transactionitem mcve_transactionssent mcve_transactiontext mcve_transinqueue mcve_transnew mcve_transparam mcve_transsend mcve_ub mcve_uwait mcve_verifyconnection mcve_verifysslcert mcve_void contained +syn keyword phpFunctions mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash contained +syn keyword phpFunctions mime_content_type contained +syn keyword phpFunctions ming_setcubicthreshold ming_setscale ming_useswfversion SWFAction SWFBitmap swfbutton_keypress SWFbutton SWFDisplayItem SWFFill SWFFont SWFGradient SWFMorph SWFMovie SWFShape SWFSprite SWFText SWFTextField contained +syn keyword phpMethods getHeight getWidth addAction addShape setAction setdown setHit setOver setUp addColor move moveTo multColor remove Rotate rotateTo scale scaleTo setDepth setName setRatio skewX skewXTo skewY skewYTo moveTo rotateTo scaleTo skewXTo skewYTo getwidth addEntry getshape1 getshape2 add nextframe output remove save setbackground setdimension setframes setrate streammp3 addFill drawCurve drawCurveTo drawLine drawLineTo movePen movePenTo setLeftFill setLine setRightFill add nextframe remove setframes addString getWidth moveTo setColor setFont setHeight setSpacing addstring align setbounds setcolor setFont setHeight setindentation setLeftMargin setLineSpacing setMargins setname setrightMargin contained +syn keyword phpFunctions connection_aborted connection_status connection_timeout constant define defined die eval exit get_browser highlight_file highlight_string ignore_user_abort pack show_source sleep uniqid unpack usleep contained +syn keyword phpFunctions udm_add_search_limit udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_load_ispell_data udm_open_stored udm_set_agent_param contained +syn keyword phpFunctions msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get msession_getdata msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set msession_setdata msession_timeout msession_uniq msession_unlock contained +syn keyword phpFunctions msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_freeresult msql_list_dbs msql_list_fields msql_list_tables msql_listdbs msql_listfields msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename msql contained +syn keyword phpFunctions mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db contained +syn keyword phpFunctions muscat_close muscat_get muscat_give muscat_setup_net muscat_setup contained +syn keyword phpFunctions mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query contained +syn keyword phpFunctions mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_client_info mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare_result mysqli_prepare mysqli_profiler mysqli_query mysqli_read_query_result mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reload mysqli_rollback mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_rpl_query_type mysqli_select_db mysqli_send_long_data mysqli_send_query mysqli_slave_query mysqli_ssl_set mysqli_stat mysqli_stmt_affected_rows mysqli_stmt_close mysqli_stmt_errno mysqli_stmt_error mysqli_stmt_store_result mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count contained +syn keyword phpFunctions ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_instr ncurses_isendwin ncurses_keyok ncurses_keypad ncurses_killchar ncurses_longname ncurses_meta ncurses_mouse_trafo ncurses_mouseinterval ncurses_mousemask ncurses_move_panel ncurses_move ncurses_mvaddch ncurses_mvaddchnstr ncurses_mvaddchstr ncurses_mvaddnstr ncurses_mvaddstr ncurses_mvcur ncurses_mvdelch ncurses_mvgetch ncurses_mvhline ncurses_mvinch ncurses_mvvline ncurses_mvwaddstr ncurses_napms ncurses_new_panel ncurses_newpad ncurses_newwin ncurses_nl ncurses_nocbreak ncurses_noecho ncurses_nonl ncurses_noqiflush ncurses_noraw ncurses_pair_content ncurses_panel_above ncurses_panel_below ncurses_panel_window ncurses_pnoutrefresh ncurses_prefresh ncurses_putp ncurses_qiflush ncurses_raw ncurses_refresh ncurses_replace_panel ncurses_reset_prog_mode ncurses_reset_shell_mode ncurses_resetty ncurses_savetty ncurses_scr_dump ncurses_scr_init ncurses_scr_restore ncurses_scr_set ncurses_scrl ncurses_show_panel ncurses_slk_attr ncurses_slk_attroff ncurses_slk_attron ncurses_slk_attrset ncurses_slk_clear ncurses_slk_color ncurses_slk_init ncurses_slk_noutrefresh ncurses_slk_refresh ncurses_slk_restore ncurses_slk_set ncurses_slk_touch ncurses_standend ncurses_standout ncurses_start_color ncurses_termattrs ncurses_termname ncurses_timeout ncurses_top_panel ncurses_typeahead ncurses_ungetch ncurses_ungetmouse ncurses_update_panels ncurses_use_default_colors ncurses_use_env ncurses_use_extended_names ncurses_vidattr ncurses_vline ncurses_waddch ncurses_waddstr ncurses_wattroff ncurses_wattron ncurses_wattrset ncurses_wborder ncurses_wclear ncurses_wcolor_set ncurses_werase ncurses_wgetch ncurses_whline ncurses_wmouse_trafo ncurses_wmove ncurses_wnoutrefresh ncurses_wrefresh ncurses_wstandend ncurses_wstandout ncurses_wvline contained +syn keyword phpFunctions checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport ip2long long2ip openlog pfsockopen socket_get_status socket_set_blocking socket_set_timeout syslog contained +syn keyword phpFunctions yp_all yp_cat yp_err_string yp_errno yp_first yp_get_default_domain yp_master yp_match yp_next yp_order contained +syn keyword phpFunctions notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version contained +syn keyword phpFunctions nsapi_request_headers nsapi_response_headers nsapi_virtual contained +syn keyword phpFunctions aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate contained +syn keyword phpFunctions ocibindbyname ocicancel ocicloselob ocicollappend ocicollassign ocicollassignelem ocicollgetelem ocicollmax ocicollsize ocicolltrim ocicolumnisnull ocicolumnname ocicolumnprecision ocicolumnscale ocicolumnsize ocicolumntype ocicolumntyperaw ocicommit ocidefinebyname ocierror ociexecute ocifetch ocifetchinto ocifetchstatement ocifreecollection ocifreecursor ocifreedesc ocifreestatement ociinternaldebug ociloadlob ocilogoff ocilogon ocinewcollection ocinewcursor ocinewdescriptor ocinlogon ocinumcols ociparse ociplogon ociresult ocirollback ocirowcount ocisavelob ocisavelobfile ociserverversion ocisetprefetch ocistatementtype ociwritelobtofile ociwritetemporarylob contained +syn keyword phpFunctions odbc_autocommit odbc_binmode odbc_close_all odbc_close odbc_columnprivileges odbc_columns odbc_commit odbc_connect odbc_cursor odbc_data_source odbc_do odbc_error odbc_errormsg odbc_exec odbc_execute odbc_fetch_array odbc_fetch_into odbc_fetch_object odbc_fetch_row odbc_field_len odbc_field_name odbc_field_num odbc_field_precision odbc_field_scale odbc_field_type odbc_foreignkeys odbc_free_result odbc_gettypeinfo odbc_longreadlen odbc_next_result odbc_num_fields odbc_num_rows odbc_pconnect odbc_prepare odbc_primarykeys odbc_procedurecolumns odbc_procedures odbc_result_all odbc_result odbc_rollback odbc_setoption odbc_specialcolumns odbc_statistics odbc_tableprivileges odbc_tables contained +syn keyword phpFunctions openssl_csr_export_to_file openssl_csr_export openssl_csr_new openssl_csr_sign openssl_error_string openssl_free_key openssl_get_privatekey openssl_get_publickey openssl_open openssl_pkcs7_decrypt openssl_pkcs7_encrypt openssl_pkcs7_sign openssl_pkcs7_verify openssl_pkey_export_to_file openssl_pkey_export openssl_pkey_get_private openssl_pkey_get_public openssl_pkey_new openssl_private_decrypt openssl_private_encrypt openssl_public_decrypt openssl_public_encrypt openssl_seal openssl_sign openssl_verify openssl_x509_check_private_key openssl_x509_checkpurpose openssl_x509_export_to_file openssl_x509_export openssl_x509_free openssl_x509_parse openssl_x509_read contained +syn keyword phpFunctions ora_bind ora_close ora_columnname ora_columnsize ora_columntype ora_commit ora_commitoff ora_commiton ora_do ora_error ora_errorcode ora_exec ora_fetch_into ora_fetch ora_getcolumn ora_logoff ora_logon ora_numcols ora_numrows ora_open ora_parse ora_plogon ora_rollback contained +syn keyword phpFunctions flush ob_clean ob_end_clean ob_end_flush ob_flush ob_get_clean ob_get_contents ob_get_flush ob_get_length ob_get_level ob_get_status ob_gzhandler ob_implicit_flush ob_list_handlers ob_start output_add_rewrite_var output_reset_rewrite_vars contained +syn keyword phpFunctions overload contained +syn keyword phpFunctions ovrimos_close ovrimos_commit ovrimos_connect ovrimos_cursor ovrimos_exec ovrimos_execute ovrimos_fetch_into ovrimos_fetch_row ovrimos_field_len ovrimos_field_name ovrimos_field_num ovrimos_field_type ovrimos_free_result ovrimos_longreadlen ovrimos_num_fields ovrimos_num_rows ovrimos_prepare ovrimos_result_all ovrimos_result ovrimos_rollback contained +syn keyword phpFunctions pcntl_exec pcntl_fork pcntl_signal pcntl_waitpid pcntl_wexitstatus pcntl_wifexited pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig contained +syn keyword phpFunctions preg_grep preg_match_all preg_match preg_quote preg_replace_callback preg_replace preg_split contained +syn keyword phpFunctions pdf_add_annotation pdf_add_bookmark pdf_add_launchlink pdf_add_locallink pdf_add_note pdf_add_outline pdf_add_pdflink pdf_add_thumbnail pdf_add_weblink pdf_arc pdf_arcn pdf_attach_file pdf_begin_page pdf_begin_pattern pdf_begin_template pdf_circle pdf_clip pdf_close_image pdf_close_pdi_page pdf_close_pdi pdf_close pdf_closepath_fill_stroke pdf_closepath_stroke pdf_closepath pdf_concat pdf_continue_text pdf_curveto pdf_delete pdf_end_page pdf_end_pattern pdf_end_template pdf_endpath pdf_fill_stroke pdf_fill pdf_findfont pdf_get_buffer pdf_get_font pdf_get_fontname pdf_get_fontsize pdf_get_image_height pdf_get_image_width pdf_get_majorversion pdf_get_minorversion pdf_get_parameter pdf_get_pdi_parameter pdf_get_pdi_value pdf_get_value pdf_initgraphics pdf_lineto pdf_makespotcolor pdf_moveto pdf_new pdf_open_CCITT pdf_open_file pdf_open_gif pdf_open_image_file pdf_open_image pdf_open_jpeg pdf_open_memory_image pdf_open_pdi_page pdf_open_pdi pdf_open_png pdf_open_tiff pdf_open pdf_place_image pdf_place_pdi_page pdf_rect pdf_restore pdf_rotate pdf_save pdf_scale pdf_set_border_color pdf_set_border_dash pdf_set_border_style pdf_set_char_spacing pdf_set_duration pdf_set_font pdf_set_horiz_scaling pdf_set_info_author pdf_set_info_creator pdf_set_info_keywords pdf_set_info_subject pdf_set_info_title pdf_set_info pdf_set_leading pdf_set_parameter pdf_set_text_matrix pdf_set_text_pos pdf_set_text_rendering pdf_set_text_rise pdf_set_value pdf_set_word_spacing pdf_setcolor pdf_setdash pdf_setflat pdf_setfont pdf_setgray_fill pdf_setgray_stroke pdf_setgray pdf_setlinecap pdf_setlinejoin pdf_setlinewidth pdf_setmatrix pdf_setmiterlimit pdf_setpolydash pdf_setrgbcolor_fill pdf_setrgbcolor_stroke pdf_setrgbcolor pdf_show_boxed pdf_show_xy pdf_show pdf_skew pdf_stringwidth pdf_stroke pdf_translate contained +syn keyword phpFunctions pfpro_cleanup pfpro_init pfpro_process_raw pfpro_process pfpro_version contained +syn keyword phpFunctions pg_affected_rows pg_cancel_query pg_client_encoding pg_close pg_connect pg_connection_busy pg_connection_reset pg_connection_status pg_convert pg_copy_from pg_copy_to pg_dbname pg_delete pg_end_copy pg_escape_bytea pg_escape_string pg_fetch_all pg_fetch_array pg_fetch_assoc pg_fetch_object pg_fetch_result pg_fetch_row pg_field_is_null pg_field_name pg_field_num pg_field_prtlen pg_field_size pg_field_type pg_free_result pg_get_notify pg_get_pid pg_get_result pg_host pg_insert pg_last_error pg_last_notice pg_last_oid pg_lo_close pg_lo_create pg_lo_export pg_lo_import pg_lo_open pg_lo_read_all pg_lo_read pg_lo_seek pg_lo_tell pg_lo_unlink pg_lo_write pg_meta_data pg_num_fields pg_num_rows pg_options pg_pconnect pg_ping pg_port pg_put_line pg_query pg_result_error pg_result_seek pg_result_status pg_select pg_send_query pg_set_client_encoding pg_trace pg_tty pg_unescape_bytea pg_untrace pg_update contained +syn keyword phpFunctions posix_ctermid posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_isatty posix_kill posix_mkfifo posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setsid posix_setuid posix_strerror posix_times posix_ttyname posix_uname contained +syn keyword phpFunctions printer_abort printer_close printer_create_brush printer_create_dc printer_create_font printer_create_pen printer_delete_brush printer_delete_dc printer_delete_font printer_delete_pen printer_draw_bmp printer_draw_chord printer_draw_elipse printer_draw_line printer_draw_pie printer_draw_rectangle printer_draw_roundrect printer_draw_text printer_end_doc printer_end_page printer_get_option printer_list printer_logical_fontheight printer_open printer_select_brush printer_select_font printer_select_pen printer_set_option printer_start_doc printer_start_page printer_write contained +syn keyword phpFunctions pspell_add_to_personal pspell_add_to_session pspell_check pspell_clear_session pspell_config_create pspell_config_ignore pspell_config_mode pspell_config_personal pspell_config_repl pspell_config_runtogether pspell_config_save_repl pspell_new_config pspell_new_personal pspell_new pspell_save_wordlist pspell_store_replacement pspell_suggest contained +syn keyword phpFunctions qdom_error qdom_tree contained +syn keyword phpFunctions readline_add_history readline_clear_history readline_completion_function readline_info readline_list_history readline_read_history readline_write_history readline contained +syn keyword phpFunctions recode_file recode_string recode contained +syn keyword phpFunctions ereg_replace ereg eregi_replace eregi split spliti sql_regcase contained +syn keyword phpFunctions ftok msg_get_queue msg_receive msg_remove_queue msg_send msg_set_queue msg_stat_queue sem_acquire sem_get sem_release sem_remove shm_attach shm_detach shm_get_var shm_put_var shm_remove_var shm_remove contained +syn keyword phpFunctions sesam_affected_rows sesam_commit sesam_connect sesam_diagnostic sesam_disconnect sesam_errormsg sesam_execimm sesam_fetch_array sesam_fetch_result sesam_fetch_row sesam_field_array sesam_field_name sesam_free_result sesam_num_fields sesam_query sesam_rollback sesam_seek_row sesam_settransaction contained +syn keyword phpFunctions session_cache_expire session_cache_limiter session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_unregister session_unset session_write_close contained +syn keyword phpFunctions shmop_close shmop_delete shmop_open shmop_read shmop_size shmop_write contained +syn keyword phpFunctions snmp_get_quick_print snmp_set_quick_print snmpget snmprealwalk snmpset snmpwalk snmpwalkoid contained +syn keyword phpFunctions socket_accept socket_bind socket_clear_error socket_close socket_connect socket_create_listen socket_create_pair socket_create socket_get_option socket_getpeername socket_getsockname socket_iovec_add socket_iovec_alloc socket_iovec_delete socket_iovec_fetch socket_iovec_free socket_iovec_set socket_last_error socket_listen socket_read socket_readv socket_recv socket_recvfrom socket_recvmsg socket_select socket_send socket_sendmsg socket_sendto socket_set_block socket_set_nonblock socket_set_option socket_shutdown socket_strerror socket_write socket_writev contained +syn keyword phpFunctions sqlite_array_query sqlite_busy_timeout sqlite_changes sqlite_close sqlite_column sqlite_create_aggregate sqlite_create_function sqlite_current sqlite_error_string sqlite_escape_string sqlite_fetch_array sqlite_fetch_single sqlite_fetch_string sqlite_field_name sqlite_has_more sqlite_last_error sqlite_last_insert_rowid sqlite_libencoding sqlite_libversion sqlite_next sqlite_num_fields sqlite_num_rows sqlite_open sqlite_popen sqlite_query sqlite_rewind sqlite_seek sqlite_udf_decode_binary sqlite_udf_encode_binary sqlite_unbuffered_query contained +syn keyword phpFunctions stream_context_create stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_filter_append stream_filter_prepend stream_filter_register stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_get_name stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_wrapper_register contained +syn keyword phpFunctions addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt explode fprintf get_html_translation_table hebrev hebrevc html_entity_decode htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vprintf vsprintf wordwrap contained +syn keyword phpFunctions swf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_startsymbol swf_textwidth swf_translate swf_viewport contained +syn keyword phpFunctions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_deadlock_retry_count sybase_fetch_array sybase_fetch_assoc sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_get_last_message sybase_min_client_severity sybase_min_error_severity sybase_min_message_severity sybase_min_server_severity sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db sybase_set_message_handler sybase_unbuffered_query contained +syn keyword phpFunctions tidy_access_count tidy_clean_repair tidy_config_count tidy_diagnose tidy_error_count tidy_get_body tidy_get_config tidy_get_error_buffer tidy_get_head tidy_get_html_ver tidy_get_html tidy_get_output tidy_get_release tidy_get_root tidy_get_status tidy_getopt tidy_is_xhtml tidy_load_config tidy_parse_file tidy_parse_string tidy_repair_file tidy_repair_string tidy_reset_config tidy_save_config tidy_set_encoding tidy_setopt tidy_warning_count contained +syn keyword phpMethods attributes children get_attr get_nodes has_children has_siblings is_asp is_comment is_html is_jsp is_jste is_text is_xhtml is_xml next prev tidy_node contained +syn keyword phpFunctions token_get_all token_name contained +syn keyword phpFunctions base64_decode base64_encode get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode contained +syn keyword phpFunctions doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export contained +syn keyword phpFunctions vpopmail_add_alias_domain_ex vpopmail_add_alias_domain vpopmail_add_domain_ex vpopmail_add_domain vpopmail_add_user vpopmail_alias_add vpopmail_alias_del_domain vpopmail_alias_del vpopmail_alias_get_all vpopmail_alias_get vpopmail_auth_user vpopmail_del_domain_ex vpopmail_del_domain vpopmail_del_user vpopmail_error vpopmail_passwd vpopmail_set_user_quota contained +syn keyword phpFunctions w32api_deftype w32api_init_dtype w32api_invoke_function w32api_register_function w32api_set_call_method contained +syn keyword phpFunctions wddx_add_vars wddx_deserialize wddx_packet_end wddx_packet_start wddx_serialize_value wddx_serialize_vars contained +syn keyword phpFunctions utf8_decode utf8_encode xml_error_string xml_get_current_byte_index xml_get_current_column_number xml_get_current_line_number xml_get_error_code xml_parse_into_struct xml_parse xml_parser_create_ns xml_parser_create xml_parser_free xml_parser_get_option xml_parser_set_option xml_set_character_data_handler xml_set_default_handler xml_set_element_handler xml_set_end_namespace_decl_handler xml_set_external_entity_ref_handler xml_set_notation_decl_handler xml_set_object xml_set_processing_instruction_handler xml_set_start_namespace_decl_handler xml_set_unparsed_entity_decl_handler contained +syn keyword phpFunctions xmlrpc_decode_request xmlrpc_decode xmlrpc_encode_request xmlrpc_encode xmlrpc_get_type xmlrpc_parse_method_descriptions xmlrpc_server_add_introspection_data xmlrpc_server_call_method xmlrpc_server_create xmlrpc_server_destroy xmlrpc_server_register_introspection_callback xmlrpc_server_register_method xmlrpc_set_type contained +syn keyword phpFunctions xslt_create xslt_errno xslt_error xslt_free xslt_output_process xslt_set_base xslt_set_encoding xslt_set_error_handler xslt_set_log xslt_set_sax_handler xslt_set_sax_handlers xslt_set_scheme_handler xslt_set_scheme_handlers contained +syn keyword phpFunctions yaz_addinfo yaz_ccl_conf yaz_ccl_parse yaz_close yaz_connect yaz_database yaz_element yaz_errno yaz_error yaz_es_result yaz_get_option yaz_hits yaz_itemorder yaz_present yaz_range yaz_record yaz_scan_result yaz_scan yaz_schema yaz_search yaz_set_option yaz_sort yaz_syntax yaz_wait contained +syn keyword phpFunctions zip_close zip_entry_close zip_entry_compressedsize zip_entry_compressionmethod zip_entry_filesize zip_entry_name zip_entry_open zip_entry_read zip_open zip_read contained +syn keyword phpFunctions gzclose gzcompress gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_get_coding_type contained + +if exists( "php_baselib" ) + syn keyword phpMethods query next_record num_rows affected_rows nf f p np num_fields haltmsg seek link_id query_id metadata table_names nextid connect halt free register unregister is_registered delete url purl self_url pself_url hidden_session add_query padd_query reimport_get_vars reimport_post_vars reimport_cookie_vars set_container set_tokenname release_token put_headers get_id get_id put_id freeze thaw gc reimport_any_vars start url purl login_if is_authenticated auth_preauth auth_loginform auth_validatelogin auth_refreshlogin auth_registerform auth_doregister start check have_perm permsum perm_invalid contained + syn keyword phpFunctions page_open page_close sess_load sess_save contained +endif + +" Conditional +syn keyword phpConditional declare else enddeclare endswitch elseif endif if switch contained + +" Repeat +syn keyword phpRepeat as do endfor endforeach endwhile for foreach while contained + +" Repeat +syn keyword phpLabel case default switch contained + +" Statement +syn keyword phpStatement return break continue exit contained + +" Keyword +syn keyword phpKeyword var const contained + +" Type +syn keyword phpType bool[ean] int[eger] real double float string array object NULL contained + +" Structure +syn keyword phpStructure extends implements instanceof parent self contained + +" Operator +syn match phpOperator "[-=+%^&|*!.~?:]" contained display +syn match phpOperator "[-+*/%^&|.]=" contained display +syn match phpOperator "/[^*/]"me=e-1 contained display +syn match phpOperator "\$" contained display +syn match phpOperator "&&\|\" contained display +syn match phpOperator "||\|\" contained display +syn match phpRelation "[!=<>]=" contained display +syn match phpRelation "[<>]" contained display +syn match phpMemberSelector "->" contained display +syn match phpVarSelector "\$" contained display + +" Identifier +syn match phpIdentifier "$\h\w*" contained contains=phpEnvVar,phpIntVar,phpVarSelector display +syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display +syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend +syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained + +" Methoden +syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display + +" Include +syn keyword phpInclude include require include_once require_once contained + +" Peter Hodge - added 'clone' keyword +" Define +syn keyword phpDefine new clone contained + +" Boolean +syn keyword phpBoolean true false contained + +" Number +syn match phpNumber "-\=\<\d\+\>" contained display +syn match phpNumber "\<0x\x\{1,8}\>" contained display + +" Float +syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display + +" SpecialChar +syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display +syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display +syn match phpSpecialChar "\\x\x\{2}" contained display + +" Error +syn match phpOctalError "[89]" contained display +if exists("php_parent_error_close") + syn match phpParentError "[)\]}]" contained display +endif + +" Todo +syn keyword phpTodo todo fixme xxx contained + +" Comment +if exists("php_parent_error_open") + syn region phpComment start="/\*" end="\*/" contained contains=phpTodo +else + syn region phpComment start="/\*" end="\*/" contained contains=phpTodo extend +endif +if version >= 600 + syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo + syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo +else + syn match phpComment "#.\{-}$" contained contains=phpTodo + syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo + syn match phpComment "//.\{-}$" contained contains=phpTodo + syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo +endif + +" String +if exists("php_parent_error_open") + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@Spell,@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,@phpAddStrings contained keepend +else + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@Spell,@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,@phpAddStrings contained keepend extend +endif + +" HereDoc +if version >= 600 + syn case match + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend +" including HTML,JavaScript,SQL even if not enabled via options + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn case ignore +endif + +" Parent +if exists("php_parent_error_close") || exists("php_parent_error_open") + syn match phpParent "[{}]" contained + syn region phpParent matchgroup=Delimiter start="(" end=")" contained contains=@phpClInside transparent + syn region phpParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phpClInside transparent + if !exists("php_parent_error_close") + syn match phpParent "[\])]" contained + endif +else + syn match phpParent "[({[\]})]" contained +endif + +syn cluster phpClConst contains=phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpBacktick,phpNumber,phpFloat,phpKeyword,phpType,phpBoolean,phpStructure,phpMethodsVar,phpConstant,phpCoreConstant,phpException +syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc +syn cluster phpClFunction contains=@phpClInside,phpDefine,phpParentError,phpStorageClass +syn cluster phpClTop contains=@phpClFunction,phpFoldFunction,phpFoldClass,phpFoldInterface,phpFoldTry,phpFoldCatch + +" Php Region +if exists("php_parent_error_open") + if exists("php_noShortTags") + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop + else + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop + endif + syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop + if exists("php_asp_tags") + syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop + endif +else + if exists("php_noShortTags") + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend + else + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend + endif + syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop keepend + if exists("php_asp_tags") + syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop keepend + endif +endif + +" Fold +if exists("php_folding") && php_folding==1 +" match one line constructs here and skip them at folding + syn keyword phpSCKeyword abstract final private protected public static contained + syn keyword phpFCKeyword function contained + syn keyword phpStorageClass global contained + syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword + syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*class\(\s\+.*}\)\@=" contained + syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained + syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained + syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained + + set foldmethod=syntax + syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="" end="\h\w*" contained contains=phpMethods,phpMemberSelector display containedin=phpStringDouble + +" highlight constant E_STRICT +syntax case match +syntax keyword phpCoreConstant E_STRICT contained +syntax case ignore + +" different syntax highlighting for 'echo', 'print', 'switch', 'die' and 'list' keywords +" to better indicate what they are. +syntax keyword phpDefine echo print contained +syntax keyword phpStructure list contained +syntax keyword phpConditional switch contained +syntax keyword phpStatement die contained + +" Highlighting for PHP5's user-definable magic class methods +syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier + \ __construct __destruct __call __toString __sleep __wakeup __set __get __unset __isset __clone __set_state +" Highlighting for __autoload slightly different from line above +syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ __autoload +highlight link phpSpecialFunction phpOperator + +" Highlighting for PHP5's built-in classes +" - built-in classes harvested from get_declared_classes() in 5.1.4 +syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ stdClass __PHP_Incomplete_Class php_user_filter Directory ArrayObject + \ Exception ErrorException LogicException BadFunctionCallException BadMethodCallException DomainException + \ RecursiveIteratorIterator IteratorIterator FilterIterator RecursiveFilterIterator ParentIterator LimitIterator + \ CachingIterator RecursiveCachingIterator NoRewindIterator AppendIterator InfiniteIterator EmptyIterator + \ ArrayIterator RecursiveArrayIterator DirectoryIterator RecursiveDirectoryIterator + \ InvalidArgumentException LengthException OutOfRangeException RuntimeException OutOfBoundsException + \ OverflowException RangeException UnderflowException UnexpectedValueException + \ PDO PDOException PDOStatement PDORow + \ Reflection ReflectionFunction ReflectionParameter ReflectionMethod ReflectionClass + \ ReflectionObject ReflectionProperty ReflectionExtension ReflectionException + \ SplFileInfo SplFileObject SplTempFileObject SplObjectStorage + \ XMLWriter LibXMLError XMLReader SimpleXMLElement SimpleXMLIterator + \ DOMException DOMStringList DOMNameList DOMDomError DOMErrorHandler + \ DOMImplementation DOMImplementationList DOMImplementationSource + \ DOMNode DOMNameSpaceNode DOMDocumentFragment DOMDocument DOMNodeList DOMNamedNodeMap + \ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler + \ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity + \ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath +highlight link phpClasses phpFunctions + +" Highlighting for PHP5's built-in interfaces +" - built-in classes harvested from get_declared_interfaces() in 5.1.4 +syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator + \ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector +highlight link phpInterfaces phpConstant + +" option defaults: +if ! exists('php_special_functions') + let php_special_functions = 1 +endif +if ! exists('php_alt_comparisons') + let php_alt_comparisons = 1 +endif +if ! exists('php_alt_assignByReference') + let php_alt_assignByReference = 1 +endif + +if php_special_functions + " Highlighting for PHP built-in functions which exhibit special behaviours + " - isset()/unset()/empty() are not real functions. + " - compact()/extract() directly manipulate variables in the local scope where + " regular functions would not be able to. + " - eval() is the token 'make_your_code_twice_as_complex()' function for PHP. + " - user_error()/trigger_error() can be overloaded by set_error_handler and also + " have the capacity to terminate your script when type is E_USER_ERROR. + syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle + \ user_error trigger_error isset unset eval extract compact empty +endif + +if php_alt_assignByReference + " special highlighting for '=&' operator + syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle + highlight link phpAssignByRef Type +endif + +if php_alt_comparisons + " highlight comparison operators differently + syntax match phpComparison "\v[=!]\=\=?" contained containedin=phpRegion + syntax match phpComparison "\v[=<>-]@]\=?[<>]@!" contained containedin=phpRegion + + " highlight the 'instanceof' operator as a comparison operator rather than a structure + syntax case ignore + syntax keyword phpComparison instanceof contained containedin=phpRegion + + hi link phpComparison Statement +endif + +" ================================================================ + +" Sync +if php_sync_method==-1 + if exists("php_noShortTags") + syn sync match phpRegionSync grouphere phpRegion "^\s*\s*$+ + if exists("php_asp_tags") + syn sync match phpRegionSync grouphere phpRegionAsp "^\s*<%\(=\)\=\s*$" + endif + syn sync match phpRegionSync grouphere NONE "^\s*?>\s*$" + syn sync match phpRegionSync grouphere NONE "^\s*%>\s*$" + syn sync match phpRegionSync grouphere phpRegion "function\s.*(.*\$" + "syn sync match phpRegionSync grouphere NONE "/\i*>\s*$" +elseif php_sync_method>0 + exec "syn sync minlines=" . php_sync_method +else + exec "syn sync fromstart" +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_php_syn_inits") + if version < 508 + let did_php_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink phpConstant Constant + HiLink phpCoreConstant Constant + HiLink phpComment Comment + HiLink phpException Exception + HiLink phpBoolean Boolean + HiLink phpStorageClass StorageClass + HiLink phpSCKeyword StorageClass + HiLink phpFCKeyword Define + HiLink phpStructure Structure + HiLink phpStringSingle String + HiLink phpStringDouble String + HiLink phpBacktick String + HiLink phpNumber Number + HiLink phpFloat Float + HiLink phpMethods Function + HiLink phpFunctions Function + HiLink phpBaselib Function + HiLink phpRepeat Repeat + HiLink phpConditional Conditional + HiLink phpLabel Label + HiLink phpStatement Statement + HiLink phpKeyword Statement + HiLink phpType Type + HiLink phpInclude Include + HiLink phpDefine Define + HiLink phpSpecialChar SpecialChar + HiLink phpParent Delimiter + HiLink phpIdentifierConst Delimiter + HiLink phpParentError Error + HiLink phpOctalError Error + HiLink phpTodo Todo + HiLink phpMemberSelector Structure + if exists("php_oldStyle") + hi phpIntVar guifg=Red ctermfg=DarkRed + hi phpEnvVar guifg=Red ctermfg=DarkRed + hi phpOperator guifg=SeaGreen ctermfg=DarkGreen + hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen + hi phpRelation guifg=SeaGreen ctermfg=DarkGreen + hi phpIdentifier guifg=DarkGray ctermfg=Brown + hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown + else + HiLink phpIntVar Identifier + HiLink phpEnvVar Identifier + HiLink phpOperator Operator + HiLink phpVarSelector Operator + HiLink phpRelation Operator + HiLink phpIdentifier Identifier + HiLink phpIdentifierSimply Identifier + endif + + delcommand HiLink +endif + +let b:current_syntax = "php" + +if main_syntax == 'php' + unlet main_syntax +endif + +" vim: ts=8 sts=2 sw=2 expandtab diff --git a/.vim/syntax/snippet.vim b/.vim/syntax/snippet.vim new file mode 100644 index 0000000..5e919e7 --- /dev/null +++ b/.vim/syntax/snippet.vim @@ -0,0 +1,19 @@ +" Syntax highlighting for snippet files (used for snipMate.vim) +" Hopefully this should make snippets a bit nicer to write! +syn match snipComment '^#.*' +syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand +syn match tabStop '\$\d\+' +syn match snipCommand '`.\{-}`' +syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword +syn match multiSnipText '\S\+ \zs.*' contained +syn match snipKeyword '^snippet'me=s+8 contained +syn match snipError "^[^#s\t].*$" + +hi link snipComment Comment +hi link multiSnipText String +hi link snipKeyword Keyword +hi link snipComment Comment +hi link placeHolder Special +hi link tabStop Special +hi link snipCommand String +hi link snipError Error diff --git a/.vim/vim-plug/.github/ISSUE_TEMPLATE.md b/.vim/vim-plug/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..314d138 --- /dev/null +++ b/.vim/vim-plug/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,32 @@ + + +Explain the problem here ... + +------------------------------ + + +``` + +``` + + +- Type: + - [ ] Bug + - [ ] Enhancement + - [ ] Feature Request + - [ ] Question +- OS: + - [ ] All/Other + - [ ] Linux + - [ ] OS X + - [ ] Windows +- Vim: + - [ ] Terminal Vim + - [ ] GVim + - [ ] Neovim diff --git a/.vim/vim-plug/.github/PULL_REQUEST_TEMPLATE.md b/.vim/vim-plug/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..b344187 --- /dev/null +++ b/.vim/vim-plug/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ + + +Describe the details of your PR ... diff --git a/.vim/vim-plug/.travis.yml b/.vim/vim-plug/.travis.yml new file mode 100644 index 0000000..5fc0240 --- /dev/null +++ b/.vim/vim-plug/.travis.yml @@ -0,0 +1,62 @@ +language: ruby +dist: trusty +sudo: false +env: + global: + - DEPS=$HOME/deps + - PATH=$DEPS/bin:$PATH +matrix: + include: + - env: ENV=vim72 + rvm: 1.8.7 + addons: { apt: { packages: [vim-nox] } } + - env: ENV=python + rvm: 1.8.7 + addons: { apt: { packages: [python2.7-dev] } } + - env: ENV=python3 + rvm: 1.8.7 + addons: { apt: { packages: [python3-dev] } } + - env: ENV=ruby18 + rvm: 1.8.7 + - env: ENV=ruby20 + rvm: 2.0.0 + - env: ENV=neovim + - env: ENV=vim8 +install: | + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + + if [ "$ENV" == "vim72" ]; then + mkdir -p ${DEPS}/bin + ln -s /usr/bin/vim.nox ${DEPS}/bin/vim + return + elif [ "$ENV" == "neovim" ]; then + # https://github.com/neovim/bot-ci#nightly-builds + eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64" + mkdir -p ${DEPS}/bin + ln -s $(which nvim) ${DEPS}/bin/vim + export VADER_OUTPUT_FILE=/dev/stderr + return + fi + + C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui " + case "$ENV" in + python) + C_OPTS+=--enable-pythoninterp + ;; + python3) + C_OPTS+=--enable-python3interp + ;; + ruby*) + C_OPTS+=--enable-rubyinterp + ;; + esac + + git clone --depth 1 https://github.com/vim/vim + cd vim + export PATH=/usr/bin:$PATH + ./configure $C_OPTS + make + make install + cd - +script: test/run ! diff --git a/.vim/vim-plug/LICENSE b/.vim/vim-plug/LICENSE new file mode 100644 index 0000000..c28e17a --- /dev/null +++ b/.vim/vim-plug/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Junegunn Choi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.vim/vim-plug/README.md b/.vim/vim-plug/README.md new file mode 100644 index 0000000..c6d785b --- /dev/null +++ b/.vim/vim-plug/README.md @@ -0,0 +1,306 @@ +vim-plug[![travis-ci](https://travis-ci.org/junegunn/vim-plug.svg?branch=master)](https://travis-ci.org/junegunn/vim-plug) +=== + +A minimalist Vim plugin manager. + + + +### Pros. + +- Easier to setup: Single file. No boilerplate code required. +- Easier to use: Concise, intuitive syntax +- [Super-fast][40/4] parallel installation/update + (with any of `+job`, `+python`, `+python3`, `+ruby`, or [Neovim][nv]) +- Creates shallow clones to minimize disk space usage and download time +- On-demand loading for [faster startup time][startup-time] +- Can review and rollback updates +- Branch/tag/commit support +- Post-update hooks +- Support for externally managed plugins + +[40/4]: https://raw.githubusercontent.com/junegunn/i/master/vim-plug/40-in-4.gif +[nv]: http://neovim.org/ +[startup-time]: https://github.com/junegunn/vim-startuptime-benchmark#result + +### Installation + +[Download plug.vim](https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim) +and put it in the "autoload" directory. + +#### Vim + +###### Unix + +```sh +curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +``` + +You can automate the process by putting the command in your Vim configuration +file as suggested [here][auto]. + +[auto]: https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation + +###### Windows (PowerShell) + +```powershell +md ~\vimfiles\autoload +$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' +(New-Object Net.WebClient).DownloadFile( + $uri, + $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath( + "~\vimfiles\autoload\plug.vim" + ) +) +``` + +#### Neovim + +###### Unix + +```sh +curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +``` + +###### Windows (PowerShell) + +```powershell +md ~\AppData\Local\nvim\autoload +$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' +(New-Object Net.WebClient).DownloadFile( + $uri, + $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath( + "~\AppData\Local\nvim\autoload\plug.vim" + ) +) +``` + +### Getting Help + +- See [tutorial] page to learn the basics of vim-plug +- See [tips] and [FAQ] pages for common problems and questions +- See [requirements] page for debugging information & tested configurations +- Create an [issue](https://github.com/junegunn/vim-plug/issues/new) + +[tutorial]: https://github.com/junegunn/vim-plug/wiki/tutorial +[tips]: https://github.com/junegunn/vim-plug/wiki/tips +[FAQ]: https://github.com/junegunn/vim-plug/wiki/faq +[requirements]: https://github.com/junegunn/vim-plug/wiki/requirements + +### Usage + +Add a vim-plug section to your `~/.vimrc` (or `~/.config/nvim/init.vim` for Neovim): + +1. Begin the section with `call plug#begin()` +1. List the plugins with `Plug` commands +1. `call plug#end()` to update `&runtimepath` and initialize plugin system + - Automatically executes `filetype plugin indent on` and `syntax enable`. + You can revert the settings after the call. e.g. `filetype indent off`, `syntax off`, etc. + +#### Example + +```vim +" Specify a directory for plugins +" - For Neovim: ~/.local/share/nvim/plugged +" - Avoid using standard Vim directory names like 'plugin' +call plug#begin('~/.vim/plugged') + +" Make sure you use single quotes + +" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +Plug 'junegunn/vim-easy-align' + +" Any valid git URL is allowed +Plug 'https://github.com/junegunn/vim-github-dashboard.git' + +" Multiple Plug commands can be written in a single line using | separators +Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' + +" On-demand loading +Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +Plug 'tpope/vim-fireplace', { 'for': 'clojure' } + +" Using a non-master branch +Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } + +" Using a tagged release; wildcard allowed (requires git 1.9.2 or above) +Plug 'fatih/vim-go', { 'tag': '*' } + +" Plugin options +Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } + +" Plugin outside ~/.vim/plugged with post-update hook +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } + +" Unmanaged plugin (manually installed and updated) +Plug '~/my-prototype-plugin' + +" Initialize plugin system +call plug#end() +``` + +Reload .vimrc and `:PlugInstall` to install plugins. + +### Commands + +| Command | Description | +| ----------------------------------- | ------------------------------------------------------------------ | +| `PlugInstall [name ...] [#threads]` | Install plugins | +| `PlugUpdate [name ...] [#threads]` | Install or update plugins | +| `PlugClean[!]` | Remove unused directories (bang version will clean without prompt) | +| `PlugUpgrade` | Upgrade vim-plug itself | +| `PlugStatus` | Check the status of plugins | +| `PlugDiff` | Examine changes from the previous update and the pending changes | +| `PlugSnapshot[!] [output path]` | Generate script for restoring the current snapshot of the plugins | + +### `Plug` options + +| Option | Description | +| ----------------------- | ------------------------------------------------ | +| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | +| `rtp` | Subdirectory that contains Vim plugin | +| `dir` | Custom directory for the plugin | +| `as` | Use different name for the plugin | +| `do` | Post-update hook (string or funcref) | +| `on` | On-demand loading: Commands or ``-mappings | +| `for` | On-demand loading: File types | +| `frozen` | Do not update unless explicitly specified | + +### Global options + +| Flag | Default | Description | +| ------------------- | --------------------------------- | ------------------------------------------------------ | +| `g:plug_threads` | 16 | Default number of threads to use | +| `g:plug_timeout` | 60 | Time limit of each task in seconds (*Ruby & Python*) | +| `g:plug_retries` | 2 | Number of retries in case of timeout (*Ruby & Python*) | +| `g:plug_shallow` | 1 | Use shallow clone | +| `g:plug_window` | `vertical topleft new` | Command to open plug window | +| `g:plug_pwindow` | `above 12new` | Command to open preview window in `PlugDiff` | +| `g:plug_url_format` | `https://git::@github.com/%s.git` | `printf` format to build repo URL (Only applies to the subsequent `Plug` commands) | + + +### Keybindings + +- `D` - `PlugDiff` +- `S` - `PlugStatus` +- `R` - Retry failed update or installation tasks +- `U` - Update plugins in the selected range +- `q` - Close the window +- `:PlugStatus` + - `L` - Load plugin +- `:PlugDiff` + - `X` - Revert the update + +### Example: A small [sensible](https://github.com/tpope/vim-sensible) Vim configuration + +```vim +call plug#begin() +Plug 'tpope/vim-sensible' +call plug#end() +``` + +### On-demand loading of plugins + +```vim +" NERD tree will be loaded on the first invocation of NERDTreeToggle command +Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } + +" Multiple commands +Plug 'junegunn/vim-github-dashboard', { 'on': ['GHDashboard', 'GHActivity'] } + +" Loaded when clojure file is opened +Plug 'tpope/vim-fireplace', { 'for': 'clojure' } + +" Multiple file types +Plug 'kovisoft/paredit', { 'for': ['clojure', 'scheme'] } + +" On-demand loading on both conditions +Plug 'junegunn/vader.vim', { 'on': 'Vader', 'for': 'vader' } + +" Code to execute when the plugin is lazily loaded on demand +Plug 'junegunn/goyo.vim', { 'for': 'markdown' } +autocmd! User goyo.vim echom 'Goyo is now loaded!' +``` + +`for` option is generally not needed as most plugins for specific file types +usually don't have too much code in `plugin` directory. You might want to +examine the output of `vim --startuptime` before applying the option. + +### Post-update hooks + +There are some plugins that require extra steps after installation or update. +In that case, use `do` option to describe the task to be performed. + +```vim +Plug 'Shougo/vimproc.vim', { 'do': 'make' } +Plug 'Valloric/YouCompleteMe', { 'do': './install.py' } +``` + +If the value starts with `:`, it will be recognized as a Vim command. + +```vim +Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } +``` + +If you need more control, you can pass a reference to a Vim function that +takes a single argument. + +```vim +function! BuildYCM(info) + " info is a dictionary with 3 fields + " - name: name of the plugin + " - status: 'installed', 'updated', or 'unchanged' + " - force: set on PlugInstall! or PlugUpdate! + if a:info.status == 'installed' || a:info.force + !./install.py + endif +endfunction + +Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') } +``` + +Both forms of post-update hook are executed inside the directory of the plugin +and only run when the repository has changed, but you can force it to run +unconditionally with the bang-versions of the commands: `PlugInstall!` and +`PlugUpdate!`. + +Make sure to escape BARs and double-quotes when you write `do` option inline +as they are mistakenly recognized as command separator or the start of the +trailing comment. + +```vim +Plug 'junegunn/fzf', { 'do': 'yes \| ./install' } +``` + +But you can avoid the escaping if you extract the inline specification using a +variable (or any Vimscript expression) as follows: + +```vim +let g:fzf_install = 'yes | ./install' +Plug 'junegunn/fzf', { 'do': g:fzf_install } +``` + +### `PlugInstall!` and `PlugUpdate!` + +The installer takes the following steps when installing/updating a plugin: + +1. `git clone` or `git fetch` from its origin +2. Check out branch, tag, or commit and optionally `git merge` remote branch +3. If the plugin was updated (or installed for the first time) + 1. Update submodules + 2. Execute post-update hooks + +The commands with `!` suffix ensure that all steps are run unconditionally. + +### Articles + +- [Writing my own Vim plugin manager](http://junegunn.kr/2013/09/writing-my-own-vim-plugin-manager) +- [Vim plugins and startup time](http://junegunn.kr/2014/07/vim-plugins-and-startup-time) +- ~~[Thoughts on Vim plugin dependency](http://junegunn.kr/2013/09/thoughts-on-vim-plugin-dependency)~~ + - *Support for Plugfile has been removed since 0.5.0* + +### License + +MIT + diff --git a/.vim/vim-plug/doc/plug.txt b/.vim/vim-plug/doc/plug.txt new file mode 100644 index 0000000..6a5c602 --- /dev/null +++ b/.vim/vim-plug/doc/plug.txt @@ -0,0 +1,376 @@ +plug.txt plug Last change: November 27 2017 +PLUG - TABLE OF CONTENTS *plug* *plug-toc* +============================================================================== + + vim-plug + Pros. + Installation + Vim + Unix + Windows (PowerShell) + Neovim + Unix + Windows (PowerShell) + Getting Help + Usage + Example + Commands + Plug options + Global options + Keybindings + Example: A small sensible Vim configuration + On-demand loading of plugins + Post-update hooks + PlugInstall! and PlugUpdate! + Articles + License + +VIM-PLUG *vim-plug* +============================================================================== + +A minimalist Vim plugin manager. + +https://raw.githubusercontent.com/junegunn/i/master/vim-plug/installer.gif + + +< Pros. >_____________________________________________________________________~ + *plug-pros* + + - Easier to setup: Single file. No boilerplate code required. + - Easier to use: Concise, intuitive syntax + - {Super-fast}{1} parallel installation/update (with any of `+job`, `+python`, + `+python3`, `+ruby`, or {Neovim}{2}) + - Creates shallow clones to minimize disk space usage and download time + - On-demand loading for {faster startup time}{3} + - Can review and rollback updates + - Branch/tag/commit support + - Post-update hooks + - Support for externally managed plugins + + {1} https://raw.githubusercontent.com/junegunn/i/master/vim-plug/40-in-4.gif + {2} http://neovim.org/ + {3} https://github.com/junegunn/vim-startuptime-benchmark#result + + +< Installation >______________________________________________________________~ + *plug-installation* + +{Download plug.vim}{4} and put it in the "autoload" directory. + + {4} https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + + +Vim~ + *plug-vim* + + +>> Unix~ +> + curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +< +You can automate the process by putting the command in your Vim configuration +file as suggested {here}{5}. + + {5} https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation + + +>> Windows (PowerShell)~ +> + md ~\vimfiles\autoload + $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + (New-Object Net.WebClient).DownloadFile( + $uri, + $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath( + "~\vimfiles\autoload\plug.vim" + ) + ) +< + +Neovim~ + *plug-neovim* + + +>> Unix~ +> + curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +< + +>> Windows (PowerShell)~ +> + md ~\AppData\Local\nvim\autoload + $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + (New-Object Net.WebClient).DownloadFile( + $uri, + $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath( + "~\AppData\Local\nvim\autoload\plug.vim" + ) + ) +< + +< Getting Help >______________________________________________________________~ + *plug-getting-help* + + - See {tutorial}{6} page to learn the basics of vim-plug + - See {tips}{7} and {FAQ}{8} pages for common problems and questions + - See {requirements}{9} page for debugging information & tested configurations + - Create an {issue}{10} + + {6} https://github.com/junegunn/vim-plug/wiki/tutorial + {7} https://github.com/junegunn/vim-plug/wiki/tips + {8} https://github.com/junegunn/vim-plug/wiki/faq + {9} https://github.com/junegunn/vim-plug/wiki/requirements + {10} https://github.com/junegunn/vim-plug/issues/new + + +< Usage >_____________________________________________________________________~ + *plug-usage* + +Add a vim-plug section to your `~/.vimrc` (or `~/.config/nvim/init.vim` for +Neovim): + + *plug#begin* *plug#end* + + 1. Begin the section with `call plug#begin()` + 2. List the plugins with `Plug` commands + 3. `call plug#end()` to update 'runtimepath' and initialize plugin system + - Automatically executes `filetype plugin indent on` and `syntax enable`. + You can revert the settings after the call. e.g. `filetype indent off`, + `syntax off`, etc. + + +Example~ + *plug-example* +> + " Specify a directory for plugins + " - For Neovim: ~/.local/share/nvim/plugged + " - Avoid using standard Vim directory names like 'plugin' + call plug#begin('~/.vim/plugged') + + " Make sure you use single quotes + + " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align + Plug 'junegunn/vim-easy-align' + + " Any valid git URL is allowed + Plug 'https://github.com/junegunn/vim-github-dashboard.git' + + " Multiple Plug commands can be written in a single line using | separators + Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' + + " On-demand loading + Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } + Plug 'tpope/vim-fireplace', { 'for': 'clojure' } + + " Using a non-master branch + Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } + + " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) + Plug 'fatih/vim-go', { 'tag': '*' } + + " Plugin options + Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } + + " Plugin outside ~/.vim/plugged with post-update hook + Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } + + " Unmanaged plugin (manually installed and updated) + Plug '~/my-prototype-plugin' + + " Initialize plugin system + call plug#end() +< + *:PlugInstall* + +Reload .vimrc and `:PlugInstall` to install plugins. + + +< Commands >__________________________________________________________________~ + *plug-commands* + + ------------------------------------+------------------------------------------------------------------- + Command | Description ~ + ------------------------------------+------------------------------------------------------------------- + `PlugInstall [name ...] [#threads]` | Install plugins + `PlugUpdate [name ...] [#threads]` | Install or update plugins + `PlugClean[!]` | Remove unused directories (bang version will clean without prompt) + `PlugUpgrade` | Upgrade vim-plug itself + `PlugStatus` | Check the status of plugins + `PlugDiff` | Examine changes from the previous update and the pending changes + `PlugSnapshot[!] [output path]` | Generate script for restoring the current snapshot of the plugins + ------------------------------------+------------------------------------------------------------------- + + +< Plug options >______________________________________________________________~ + *plug-options* + + ------------------------+----------------------------------------------- + Option | Description ~ + ------------------------+----------------------------------------------- + `branch` / `tag` / `commit` | Branch/tag/commit of the repository to use + `rtp` | Subdirectory that contains Vim plugin + `dir` | Custom directory for the plugin + `as` | Use different name for the plugin + `do` | Post-update hook (string or funcref) + `on` | On-demand loading: Commands or -mappings + `for` | On-demand loading: File types + `frozen` | Do not update unless explicitly specified + ------------------------+----------------------------------------------- + + +< Global options >____________________________________________________________~ + *plug-global-options* + + *g:plug_threads* *g:plug_timeout* *g:plug_retries* *g:plug_shallow* *g:plug_window* + *g:plug_pwindow* *g:plug_url_format* + + --------------------+-----------------------------------+----------------------------------------------------------------------------------- + Flag | Default | Description ~ + --------------------+-----------------------------------+----------------------------------------------------------------------------------- + `g:plug_threads` | 16 | Default number of threads to use + `g:plug_timeout` | 60 | Time limit of each task in seconds (Ruby & Python) + `g:plug_retries` | 2 | Number of retries in case of timeout (Ruby & Python) + `g:plug_shallow` | 1 | Use shallow clone + `g:plug_window` | `vertical topleft new` | Command to open plug window + `g:plug_pwindow` | `above 12new` | Command to open preview window in `PlugDiff` + `g:plug_url_format` | `https://git::@github.com/%s.git` | `printf` format to build repo URL (Only applies to the subsequent `Plug` commands) + --------------------+-----------------------------------+----------------------------------------------------------------------------------- + + +< Keybindings >_______________________________________________________________~ + *plug-keybindings* + + *:PlugStatus* *:PlugDiff* + + - `D` - `PlugDiff` + - `S` - `PlugStatus` + - `R` - Retry failed update or installation tasks + - `U` - Update plugins in the selected range + - `q` - Close the window + - `:PlugStatus` + - `L` - Load plugin + - `:PlugDiff` + - `X` - Revert the update + + +< Example: A small sensible Vim configuration >_______________________________~ + *plug-example-a-small-sensible-vim-configuration* +> + call plug#begin() + Plug 'tpope/vim-sensible' + call plug#end() +< + +< On-demand loading of plugins >______________________________________________~ + *plug-on-demand-loading-of-plugins* +> + " NERD tree will be loaded on the first invocation of NERDTreeToggle command + Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } + + " Multiple commands + Plug 'junegunn/vim-github-dashboard', { 'on': ['GHDashboard', 'GHActivity'] } + + " Loaded when clojure file is opened + Plug 'tpope/vim-fireplace', { 'for': 'clojure' } + + " Multiple file types + Plug 'kovisoft/paredit', { 'for': ['clojure', 'scheme'] } + + " On-demand loading on both conditions + Plug 'junegunn/vader.vim', { 'on': 'Vader', 'for': 'vader' } + + " Code to execute when the plugin is lazily loaded on demand + Plug 'junegunn/goyo.vim', { 'for': 'markdown' } + autocmd! User goyo.vim echom 'Goyo is now loaded!' +< +`for` option is generally not needed as most plugins for specific file types +usually don't have too much code in `plugin` directory. You might want to +examine the output of `vim --startuptime` before applying the option. + + +< Post-update hooks >_________________________________________________________~ + *plug-post-update-hooks* + +There are some plugins that require extra steps after installation or update. +In that case, use `do` option to describe the task to be performed. +> + Plug 'Shougo/vimproc.vim', { 'do': 'make' } + Plug 'Valloric/YouCompleteMe', { 'do': './install.py' } +< +If the value starts with `:`, it will be recognized as a Vim command. + + *:GoInstallBinaries* +> + Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } +< +If you need more control, you can pass a reference to a Vim function that +takes a single argument. +> + function! BuildYCM(info) + " info is a dictionary with 3 fields + " - name: name of the plugin + " - status: 'installed', 'updated', or 'unchanged' + " - force: set on PlugInstall! or PlugUpdate! + if a:info.status == 'installed' || a:info.force + !./install.py + endif + endfunction + + Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') } +< +Both forms of post-update hook are executed inside the directory of the plugin +and only run when the repository has changed, but you can force it to run +unconditionally with the bang-versions of the commands: `PlugInstall!` and +`PlugUpdate!`. + +Make sure to escape BARs and double-quotes when you write `do` option inline +as they are mistakenly recognized as command separator or the start of the +trailing comment. +> + Plug 'junegunn/fzf', { 'do': 'yes \| ./install' } +< +But you can avoid the escaping if you extract the inline specification using a +variable (or any Vimscript expression) as follows: + + *g:fzf_install* +> + let g:fzf_install = 'yes | ./install' + Plug 'junegunn/fzf', { 'do': g:fzf_install } +< + +< PlugInstall! and PlugUpdate! >______________________________________________~ + *pluginstall-and-plugupdate* + +The installer takes the following steps when installing/updating a plugin: + + 1. `git clone` or `git fetch` from its origin + 2. Check out branch, tag, or commit and optionally `git merge` remote branch + 3. If the plugin was updated (or installed for the first time) + 1. Update submodules + 2. Execute post-update hooks + +The commands with `!` suffix ensure that all steps are run unconditionally. + + +< Articles >__________________________________________________________________~ + *plug-articles* + + - {Writing my own Vim plugin manager}{11} + - {Vim plugins and startup time}{12} + - ~~{Thoughts on Vim plugin dependency}{13}~~ + - Support for Plugfile has been removed since 0.5.0 + + {11} http://junegunn.kr/2013/09/writing-my-own-vim-plugin-manager + {12} http://junegunn.kr/2014/07/vim-plugins-and-startup-time + {13} http://junegunn.kr/2013/09/thoughts-on-vim-plugin-dependency + + +< License >___________________________________________________________________~ + *plug-license* + +MIT + + +============================================================================== +vim:tw=78:sw=2:ts=2:ft=help:norl:nowrap: diff --git a/.vim/vim-plug/plug.png b/.vim/vim-plug/plug.png new file mode 100644 index 0000000000000000000000000000000000000000..d33a43def237bdf9537010a3ddbb6b4b606206f2 GIT binary patch literal 23247 zcmcG#byQT{_c%;S44u-YbVzrXfP~~AJ%E6eba%Ikw6q8a0z-F53X&2-gQPGt3^4+~ z%k%j>-}n9FyMBMXYrS`|m^*j&*=L{Kd!KXTbhK3Qaj9`pP*CvIo-661pkUOXprCSN zKLVco>QL7KKBzpE!Jc}quRVRN+-*_hZCoL?jB3tScDA~#?{2H-ucdG8?`SPV2 z__=sm`SQ4Uu>6Zb$=1W#-QlgLgR2YU14b)|tCy!VGeGHomf-wWQ}cfiyLkMUQ2@*M ze68N{@$)|8b9R1M*FVr6p1QXG4;lX}w1>XmTU$O|TMt(+cWXc%uUY;b4Djy%KG6dp zK#hd9y8|E;D<>saYcFS87f&@MX=dOTUKd%%&Beph z%Ej9D-+3K?dH*|B@c%kiLebsU%G1?d-__OWUk%W)clC7juy=jSsHi8x$Zq7|V&m%L z!SNuT|EyNY*4@F|)<(tM)tT`h{z^FfFY}8ki7E>!s0fP!6g;e3OiWo>UIAE$n7p7c zzc4`if5zJUf8iM)Kn&l5a{RxP<=;nu20q;WkLm+o{>ON1T>y)52TWsMccc&n#qeHD zNnYP~0iKKX$;_bP{xWj~UF|vFv}GZS@>hLgV(zkCWC9&I{6?Q1Vdtu?tgPG<6Z!SI z-&7iB2R3$O_KN)<>6ZHjF}n{xY*;;xasw`3?ZA&N&y4f4Uc5e(2{`cZzRqo!b1B#7 zME%E%fq&gx)!mr?ep#c!;QsgiEj}8>zxU0LP(lCRn?{8G4}6t;H`>3?=NK*jMH=cz z1bCePT;0Oh;D7JesQ-UJFYShkBFFFG;LwAEf-+j#1$Kq@TrU}SA&B?cMC2+nVDJ9k zKWaeA-p&_8GW0pqqMAuiPzq@F8K_>IprObSOTGn&3iYRY>irew!bJL6|Lq>B2zj~x zj;t%jSsy{V-(_kuJuqVIf)HScocw>`Ct^90;uo0QTXuf5BRiTI00^0(uzxti;r2Y1 z&zz%e%^w9N^yWV-3jGLMEi-k0V38;Kf4J~G?jUhEH)vq zdsX{`oplcNvpkLxk*J{;j{5pF63k8LedeTpH&H`g!Cym7`tOKw-6vuig8L{GLV0g| zq2sYZU18%I8Zu!rU^sr*=PCdblrc;aMXn`_(Ypwi(?@_8ESz%Sft0&Dicz3o3RE7_ zogi|UMg^pi`^y9_1@#g7b7t|>TXiUs+ua(FS)VZsEO*C+61ol596BZKGI8n(pS7A> z(xS{^6;Xz3LsBN&Y5XvGQFe(&_1wJd^L%H9!B9uVbVedz^6U|@Vs~P|N~jYK-%O%6 z@Qxv2`7yuajSjNN1eo?;LKpkBaE;$8p8`U6O7Q@U>p1{MYYwV+XNLir zL#-eS)l*0(yN!P5ObIvmebdQnGYM`bzr}+Va)`>HQFL#YWqN`)1y*TmYm9)A_Vk;8 zh}l^=m;M?JHO}QeZM245%sGEp9p1k`c(+SHuf+tfLKly!aSGIh+o{;@{~)DKYDj43p11IAVGhJZXk4*mlAve`P}1xecrcy*6UPM{FrXGFX|s7f{yNUK>t z8wJEN@wO6!`_uvzML#BQBKSQ_w$D65^388w{^hTCVFE@Zs369TUs_d)inf=9;s9aP z1UO5mD1k+BEi#V@vk?G@llnQ)5-<)?Q0P29z`FX9`^fQC zn?_fe5$gg5xBz6N;wQ85XW4+A7I38cfnou%z&?gScH%X0Ht(HTJNkoZYI}$MKNczg zD#+BnFn@7gtoA@~{I(I5qrM2>jJm%#RwL0%s|PoQpc?%*lpV|upicX6|JjKr04Tog zXE0xJ?Sq;LXpyyPIH{Tv=aTlh;9-snMu%d)i>mR5FlhoFd_sryae5N4uJYo=xnOp0 zC=6xEY9JUg7ll?@2{^Fhv~DxMY*v81_Uwi@OO%G3X|{k=NK`N@M*3t@xJ+wOV49HL z1mBYf0xCVdr3okhA)uc#42fq-h=L<1VZ*jg7sF+GLJhqK-FY*6;h<5-VV}{OC2V)K zX8jj6+AKE!9C!Nl-B#NIsZp~M3zU~|UM(sL^?_l3lB>4-`5UQ$l?hQ)@I-EQp@ow9 zIS-i+rwo!;iNAoSFiDm-5djtxc^q2ocun_TefZGKVu>pErrjJKtusNZfpf|W6^wU> zK9IV!y(vLY(H6c9;ItQ00^GAuzGw`0)0Cy@OZH90A78EAh9uJd~ zNp}X-znljUyu)p!J79(eHy6G8EAOOwL>U)~N%TFwy{^GVeQ3oH0G6|+A{QVYLHp2* zE{9v@>y-w!FntL=SNg6I;eq;(HkLxji)-^qB$EJ}Lb1n9SBs46MhmU=cs|s}#ataf zUImdw1cm{VQKdw}F`{AI6q4rfr`Z5-0mlm=&dY1{l3J2Wbh)^B9vksM;_Bhv!M@~E ze>Y$R&2>9$DRztJhh&WEKM~{CV>|uB2Z20&9RPJi$5|X1nm1o0M+I53@WtjnX=GI} z=8LCe@uqaa0%+khM5DN_Mk%PoBh2y@CNcU*vh06vmO=^WP7Q}>LWhx)8R^KxC!=c8 zHaZ`4fH8Crp>$x<1kT5l&>eny`V!jFZbtUtg-qGK!(mgbfsJ`0&80B?B|H=qBFu^> zhfm&Og$kTHLL=TP{(1Rr*Qh7!bz~^!1i$}>Xk5*t_zzQM71sSLq_s;A&Wi{O7yy^ z3`bTa1c%am*vMg86xj<;S1(aW^&AZ2;Spn^^Ck{RfT2R#;*<8)e6|y$X=_biQTJak zx&W(srdVA4g(|Hh_h(&x2@XmD#{Qi1sn@8zROXY?XeUXln%NYh8YduLVFmR!lI*iI zzH)jG6IcSwYVA?bAJ3eZ^FcOw9oeiXq2bjQ0kLLm-j7!_D3aJ$ws9IN*P*MCxZ`6OozcG}g=F5gZ3Oj1H!j?%h zY9wELmaD8H;68vDUMnzGwqy+CE4ayD)WrG3)YtI8>=xQ=zxM^S0l0JwA2PGOjS)!O z`Xl?^!Eb#3%`=8^ACj8`IGF&zOdeMk2M2!XI6yrg1`Wp>5L9M8ApKd5Zh~dy;UC{I zc#8I)9IqhJ{x01)ahNqu5`~Oh+BsPd%Sz)ihU&lbsSHr1KO`XR%t8H~2{e`<`25tA z!2H*Tqzky%Sq#x;{h=*@Gr=8lfRMVOd-g1T!+l6YfYk^HtduSJrK#KU9Abrr^S^-O zEuk2^tu*NQ7kMQ{CDj96L#6%EYmdspgG^q%iZ&rzB3(t7Q`jwNPk<#uQu|cm@m=RA ztB7)VL{#A~p;-OfPWG3crAZ?51Yjt-(7k$7ueb0Jj5Ij z9i(6>V3D!l8?U1>|Ne_txz|C2#J8v^b-(d*&FZ??ws{joL-;a3^{J_E`n#nOsGNU zM~B311-j+jTskzt%tS$$4Q@Kmh-zM`e`WL;=iuRq8OlhBhL0|XYCWn`DN5*T67&9% z)3?GVB66whsJh%WYEz;bF=CoV7%8g!wV0rhfoQR1nQ_|t`_%Jbc0|6`qGTgqaH_0p zl7cdq^ol_$sFOGUxyXmXzF<~wt)U`@%H3Q(m(};$kFi7x@sd=4v}6!+DJUT)KY3!% zUodF`ekVkd)H!Ki{;C-J)v4Q&Cls9~P;?oynhl6>oQ#C$YN**)1=7{VX`CK(K|3SpmIVA9Z&m9^^4Mu zfkKkWf=ie>Y3wE!#@C;BG_YeY8Nz*J9TSsmp@aA4xM7v2vFjXjzeD&H)@=*|OVDE# zMSn!UrOPMT{3|XPrUEi1>ur74!5`<)CfUI+3t3ArM4Eh-pm&_umdH$Uhpi}IL?!o8 zJCs0Tl7p8wJ-kB5{gjR^qyi*o_l7f*dzAC{;x#g!2Xg6yz2Sfm-nbKPp0n1 zX&UYqS$-NNoO071ZJJ-T$uEy&gEV(c*`m31In((rqPmS*nLgaE?B1=;{PAy+J`yxN zvg&Uno;)^aW)sS*v+X+Rcuu5*^}vD z@55=45pr5`aj^COI!mbFu~LgB6oHkLmnLfH7j!d=3~^_YMF^YI@2wh|Vcbw5(vT8l zHI;c$*0f8Y0GgQ~7o7ZxTMy!;z4gbWj&pEf@U0a+ul21~Y=oU@t91+pl4lFO@PV6#vW zmS4VjQALpT_Cmt$ayaiA!~Gs*ErVa>jCOfI>RWs;+(q$aA$gMSO$*FIVdJdJ_wg_8 ziRUxdQlKh|V?)SmW37vsV0DY>prs!d_VkKL!LlvGs|>F_b1OL0hQrb7kC2(Xa-wq> zFXg)zXt_`wKPy_$I)EEHJ36cTNKNS`4Eg6nvRVpT^~Ai;ZtS4@blf)*3Zxby%-SFG z_RbUD#d*5ET{7B>)X~O~NVG!#1eq!QgVVa-czjRYP`((}nGAcBd? zWu2pQKe?P_ss7o$a%I@>)3onJ6hbebEI=RrZ460B4n2qM5PRKquqw|uzb}m%$bU40 zC*-e4x^qN_vis|m9|UxNNe=}nG?t9eaCWY8io8eI1@g_Kt#C>|pJb^y$LQBk*wD6f zda@G*KZjS%3e|@U+P{hah9-CGG&eOx;-wW4+8}O-mfl1QR;A8h(CDu9=h|`8sXOgI z=lQ#exDHp>UZ&A`C!<6eLOBcT`np!4Fwx&*C$ybD;jC(eneX?P(Ycc1Aa|?FzX^6P zksqLmYizSML{cxi(RN$6ru&e15=b-6wkTE?424+%tpzdWnfz z`sDgGQCON=q}6;j zeg4cO!VE~0)SViG=P2UK^a$ z5oYs-(}s7sL)h=!^AWx|N5V}*TaXCQu51#sbT*^PW5Z+UQl8xOU@ zT6a9cHtSy9!}X_ic+NCNlR@`Xs>>nX7Kz*nN$vCKMq2XPjj~I;Ek)%v27ySq??Ksl z%?Q)GAdMk+b7u=nhP@|#I;hnq)qd<7k{-F1Y?h-q{R_I)jzrRyMXKz))bn?B1i{In zGyJoq&mB!V)Zuw9!DD{c9>E@AhcmS^(qE&)fFA+9&Y%@5cVd`cQimrrT}BZcui_b# zj4^Mw?ZsC&T;H8RjAGpLuiV37cX%w8FC52WVfE5s$G;%1oXregx;Hau=9glL^@_Clh!@fE;p$Wmk_z%3H5AV`G~!GHoF7f*`{NFs&lram1jYpAwZ{kE z9y}ma$C7g(6d>MjcfH}~M1BlBT*W&_DXXJHc2s($WNY9*$RxRYYA7yD#nysKfV>5s zDlr;Y6OD5?V&Ck8t9k{x zM|qScJsoTG(l);nb$Go=161#B<%&C-v2m7oblgswGJ=7Ld&3k66Jw+LQ2imib?BmbAwyb!-(VBdWP4E?#wf%<8GD2{WEvmCioe zyDXG~1enw_%wn@N5_%{0Klaj#WlQgrbZRYG&90rJLmffo$XBojIs>Gu=5#GDNSYUs zXu}D-zQ~P7&nvYnHbJGeg`gfjie3M27~IS?A_6QYH{;yh9z~PX$aGJ<3HD>_@a02_ zql2zC`7HiH73r)a>*T*?h*ni;I3{XE@w{D05z{z@>T0q;RqNMMEtFr(25a|Y*7&0~Z0@FmRiNmY zvK;j*gweep`P&A&CNRx&U(P{8Gu#0ySsCZw75-TKmOP#d(P1^gg9o8*0gWJ(#7ukr z!?34_^6l>uEsS&Ozg>`aJrR7K=F2$&g^HbIe?JAUa1&52j+Z%&n_&Bhu%9)lc-@Af zhm`7EmX!{%SbAy2qovOv;(_;y{Tgunnd<xiljf(_2Kem@jsKcr<_ zXX^CoZ5Zq(lGSUoJ6vDqWDk1@<=mmfsupHGR{e5E*AUC@Cy+yQS4Qs34BDHU@Z?kO z=RD6B7FtJk2{tB}=H&@k@K+w;N86T~UVZ_rRlNME`yA03UD9wPOr|+)9b+yh)bJ(DbBVzEvwJdS%w~SV4MT6j=ib7WsVV^nJJ7shy zgQ8A5+dHS9KlZ!W?-yik3h!U-(1kCjZ@iiphJ6ykb@)#4ef!KGY9Y}fGT?)>vr_qe zamjAk5Syzqm*#|QveoIU)$cR5HC;tj+4`b?S+=-CT+^7y%V-S(QxJm3@9TVGUNmPLC`uEMOUlEO3dO|f^*^;L!t-0C=>^umX6tF_9|QgK ztM(Q1)RUv(w`g$)2NQ*;y_mD$!;-+T@=0RJ?eQ0~gL8NO3tdDBvmg80jUJDdcdURU z=2o-TndT9$8b9j^=%>CU3UG>+w6a)=e`h94S0>;Fp=zX1cE+mFC3O51Z&QN1Ljx4j zcRS5j^D=T&$lm0|@L}YypZb5xh&N;P4k){CKES-*DJ%EAu!8bow*7h`X-(3L^JKcz ztKSRKMbReWnfJ9I12%arc>6lW3npRHQj_QA>#Vd4lLgTS@(;hw-EgbApKa zW=3SfJgx)FT<>Tr-i3gN%%{lz)H@xa8EW*^M(-T7Ox1KQQl;hSE^pB57?$hTXuY^n z8Y*IhEPQ+K3J<=HAaBc?qxMg0Ky8!O0XvVbAzE9i{cxv*P_BL(!xT2 z?Z)<`$TcyUPn+wIT{E6x-g0yo^ISIXU#;w&X_X#yeIH^NRLU#%52jezUXy{1mmO9x zgD_?a#8YO)_9V|c10Bm`DC<=4a_MW&iPO+vG_=*u$j4W`HxntcR4btJ>02)TBkK>% zu2c!42~ZX`f}fIguowI;CXJ6_NCo9|NkuP{tvzMMSHcc|u)_0yG34Y{IL5(B`;tK- zST8*>)EbzgWSlijKY?C0&7Cw|#&sCN73{ng77Oz)N}^^EZn_v(+56zxj^A*ZtB{`Y zsvL%d16D+aPSAPFHpz|Folgp-C0_QQs|D`HFAUCL3$qRS*Wh4IuMm;f{X~HFMTL?F z((1GncxI0J{vQ<++cy z=E8kDm(3*lGL`7PA{Mer;-9EdW6f$E}5X?F*l?p`^l)I z$Uo9w7tc5%6Yz$mCTlteF&5ENbjt(uM=?-GURrPBCAY)s#BhaQqoOO#!cSb$D zQ%tTE&P+#BOt-Hgc9O@}6S20pX7CEF!-gKzg7%2oFk-m8-T@v3C_b0l8U%K5u?GnU?v)zI-tDPwA@PN^#!=sBiFJHfj&Y6OEQ z(elBWN-<~t8~CaI9=(CSO83I4V&||uBQ;eyt>$AO9^S%acColDeiB@;@g5OmuPyn% zCzhoCqYBX$Z=QSXTJRGf=Ju1zvV#rT=P?Z}+(tDklSz9v*GU(p<*UqneUhrKrsqf> z@#aTK3b)GWvf3=rPU^tl(qV1ntIyc=qQ+Rt0)A!bmFpMfDGY@dIS#icP5eIZiGmoh zNtIiNJ4*KaB0vxl{9R#z7*k(g>b1H*$IwQbwd>1sooe4~BiJjA`|9I9duM2ZU3$iy znQ}DUwc(X_VFk*j*&)@uS`v&H|K^`}X3+p4X8Iyd+Qk5s8ojt+VY}lESiZNNgv!s6 z_QU#y-&+@|TTt(ySwuk9GFq$?~4@@o6mqDwpJiXXT0TC)UPFpoI6xt`-YCjAyhoK2W+Ef2T||xF*^& z2TB*1yX}FEDRu8rgHX8)zY8Z|S8@<6Oux|`#PDHBcO9k2f3H2V8yfX~; zc>OU+*u?>B$lcUCWk&D@&klI6C@IFSM^Qg9uUT}s%t_m$qlr4BT9Wr}wr_lH>B~wH zLqbi|guBd_{qEOTIuDy`M*+o^UR_*`EW|af0}9>L#D$5u_^f#zwA@8JY|ZqFxq27< zqfF9w@;(GOYx3Rx&*81uTlPZbUN*&|s6f0xjEBdxjDdTFlS>2E#Wqg6mNv)d{)TtC zBbNMR!fMi@2DbLEV3myVzxwYMp+_TzKDiM~)QfT0U^8nb%cMA+Xyx-X`umO*`5b|s zeo8{>^bV;WiR#zvVIM9XoUhGdS-2f!{fphq*rx9I6ys4WI%~eRxi|)lsUf@6odSAK ztFhhOH$ELWCBKZs=H4fr6b>oE6)zRK^6=VUYRW}+I(daO>z21aZkx#a>DAWv`@HHg zF}U1?VS01kI&l~wQdR;_7{nhj|7e+Ofwx91Enn3HBZ8Vk&=tMazbq64CO>;}Pj|bF zdVTcgvX%Vu``U(3dn2i$BdP|aE~OIp(Wzy?@YHkF16hGCBc5XlFRN>AU!t0!5c2QP zfvrLHSGN#e?DijVs|oMW9rIH6#WdiLp@g0udChi1jj4yG1=mK#d%+3Hg#bfz%JuUc z9UP3awc*zM5(;e$)bnY2{f9mipNsL10$fQ=H7vk{$94E4jsB97b2Vew;2A+78|L@% z%Kjf-FaQS%#vg6nA7-Se-PAET2X}pAoDsagHI)B)aCA8)Tih0?17BNXlkX}Cog5Zs za&h+>-MbP(4HCuQ1|$<^6?`#~ z4>2viH|O$>hUI`HR=E_Ht83ZGP%9)nY1XTVM;s9xk;tg4(t_OlD-0joV>if0EDQVC zTeOYVaZ&Dou)`24lXoy$%@?@FRsqr zAH96GN}H)&bg0q|>$ZJ#mg)dWP27`A_ zSMK8R+b1PRUe$MzxX7bKd+UocuhAC6q+lnrI!*v9^~{y=kA|<2w6iey@O_i z9R(Y)2p6tKF+L*6G=n2~;R6mYsZ>e6)qMJ;LVo1p-&@p^ukfH8FEpPDQd9={te`p&-7v5HCFQ(kJBWRPHH4L)8aerjfc)LTf;i*Zz>Gd0Ts1!BeAN(s8m!m z6*g+pH{C4biR*@hQ-&YV;E&*p6+|uuuA(HVtoo08cuJEdjx>?f}UQFeXhmo6fXaBC` zQTsiHVFZ=B0e0=vQ~e1q@2^m71JgT}HheJJXg&6m7K^GQ8t1Ozk14)wk1GtLrK_;` ziaFmf_SW88fg7<_Db>3DLpkuK<5Ys~m;JkAc!Au$0$-xUIr}(^6WsUWZCPPohWHzG z{E9|guFJ-Wy7MS3{@$;L)Fme$Ud|hq_WQwJf5A#m#MK$FYjLJA$&2-kal7To=O;v) z9kTR!_P&WyKmCD)pY!hb<$8fV_W0h87ghyYW0lzHl%b&p($FSi5$jW82i8iQZOOS2&XLGavY6!AaYPCMr3ePjs{xrHqyah+n2$H7|5lpHSn z&;3j=iNT{isiC%6pYLU`E-XG>b!7Ulu-y0~19~DtFBT$^^7}G1&#$XrwWK@XO?Myl zZ~Om)nZuu;a=M97p!{qd#D^XjKlz+PCD)kGewe@nTTqHtwNvOMfEX2I0Z#FvH=j6g z1|x!)oa5OorAY!iZLmV@b%qJsP4UnSFM!%s=t-9ax-8$9P+?X0>lo+ER{ID(_C<;R3b4+=%9hexh$6S!ZyuB6 z9AN<_RRkzzXCB&@fNeF@)u}6|*d@{BEtFZWUc~N4Fq>auLiXuISkTft_@q38v)Agi zA*4$m*)GyA1F}vU-!_qPFu3d73rE`qhC%7{_95K9*|Q(Wn%kFC zYsz(hO@hTO(LA;6Uy>0Mz8b=sqEC{ea?wY;2wZFB-GnmI!}VhEx()9?Ct{JZg| zFG9Bq8b)_iN+^O+%zqV$qlQDt&nXbnqATG;qq;0X=5n8@r_}mIF z&{GhBs9FlYnIzZimRNOIGzK~feUw$Kew$tD`zuYROX*Z3&90x8{0ab_<05srpC8K` znGSmIe#bY0T^WP+lk>PCU-e8L%RYD{CHC8ex7CY1M;334SrPoJL}Eyra{KE>LYMex zQ{G-mn!t6YKZ0n6uTuRG>iM0P|WKK|`Mdja5mm~bmG-@PyV{A0)QFSI&BQLkpEN@|2{oZ_bm51iKCii-&J2^(x^YV^UYS15KDbq zX&3zBH&M+Smc~%wBGi0h59AuzptIeDVKQm_U;JYZT=0{NC>2Ev!vTFZna3ZFJBF^t zuJZhEFNL^iP%CKB(p^|gmGl(Gkl}TG2hQ@{U-5%_>v=z!C2pci28TRVN_BBj@OZeaB4ZJJDb)G8XR=&_R-f4yfu^=$7ibfR#>}l7h^yF zl!B&_NQ9o;S?cLU{hJLo+H1=KtNHz;{XGBa_c5I-5qyv0@U=XH>k_Qy&5Lx9H0jbT zAJNHq4Y8hQsrGm7-ZB%{ykXlG`Od%m7g@|~zE8GuppuNo+B^*I4Ick`*NeyIO@A1| zTthuBWH)C$Gmv*`VT=o&B?h+_)H1BC_Sdb|by|EozOyYTj=zK2D@Ii$gOvf*?GO_x^jgM_bs|4y_ zC9Q0UFTx#AZZ+T0uOiSXIL8m)|E3M5hg{*6`5xF_M%mJL3pg=3ZP65>pgj_bB8&>B zeGvgn0@a?c@M%kRNs|zo5;nJz@--4HGuAw`TTj6M%>8=Tgr|bX2skrw2H{FvY|B{h z>#W>`Y=zL8rECW;EC6*0X@`}{RuxX;qS_#J`T@`0_fuel!?J|hth3l^UXO11KAjkB zOH$+6>CdW{yE!4!RmM)an2PwC1!E(2A>AV#Mc|)A;vOwx@$?Sc{RSCzK0m?uuAjOP z9mqfTy{18#6Oy2a7%Ec2hU?5+| zx)K_Kj-NsuKQ(39VhpPXt`AdkCdHe z6x(gECd}0L)$+E-`8{PL@>4@03=pTb#A(Eg!p74Le-j+=*=a)%EC>Xm zy-bw|e2;*zT{N9a;N+0RGc_u@<^6F;4t%yy1J`dNaz|TN`65{^i)I)Ipf^IhL@aS3 zf}p>$-h9Me&OH`^O2)rJ)nckl$y~&4D&KI0I5V^}UJV6we|}`4uh?ao!8Y*qj?*TE zpR=vf^=S_!pzVUmftG$Gs~!VhJDB7fZAER&H*EfVU}vUj<(ksXt;GpSp(xk*+njQh zaxr809oH7JLGu(=8hBEX{x!Dg+yQST+=ulWF1J5tM}AT=@>6 z>EJ%_r;n^gWtu-L!R>PueJ&COM9bQYnYm`n=PBef^|x=YGIgPrjtgIg35{zRyRy^k z=lkJydrk4d5(C)+wRc93X9GT3&3k-WzE9l+We@a1@~v85`s%lH_W$^R4ZdTmYH+!a zBMNt3}@z2_I>`pD?cW~I(z&VdcSAlB>NV|cST7ozlepHrRf zHI<s?uGRb*iPL?qV!`%-=i{8sIqU)3ZhOk`KD|Ey)3F z7;W{Bb!cwF*Lffz+$KObaZgU7!i&iz{P2zTEX>TwH*#OROK!9ujot!07sBdHFhN$S zwAJ2Q&oU2=gwz0uD9&6m++5M2gShJS{ z!%UVl+CQBmXILE)p+P#U66X2^-jMJFKHa=Ek9)-|ApGTfY(}UtC3H4+-+W%4R;D2w z52v*FoQ*yrfCjXemOXJUV>>jR@P83y><0P0gK64+V?;B&l_G~$zDX6LCtrV6MQPHF zR{9Qf1>_|VA>H9pErn~S{}&)+99V)8^-7B&t-W?k{j@1RU1Pi7*e>=Rg@CHaCB?56 zwQ?mc;|{nGI$2zCp$4-2EHz($gq4(z&^=y%^@Xf57u>x8vIUnNJc|^Vw$R?3A1HJB z(5#q6`7MvR##?|JskYHt%DeEa(=HMFPoA6|hh@jw?%irwXE%oQ#C``V@dzk{SW?V} zEi8i?5MmsMr2%PJ$!~*IR*RVJw&qI9gFXyO3ox%I&%SKWLz6^jTV^yh^gKY0}X^cwLFrNB!dvhBlZj*gyq;3zH&C+CxVvRX3PA95Imx4s&`=~==8CL0OA z9?vDE}(>;b<6E-lq)f!&9S-sl;MErZvf#6xFfOU)W&#7IJ_7u>P9c@&c$!YaE}Kp)WG8bs*fB+!z4^;bi#$#rLs(oMl~T0o46R2 zhYvoJn{f6$@o=8*1Y#Zk8&I4@g7-P{q)98fSiR|N9**VrSqA>Tn3Eah#7gf(z4IwL zID&>~_*L~f{Bk%0nqR~w|(7F|>t9a+Q zx6VBilQSTiZHWetfT70D5DA+}j!+E=AfZ4;%=F|04BCc|pp2Pov< zx+ESonrupAgAMr{w^cvgEAGG{U=bi7?xLc|k}jIVOCeltKSsXK*g}9;jx^wErnR<2 zHLV^^2AtWHZ(e==t>S%L7sUMHH!r*WSt5UXm)#o3h}2Yz(MADl3!>lowyCH;j1a-k zjqFrHdZui&ZBh6UZUhWZ+F5d0zUM6ru*aCS>u)4ScEV~gf(n?g=9v<+EibeJX?N53{_=qLZGuf6d5)f!yi?W-=D!kOuAleVs*Z-+ zp2hTkai^Jngl2ddmp0T<%wwr4)bjHTw8U#@wblBqKAg||bvmg9cqZhL*CY0s+XIL7 z*IsCaF2upZ&3D-6=NGe=;eg1ytmf(a>dYd{(C+82d1>uw`QmRGZA?HZlt>NsIT5oU z)KfdCwIYQV;@cYETH&*Yx4u}@LuX{-+VY+?hLDc@O1@^M5EB*zSu|&_ad5CAZNso^ zSuaSjy%rM<&@KbQZxe8U;~BCb^T79~-hLygKOOB39WyHlAhI^ARxIbZKJ-oO^$WF$zF)P9<5N?4|-)fbqs0d!?tka%Rux;KBQ%k?#y&vI#i zanIt@Ej7B-AO?_G#m#;gq2V=$FBcAfO>#H&YtuWRd|5pxxQ*-nP8q-D@Hx?Ienh@P zX&YTJ9i409?uP(R)7fc=qq%F+@Pe@u8nyW9f0|PJ!byIby=G_OW9b*QIfgM| z6!$`^2j&Vfzmbn6-Qs7qL7Tn$i|S0#depp&^!)MO>L}r33T#&Tui+0WJ+cEvo=TP) zz_{sBBhpycfCV)q`LZz~BzqtvhydG4eT; zq%JHmA&!Yo@_Q1~c#Z78zT{G1HSHjhATHxf!=)F+K&{}nr>_Lg*=7FaTEuF4v1-}m z?DUXpf<}I^&pmByK69^>_(+q)OKTg5&w@W9GhG8Wp{u_)>^VGdFeb>ytO#&(`M%NC z`RUdECO!BA-w@A)@DD{5TLw$`<#!M`4)@uJM-ENFL^~R#P$W2RNp;gArzPmPIz6A*ob2e8>|CEXae z)FjM}w6yLLTt$8MKz!eDgs?<@rH~-n{*=yNcH9cJQBJm03BpeBpFW_2C~Sq~{+Q)P zP}QT}J@uDPm1Y*%7`bQ>6&?i~aI`henl7PREYVU0;6(( zNTYk|n`L(WTP4zwOxl z-hC~Aq#5Z;K>=u`_GP#&#;i@TdjkX97VK(1i~2YsbmlPx2b_IboVAE0>^jc#)SmDm zxL!c)RKfudk7e80wP?+hoNo`d7!7IQT}R{t$FgwfwN@Zib^&Wshbmk2ws4Pa36udw zOW|lR(2!>JS)z<|r^On^m|LL~B(3h+!mwk$l>PXa4{f%BC8Ly$wPU%aQ&i$avM4IW z&Z;2dhSb?9=d1j$Z1Cn2sUFx4@Iu7{vPaUdBve+|b1P|KedGDM9}tX{OMnexa7$;| z=|F(uNw1u!=3(67THXcty>Kc-AyC@QEd&yrFz}E{M(`${TOdJU@+dM_! zdGq~|YLu1x@DK6?p#il>e;em6)*!?Ngz)2MY26fwQ=lw^?d_ozZQPbEpNU3j)H$v}X>N5f*Ky_qMRpC8yCJ0Op#k2(4vm3r&*5>Zn zD8x!=rz->3<$u^MehVry?aIr2VmJ+pik(^Mla=(Eo;AMt8GJvdx zo24e2&7Z-SX1@}%QdG&ju5&JI+|L;6AFS-Hpy%dyLa(s%ND>s+{`?1700dapM=~sukZH=_$Xl;Ek;GG#?uB?QBZ`xOZMj?7;YR zja4xjh?{{InBG1^jTq3eLERtI2}B+9*WIvU4&xKa2bUQ7oOS^T${O5XhTMw2M4_h* zf4|ufPR(}LnAmyt*h;#u2A)fL0BT>xqOW2z)Sq_H3LFc>>V6F9>Ps8c-9QSl<<~7R zjjP|b>G3@3&38a6FmhTEU};;P8pPGXoobbM-wHgKlY71spBCEijA3qRVrpt?@rneY zSMCk@fx`CJas2Ylee7r9uj}6CGD9u;2jCs6Y z>)3_rUO1TiUW7>JoX^L^=h~ZgY0zC~V;s`_aW(C9q1hiX9jBGX4C*)$#-l*`rjA^F zAq`3Grt3z<1}7Dlq0Qn$K&yDW8m=)Ck?3!BKilhwerwPBw5m# z#w@`nxmdoB>F>T|{xET17u?7-&rrcid~xA7>YHy9&6SS_KecWP_a69(CI%^+A4CpC9$#`%bOJKH79nn94H$cj(7_YXlp|9Y0 zc;2O2wNXUFOTY;vLx^3>z}DBBc32GUv}3%WEQ_VHdVh1EH2I-ig!{#lVduqQ z<$N48sAk4XVzNEd)XEcB`EuSIlbi7NkN{#7+06WKtZ`IScziwR;Z@5&n8J(@sZh4Dk0txs*s{%Y@qNCp=TCU%$GM+-?tbpM_uTWITp38ty082$hG3Fn zZD1F6&bi-2NxfVSNfSI86=Qr3Hp}KpV-L=AdG4IGB;xnzS#aeA{hsY`*Yx`trsT}u zy@OY}fRm+0C?UdyussR$6HA*^aYVrfkFv+L&lgsdpU+NNVvQh%ep+q!~?_58`pBMubTnqNV~ zKwXg`u$2CoMwWmFxo8dedELEdkIp%<_k=EJ2>|7nams<{(cRc)N?3^DN%DX|k;YfEN)X%OrAZR{g+_Hm`VUjEH5158O_db{7JEDRJh6;W^z*~R&# zk5^95X5lYT{%oll{Nzq;>pIN&%AvDk!ogAaFb3G1*zau$zjs?pP3T8#tjMXsu$+&Q z#vtTFJlgP%;AoVv8xMiPZ4YN0keT#p>Uk5@`Sn(Zt@g(qFP~4tT*kSs^%Tp%e9~RI zrIELWgWc|Zypa4OZcB6lLqCHg!ywE2T3pwmaG)|}dUKwUYc5JGOUL?3F~hHo43I^G z6n1PT6^$?Ivp3-h?46Xt!jE-O;f_SjO5Mpyyz zM9nTco|@P2xQR~hdS&2F)Y>p@+oA6KfwHeZyyZ0ngce`NKbdEOo*aS|EkA%`c-TWQ zuWAjHW}1P=b$q-%zuV?<3y#fCD{fV%xHXv*_%kNeoBU1|t>r9K)m%w$?-;=8w5|5} zp3+P8-=aB31GbfA%6ja9l6uXA%$zBO z#L^@V*cm@pWa@;B&FGWpJ}0#y*Ppu(V-&LMLG^Vt=>8@tUX3Wu$_|yHJCiL%?W|`&r;7gM`J6@bu%hiti8CN?{_#bnfU51 zrJh1D)Z?83<90-0)NFw@*0B)2E!iwTWp#K;!@!% z&)A;V1x!za6r#Im*EO*xz(&L=n;~n}HSFuFLCXnbx_%7!)ZTVuq5rp&L*9-;4SmAd z!?rqbqnYKJZn60F$52a4VB>@=K@02<8PwM(?K|Nn$5h1ba=n#Z|GT}VQ?8==5ttzK zNkN!aNqn1$zV$*Q++J{tovj-FMQCWk&)7MNwk%&7==707?YDD-;Fj8 zN=^2IRrRl-AMNLM>K4X3tyPILnICBGOL~sao~KZM-|B!b|Kk>c^j9OgGY`><&2M}Q z@7%eT@4IL9@=+h)~e@_X`HHf<|UVEnhY!@q`Z3SdLrsGre`S$U|fURaAF;T@e) z!1j|T8}?hHN#$F;w0*p1?N~9H4=cr^P1u(3U0i*qHa z-tSPhnXuF6mkY8>9%x0Dq;p%^<)`?oyeuNyyVXxd5j0|EM#eFBnH|t&yq|6V6ie)Dh(C-#>0_UdKxoSjLgDXE$Wg3%I!iX#OuPXtvL)7+Q76g_d1 zwZ^me)452^H@`Ux!EX3e()c^Iam`9tNFHtb6kX0!aqfL@&drlEoQH(bj>8aqgxq+H?-#MFv+~>N~pcL`L-UfqqJ>2N0uIift%wVYHK_8 zxVbFGu_Jg@^N@V*?wg1WBCsj#;zI;U`%Oq(-u$M5_inXNiH=R zmY%GG^9-3ATomgs++{yD`~4MjOJBi{(px`Y_uFOrPe_GDRv1jlCcJiI4KPs&K2+h= zxK%Xf(W!Vn2ObhY`oow*3`ZcD=$E(_l4jKdBnMYt4@v`#&aSP6;P%&@RN3c;e zW23%{TSZ`bWj{%rks|QnvPemd=7{C3G$Anq(OZN~Nvu*sxJ&36k+MaTdW!T{@@atd z*zd=cmD5FUAM4(bCnKW0PI28eUCRO**T1Mmk5SUUL=V#{6LW<*4zdZ3M@tI_s-X#` zDVDLQFfGq_DWwa0alb+j3G-^2Tpc3JP3sG}l2-}BYcYzq<^Q9)`n|V(7Md#yDD31*V)LTCg%I^xA4@YsEe$YVJB5p8oGnKT2 zp(WKfUXXn0R~Nkv-{@D@x>!zzA9k4;-Qe- z>mq{{N2iTC<&oIDP=pZ9WcNiEP(F>3SD{unK)QO6r@-vlJ33&^&SpQHt3&!#J?4-a z(ZyKTw>??p2OEhG9aR*<-l;O2%R094qU-NyXwdG?lYt&4N~x|dVOV@^i%by@3=I1@ zL-T&NaC_G}JEC-bsAYh2G91s}5aHKzN+E7gK)M{3Qy~^n+o$a9@h7LWCG1tuLhBLS zU+*g*K2cKZ3Z@m+zjF0`*iDbDoFB7_PltHId#XrKKd#j^ZF0Uwj2dng9#I}%O4zy?z9Xs;JST+k zZKi#%rKyTbc&5TKs7qMBhwTv9y6recendO#3e_(s(PO6Bfu2TKPOB0Xb!L`@l$_8BZ z(3eH3kX>n6e}W2+y#F+QTPI0`YTjgsHr)*L3Y=WO`@#OzjMOWeq0Nc;VG(WdV_ceV zyX9J+NRRP#uFu`g77IH?@E!`BPgRMvQwDKFH%Hf!9_in{kCj zs+h$7I{0}uOkchv0rze32Mj;Wxzi0-b`K8Dcjuz#RpH9&oe7XiE5rc+oEba1f~5 zgL-~?&e0PPQf2LmFy;6FGnxHgS=Sz3mWyPCh`jVCQ~#d*KN*~u_!vWA(6$doEd$h5 z|A5TqZRyE(4&Y&k@SR3*tMw*ZYfG`@zfzo%NvscjzXGru870sdtSLd!2SvdTifRB1 zFIRwKfh@Q^3UR1WCy16_={v!T+rXZ8HGRw)}h)ASBb_*qg+%ll09IbY$*- zD^L6I^5hr-g5cZfq>B%IOF4?j;n46wd2s)qzuIzb`2j3uu2*NS14OJQZo#$>(0}$A z`N-rws+UbL%I;YN`iHKQ%r9DK_n=J4n-@jW_fx~gaIr?c=?U*&GD81lO(0q$!Q}Y9 zVT{ok7;5=@1*Upw>R>)Injg3HyRQUsoIG|z_MEdEZ9#&PUGl8g@vTBq&#}@GE36Iv z5tINs82?)Uj0b>Cszye~r$n%~`?fu^Nvlo~CqC(WzN??*;agL{j-gA(WSnO4Xz0kV z5i^k&oJSzT=7VM1TV*xp_|R7<;RkWYP`sPsx*6eCKjI|gIYPCF5mUn_SXmt2(h$9( zvvq+F^|7yS!@4`#b9OU|Ux^A`00)`985n880E67eawT>Nr6er=-5=j1QWt)D9s4o~ z!Lh}HWkI14qY6r^$qcs0Luw$8s*%F|A)>}tuj%BhLtUc2_~6jZ?kZmQNCvU{(Fqq9 ziz(g?0Mj)G!_reqI~u^wkQo!F#~D%q&_vgx#eQ{heTq{uE}!H*>#~OngCLg2N0%E# zA5Dou!j}iXo_RaEbLm#cw$^T&Ecz=WcE^V6o(Ecx_5{mSRp`epC|P(qXFeZWwHWF4dSxrBz} z6$2*+45iZJ2hm(mLhtlmqUG(U#4}*ICM0-u-M+4Oub5qdMh4>ecR4~rtcRe^FSNFX zQUtaTj{g$0gZQN3Jv6Fnr(&7hogzsV_i0pp4rUMw037a*EO?lRHi#Ghd<<%&+t&xi z_Hn>P46Qu>J!y<(@}W`19^~-2!ieqCvEI*gDv7C3on>}I*b5R?-d`e)Kiu-=z6N6_ z@2fx@;3~7^rwRS=`L#nO|NBAm4F4QH)Q1K#yhc(dU3K96bV>$FJ-{?#V)htr6{TZe z$T8x+C8Q)!PrSS`Xg8z_7Ns_s8PardZvI2B-efC@NU)@{fKuuAR~Y7tJJ(UL)(uSs z$x-@vo4IS)uBt=1w)-ngwU7xLw1+M_^0!o8tFb7*fpg>t^3Q=jekaiY6bUl?gQBe{ z;+kspAz|@@hM>)u#ei&K5eCcWf9SDe4QXVM=|Fp=tuR_$c47hkW7 zFR54XxTPo%RES^%1S_4uaF7g{1Dz1ayqEs+_$w)m(?J;jqIGIq)&*SZ8+vW7Jv9Rn zpBx7p2T+x{#1}j*VKYND;DKPTZsHsC{~)>0tkVL3cDYHk=Q|-~On(5M$)|YtbTF%;`pDOL>B+uKb1y(wP&pLN%n> z0TIaaFCxtP^*#Gp1DPt7uShj4uw)npq?5ApkTx_{Dl{h(BNUN)Jq6Ka62aN{W*Dq09 zeN_MU&QV9%-DPM`J?#CEu6x7!@6Y!C8M}3VR`1u1oJo}=LKq9aCe+YP01bs89Zmgf JCF+h*{{y4F8fX9j literal 0 HcmV?d00001 diff --git a/.vim/vim-plug/plug.vim b/.vim/vim-plug/plug.vim new file mode 100644 index 0000000..143c377 --- /dev/null +++ b/.vim/vim-plug/plug.vim @@ -0,0 +1,2504 @@ +" vim-plug: Vim plugin manager +" ============================ +" +" Download plug.vim and put it in ~/.vim/autoload +" +" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ +" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +" +" Edit your .vimrc +" +" call plug#begin('~/.vim/plugged') +" +" " Make sure you use single quotes +" +" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +" Plug 'junegunn/vim-easy-align' +" +" " Any valid git URL is allowed +" Plug 'https://github.com/junegunn/vim-github-dashboard.git' +" +" " Multiple Plug commands can be written in a single line using | separators +" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' +" +" " On-demand loading +" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } +" +" " Using a non-master branch +" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } +" +" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) +" Plug 'fatih/vim-go', { 'tag': '*' } +" +" " Plugin options +" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } +" +" " Plugin outside ~/.vim/plugged with post-update hook +" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +" +" " Unmanaged plugin (manually installed and updated) +" Plug '~/my-prototype-plugin' +" +" " Initialize plugin system +" call plug#end() +" +" Then reload .vimrc and :PlugInstall to install plugins. +" +" Plug options: +" +"| Option | Description | +"| ----------------------- | ------------------------------------------------ | +"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | +"| `rtp` | Subdirectory that contains Vim plugin | +"| `dir` | Custom directory for the plugin | +"| `as` | Use different name for the plugin | +"| `do` | Post-update hook (string or funcref) | +"| `on` | On-demand loading: Commands or ``-mappings | +"| `for` | On-demand loading: File types | +"| `frozen` | Do not update unless explicitly specified | +" +" More information: https://github.com/junegunn/vim-plug +" +" +" Copyright (c) 2017 Junegunn Choi +" +" MIT License +" +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be +" included in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +if exists('g:loaded_plug') + finish +endif +let g:loaded_plug = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let s:plug_src = 'https://github.com/junegunn/vim-plug.git' +let s:plug_tab = get(s:, 'plug_tab', -1) +let s:plug_buf = get(s:, 'plug_buf', -1) +let s:mac_gui = has('gui_macvim') && has('gui_running') +let s:is_win = has('win32') || has('win64') +let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) +let s:vim8 = has('patch-8.0.0039') && exists('*job_start') +let s:me = resolve(expand(':p')) +let s:base_spec = { 'branch': 'master', 'frozen': 0 } +let s:TYPE = { +\ 'string': type(''), +\ 'list': type([]), +\ 'dict': type({}), +\ 'funcref': type(function('call')) +\ } +let s:loaded = get(s:, 'loaded', {}) +let s:triggers = get(s:, 'triggers', {}) + +function! plug#begin(...) + if a:0 > 0 + let s:plug_home_org = a:1 + let home = s:path(fnamemodify(expand(a:1), ':p')) + elseif exists('g:plug_home') + let home = s:path(g:plug_home) + elseif !empty(&rtp) + let home = s:path(split(&rtp, ',')[0]) . '/plugged' + else + return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') + endif + if fnamemodify(home, ':t') ==# 'plugin' && fnamemodify(home, ':h') ==# s:first_rtp + return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') + endif + + let g:plug_home = home + let g:plugs = {} + let g:plugs_order = [] + let s:triggers = {} + + call s:define_commands() + return 1 +endfunction + +function! s:define_commands() + command! -nargs=+ -bar Plug call plug#() + if !executable('git') + return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') + endif + command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) + command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) + command! -nargs=0 -bar -bang PlugClean call s:clean(0) + command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif + command! -nargs=0 -bar PlugStatus call s:status() + command! -nargs=0 -bar PlugDiff call s:diff() + command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(0, ) +endfunction + +function! s:to_a(v) + return type(a:v) == s:TYPE.list ? a:v : [a:v] +endfunction + +function! s:to_s(v) + return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" +endfunction + +function! s:glob(from, pattern) + return s:lines(globpath(a:from, a:pattern)) +endfunction + +function! s:source(from, ...) + let found = 0 + for pattern in a:000 + for vim in s:glob(a:from, pattern) + execute 'source' s:esc(vim) + let found = 1 + endfor + endfor + return found +endfunction + +function! s:assoc(dict, key, val) + let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) +endfunction + +function! s:ask(message, ...) + call inputsave() + echohl WarningMsg + let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) + echohl None + call inputrestore() + echo "\r" + return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 +endfunction + +function! s:ask_no_interrupt(...) + try + return call('s:ask', a:000) + catch + return 0 + endtry +endfunction + +function! plug#end() + if !exists('g:plugs') + return s:err('Call plug#begin() first') + endif + + if exists('#PlugLOD') + augroup PlugLOD + autocmd! + augroup END + augroup! PlugLOD + endif + let lod = { 'ft': {}, 'map': {}, 'cmd': {} } + + if exists('g:did_load_filetypes') + filetype off + endif + for name in g:plugs_order + if !has_key(g:plugs, name) + continue + endif + let plug = g:plugs[name] + if get(s:loaded, name, 0) || !has_key(plug, 'on') && !has_key(plug, 'for') + let s:loaded[name] = 1 + continue + endif + + if has_key(plug, 'on') + let s:triggers[name] = { 'map': [], 'cmd': [] } + for cmd in s:to_a(plug.on) + if cmd =~? '^.\+' + if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) + call s:assoc(lod.map, cmd, name) + endif + call add(s:triggers[name].map, cmd) + elseif cmd =~# '^[A-Z]' + let cmd = substitute(cmd, '!*$', '', '') + if exists(':'.cmd) != 2 + call s:assoc(lod.cmd, cmd, name) + endif + call add(s:triggers[name].cmd, cmd) + else + call s:err('Invalid `on` option: '.cmd. + \ '. Should start with an uppercase letter or ``.') + endif + endfor + endif + + if has_key(plug, 'for') + let types = s:to_a(plug.for) + if !empty(types) + augroup filetypedetect + call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') + augroup END + endif + for type in types + call s:assoc(lod.ft, type, name) + endfor + endif + endfor + + for [cmd, names] in items(lod.cmd) + execute printf( + \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "", , , , %s)', + \ cmd, string(cmd), string(names)) + endfor + + for [map, names] in items(lod.map) + for [mode, map_prefix, key_prefix] in + \ [['i', '', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] + execute printf( + \ '%snoremap %s %s:call lod_map(%s, %s, %s, "%s")', + \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) + endfor + endfor + + for [ft, names] in items(lod.ft) + augroup PlugLOD + execute printf('autocmd FileType %s call lod_ft(%s, %s)', + \ ft, string(ft), string(names)) + augroup END + endfor + + call s:reorg_rtp() + filetype plugin indent on + if has('vim_starting') + if has('syntax') && !exists('g:syntax_on') + syntax enable + end + else + call s:reload_plugins() + endif +endfunction + +function! s:loaded_names() + return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') +endfunction + +function! s:load_plugin(spec) + call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') +endfunction + +function! s:reload_plugins() + for name in s:loaded_names() + call s:load_plugin(g:plugs[name]) + endfor +endfunction + +function! s:trim(str) + return substitute(a:str, '[\/]\+$', '', '') +endfunction + +function! s:version_requirement(val, min) + for idx in range(0, len(a:min) - 1) + let v = get(a:val, idx, 0) + if v < a:min[idx] | return 0 + elseif v > a:min[idx] | return 1 + endif + endfor + return 1 +endfunction + +function! s:git_version_requirement(...) + if !exists('s:git_version') + let s:git_version = map(split(split(s:system('git --version'))[2], '\.'), 'str2nr(v:val)') + endif + return s:version_requirement(s:git_version, a:000) +endfunction + +function! s:progress_opt(base) + return a:base && !s:is_win && + \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' +endfunction + +if s:is_win + function! s:rtp(spec) + return s:path(a:spec.dir . get(a:spec, 'rtp', '')) + endfunction + + function! s:path(path) + return s:trim(substitute(a:path, '/', '\', 'g')) + endfunction + + function! s:dirpath(path) + return s:path(a:path) . '\' + endfunction + + function! s:is_local_plug(repo) + return a:repo =~? '^[a-z]:\|^[%~]' + endfunction +else + function! s:rtp(spec) + return s:dirpath(a:spec.dir . get(a:spec, 'rtp', '')) + endfunction + + function! s:path(path) + return s:trim(a:path) + endfunction + + function! s:dirpath(path) + return substitute(a:path, '[/\\]*$', '/', '') + endfunction + + function! s:is_local_plug(repo) + return a:repo[0] =~ '[/$~]' + endfunction +endif + +function! s:err(msg) + echohl ErrorMsg + echom '[vim-plug] '.a:msg + echohl None +endfunction + +function! s:warn(cmd, msg) + echohl WarningMsg + execute a:cmd 'a:msg' + echohl None +endfunction + +function! s:esc(path) + return escape(a:path, ' ') +endfunction + +function! s:escrtp(path) + return escape(a:path, ' ,') +endfunction + +function! s:remove_rtp() + for name in s:loaded_names() + let rtp = s:rtp(g:plugs[name]) + execute 'set rtp-='.s:escrtp(rtp) + let after = globpath(rtp, 'after') + if isdirectory(after) + execute 'set rtp-='.s:escrtp(after) + endif + endfor +endfunction + +function! s:reorg_rtp() + if !empty(s:first_rtp) + execute 'set rtp-='.s:first_rtp + execute 'set rtp-='.s:last_rtp + endif + + " &rtp is modified from outside + if exists('s:prtp') && s:prtp !=# &rtp + call s:remove_rtp() + unlet! s:middle + endif + + let s:middle = get(s:, 'middle', &rtp) + let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') + let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') + let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') + \ . ','.s:middle.',' + \ . join(map(afters, 'escape(v:val, ",")'), ',') + let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') + let s:prtp = &rtp + + if !empty(s:first_rtp) + execute 'set rtp^='.s:first_rtp + execute 'set rtp+='.s:last_rtp + endif +endfunction + +function! s:doautocmd(...) + if exists('#'.join(a:000, '#')) + execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '' : '') join(a:000) + endif +endfunction + +function! s:dobufread(names) + for name in a:names + let path = s:rtp(g:plugs[name]).'/**' + for dir in ['ftdetect', 'ftplugin'] + if len(finddir(dir, path)) + if exists('#BufRead') + doautocmd BufRead + endif + return + endif + endfor + endfor +endfunction + +function! plug#load(...) + if a:0 == 0 + return s:err('Argument missing: plugin name(s) required') + endif + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 + let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') + if !empty(unknowns) + let s = len(unknowns) > 1 ? 's' : '' + return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) + end + let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') + if !empty(unloaded) + for name in unloaded + call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + endfor + call s:dobufread(unloaded) + return 1 + end + return 0 +endfunction + +function! s:remove_triggers(name) + if !has_key(s:triggers, a:name) + return + endif + for cmd in s:triggers[a:name].cmd + execute 'silent! delc' cmd + endfor + for map in s:triggers[a:name].map + execute 'silent! unmap' map + execute 'silent! iunmap' map + endfor + call remove(s:triggers, a:name) +endfunction + +function! s:lod(names, types, ...) + for name in a:names + call s:remove_triggers(name) + let s:loaded[name] = 1 + endfor + call s:reorg_rtp() + + for name in a:names + let rtp = s:rtp(g:plugs[name]) + for dir in a:types + call s:source(rtp, dir.'/**/*.vim') + endfor + if a:0 + if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) + execute 'runtime' a:1 + endif + call s:source(rtp, a:2) + endif + call s:doautocmd('User', name) + endfor +endfunction + +function! s:lod_ft(pat, names) + let syn = 'syntax/'.a:pat.'.vim' + call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) + execute 'autocmd! PlugLOD FileType' a:pat + call s:doautocmd('filetypeplugin', 'FileType') + call s:doautocmd('filetypeindent', 'FileType') +endfunction + +function! s:lod_cmd(cmd, bang, l1, l2, args, names) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) +endfunction + +function! s:lod_map(map, names, with_prefix, prefix) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + let extra = '' + while 1 + let c = getchar(0) + if c == 0 + break + endif + let extra .= nr2char(c) + endwhile + + if a:with_prefix + let prefix = v:count ? v:count : '' + let prefix .= '"'.v:register.a:prefix + if mode(1) == 'no' + if v:operator == 'c' + let prefix = "\" . prefix + endif + let prefix .= v:operator + endif + call feedkeys(prefix, 'n') + endif + call feedkeys(substitute(a:map, '^', "\", '') . extra) +endfunction + +function! plug#(repo, ...) + if a:0 > 1 + return s:err('Invalid number of arguments (1..2)') + endif + + try + let repo = s:trim(a:repo) + let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec + let name = get(opts, 'as', fnamemodify(repo, ':t:s?\.git$??')) + let spec = extend(s:infer_properties(name, repo), opts) + if !has_key(g:plugs, name) + call add(g:plugs_order, name) + endif + let g:plugs[name] = spec + let s:loaded[name] = get(s:loaded, name, 0) + catch + return s:err(v:exception) + endtry +endfunction + +function! s:parse_options(arg) + let opts = copy(s:base_spec) + let type = type(a:arg) + if type == s:TYPE.string + let opts.tag = a:arg + elseif type == s:TYPE.dict + call extend(opts, a:arg) + if has_key(opts, 'dir') + let opts.dir = s:dirpath(expand(opts.dir)) + endif + else + throw 'Invalid argument type (expected: string or dictionary)' + endif + return opts +endfunction + +function! s:infer_properties(name, repo) + let repo = a:repo + if s:is_local_plug(repo) + return { 'dir': s:dirpath(expand(repo)) } + else + if repo =~ ':' + let uri = repo + else + if repo !~ '/' + throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) + endif + let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') + let uri = printf(fmt, repo) + endif + return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } + endif +endfunction + +function! s:install(force, names) + call s:update_impl(0, a:force, a:names) +endfunction + +function! s:update(force, names) + call s:update_impl(1, a:force, a:names) +endfunction + +function! plug#helptags() + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + for spec in values(g:plugs) + let docd = join([s:rtp(spec), 'doc'], '/') + if isdirectory(docd) + silent! execute 'helptags' s:esc(docd) + endif + endfor + return 1 +endfunction + +function! s:syntax() + syntax clear + syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber + syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX + syn match plugNumber /[0-9]\+[0-9.]*/ contained + syn match plugBracket /[[\]]/ contained + syn match plugX /x/ contained + syn match plugDash /^-/ + syn match plugPlus /^+/ + syn match plugStar /^*/ + syn match plugMessage /\(^- \)\@<=.*/ + syn match plugName /\(^- \)\@<=[^ ]*:/ + syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ + syn match plugTag /(tag: [^)]\+)/ + syn match plugInstall /\(^+ \)\@<=[^:]*/ + syn match plugUpdate /\(^* \)\@<=[^:]*/ + syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag + syn match plugEdge /^ \X\+$/ + syn match plugEdge /^ \X*/ contained nextgroup=plugSha + syn match plugSha /[0-9a-f]\{7,9}/ contained + syn match plugRelDate /([^)]*)$/ contained + syn match plugNotLoaded /(not loaded)$/ + syn match plugError /^x.*/ + syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ + syn match plugH2 /^.*:\n-\+$/ + syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean + hi def link plug1 Title + hi def link plug2 Repeat + hi def link plugH2 Type + hi def link plugX Exception + hi def link plugBracket Structure + hi def link plugNumber Number + + hi def link plugDash Special + hi def link plugPlus Constant + hi def link plugStar Boolean + + hi def link plugMessage Function + hi def link plugName Label + hi def link plugInstall Function + hi def link plugUpdate Type + + hi def link plugError Error + hi def link plugDeleted Ignore + hi def link plugRelDate Comment + hi def link plugEdge PreProc + hi def link plugSha Identifier + hi def link plugTag Constant + + hi def link plugNotLoaded Comment +endfunction + +function! s:lpad(str, len) + return a:str . repeat(' ', a:len - len(a:str)) +endfunction + +function! s:lines(msg) + return split(a:msg, "[\r\n]") +endfunction + +function! s:lastline(msg) + return get(s:lines(a:msg), -1, '') +endfunction + +function! s:new_window() + execute get(g:, 'plug_window', 'vertical topleft new') +endfunction + +function! s:plug_window_exists() + let buflist = tabpagebuflist(s:plug_tab) + return !empty(buflist) && index(buflist, s:plug_buf) >= 0 +endfunction + +function! s:switch_in() + if !s:plug_window_exists() + return 0 + endif + + if winbufnr(0) != s:plug_buf + let s:pos = [tabpagenr(), winnr(), winsaveview()] + execute 'normal!' s:plug_tab.'gt' + let winnr = bufwinnr(s:plug_buf) + execute winnr.'wincmd w' + call add(s:pos, winsaveview()) + else + let s:pos = [winsaveview()] + endif + + setlocal modifiable + return 1 +endfunction + +function! s:switch_out(...) + call winrestview(s:pos[-1]) + setlocal nomodifiable + if a:0 > 0 + execute a:1 + endif + + if len(s:pos) > 1 + execute 'normal!' s:pos[0].'gt' + execute s:pos[1] 'wincmd w' + call winrestview(s:pos[2]) + endif +endfunction + +function! s:finish_bindings() + nnoremap R :call retry() + nnoremap D :PlugDiff + nnoremap S :PlugStatus + nnoremap U :call status_update() + xnoremap U :call status_update() + nnoremap ]] :silent! call section('') + nnoremap [[ :silent! call section('b') +endfunction + +function! s:prepare(...) + if empty(getcwd()) + throw 'Invalid current working directory. Cannot proceed.' + endif + + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] + if exists(evar) + throw evar.' detected. Cannot proceed.' + endif + endfor + + call s:job_abort() + if s:switch_in() + if b:plug_preview == 1 + pc + endif + enew + else + call s:new_window() + endif + + nnoremap q :if b:plug_preview==1pcendifbd + if a:0 == 0 + call s:finish_bindings() + endif + let b:plug_preview = -1 + let s:plug_tab = tabpagenr() + let s:plug_buf = winbufnr(0) + call s:assign_name() + + for k in ['', 'L', 'o', 'X', 'd', 'dd'] + execute 'silent! unmap ' k + endfor + setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell + setf vim-plug + if exists('g:syntax_on') + call s:syntax() + endif +endfunction + +function! s:assign_name() + " Assign buffer name + let prefix = '[Plugins]' + let name = prefix + let idx = 2 + while bufexists(name) + let name = printf('%s (%s)', prefix, idx) + let idx = idx + 1 + endwhile + silent! execute 'f' fnameescape(name) +endfunction + +function! s:chsh(swap) + let prev = [&shell, &shellcmdflag, &shellredir] + if s:is_win + set shell=cmd.exe shellcmdflag=/c shellredir=>%s\ 2>&1 + elseif a:swap + set shell=sh shellredir=>%s\ 2>&1 + endif + return prev +endfunction + +function! s:bang(cmd, ...) + try + let [sh, shellcmdflag, shrd] = s:chsh(a:0) + " FIXME: Escaping is incomplete. We could use shellescape with eval, + " but it won't work on Windows. + let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd + if s:is_win + let batchfile = tempname().'.bat' + call writefile(['@echo off', cmd], batchfile) + let cmd = batchfile + endif + let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') + execute "normal! :execute g:_plug_bang\\" + finally + unlet g:_plug_bang + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win + call delete(batchfile) + endif + endtry + return v:shell_error ? 'Exit status: ' . v:shell_error : '' +endfunction + +function! s:regress_bar() + let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') + call s:progress_bar(2, bar, len(bar)) +endfunction + +function! s:is_updated(dir) + return !empty(s:system_chomp('git log --pretty=format:"%h" "HEAD...HEAD@{1}"', a:dir)) +endfunction + +function! s:do(pull, force, todo) + for [name, spec] in items(a:todo) + if !isdirectory(spec.dir) + continue + endif + let installed = has_key(s:update.new, name) + let updated = installed ? 0 : + \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) + if a:force || installed || updated + execute 'cd' s:esc(spec.dir) + call append(3, '- Post-update hook for '. name .' ... ') + let error = '' + let type = type(spec.do) + if type == s:TYPE.string + if spec.do[0] == ':' + if !get(s:loaded, name, 0) + let s:loaded[name] = 1 + call s:reorg_rtp() + endif + call s:load_plugin(spec) + try + execute spec.do[1:] + catch + let error = v:exception + endtry + if !s:plug_window_exists() + cd - + throw 'Warning: vim-plug was terminated by the post-update hook of '.name + endif + else + let error = s:bang(spec.do) + endif + elseif type == s:TYPE.funcref + try + let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') + call spec.do({ 'name': name, 'status': status, 'force': a:force }) + catch + let error = v:exception + endtry + else + let error = 'Invalid hook type' + endif + call s:switch_in() + call setline(4, empty(error) ? (getline(4) . 'OK') + \ : ('x' . getline(4)[1:] . error)) + if !empty(error) + call add(s:update.errors, name) + call s:regress_bar() + endif + cd - + endif + endfor +endfunction + +function! s:hash_match(a, b) + return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 +endfunction + +function! s:checkout(spec) + let sha = a:spec.commit + let output = s:system('git rev-parse HEAD', a:spec.dir) + if !v:shell_error && !s:hash_match(sha, s:lines(output)[0]) + let output = s:system( + \ 'git fetch --depth 999999 && git checkout '.s:esc(sha).' --', a:spec.dir) + endif + return output +endfunction + +function! s:finish(pull) + let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) + if new_frozen + let s = new_frozen > 1 ? 's' : '' + call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) + endif + call append(3, '- Finishing ... ') | 4 + redraw + call plug#helptags() + call plug#end() + call setline(4, getline(4) . 'Done!') + redraw + let msgs = [] + if !empty(s:update.errors) + call add(msgs, "Press 'R' to retry.") + endif + if a:pull && len(s:update.new) < len(filter(getline(5, '$'), + \ "v:val =~ '^- ' && stridx(v:val, 'Already up-to-date') < 0")) + call add(msgs, "Press 'D' to see the updated changes.") + endif + echo join(msgs, ' ') + call s:finish_bindings() +endfunction + +function! s:retry() + if empty(s:update.errors) + return + endif + echo + call s:update_impl(s:update.pull, s:update.force, + \ extend(copy(s:update.errors), [s:update.threads])) +endfunction + +function! s:is_managed(name) + return has_key(g:plugs[a:name], 'uri') +endfunction + +function! s:names(...) + return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) +endfunction + +function! s:check_ruby() + silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") + if !exists('g:plug_ruby') + redraw! + return s:warn('echom', 'Warning: Ruby interface is broken') + endif + let ruby_version = split(g:plug_ruby, '\.') + unlet g:plug_ruby + return s:version_requirement(ruby_version, [1, 8, 7]) +endfunction + +function! s:update_impl(pull, force, args) abort + let sync = index(a:args, '--sync') >= 0 || has('vim_starting') + let args = filter(copy(a:args), 'v:val != "--sync"') + let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? + \ remove(args, -1) : get(g:, 'plug_threads', 16) + + let managed = filter(copy(g:plugs), 's:is_managed(v:key)') + let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : + \ filter(managed, 'index(args, v:key) >= 0') + + if empty(todo) + return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) + endif + + if !s:is_win && s:git_version_requirement(2, 3) + let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' + let $GIT_TERMINAL_PROMPT = 0 + for plug in values(todo) + let plug.uri = substitute(plug.uri, + \ '^https://git::@github\.com', 'https://github.com', '') + endfor + endif + + if !isdirectory(g:plug_home) + try + call mkdir(g:plug_home, 'p') + catch + return s:err(printf('Invalid plug directory: %s. '. + \ 'Try to call plug#begin with a valid directory', g:plug_home)) + endtry + endif + + if has('nvim') && !exists('*jobwait') && threads > 1 + call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') + endif + + let use_job = s:nvim || s:vim8 + let python = (has('python') || has('python3')) && !use_job + let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() + + let s:update = { + \ 'start': reltime(), + \ 'all': todo, + \ 'todo': copy(todo), + \ 'errors': [], + \ 'pull': a:pull, + \ 'force': a:force, + \ 'new': {}, + \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, + \ 'bar': '', + \ 'fin': 0 + \ } + + call s:prepare(1) + call append(0, ['', '']) + normal! 2G + silent! redraw + + let s:clone_opt = get(g:, 'plug_shallow', 1) ? + \ '--depth 1' . (s:git_version_requirement(1, 7, 10) ? ' --no-single-branch' : '') : '' + + if has('win32unix') + let s:clone_opt .= ' -c core.eol=lf -c core.autocrlf=input' + endif + + " Python version requirement (>= 2.7) + if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 + redir => pyv + silent python import platform; print platform.python_version() + redir END + let python = s:version_requirement( + \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) + endif + + if (python || ruby) && s:update.threads > 1 + try + let imd = &imd + if s:mac_gui + set noimd + endif + if ruby + call s:update_ruby() + else + call s:update_python() + endif + catch + let lines = getline(4, '$') + let printed = {} + silent! 4,$d _ + for line in lines + let name = s:extract_name(line, '.', '') + if empty(name) || !has_key(printed, name) + call append('$', line) + if !empty(name) + let printed[name] = 1 + if line[0] == 'x' && index(s:update.errors, name) < 0 + call add(s:update.errors, name) + end + endif + endif + endfor + finally + let &imd = imd + call s:update_finish() + endtry + else + call s:update_vim() + while use_job && sync + sleep 100m + if s:update.fin + break + endif + endwhile + endif +endfunction + +function! s:log4(name, msg) + call setline(4, printf('- %s (%s)', a:msg, a:name)) + redraw +endfunction + +function! s:update_finish() + if exists('s:git_terminal_prompt') + let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt + endif + if s:switch_in() + call append(3, '- Updating ...') | 4 + for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) + let [pos, _] = s:logpos(name) + if !pos + continue + endif + if has_key(spec, 'commit') + call s:log4(name, 'Checking out '.spec.commit) + let out = s:checkout(spec) + elseif has_key(spec, 'tag') + let tag = spec.tag + if tag =~ '\*' + let tags = s:lines(s:system('git tag --list '.s:shellesc(tag).' --sort -version:refname 2>&1', spec.dir)) + if !v:shell_error && !empty(tags) + let tag = tags[0] + call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) + call append(3, '') + endif + endif + call s:log4(name, 'Checking out '.tag) + let out = s:system('git checkout -q '.s:esc(tag).' -- 2>&1', spec.dir) + else + let branch = s:esc(get(spec, 'branch', 'master')) + call s:log4(name, 'Merging origin/'.branch) + let out = s:system('git checkout -q '.branch.' -- 2>&1' + \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only origin/'.branch.' 2>&1')), spec.dir) + endif + if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && + \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) + call s:log4(name, 'Updating submodules. This may take a while.') + let out .= s:bang('git submodule update --init --recursive 2>&1', spec.dir) + endif + let msg = s:format_message(v:shell_error ? 'x': '-', name, out) + if v:shell_error + call add(s:update.errors, name) + call s:regress_bar() + silent execute pos 'd _' + call append(4, msg) | 4 + elseif !empty(out) + call setline(pos, msg[0]) + endif + redraw + endfor + silent 4 d _ + try + call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) + catch + call s:warn('echom', v:exception) + call s:warn('echo', '') + return + endtry + call s:finish(s:update.pull) + call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') + call s:switch_out('normal! gg') + endif +endfunction + +function! s:job_abort() + if (!s:nvim && !s:vim8) || !exists('s:jobs') + return + endif + + for [name, j] in items(s:jobs) + if s:nvim + silent! call jobstop(j.jobid) + elseif s:vim8 + silent! call job_stop(j.jobid) + endif + if j.new + call s:system('rm -rf ' . s:shellesc(g:plugs[name].dir)) + endif + endfor + let s:jobs = {} +endfunction + +function! s:last_non_empty_line(lines) + let len = len(a:lines) + for idx in range(len) + let line = a:lines[len-idx-1] + if !empty(line) + return line + endif + endfor + return '' +endfunction + +function! s:job_out_cb(self, data) abort + let self = a:self + let data = remove(self.lines, -1) . a:data + let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') + call extend(self.lines, lines) + " To reduce the number of buffer updates + let self.tick = get(self, 'tick', -1) + 1 + if !self.running || self.tick % len(s:jobs) == 0 + let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') + let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) + call s:log(bullet, self.name, result) + endif +endfunction + +function! s:job_exit_cb(self, data) abort + let a:self.running = 0 + let a:self.error = a:data != 0 + call s:reap(a:self.name) + call s:tick() +endfunction + +function! s:job_cb(fn, job, ch, data) + if !s:plug_window_exists() " plug window closed + return s:job_abort() + endif + call call(a:fn, [a:job, a:data]) +endfunction + +function! s:nvim_cb(job_id, data, event) dict abort + return a:event == 'stdout' ? + \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : + \ s:job_cb('s:job_exit_cb', self, 0, a:data) +endfunction + +function! s:spawn(name, cmd, opts) + let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], + \ 'batchfile': (s:is_win && (s:nvim || s:vim8)) ? tempname().'.bat' : '', + \ 'new': get(a:opts, 'new', 0) } + let s:jobs[a:name] = job + let cmd = has_key(a:opts, 'dir') ? s:with_cd(a:cmd, a:opts.dir) : a:cmd + if !empty(job.batchfile) + call writefile(['@echo off', cmd], job.batchfile) + let cmd = job.batchfile + endif + let argv = add(s:is_win ? ['cmd', '/c'] : ['sh', '-c'], cmd) + + if s:nvim + call extend(job, { + \ 'on_stdout': function('s:nvim_cb'), + \ 'on_exit': function('s:nvim_cb'), + \ }) + let jid = jobstart(argv, job) + if jid > 0 + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = [jid < 0 ? argv[0].' is not executable' : + \ 'Invalid arguments (or job table is full)'] + endif + elseif s:vim8 + let jid = job_start(s:is_win ? join(argv, ' ') : argv, { + \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), + \ 'out_mode': 'raw' + \}) + if job_status(jid) == 'run' + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = ['Failed to start job'] + endif + else + let job.lines = s:lines(call('s:system', [cmd])) + let job.error = v:shell_error != 0 + let job.running = 0 + endif +endfunction + +function! s:reap(name) + let job = s:jobs[a:name] + if job.error + call add(s:update.errors, a:name) + elseif get(job, 'new', 0) + let s:update.new[a:name] = 1 + endif + let s:update.bar .= job.error ? 'x' : '=' + + let bullet = job.error ? 'x' : '-' + let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) + call s:log(bullet, a:name, empty(result) ? 'OK' : result) + call s:bar() + + if has_key(job, 'batchfile') && !empty(job.batchfile) + call delete(job.batchfile) + endif + call remove(s:jobs, a:name) +endfunction + +function! s:bar() + if s:switch_in() + let total = len(s:update.all) + call setline(1, (s:update.pull ? 'Updating' : 'Installing'). + \ ' plugins ('.len(s:update.bar).'/'.total.')') + call s:progress_bar(2, s:update.bar, total) + call s:switch_out() + endif +endfunction + +function! s:logpos(name) + for i in range(4, line('$')) + if getline(i) =~# '^[-+x*] '.a:name.':' + for j in range(i + 1, line('$')) + if getline(j) !~ '^ ' + return [i, j - 1] + endif + endfor + return [i, i] + endif + endfor + return [0, 0] +endfunction + +function! s:log(bullet, name, lines) + if s:switch_in() + let [b, e] = s:logpos(a:name) + if b > 0 + silent execute printf('%d,%d d _', b, e) + if b > winheight('.') + let b = 4 + endif + else + let b = 4 + endif + " FIXME For some reason, nomodifiable is set after :d in vim8 + setlocal modifiable + call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) + call s:switch_out() + endif +endfunction + +function! s:update_vim() + let s:jobs = {} + + call s:bar() + call s:tick() +endfunction + +function! s:tick() + let pull = s:update.pull + let prog = s:progress_opt(s:nvim || s:vim8) +while 1 " Without TCO, Vim stack is bound to explode + if empty(s:update.todo) + if empty(s:jobs) && !s:update.fin + call s:update_finish() + let s:update.fin = 1 + endif + return + endif + + let name = keys(s:update.todo)[0] + let spec = remove(s:update.todo, name) + let new = !isdirectory(spec.dir) + + call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') + redraw + + let has_tag = has_key(spec, 'tag') + if !new + let [error, _] = s:git_validate(spec, 0) + if empty(error) + if pull + let fetch_opt = (has_tag && !empty(globpath(spec.dir, '.git/shallow'))) ? '--depth 99999999' : '' + call s:spawn(name, printf('git fetch %s %s 2>&1', fetch_opt, prog), { 'dir': spec.dir }) + else + let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } + endif + else + let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } + endif + else + call s:spawn(name, + \ printf('git clone %s %s %s %s 2>&1', + \ has_tag ? '' : s:clone_opt, + \ prog, + \ s:shellesc(spec.uri), + \ s:shellesc(s:trim(spec.dir))), { 'new': 1 }) + endif + + if !s:jobs[name].running + call s:reap(name) + endif + if len(s:jobs) >= s:update.threads + break + endif +endwhile +endfunction + +function! s:update_python() +let py_exe = has('python') ? 'python' : 'python3' +execute py_exe "<< EOF" +import datetime +import functools +import os +try: + import queue +except ImportError: + import Queue as queue +import random +import re +import shutil +import signal +import subprocess +import tempfile +import threading as thr +import time +import traceback +import vim + +G_NVIM = vim.eval("has('nvim')") == '1' +G_PULL = vim.eval('s:update.pull') == '1' +G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 +G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) +G_CLONE_OPT = vim.eval('s:clone_opt') +G_PROGRESS = vim.eval('s:progress_opt(1)') +G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) +G_STOP = thr.Event() +G_IS_WIN = vim.eval('s:is_win') == '1' + +class PlugError(Exception): + def __init__(self, msg): + self.msg = msg +class CmdTimedOut(PlugError): + pass +class CmdFailed(PlugError): + pass +class InvalidURI(PlugError): + pass +class Action(object): + INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] + +class Buffer(object): + def __init__(self, lock, num_plugs, is_pull): + self.bar = '' + self.event = 'Updating' if is_pull else 'Installing' + self.lock = lock + self.maxy = int(vim.eval('winheight(".")')) + self.num_plugs = num_plugs + + def __where(self, name): + """ Find first line with name in current buffer. Return line num. """ + found, lnum = False, 0 + matcher = re.compile('^[-+x*] {0}:'.format(name)) + for line in vim.current.buffer: + if matcher.search(line) is not None: + found = True + break + lnum += 1 + + if not found: + lnum = -1 + return lnum + + def header(self): + curbuf = vim.current.buffer + curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) + + num_spaces = self.num_plugs - len(self.bar) + curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') + + with self.lock: + vim.command('normal! 2G') + vim.command('redraw') + + def write(self, action, name, lines): + first, rest = lines[0], lines[1:] + msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] + msg.extend([' ' + line for line in rest]) + + try: + if action == Action.ERROR: + self.bar += 'x' + vim.command("call add(s:update.errors, '{0}')".format(name)) + elif action == Action.DONE: + self.bar += '=' + + curbuf = vim.current.buffer + lnum = self.__where(name) + if lnum != -1: # Found matching line num + del curbuf[lnum] + if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): + lnum = 3 + else: + lnum = 3 + curbuf.append(msg, lnum) + + self.header() + except vim.error: + pass + +class Command(object): + CD = 'cd /d' if G_IS_WIN else 'cd' + + def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): + self.cmd = cmd + if cmd_dir: + self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) + self.timeout = timeout + self.callback = cb if cb else (lambda msg: None) + self.clean = clean if clean else (lambda: None) + self.proc = None + + @property + def alive(self): + """ Returns true only if command still running. """ + return self.proc and self.proc.poll() is None + + def execute(self, ntries=3): + """ Execute the command with ntries if CmdTimedOut. + Returns the output of the command if no Exception. + """ + attempt, finished, limit = 0, False, self.timeout + + while not finished: + try: + attempt += 1 + result = self.try_command() + finished = True + return result + except CmdTimedOut: + if attempt != ntries: + self.notify_retry() + self.timeout += limit + else: + raise + + def notify_retry(self): + """ Retry required for command, notify user. """ + for count in range(3, 0, -1): + if G_STOP.is_set(): + raise KeyboardInterrupt + msg = 'Timeout. Will retry in {0} second{1} ...'.format( + count, 's' if count != 1 else '') + self.callback([msg]) + time.sleep(1) + self.callback(['Retrying ...']) + + def try_command(self): + """ Execute a cmd & poll for callback. Returns list of output. + Raises CmdFailed -> return code for Popen isn't 0 + Raises CmdTimedOut -> command exceeded timeout without new output + """ + first_line = True + + try: + tfile = tempfile.NamedTemporaryFile(mode='w+b') + preexec_fn = not G_IS_WIN and os.setsid or None + self.proc = subprocess.Popen(self.cmd, stdout=tfile, + stderr=subprocess.STDOUT, + stdin=subprocess.PIPE, shell=True, + preexec_fn=preexec_fn) + thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) + thrd.start() + + thread_not_started = True + while thread_not_started: + try: + thrd.join(0.1) + thread_not_started = False + except RuntimeError: + pass + + while self.alive: + if G_STOP.is_set(): + raise KeyboardInterrupt + + if first_line or random.random() < G_LOG_PROB: + first_line = False + line = '' if G_IS_WIN else nonblock_read(tfile.name) + if line: + self.callback([line]) + + time_diff = time.time() - os.path.getmtime(tfile.name) + if time_diff > self.timeout: + raise CmdTimedOut(['Timeout!']) + + thrd.join(0.5) + + tfile.seek(0) + result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] + + if self.proc.returncode != 0: + raise CmdFailed([''] + result) + + return result + except: + self.terminate() + raise + + def terminate(self): + """ Terminate process and cleanup. """ + if self.alive: + if G_IS_WIN: + os.kill(self.proc.pid, signal.SIGINT) + else: + os.killpg(self.proc.pid, signal.SIGTERM) + self.clean() + +class Plugin(object): + def __init__(self, name, args, buf_q, lock): + self.name = name + self.args = args + self.buf_q = buf_q + self.lock = lock + self.tag = args.get('tag', 0) + + def manage(self): + try: + if os.path.exists(self.args['dir']): + self.update() + else: + self.install() + with self.lock: + thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) + except PlugError as exc: + self.write(Action.ERROR, self.name, exc.msg) + except KeyboardInterrupt: + G_STOP.set() + self.write(Action.ERROR, self.name, ['Interrupted!']) + except: + # Any exception except those above print stack trace + msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) + self.write(Action.ERROR, self.name, msg.split('\n')) + raise + + def install(self): + target = self.args['dir'] + if target[-1] == '\\': + target = target[0:-1] + + def clean(target): + def _clean(): + try: + shutil.rmtree(target) + except OSError: + pass + return _clean + + self.write(Action.INSTALL, self.name, ['Installing ...']) + callback = functools.partial(self.write, Action.INSTALL, self.name) + cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( + '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], + esc(target)) + com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + + def repo_uri(self): + cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' + command = Command(cmd, self.args['dir'], G_TIMEOUT,) + result = command.execute(G_RETRIES) + return result[-1] + + def update(self): + actual_uri = self.repo_uri() + expect_uri = self.args['uri'] + regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') + ma = regex.match(actual_uri) + mb = regex.match(expect_uri) + if ma is None or mb is None or ma.groups() != mb.groups(): + msg = ['', + 'Invalid URI: {0}'.format(actual_uri), + 'Expected {0}'.format(expect_uri), + 'PlugClean required.'] + raise InvalidURI(msg) + + if G_PULL: + self.write(Action.UPDATE, self.name, ['Updating ...']) + callback = functools.partial(self.write, Action.UPDATE, self.name) + fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' + cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) + com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + else: + self.write(Action.DONE, self.name, ['Already installed']) + + def write(self, action, name, msg): + self.buf_q.put((action, name, msg)) + +class PlugThread(thr.Thread): + def __init__(self, tname, args): + super(PlugThread, self).__init__() + self.tname = tname + self.args = args + + def run(self): + thr.current_thread().name = self.tname + buf_q, work_q, lock = self.args + + try: + while not G_STOP.is_set(): + name, args = work_q.get_nowait() + plug = Plugin(name, args, buf_q, lock) + plug.manage() + work_q.task_done() + except queue.Empty: + pass + +class RefreshThread(thr.Thread): + def __init__(self, lock): + super(RefreshThread, self).__init__() + self.lock = lock + self.running = True + + def run(self): + while self.running: + with self.lock: + thread_vim_command('noautocmd normal! a') + time.sleep(0.33) + + def stop(self): + self.running = False + +if G_NVIM: + def thread_vim_command(cmd): + vim.session.threadsafe_call(lambda: vim.command(cmd)) +else: + def thread_vim_command(cmd): + vim.command(cmd) + +def esc(name): + return '"' + name.replace('"', '\"') + '"' + +def nonblock_read(fname): + """ Read a file with nonblock flag. Return the last line. """ + fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) + buf = os.read(fread, 100000).decode('utf-8', 'replace') + os.close(fread) + + line = buf.rstrip('\r\n') + left = max(line.rfind('\r'), line.rfind('\n')) + if left != -1: + left += 1 + line = line[left:] + + return line + +def main(): + thr.current_thread().name = 'main' + nthreads = int(vim.eval('s:update.threads')) + plugs = vim.eval('s:update.todo') + mac_gui = vim.eval('s:mac_gui') == '1' + + lock = thr.Lock() + buf = Buffer(lock, len(plugs), G_PULL) + buf_q, work_q = queue.Queue(), queue.Queue() + for work in plugs.items(): + work_q.put(work) + + start_cnt = thr.active_count() + for num in range(nthreads): + tname = 'PlugT-{0:02}'.format(num) + thread = PlugThread(tname, (buf_q, work_q, lock)) + thread.start() + if mac_gui: + rthread = RefreshThread(lock) + rthread.start() + + while not buf_q.empty() or thr.active_count() != start_cnt: + try: + action, name, msg = buf_q.get(True, 0.25) + buf.write(action, name, ['OK'] if not msg else msg) + buf_q.task_done() + except queue.Empty: + pass + except KeyboardInterrupt: + G_STOP.set() + + if mac_gui: + rthread.stop() + rthread.join() + +main() +EOF +endfunction + +function! s:update_ruby() + ruby << EOF + module PlugStream + SEP = ["\r", "\n", nil] + def get_line + buffer = '' + loop do + char = readchar rescue return + if SEP.include? char.chr + buffer << $/ + break + else + buffer << char + end + end + buffer + end + end unless defined?(PlugStream) + + def esc arg + %["#{arg.gsub('"', '\"')}"] + end + + def killall pid + pids = [pid] + if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM + pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } + else + unless `which pgrep 2> /dev/null`.empty? + children = pids + until children.empty? + children = children.map { |pid| + `pgrep -P #{pid}`.lines.map { |l| l.chomp } + }.flatten + pids += children + end + end + pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } + end + end + + def compare_git_uri a, b + regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} + regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) + end + + require 'thread' + require 'fileutils' + require 'timeout' + running = true + iswin = VIM::evaluate('s:is_win').to_i == 1 + pull = VIM::evaluate('s:update.pull').to_i == 1 + base = VIM::evaluate('g:plug_home') + all = VIM::evaluate('s:update.todo') + limit = VIM::evaluate('get(g:, "plug_timeout", 60)') + tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 + nthr = VIM::evaluate('s:update.threads').to_i + maxy = VIM::evaluate('winheight(".")').to_i + vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ + cd = iswin ? 'cd /d' : 'cd' + tot = VIM::evaluate('len(s:update.todo)') || 0 + bar = '' + skip = 'Already installed' + mtx = Mutex.new + take1 = proc { mtx.synchronize { running && all.shift } } + logh = proc { + cnt = bar.length + $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" + $curbuf[2] = '[' + bar.ljust(tot) + ']' + VIM::command('normal! 2G') + VIM::command('redraw') + } + where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } + log = proc { |name, result, type| + mtx.synchronize do + ing = ![true, false].include?(type) + bar += type ? '=' : 'x' unless ing + b = case type + when :install then '+' when :update then '*' + when true, nil then '-' else + VIM::command("call add(s:update.errors, '#{name}')") + 'x' + end + result = + if type || type.nil? + ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] + elsif result =~ /^Interrupted|^Timeout/ + ["#{b} #{name}: #{result}"] + else + ["#{b} #{name}"] + result.lines.map { |l| " " << l } + end + if lnum = where.call(name) + $curbuf.delete lnum + lnum = 4 if ing && lnum > maxy + end + result.each_with_index do |line, offset| + $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) + end + logh.call + end + } + bt = proc { |cmd, name, type, cleanup| + tried = timeout = 0 + begin + tried += 1 + timeout += limit + fd = nil + data = '' + if iswin + Timeout::timeout(timeout) do + tmp = VIM::evaluate('tempname()') + system("(#{cmd}) > #{tmp}") + data = File.read(tmp).chomp + File.unlink tmp rescue nil + end + else + fd = IO.popen(cmd).extend(PlugStream) + first_line = true + log_prob = 1.0 / nthr + while line = Timeout::timeout(timeout) { fd.get_line } + data << line + log.call name, line.chomp, type if name && (first_line || rand < log_prob) + first_line = false + end + fd.close + end + [$? == 0, data.chomp] + rescue Timeout::Error, Interrupt => e + if fd && !fd.closed? + killall fd.pid + fd.close + end + cleanup.call if cleanup + if e.is_a?(Timeout::Error) && tried < tries + 3.downto(1) do |countdown| + s = countdown > 1 ? 's' : '' + log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type + sleep 1 + end + log.call name, 'Retrying ...', type + retry + end + [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] + end + } + main = Thread.current + threads = [] + watcher = Thread.new { + if vim7 + while VIM::evaluate('getchar(1)') + sleep 0.1 + end + else + require 'io/console' # >= Ruby 1.9 + nil until IO.console.getch == 3.chr + end + mtx.synchronize do + running = false + threads.each { |t| t.raise Interrupt } unless vim7 + end + threads.each { |t| t.join rescue nil } + main.kill + } + refresh = Thread.new { + while true + mtx.synchronize do + break unless running + VIM::command('noautocmd normal! a') + end + sleep 0.2 + end + } if VIM::evaluate('s:mac_gui') == 1 + + clone_opt = VIM::evaluate('s:clone_opt') + progress = VIM::evaluate('s:progress_opt(1)') + nthr.times do + mtx.synchronize do + threads << Thread.new { + while pair = take1.call + name = pair.first + dir, uri, tag = pair.last.values_at *%w[dir uri tag] + exists = File.directory? dir + ok, result = + if exists + chdir = "#{cd} #{iswin ? dir : esc(dir)}" + ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil + current_uri = data.lines.to_a.last + if !ret + if data =~ /^Interrupted|^Timeout/ + [false, data] + else + [false, [data.chomp, "PlugClean required."].join($/)] + end + elsif !compare_git_uri(current_uri, uri) + [false, ["Invalid URI: #{current_uri}", + "Expected: #{uri}", + "PlugClean required."].join($/)] + else + if pull + log.call name, 'Updating ...', :update + fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' + bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil + else + [true, skip] + end + end + else + d = esc dir.sub(%r{[\\/]+$}, '') + log.call name, 'Installing ...', :install + bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { + FileUtils.rm_rf dir + } + end + mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok + log.call name, result, ok + end + } if running + end + end + threads.each { |t| t.join rescue nil } + logh.call + refresh.kill if refresh + watcher.kill +EOF +endfunction + +function! s:shellesc_cmd(arg) + let escaped = substitute(a:arg, '[&|<>()@^]', '^&', 'g') + let escaped = substitute(escaped, '%', '%%', 'g') + let escaped = substitute(escaped, '"', '\\^&', 'g') + let escaped = substitute(escaped, '\(\\\+\)\(\\^\)', '\1\1\2', 'g') + return '^"'.substitute(escaped, '\(\\\+\)$', '\1\1', '').'^"' +endfunction + +function! s:shellesc(arg) + if &shell =~# 'cmd.exe$' + return s:shellesc_cmd(a:arg) + endif + return shellescape(a:arg) +endfunction + +function! s:glob_dir(path) + return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') +endfunction + +function! s:progress_bar(line, bar, total) + call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') +endfunction + +function! s:compare_git_uri(a, b) + " See `git help clone' + " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] + " [git@] github.com[:port] : junegunn/vim-plug [.git] + " file:// / junegunn/vim-plug [/] + " / junegunn/vim-plug [/] + let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' + let ma = matchlist(a:a, pat) + let mb = matchlist(a:b, pat) + return ma[1:2] ==# mb[1:2] +endfunction + +function! s:format_message(bullet, name, message) + if a:bullet != 'x' + return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] + else + let lines = map(s:lines(a:message), '" ".v:val') + return extend([printf('x %s:', a:name)], lines) + endif +endfunction + +function! s:with_cd(cmd, dir) + return printf('cd%s %s && %s', s:is_win ? ' /d' : '', s:shellesc(a:dir), a:cmd) +endfunction + +function! s:system(cmd, ...) + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd + if s:is_win + let batchfile = tempname().'.bat' + call writefile(['@echo off', cmd], batchfile) + let cmd = batchfile + endif + return system(s:is_win ? '('.cmd.')' : cmd) + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win + call delete(batchfile) + endif + endtry +endfunction + +function! s:system_chomp(...) + let ret = call('s:system', a:000) + return v:shell_error ? '' : substitute(ret, '\n$', '', '') +endfunction + +function! s:git_validate(spec, check_branch) + let err = '' + if isdirectory(a:spec.dir) + let result = s:lines(s:system('git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url', a:spec.dir)) + let remote = result[-1] + if v:shell_error + let err = join([remote, 'PlugClean required.'], "\n") + elseif !s:compare_git_uri(remote, a:spec.uri) + let err = join(['Invalid URI: '.remote, + \ 'Expected: '.a:spec.uri, + \ 'PlugClean required.'], "\n") + elseif a:check_branch && has_key(a:spec, 'commit') + let result = s:lines(s:system('git rev-parse HEAD 2>&1', a:spec.dir)) + let sha = result[-1] + if v:shell_error + let err = join(add(result, 'PlugClean required.'), "\n") + elseif !s:hash_match(sha, a:spec.commit) + let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', + \ a:spec.commit[:6], sha[:6]), + \ 'PlugUpdate required.'], "\n") + endif + elseif a:check_branch + let branch = result[0] + " Check tag + if has_key(a:spec, 'tag') + let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) + if a:spec.tag !=# tag && a:spec.tag !~ '\*' + let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', + \ (empty(tag) ? 'N/A' : tag), a:spec.tag) + endif + " Check branch + elseif a:spec.branch !=# branch + let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', + \ branch, a:spec.branch) + endif + if empty(err) + let [ahead, behind] = split(s:lastline(s:system(printf( + \ 'git rev-list --count --left-right HEAD...origin/%s', + \ a:spec.branch), a:spec.dir)), '\t') + if !v:shell_error && ahead + if behind + " Only mention PlugClean if diverged, otherwise it's likely to be + " pushable (and probably not that messed up). + let err = printf( + \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" + \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', a:spec.branch, ahead, behind) + else + let err = printf("Ahead of origin/%s by %d commit(s).\n" + \ .'Cannot update until local changes are pushed.', + \ a:spec.branch, ahead) + endif + endif + endif + endif + else + let err = 'Not found' + endif + return [err, err =~# 'PlugClean'] +endfunction + +function! s:rm_rf(dir) + if isdirectory(a:dir) + call s:system((s:is_win ? 'rmdir /S /Q ' : 'rm -rf ') . s:shellesc(a:dir)) + endif +endfunction + +function! s:clean(force) + call s:prepare() + call append(0, 'Searching for invalid plugins in '.g:plug_home) + call append(1, '') + + " List of valid directories + let dirs = [] + let errs = {} + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + if !s:is_managed(name) + call add(dirs, spec.dir) + else + let [err, clean] = s:git_validate(spec, 1) + if clean + let errs[spec.dir] = s:lines(err)[0] + else + call add(dirs, spec.dir) + endif + endif + let cnt += 1 + call s:progress_bar(2, repeat('=', cnt), total) + normal! 2G + redraw + endfor + + let allowed = {} + for dir in dirs + let allowed[s:dirpath(fnamemodify(dir, ':h:h'))] = 1 + let allowed[dir] = 1 + for child in s:glob_dir(dir) + let allowed[child] = 1 + endfor + endfor + + let todo = [] + let found = sort(s:glob_dir(g:plug_home)) + while !empty(found) + let f = remove(found, 0) + if !has_key(allowed, f) && isdirectory(f) + call add(todo, f) + call append(line('$'), '- ' . f) + if has_key(errs, f) + call append(line('$'), ' ' . errs[f]) + endif + let found = filter(found, 'stridx(v:val, f) != 0') + end + endwhile + + 4 + redraw + if empty(todo) + call append(line('$'), 'Already clean.') + else + let s:clean_count = 0 + call append(3, ['Directories to delete:', '']) + redraw! + if a:force || s:ask_no_interrupt('Delete all directories?') + call s:delete([6, line('$')], 1) + else + call setline(4, 'Cancelled.') + nnoremap d :set opfunc=delete_opg@ + nmap dd d_ + xnoremap d :call delete_op(visualmode(), 1) + echo 'Delete the lines (d{motion}) to delete the corresponding directories' + endif + endif + 4 + setlocal nomodifiable +endfunction + +function! s:delete_op(type, ...) + call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) +endfunction + +function! s:delete(range, force) + let [l1, l2] = a:range + let force = a:force + while l1 <= l2 + let line = getline(l1) + if line =~ '^- ' && isdirectory(line[2:]) + execute l1 + redraw! + let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) + let force = force || answer > 1 + if answer + call s:rm_rf(line[2:]) + setlocal modifiable + call setline(l1, '~'.line[1:]) + let s:clean_count += 1 + call setline(4, printf('Removed %d directories.', s:clean_count)) + setlocal nomodifiable + endif + endif + let l1 += 1 + endwhile +endfunction + +function! s:upgrade() + echo 'Downloading the latest version of vim-plug' + redraw + let tmp = tempname() + let new = tmp . '/plug.vim' + + try + let out = s:system(printf('git clone --depth 1 %s %s', s:plug_src, tmp)) + if v:shell_error + return s:err('Error upgrading vim-plug: '. out) + endif + + if readfile(s:me) ==# readfile(new) + echo 'vim-plug is already up-to-date' + return 0 + else + call rename(s:me, s:me . '.old') + call rename(new, s:me) + unlet g:loaded_plug + echo 'vim-plug has been upgraded' + return 1 + endif + finally + silent! call s:rm_rf(tmp) + endtry +endfunction + +function! s:upgrade_specs() + for spec in values(g:plugs) + let spec.frozen = get(spec, 'frozen', 0) + endfor +endfunction + +function! s:status() + call s:prepare() + call append(0, 'Checking plugins') + call append(1, '') + + let ecnt = 0 + let unloaded = 0 + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + let is_dir = isdirectory(spec.dir) + if has_key(spec, 'uri') + if is_dir + let [err, _] = s:git_validate(spec, 1) + let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] + else + let [valid, msg] = [0, 'Not found. Try PlugInstall.'] + endif + else + if is_dir + let [valid, msg] = [1, 'OK'] + else + let [valid, msg] = [0, 'Not found.'] + endif + endif + let cnt += 1 + let ecnt += !valid + " `s:loaded` entry can be missing if PlugUpgraded + if is_dir && get(s:loaded, name, -1) == 0 + let unloaded = 1 + let msg .= ' (not loaded)' + endif + call s:progress_bar(2, repeat('=', cnt), total) + call append(3, s:format_message(valid ? '-' : 'x', name, msg)) + normal! 2G + redraw + endfor + call setline(1, 'Finished. '.ecnt.' error(s).') + normal! gg + setlocal nomodifiable + if unloaded + echo "Press 'L' on each line to load plugin, or 'U' to update" + nnoremap L :call status_load(line('.')) + xnoremap L :call status_load(line('.')) + end +endfunction + +function! s:extract_name(str, prefix, suffix) + return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') +endfunction + +function! s:status_load(lnum) + let line = getline(a:lnum) + let name = s:extract_name(line, '-', '(not loaded)') + if !empty(name) + call plug#load(name) + setlocal modifiable + call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) + setlocal nomodifiable + endif +endfunction + +function! s:status_update() range + let lines = getline(a:firstline, a:lastline) + let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') + if !empty(names) + echo + execute 'PlugUpdate' join(names) + endif +endfunction + +function! s:is_preview_window_open() + silent! wincmd P + if &previewwindow + wincmd p + return 1 + endif +endfunction + +function! s:find_name(lnum) + for lnum in reverse(range(1, a:lnum)) + let line = getline(lnum) + if empty(line) + return '' + endif + let name = s:extract_name(line, '-', '') + if !empty(name) + return name + endif + endfor + return '' +endfunction + +function! s:preview_commit() + if b:plug_preview < 0 + let b:plug_preview = !s:is_preview_window_open() + endif + + let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') + if empty(sha) + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) + return + endif + + if exists('g:plug_pwindow') && !s:is_preview_window_open() + execute g:plug_pwindow + execute 'e' sha + else + execute 'pedit' sha + wincmd P + endif + setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + let cmd = 'cd '.s:shellesc(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha + if s:is_win + let batchfile = tempname().'.bat' + call writefile(['@echo off', cmd], batchfile) + let cmd = batchfile + endif + execute 'silent %!' cmd + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win + call delete(batchfile) + endif + endtry + setlocal nomodifiable + nnoremap q :q + wincmd p +endfunction + +function! s:section(flags) + call search('\(^[x-] \)\@<=[^:]\+:', a:flags) +endfunction + +function! s:format_git_log(line) + let indent = ' ' + let tokens = split(a:line, nr2char(1)) + if len(tokens) != 5 + return indent.substitute(a:line, '\s*$', '', '') + endif + let [graph, sha, refs, subject, date] = tokens + let tag = matchstr(refs, 'tag: [^,)]\+') + let tag = empty(tag) ? ' ' : ' ('.tag.') ' + return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) +endfunction + +function! s:append_ul(lnum, text) + call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) +endfunction + +function! s:diff() + call s:prepare() + call append(0, ['Collecting changes ...', '']) + let cnts = [0, 0] + let bar = '' + let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') + call s:progress_bar(2, bar, len(total)) + for origin in [1, 0] + let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) + if empty(plugs) + continue + endif + call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') + for [k, v] in plugs + let range = origin ? '..origin/'.v.branch : 'HEAD@{1}..' + let diff = s:system_chomp('git log --graph --color=never '.join(map(['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range], 's:shellesc(v:val)')), v.dir) + if !empty(diff) + let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' + call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) + let cnts[origin] += 1 + endif + let bar .= '=' + call s:progress_bar(2, bar, len(total)) + normal! 2G + redraw + endfor + if !cnts[origin] + call append(5, ['', 'N/A']) + endif + endfor + call setline(1, printf('%d plugin(s) updated.', cnts[0]) + \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) + + if cnts[0] || cnts[1] + nnoremap :silent! call preview_commit() + nnoremap o :silent! call preview_commit() + endif + if cnts[0] + nnoremap X :call revert() + echo "Press 'X' on each block to revert the update" + endif + normal! gg + setlocal nomodifiable +endfunction + +function! s:revert() + if search('^Pending updates', 'bnW') + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || + \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' + return + endif + + call s:system('git reset --hard HEAD@{1} && git checkout '.s:esc(g:plugs[name].branch).' --', g:plugs[name].dir) + setlocal modifiable + normal! "_dap + setlocal nomodifiable + echo 'Reverted' +endfunction + +function! s:snapshot(force, ...) abort + call s:prepare() + setf vim + call append(0, ['" Generated by vim-plug', + \ '" '.strftime("%c"), + \ '" :source this file in vim to restore the snapshot', + \ '" or execute: vim -S snapshot.vim', + \ '', '', 'PlugUpdate!']) + 1 + let anchor = line('$') - 3 + let names = sort(keys(filter(copy(g:plugs), + \'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)'))) + for name in reverse(names) + let sha = s:system_chomp('git rev-parse --short HEAD', g:plugs[name].dir) + if !empty(sha) + call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) + redraw + endif + endfor + + if a:0 > 0 + let fn = expand(a:1) + if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) + return + endif + call writefile(getline(1, '$'), fn) + echo 'Saved as '.a:1 + silent execute 'e' s:esc(fn) + setf vim + endif +endfunction + +function! s:split_rtp() + return split(&rtp, '\\\@ out + tabnew a.c + redir END + Assert stridx(out, 'ftplugin-c') >= 0, 'Unexpected output (1): '.out + +* The same applies to plug#load()) + call ResetPlug() + redir => out + call plug#load('ftplugin-msg') + redir END + Assert stridx(out, 'ftplugin-c') >= 0, 'Unexpected output (2): '.out + q + + +********************************************************************** +Execute (#114 Should not contain empty path in &rtp): + call plug#begin('/tmp/vim-plug-test/plugged') + call plug#end() + + Log &rtp + Assert &rtp !~ ',,', 'Commas' + Assert &rtp !~ '^,', 'Comma prefix' + Assert &rtp !~ ',$', 'Comma suffix' + +********************************************************************** +Execute (#130 Proper cleanup of on-demand loading triggers): + augroup PlugLOD + autocmd! + augroup END + + " Cleared on command + call ReloadPlug() + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/vim-emoji', { 'on': ['EmojiCommand', 'EmojiCommand2', '(EmojiMapping)'] } + call plug#end() + PlugInstall | q + + Assert exists(':EmojiCommand'), 'EmojiCommand not defined' + Assert exists(':EmojiCommand2'), 'EmojiCommand2 not defined' + Assert !empty(mapcheck('(EmojiMapping)')), '(EmojiMapping) not defined' + + silent! EmojiCommand + + Assert !exists(':EmojiCommand'), 'EmojiCommand defined' + Assert !exists(':EmojiCommand2'), 'EmojiCommand2 defined' + Assert empty(mapcheck('(EmojiMapping)')), '(EmojiMapping) defined' + + " Cleared on FileType + call ReloadPlug() + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/vim-emoji', { 'on': ['EmojiCommandExtra', '(EmojiMappingExtra)'], 'for': ['emoji'] } + call plug#end() + + Assert exists(':EmojiCommandExtra'), 'EmojiCommandExtra not defined' + Assert !empty(mapcheck('(EmojiMappingExtra)')), '(EmojiMappingExtra) not defined' + + setf emoji + + Assert !exists(':EmojiCommandExtra'), 'EmojiCommandExtra defined' + Assert empty(mapcheck('(EmojiMappingExtra)')), '(EmojiMappingExtra) defined' + +********************************************************************** +Execute (#131 Syntax error): + call plug#begin('/proc/no-permission') + Plug 'junegunn/vim-emoji' + call plug#end() + + redir => out + silent PlugInstall + redir END + Assert out =~ 'Invalid plug directory: /proc/no-permission', out + +********************************************************************** +Execute (#139-1 Using new remote branch): + " Make sure to remove the clone + call plug#begin('/tmp/vim-plug-test/plugged') + call plug#end() + PlugClean! + + " Install master branch + call plug#begin('/tmp/vim-plug-test/plugged') + Plug expand('file:////tmp/vim-plug-test/new-branch') + call plug#end() + PlugUpdate + + unlet! g:foo g:bar g:baz + call ResetPlug() + call plug#load('new-branch') + Assert exists('g:foo'), 'g:foo should be found (1)' + Assert !exists('g:bar'), 'g:bar should not be found (1)' + Assert !exists('g:baz'), 'g:baz should not be found (1)' + + " Create a new branch on origin + call system('cd /tmp/vim-plug-test/new-branch && git checkout -b new &&' + \. 'echo "let g:bar = 1" > plugin/bar.vim && git add plugin/bar.vim &&' + \. 'git commit -m second') + + " We're setting up two plugins so that parallel installer is used + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/seoul256.vim' + Plug expand('file:////tmp/vim-plug-test/new-branch'), { 'branch': 'new' } + call plug#end() + PlugUpdate + silent %y + Log @" + Assert @" !~? 'error', 'Should be able to use new remote branch: ' . @" + + unlet! g:foo g:bar g:baz + call ResetPlug() + call plug#load('new-branch') + Assert exists('g:foo'), 'g:foo should be found (2)' + Assert exists('g:bar'), 'g:bar should be found (2)' + Assert !exists('g:baz'), 'g:baz should not be found (2)' + + call PlugStatusSorted() + +Expect: + - new-branch: OK + - seoul256.vim: OK + Finished. 0 error(s). + [==] + +Execute (#139-2 Using yet another new remote branch): + " Create another branch on origin + call system('cd /tmp/vim-plug-test/new-branch && git checkout master &&' + \. 'git checkout -b brand-new &&' + \. 'echo "let g:baz = 1" > plugin/baz.vim && git add plugin/baz.vim &&' + \. 'git commit -m third') + + " Test Vim installer here + call plug#begin('/tmp/vim-plug-test/plugged') + Plug expand('file:////tmp/vim-plug-test/new-branch'), { 'branch': 'brand-new' } + call plug#end() + PlugUpdate + silent %y + Log @" + Assert @" !~? 'error', 'Should be able to use new remote branch: ' . @" + + unlet! g:foo g:bar g:baz + call ResetPlug() + call plug#load('new-branch') + Assert exists('g:foo'), 'g:foo should be found' + Assert !exists('g:bar'), 'g:bar should not be found' + Assert exists('g:baz'), 'g:baz should be found' + + call PlugStatusSorted() + +Expect: + - new-branch: OK + Finished. 0 error(s). + [=] + +Execute (#139-3 Should fail when not possible to fast-forward): + " Commit on cloned repo + call system('cd /tmp/vim-plug-test/plugged/new-branch && git checkout master &&' + \. 'touch foobar && git add foobar && git commit -m foobar') + + " Different commit on remote + call system('cd /tmp/vim-plug-test/new-branch && git checkout master &&' + \. 'touch foobaz && git add foobaz && git commit -m foobaz') + + for multi in [0, 1] + call plug#begin('/tmp/vim-plug-test/plugged') + if multi + Plug 'junegunn/seoul256.vim' + endif + Plug expand('file:////tmp/vim-plug-test/new-branch') + call plug#end() + PlugUpdate + silent %y + Assert @" =~ 'Not possible to fast-forward', @" + endfor + q + +********************************************************************** +Execute (#145: Merging on-demand loading triggers - cmd): + unlet! g:xxx g:yyy + call plug#begin() + Plug '$PLUG_FIXTURES/xxx', { 'on': 'XXX' } + Plug '$PLUG_FIXTURES/yyy', { 'on': ['XXX', 'YYY'] } + call plug#end() + + silent! XXX + + Assert exists('g:xxx'), 'xxx is not loaded' + Assert exists('g:yyy'), 'yyy is not loaded' + Assert !exists(':YYY') + +Execute (#145: Merging on-demand loading triggers - map): + unlet! g:xxx g:yyy + + call ReloadPlug() + call plug#begin() + Plug '$PLUG_FIXTURES/xxx', { 'on': '(xxx)' } + Plug '$PLUG_FIXTURES/yyy', { 'on': ['(xxx)' ,'(yyy)' ] } + call plug#end() + + Assert !empty(mapcheck("(xxx)")) + Assert !empty(mapcheck("(yyy)")) + +# FIXME feedkeys() cannot be tested with Vader + call plug#load('xxx', 'yyy') + Assert empty(mapcheck("(xxx)")) + Assert empty(mapcheck("(yyy)")) + +********************************************************************** +Execute (#159: shell=/bin/tcsh): + let org = &shell + try + set shell=/bin/tcsh + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/seoul256.vim' + call plug#end() + + PlugStatus + Log getline(1, '$') + q + AssertEqual '/bin/tcsh', &shell + finally + let &shell = org + endtry + +********************************************************************** +Execute (#154: Spaces in &rtp should not be escaped): + call plug#begin('/tmp/vim-plug-test/plug it') + Plug 'foo/seoul256 vim' + call plug#end() + Log &rtp + Assert stridx(&rtp, 'plug it/seoul256 vim') >= 0 + +********************************************************************** +Execute (#184: Duplicate entries in &rtp): + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'foo/plugin1' + \| Plug 'foo/plugin0' + + Plug 'foo/plugin2' + \| Plug 'foo/plugin0' + \| Plug 'foo/plugin1' + call plug#end() + + Log &rtp + AssertEqual 3, len(filter(split(&rtp, ','), 'stridx(v:val, "plugged") >= 0')) + +********************************************************************** +Execute (#236: Plugin removed from &rtp when .vimrc is reloaded): + unlet! g:loaded_easy_align_plugin + silent! delc EasyAlign + + call ReloadPlug() + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/vim-easy-align', { 'on': 'EasyAlign' } + call plug#end() + PlugInstall | q + + Assert &rtp !~ '/vim-easy-align', 'Plugin should not be in &rtp' + %EasyAlign= + Assert &rtp =~ '/vim-easy-align', 'Plugin should be in &rtp' + + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/vim-easy-align', { 'on': 'EasyAlign' } + call plug#end() + Assert &rtp =~ '/vim-easy-align', 'Plugin should still be in &rtp' + +********************************************************************** +Execute (#350: Ruby installer failed to unshallow tagged plugin on update): + call plug#begin('/tmp/vim-plug-test/plugged') + call plug#end() + PlugClean! + + " Shallow clone. We should have at least 2 plugins to enable parallel installer. + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/vim-easy-align' + Plug 'junegunn/seoul256.vim' + call plug#end() + PlugUpdate + Assert filereadable(g:plugs['vim-easy-align'].dir.'/.git/shallow') + + " Now unshallowed + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/vim-easy-align', { 'tag': '2.9.0' } + Plug 'junegunn/seoul256.vim' + call plug#end() + PlugUpdate + Assert !filereadable(g:plugs['vim-easy-align'].dir.'/.git/shallow') + q + +********************************************************************** +Execute (#474: Load ftdetect files in filetypedetect augroup): + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/rust.vim', { 'for': 'rust', 'commit': '115d321d383eb96d438466c56cc871fcc1bd0faa' } + call plug#end() + PlugInstall! + q + + tabnew /tmp/vim-plug-test/any.rs + AssertEqual 'rust', &filetype + Log &filetype + filetype detect + AssertEqual 'rust', &filetype + Log &filetype + bd + +********************************************************************** +Execute (#489/#587 On-demand loading with 'on' option should trigger BufRead autocmd w/o nomodeline): + call plug#begin('$PLUG_FIXTURES') + Plug 'foo/ftplugin-msg', { 'on': 'XXX' } + call plug#end() + + tabnew a.java + call setline(1, '// vim: set filetype=lava:') + redir => out + silent! XXX + redir END + Assert stridx(out, 'ftplugin-java') >= 0 + AssertEqual 'lava', &filetype + q! + +********************************************************************** +Execute (Cursor moved to another window during post-update hook): + function! DoSplit(...) + new + call setline(1, 'empty') + endfunction + call plug#begin('/tmp/vim-plug-test/plugged') + Plug 'junegunn/rust.vim', { 'do': function('DoSplit') } + call plug#end() + PlugInstall! + AssertEqual 1, line('$') + AssertEqual 'empty', getline(1) + q! + q + +********************************************************************** +Execute (#593 Add plugin to &rtp before running post-update hook with : prefix): + call ReloadPlug() + call plug#begin() + Plug 'junegunn/vim-pseudocl', { 'on': 'XXX', 'do': ':let g:bar = pseudocl#complete#extract_words(''a b'')' } + call plug#end() + PlugInstall! + AssertEqual ['a', 'b'], g:bar + +********************************************************************** +Execute (#602 Confusion with branch name and path name): + call plug#begin() + Plug expand('file:////tmp/vim-plug-test/new-branch'), { 'branch': 'plugin' } + call plug#end() + PlugUpdate + call PlugStatusSorted() + +Expect: + - new-branch: OK + Finished. 0 error(s). + [=] + +********************************************************************** +Execute (PlugStatus showed error with wildcard tag): + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'tag': '*' } + call plug#end() + PlugUpdate + call PlugStatusSorted() + +Expect: + - vim-easy-align: OK + Finished. 0 error(s). + [=] diff --git a/.vim/vim-plug/test/run b/.vim/vim-plug/test/run new file mode 100755 index 0000000..6e19ed8 --- /dev/null +++ b/.vim/vim-plug/test/run @@ -0,0 +1,130 @@ +#!/bin/bash + +# Privileged mode, ignores $CDPATH etc. +set -p +set -eu + +cd "$(dirname "${BASH_SOURCE[0]}")" + +export BASE="$PWD" +export PLUG_SRC="$PWD/../plug.vim" +export PLUG_FIXTURES="$PWD/fixtures" +mkdir -p "$PLUG_FIXTURES" +export TEMP=/tmp/vim-plug-test +rm -rf "$TEMP" +mkdir -p "$TEMP" + +cat > $TEMP/mini-vimrc << VIMRC +set rtp+=$TEMP/junegunn/vader.vim +set shell=/bin/bash +VIMRC + +clone() { + if [ ! -d "$2" ]; then + git clone "$1" "$2" + fi +} + +clone_repos() ( + cd $TEMP + mkdir -p junegunn vim-scripts jg + for repo in vader.vim goyo.vim rust.vim seoul256.vim vim-easy-align vim-fnr \ + vim-oblique vim-pseudocl vim-redis vim-emoji; do + clone https://github.com/junegunn/${repo}.git junegunn/$repo & + done + clone https://github.com/vim-scripts/beauty256.git vim-scripts/beauty256 & + clone https://github.com/junegunn/fzf.git fzf & + clone https://github.com/yous/subsubmodule.git yous/subsubmodule && \ + (cd yous/subsubmodule && git submodule update --init --recursive &) & + wait + + clone junegunn/vim-emoji jg/vim-emoji + cd junegunn/seoul256.vim && git checkout no-t_co && git checkout master +) + +make_dirs() ( + rm -rf "$PLUG_FIXTURES/$1" + mkdir -p "$PLUG_FIXTURES/$1" + cd "$PLUG_FIXTURES/$1" + mkdir -p autoload colors ftdetect ftplugin indent plugin syntax + for d in *; do + [ -d "$d" ] || continue + cat > "$d/xxx.vim" << EOF + " echom expand('') + let g:total_order = get(g:, 'total_order', []) + let g:$2 = get(g:, '$2', []) + let s:name = join(filter(['$2', '${1:4}', '$d'], '!empty(v:val)'), '/') + call add(g:$2, s:name) + call add(g:total_order, s:name) +EOF + done +) + +gitinit() ( + cd "$PLUG_FIXTURES/$1" + git init + git commit -m 'commit' --allow-empty +) + +prepare() { + make_dirs xxx/ xxx + make_dirs xxx/after xxx + mkdir -p "$PLUG_FIXTURES/xxx/doc" + cat > "$PLUG_FIXTURES/xxx/doc/xxx.txt" << DOC +hello *xxx* +DOC + gitinit xxx + + make_dirs yyy/ yyy + make_dirs yyy/after yyy + mkdir -p "$PLUG_FIXTURES/yyy/rtp/doc" + cat > "$PLUG_FIXTURES/yyy/rtp/doc/yyy.txt" << DOC +hello *yyy* +DOC + gitinit yyy + + make_dirs z1/ z1 + make_dirs z2/ z2 + + rm -rf "$PLUG_FIXTURES/ftplugin-msg" + mkdir -p "$PLUG_FIXTURES/ftplugin-msg/ftplugin" + echo "echomsg 'ftplugin-c'" > "$PLUG_FIXTURES/ftplugin-msg/ftplugin/c.vim" + echo "echomsg 'ftplugin-java'" > "$PLUG_FIXTURES/ftplugin-msg/ftplugin/java.vim" + + rm -rf $TEMP/new-branch + cd $TEMP + git init new-branch + cd new-branch + mkdir plugin + echo 'let g:foo = 1' > plugin/foo.vim + git add plugin/foo.vim + git commit -m initial + git checkout -b plugin + git checkout master + + cd "$BASE" +} + +select_vim() { + local vim=/usr/bin/vim + if [ -n "${DEPS:-}" ] && [ -e "${DEPS}/bin/vim" ]; then + vim="${DEPS}/bin/vim" + elif [ -e "/usr/local/bin/vim" ]; then + vim=/usr/local/bin/vim + fi + echo $vim +} + +clone_repos +prepare + +git --version +vim=$(select_vim) +echo "Selected Vim: $vim" +if [ "${1:-}" = '!' ]; then + $vim -Nu $TEMP/mini-vimrc -c 'Vader! test.vader' > /dev/null && + prepare && + $vim -Nu $TEMP/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null +else + $vim -Nu $TEMP/mini-vimrc -c 'Vader test.vader' +fi diff --git a/.vim/vim-plug/test/test.vader b/.vim/vim-plug/test/test.vader new file mode 100644 index 0000000..eaa444c --- /dev/null +++ b/.vim/vim-plug/test/test.vader @@ -0,0 +1,108 @@ +Execute (Initialize test environment): + Save &rtp, g:plugs, g:plug_home, g:plug_window + unlet! g:plugs g:plug_home g:plug_window + + let g:plug_url_format = 'file:///tmp/vim-plug-test/%s' + let g:base_rtp = &rtp + let g:first_rtp = split(&rtp, ',')[0] + let g:last_rtp = split(&rtp, ',')[-1] + let g:temp_plugged = tempname() + if !exists('$PLUG_SRC') + let $PLUG_SRC = globpath(&rtp, 'autoload/plug.vim') + endif + let $PLUG_TMP = fnamemodify(tempname(), ':h').'/plug.vim' + + " Temporarily patch plug.vim + call system('cp "$PLUG_SRC" "$PLUG_TMP"') + let patch = + \ ['function! ResetPlug()', 'let s:loaded = {}', 'endfunction', + \ 'function! CompareURI(a, b)', 'return s:compare_git_uri(a:a, a:b)', 'endfunction'] + + if $ENV != 'vim8' + call add(patch, 'let s:vim8 = 0') + endif + + call writefile(extend(readfile($PLUG_TMP), patch), $PLUG_TMP) + + set t_Co=256 + colo default + pclose + + function! PlugStatusSorted() + PlugStatus + %y + q + normal! P + %sort + g/^$/d + endfunction + + function! AssertExpect(bang, pat, cnt) + let op = a:bang ? '==#' : '=~#' + AssertEqual a:cnt, len(filter(getline(1, '$'), "v:val ".op." '".a:pat."'")) + endfunction + command! -nargs=+ -bang AssertExpect call AssertExpect('' == '!', ) + + function! EnsureLoaded() + if has('vim_starting') + runtime! plugin/**/*.vim + endif + endfunction + + function! RmRf(file) + call system(printf('rm -rf "%s"', a:file)) + endfunction + + function! ReloadPlug() + call ResetPlug() + source $PLUG_TMP + let &rtp = g:base_rtp + endfunction + + function! GitBranch(repo) + return system(printf('cd %s && git rev-parse --abbrev-ref HEAD', g:plugs[a:repo].dir))[:-2] + endfunction + + function! GitTag(repo) + return system(printf('cd %s && git describe --tags', g:plugs[a:repo].dir))[:-2] + endfunction + + function! GitCommit(repo) + return system(printf('cd %s && git rev-parse HEAD', g:plugs[a:repo].dir))[:-2] + endfunction + + source $PLUG_TMP + +Execute (Print Interpreter Version): + redir => out + if has('ruby') + silent! ruby puts 'Ruby: ' + RUBY_VERSION + endif + if has('python') + silent! python import sys; svi = sys.version_info; print 'Python: {}.{}.{}'.format(svi[0], svi[1], svi[2]) + endif + if has('python3') + silent! python3 import sys; svi = sys.version_info; print('Python: {}.{}.{}'.format(svi[0], svi[1], svi[2])) + endif + redir END + Log split(out, '\n') + +Include: workflow.vader +Include: regressions.vader + +Execute (Cleanup): + silent! call RmRf(g:temp_plugged) + silent! unlet g:plugs g:plug_home g:plug_url_format + silent! unlet g:temp_plugged g:first_rtp g:last_rtp g:base_rtp out + silent! delf PlugStatusSorted + silent! delf AssertExpect + silent! delf PlugUpdated + silent! delf EnsureLoaded + silent! delf ReloadPlug + silent! delc AssertExpect + silent! unmap / + silent! unmap ? + call delete($PLUG_TMP) + + Restore + diff --git a/.vim/vim-plug/test/workflow.vader b/.vim/vim-plug/test/workflow.vader new file mode 100644 index 0000000..8034d2f --- /dev/null +++ b/.vim/vim-plug/test/workflow.vader @@ -0,0 +1,1633 @@ +Execute (plug#end() before plug#begin() should fail): + redir => out + silent! AssertEqual 0, plug#end() + redir END + Assert stridx(out, 'Call plug#begin() first') >= 0 + +Execute (plug#begin() without path argument): + call plug#begin() + AssertEqual split(&rtp, ',')[0].'/plugged', g:plug_home + unlet g:plug_home + +Execute (plug#begin() without path argument with empty &rtp): + let save_rtp = &rtp + set rtp= + redir => out + AssertEqual 0, plug#begin() + redir END + Assert stridx(out, 'Unable to determine plug home') >= 0 + let &rtp = save_rtp + unlet save_rtp + +Execute (Standard runtime path is not allowed): + redir => out + silent! AssertEqual 0, plug#begin(split(&rtp, ',')[0].'/plugin') + redir END + Log out + Assert stridx(out, 'Invalid plug home') >= 0 + +Execute (plug#begin(path)): + call plug#begin(g:temp_plugged.'/') + Assert g:plug_home !~ '[/\\]$', 'Trailing / should be stripped from g:plug_home' + + AssertEqual 0, len(g:plugs) + AssertEqual g:temp_plugged, g:plug_home + AssertEqual g:base_rtp, &rtp + +Execute (Subsequent plug#begin() calls will reuse g:plug_home): + call plug#begin() + AssertEqual g:temp_plugged, g:plug_home + +Execute (Test Plug command): +^ Git repo with branch (DEPRECATED. USE BRANCH OPTION) + Plug 'junegunn/seoul256.vim', { 'branch': 'yes-t_co' } + AssertEqual 'file:///tmp/vim-plug-test/junegunn/seoul256.vim', g:plugs['seoul256.vim'].uri + AssertEqual join([g:temp_plugged, 'seoul256.vim/'], '/'), g:plugs['seoul256.vim'].dir + AssertEqual 'yes-t_co', g:plugs['seoul256.vim'].branch + + Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co' } " Using branch option + AssertEqual 'no-t_co', g:plugs['seoul256.vim'].branch + +^ Git repo with tag (DEPRECATED. USE TAG OPTION) + Plug 'junegunn/goyo.vim', '1.5.2' + AssertEqual 'file:///tmp/vim-plug-test/junegunn/goyo.vim', g:plugs['goyo.vim'].uri + AssertEqual join([g:temp_plugged, 'goyo.vim/'], '/'), g:plugs['goyo.vim'].dir + AssertEqual '1.5.2', g:plugs['goyo.vim'].tag + + Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } " Using tag option + AssertEqual '1.5.3', g:plugs['goyo.vim'].tag + + " Git URI + Plug 'file:///tmp/vim-plug-test/jg/vim-emoji' + AssertEqual 'file:///tmp/vim-plug-test/jg/vim-emoji', g:plugs['vim-emoji'].uri + AssertEqual 'master', g:plugs['vim-emoji'].branch + AssertEqual join([g:temp_plugged, 'vim-emoji/'], '/'), g:plugs['vim-emoji'].dir + + " vim-scripts/ + Plug 'vim-scripts/beauty256' + AssertEqual 'file:///tmp/vim-plug-test/vim-scripts/beauty256', g:plugs.beauty256.uri + AssertEqual 'master', g:plugs.beauty256.branch + + AssertEqual 4, len(g:plugs) + + redir => out + Plug 'beauty256' + redir END + Assert out =~ 'Invalid argument: beauty256' + +Execute (Plug command with dictionary option): + Log string(g:plugs) + Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co', 'rtp': '././' } + AssertEqual join([g:temp_plugged, 'seoul256.vim/'], '/'), g:plugs['seoul256.vim'].dir + AssertEqual '././', g:plugs['seoul256.vim'].rtp + + Log string(g:plugs) + AssertEqual 4, len(g:plugs) + +Execute (PlugStatus before installation): + PlugStatus + AssertExpect 'Not found', 4 + q + +Execute (PlugClean before installation): + PlugClean + AssertExpect 'Already clean', 1 + q + +Execute (plug#end() updates &rtp): + " Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } + " Plug 'file:///tmp/vim-plug-test/jg/vim-emoji' + " Plug 'beauty256' + " Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co', 'rtp': '././' } + call plug#end() + Assert len(&rtp) > len(g:base_rtp) + AssertEqual g:first_rtp, split(&rtp, ',')[0] + AssertEqual g:last_rtp, split(&rtp, ',')[-1] + +Execute (Yet, plugins are not available): + Assert empty(globpath(&rtp, 'autoload/emoji.vim')) + +Execute (PlugInstall): + PlugInstall + q + +Execute (Plugin available after installation): + Assert !empty(globpath(&rtp, 'autoload/emoji.vim')) + +Execute (PlugClean after installation): + PlugClean + AssertExpect 'Already clean', 1 + q + +Execute (PlugStatus after installation): + PlugStatus + Log getline(1, '$') + AssertExpect 'OK', 4 + q + +Execute (PlugUpdate - tagged plugin should not fail (#174)): + PlugUpdate goyo.vim + Log getline(1, '$') + AssertExpect '^- goyo.vim', 1 + q + +Execute (Change tag of goyo.vim): + call plug#begin() + Plug 'junegunn/goyo.vim', { 'tag': '9.9.9' } + call plug#end() + +Execute (PlugStatus): + call PlugStatusSorted() + +Expect: + Invalid tag: 1.5.3 (expected: 9.9.9). Try PlugUpdate. + Finished. 1 error(s). + [=] + x goyo.vim: + +Execute (Remove tag of goyo.vim): + call plug#begin() + Plug 'junegunn/goyo.vim' + call plug#end() + +Execute (PlugStatus): + call PlugStatusSorted() + +Expect: + Invalid branch: HEAD (expected: master). Try PlugUpdate. + Finished. 1 error(s). + [=] + x goyo.vim: + +Execute (PlugUpdate to set the right branch): + PlugUpdate + call PlugStatusSorted() + +Expect: + - goyo.vim: OK + Finished. 0 error(s). + [=] + +Execute (Change branch of seoul256.vim): + call plug#begin() + Plug 'junegunn/seoul256.vim' + Plug 'file:///tmp/vim-plug-test/jg/vim-emoji' + call plug#end() + +Execute (PlugStatus): + call PlugStatusSorted() + +Expect: + Invalid branch: no-t_co (expected: master). Try PlugUpdate. + - vim-emoji: OK + Finished. 1 error(s). + [==] + x seoul256.vim: + +Execute (PlugUpdate to switch branch, then PlugStatus): + PlugUpdate + call PlugStatusSorted() + +Expect: + - seoul256.vim: OK + - vim-emoji: OK + Finished. 0 error(s). + [==] + +Execute (Change tag of seoul256.vim): + call plug#begin() + Plug 'junegunn/seoul256.vim', { 'tag': 'no-such-tag' } + call plug#end() + call PlugStatusSorted() + +Expect: + Invalid tag: N/A (expected: no-such-tag). Try PlugUpdate. + Finished. 1 error(s). + [=] + x seoul256.vim: + +Execute (Change URI of seoul256.vim): + call plug#begin() + Plug 'junegunn.choi/seoul256.vim' + Plug 'file:///tmp/vim-plug-test/jg/vim-emoji' + call plug#end() + +Execute (PlugStatus): + call PlugStatusSorted() + +Expect: + Expected: file:///tmp/vim-plug-test/junegunn.choi/seoul256.vim + Invalid URI: file:///tmp/vim-plug-test/junegunn/seoul256.vim + PlugClean required. + - vim-emoji: OK + Finished. 1 error(s). + [==] + x seoul256.vim: + +Execute (Corrected the URI but ahead of upstream): + call plug#begin() + Plug 'junegunn/seoul256.vim' + Plug 'file:///tmp/vim-plug-test/jg/vim-emoji' + call plug#end() + for _ in range(3) + call system(printf('cd "%s" && git commit --allow-empty -m "dummy"', g:plugs['seoul256.vim'].dir)) + endfor + call PlugStatusSorted() + +Expect: + Ahead of origin/master by 3 commit(s). + Cannot update until local changes are pushed. + - vim-emoji: OK + Finished. 1 error(s). + [==] + x seoul256.vim: + +# TODO: does not work due to inputsave() +# Do (PlugClean): +# :PlugClean\y\ +# ggyG +# q +# PGdd + +Execute (PlugClean! keeps seoul256.vim): + PlugClean! + " Two removed, emoji and seoul256 left + AssertEqual 'Removed 2 directories.', getline(4) + AssertExpect '^\~ ', 2 + AssertExpect 'Diverged', 0 + Assert !empty(globpath(&rtp, 'colors/seoul256.vim')) + Assert !empty(globpath(&rtp, 'autoload/emoji.vim')) + q + +Execute (Make seoul256 to be diverged): + call plug#begin() + Plug 'junegunn/seoul256.vim' + Plug 'file:///tmp/vim-plug-test/jg/vim-emoji' + call plug#end() + call system(printf(join([ + \ 'cd "%s"', + \ 'git fetch --unshallow', + \ 'git reset "@{u}~1"', + \ 'git commit --allow-empty -m "diverged1"', + \ 'git commit --allow-empty -m "diverged2"'], ' && '), + \ g:plugs['seoul256.vim'].dir)) + Assert empty(v:shell_error), 'Got shell error: '.v:shell_error + call PlugStatusSorted() + +Expect: + Backup local changes and run PlugClean and PlugUpdate to reinstall it. + Diverged from origin/master (2 commit(s) ahead and 1 commit(s) behind! + - vim-emoji: OK + Finished. 1 error(s). + [==] + x seoul256.vim: + +Execute (PlugClean! removes seoul256.vim): + PlugClean! + " One removed, emoji left + AssertEqual 'Removed 1 directories.', getline(4) + AssertExpect '^\~ ', 1 + AssertExpect 'Diverged', 1 + Assert empty(globpath(&rtp, 'colors/seoul256.vim')) + Assert !empty(globpath(&rtp, 'autoload/emoji.vim')) + q + +Execute (Change GIT URI of vim-emoji): + call plug#begin() + Plug 'junegunn/seoul256.vim' + Plug 'junegunn/vim-emoji' + call plug#end() + +Execute (PlugStatus): + call PlugStatusSorted() + +Expect: + Expected: file:///tmp/vim-plug-test/junegunn/vim-emoji + Invalid URI: file:///tmp/vim-plug-test/jg/vim-emoji + Not found. Try PlugInstall. + PlugClean required. + Finished. 2 error(s). + [==] + x seoul256.vim: + x vim-emoji: + +Execute (PlugClean! to remove vim-emoji): + PlugClean! + AssertExpect '^\~ ', 1 + AssertEqual 'Removed 1 directories.', getline(4) + Assert empty(globpath(&rtp, 'colors/seoul256.vim')), 'seoul256.vim was removed' + Assert empty(globpath(&rtp, 'autoload/emoji.vim')), 'emoji was removed' + q + +Execute (PlugUpdate to install both again): + PlugUpdate + AssertExpect '^- [^:]*:', 2 + Assert !empty(globpath(&rtp, 'colors/seoul256.vim')), 'seoul256.vim should be found' + Assert !empty(globpath(&rtp, 'autoload/emoji.vim')), 'vim-emoji should be found' + q + +Execute (PlugUpdate only to find out plugins are up-to-date, D key to check): + PlugUpdate + AssertExpect 'Already up-to-date', 2 + normal D + AssertEqual '0 plugin(s) updated.', getline(1) + q + +Execute (PlugDiff - 'No updates.'): + PlugDiff + Log getline(1, '$') + AssertEqual '0 plugin(s) updated.', getline(1) + Assert empty(mapcheck('o')) + Assert empty(mapcheck('X')) + Assert empty(mapcheck("\")) + q + +Execute (New commits on remote, PlugUpdate, then PlugDiff): + for repo in ['seoul256.vim', 'vim-emoji'] + for _ in range(2) + call system(printf('cd /tmp/vim-plug-test/junegunn/%s && git commit --allow-empty -m "update"', repo)) + endfor + endfor + unlet repo + PlugUpdate + + " Now we have updates + normal D + AssertEqual '2 plugin(s) updated.', getline(1) + + " Preview commit + silent! wincmd P + AssertEqual 0, &previewwindow + + " ]] motion + execute 'normal ]]' + let lnum = line('.') + AssertEqual 3, col('.') + + " Open commit preview + execute "normal j\" + wincmd P + AssertEqual 1, &previewwindow + AssertEqual 'git', &filetype + + " Back to plug window + wincmd p + + " ]] motion + execute 'normal $]]' + Assert line('.') >= 4 + " 5+ for merge commit + AssertEqual 3, col('.') + + " [[ motion + execute 'normal 0[[' + AssertEqual lnum, line('.') + unlet lnum + AssertEqual 3, col('.') + + " X key to revert the update + AssertExpect '^- ', 2 + execute "normal Xn\" + AssertExpect '^- ', 2 + execute "normal Xy\" + AssertExpect '^- ', 1 + + " q will close preview window as well + normal q + + " We no longer have preview window + silent! wincmd P + AssertEqual 0, &previewwindow + + " q should not close preview window if it's already open + pedit + PlugDiff + AssertExpect '^- ', 1 + execute "normal ]]j\" + normal q + + silent! wincmd P + AssertEqual 1, &previewwindow + pclose + +Execute (Test g:plug_pwindow): + let g:plug_pwindow = 'below 5new' + PlugDiff + AssertExpect '^- ', 1 + execute "normal ]]jo" + + AssertEqual 0, &previewwindow + AssertEqual 1, winnr() + wincmd P + AssertEqual 1, &previewwindow + AssertEqual 2, winnr() + AssertEqual 5, winheight('.') + wincmd p + normal q + unlet g:plug_pwindow + +Execute (#572 - Commit preview should work with non-POSIX-compliant &shell): + " Invalid shell + let shell = &shell + set shell=shellfish + + try + " Preview commit should still work + PlugDiff + execute "normal ]]jo" + wincmd P + Log getline(1, '$') + Assert getline(1) =~ 'commit', 'Preview window is empty' + AssertEqual 'shellfish', &shell + finally + " Restore &shell + let &shell = shell + unlet shell + pclose + q + endtry + +Execute (Reuse Plug window in another tab): + let tabnr = tabpagenr() + PlugDiff + tab new new-tab + set buftype=nofile + PlugUpdate + normal D + AssertExpect '^- ', 1 + normal q + AssertEqual tabnr, tabpagenr() + normal! gt + q + unlet tabnr + +Execute (contd. PlugDiff should not show inverted history): + " Additional PlugUpdate to clear diff + PlugUpdate + PlugDiff + Log getline(1, '$') + + " Checking out older revisions + for repo in values(g:plugs) + call system(printf('cd %s && git reset HEAD^ --hard', shellescape(repo.dir))) + endfor + unlet repo + + " PlugDiff should not report the changes i.e. git log --left-only + PlugDiff + Log getline(1, '$') + AssertEqual '0 plugin(s) updated.', getline(1) + q + +********************************************************************** +~ PlugDiff to see the pending changes +********************************************************************** + +Execute (PlugDiff): + call plug#begin() + call plug#end() + PlugClean! + + call plug#begin() + Plug 'file://'.expand('$PLUG_FIXTURES').'/xxx' + Plug 'file://'.expand('$PLUG_FIXTURES').'/yyy' + call plug#end() + PlugInstall + Log getline(1, '$') + + call system('cd "$PLUG_FIXTURES/xxx" && git commit --allow-empty -m update-xxx && git tag -f xxx') + call system('cd "$PLUG_FIXTURES/yyy" && git tag -f yyy && git commit --allow-empty -m update-yyy && git tag -f zzz') + + let g:plugs.yyy.tag = 'yyy' + PlugUpdate + Log getline(1, '$') + + PlugDiff + " 1 plugin(s) updated. 1 plugin(s) have pending updates. + " [==] + " + " Last update: + " ------------ + " + " - xxx: + " 166cfff (tag: xxx) update-xxx (1 second ago) + " + " Pending updates: + " ---------------- + " + " - yyy: (tag: yyy) + " c0a064b (tag: zzz) update-yyy (1 second ago) + " + Log getline(1, '$') + AssertEqual 15, line('$') + AssertEqual '1 plugin(s) updated. 1 plugin(s) have pending updates.', getline(1) + AssertEqual '[==]', getline(2) + AssertEqual '- yyy: (tag: yyy)', getline(13) + Assert getline(8) =~ '(tag: xxx)' + Assert getline(14) =~ '(tag: zzz)' + Assert !empty(mapcheck('o')) + Assert !empty(mapcheck('X')) + Assert !empty(mapcheck("\")) + q + +********************************************************************** +~ On-demand loading / Partial installation/update ~ +********************************************************************** + +Execute (Trying to execute on-demand commands when plugin is not installed): + call ReloadPlug() + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'on': ['EasyAlign', 'LiveEasyAlign!'] } + call plug#end() + + Assert exists(':EasyAlign') + Assert exists(':LiveEasyAlign') + AssertThrows EasyAlign + AssertThrows LiveEasyAlign + Assert !exists(':EasyAlign') + Assert !exists(':LiveEasyAlign') + +Execute (New set of plugins): + call ReloadPlug() + call plug#begin() + Plug 'junegunn/vim-fnr' + Plug 'junegunn/vim-pseudocl' + Plug 'junegunn/vim-easy-align', { 'on': 'EasyAlign' } + Plug 'junegunn/vim-redis', { 'for': 'redis' } + let user_autocmd = {} + autocmd! User vim-fnr let user_autocmd.fnr = 1 + autocmd! User vim-easy-align let user_autocmd.easy_align = 1 + autocmd! User vim-redis let user_autocmd.redis = 1 + call plug#end() + +Execute (Check commands): + Assert !exists(':FNR'), 'FNR command should not be found' + Assert !exists(':RedisExecute'), 'RedisExecute command should not be found' + Assert empty(user_autocmd) + +Execute (Partial PlugInstall): + PlugInstall vim-fnr vim-easy-align + AssertExpect 'vim-fnr', 1 + q + + PlugInstall vim-fnr vim-easy-align 1 + AssertExpect 'vim-fnr', 1 + AssertExpect 'vim-easy-align', 1 + AssertEqual g:first_rtp, split(&rtp, ',')[0] + AssertEqual g:last_rtp, split(&rtp, ',')[-1] + q + +Given (Unaligned code): + a=1 + aa=2 + +Execute (Check installed plugins): + call EnsureLoaded() + Assert exists(':FNR'), 'FNR command should be found' + Assert !exists(':RedisExecute'), 'RedisExecute command still should not be found' + + Assert exists(':EasyAlign'), 'EasyAlign command should be found' + %EasyAlign= + +Expect (Aligned code): + a = 1 + aa = 2 + +Then (autocmd executed): + Assert user_autocmd.easy_align + AssertEqual 1, len(user_autocmd) + +Given: +Execute (Partial PlugUpdate): + PlugUpdate vim-redis + q + +Execute (On-demand loading based on filetypes): + Assert !exists(':RedisExecute'), 'RedisExecute command still should not be found' + set ft=redis + Assert exists(':RedisExecute'), 'RedisExecute command is now found' + Assert user_autocmd.redis + AssertEqual 2, len(user_autocmd) + + autocmd! User + unlet user_autocmd + +********************************************************************** +~ Local (unmanaged) plugins +********************************************************************** + +Execute (Add unmanaged plugin): + let fzf = expand('$PLUG_FIXTURES/fzf') + call RmRf(fzf) + Log fzf + + call plug#begin() + Plug fzf, { 'on': 'SomeCommand' } + call plug#end() + + " Check uri field + Assert !has_key(g:plugs.fzf, 'uri'), 'Should not have uri field' + + " Check dir field + AssertEqual fzf.'/', g:plugs.fzf.dir + + " Trailing slashes and backslashes should be stripped + for suffix in ['///', '/\/\/'] + call plug#begin() + Plug fzf.suffix, { 'on': 'SomeCommand' } + call plug#end() + + " Check dir field + AssertEqual fzf.'/', g:plugs.fzf.dir + endfor + +Execute (Plug block for following tests): + call plug#begin() + Plug 'junegunn/vim-easy-align' + Plug fzf, { 'on': 'SomeCommand' } + call plug#end() + " Remove plugins from previous tests + PlugClean! + q + +Execute (PlugInstall will only install vim-easy-align): + PlugInstall + Log getline(1, '$') + AssertExpect 'fzf', 0 + q + +Execute (PlugUpdate will only update vim-easy-align): + PlugUpdate + Log getline(1, '$') + AssertExpect 'fzf', 0 + q + +Execute (PlugClean should not care about unmanaged plugins): + PlugClean + Log getline(1, '$') + AssertExpect 'fzf', 0 + q + +Execute (PlugStatus should point out that the plugin is missing): + PlugStatus + Log getline(1, '$') + AssertExpect 'x fzf', 1 + AssertExpect 'Not found', 1 + q + +Execute (Deploy unmanaged plugin): + Assert !exists(':FZF'), ':FZF command should not exist' + call RmRf(fzf) + Log system(printf('cp -r "/tmp/vim-plug-test/fzf" "%s"', fzf)) + +Execute (PlugUpdate still should not care): + PlugUpdate + Log getline(1, '$') + AssertExpect 'fzf', 0 + q + +Execute (PlugStatus with no error): + PlugStatus + Log getline(1, '$') + AssertExpect 'x fzf', 0 + AssertExpect 'Not found', 0 + q + +Execute (Check &rtp after SomeCommand): + Log &rtp + Assert &rtp !~ 'fzf' + silent! SomeCommand + Assert &rtp =~ 'fzf' + AssertEqual g:first_rtp, split(&rtp, ',')[0] + AssertEqual g:last_rtp, split(&rtp, ',')[-1] + +Execute (Common parent): + call plug#begin() + Plug 'junegunn/vim-pseudocl' + Plug 'junegunn/vim-fnr' + Plug 'junegunn/vim-oblique' + call plug#end() + + PlugInstall + Log getline(1, '$') + AssertExpect! '[===]', 1 + q + + unlet fzf + +********************************************************************** +~ Frozen plugins +********************************************************************** +- We've decided to install plugins that are frozen: see #113 +Execute (Frozen plugin are not ~~installed nor~~ updated): + " Remove plugins + call plug#begin() + call plug#end() + PlugClean! + q + + " vim-easy-align is not found, so it will be installed even though it's frozen + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'frozen': 1 } + call plug#end() + PlugInstall + AssertEqual 1, len(filter(getline(1, '$'), 'v:val =~ "vim-easy-align"')) + q + + " Remove plugins again + call plug#begin() + call plug#end() + PlugClean! + q + + " PlugUpdate will do the same + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'frozen': 1 } + call plug#end() + PlugInstall + AssertEqual 1, len(filter(getline(1, '$'), 'v:val =~ "vim-easy-align"')) + q + + " Since vim-easy-align already exists, PlugInstall or PlugUpdate will skip it + redir => out + silent PlugInstall + redir END + Assert out =~ 'No plugin to install' + + redir => out + silent PlugUpdate + redir END + Assert out =~ 'No plugin to update' + +Execute (But you can still install it if the name is given as the argument): + PlugInstall vim-easy-align + Log getline(1, '$') + AssertEqual 1, len(filter(getline(1, '$'), 'v:val =~ "vim-easy-align"')) + q + + PlugUpdate vim-easy-align + Log getline(1, '$') + AssertEqual 1, len(filter(getline(1, '$'), 'v:val =~ "vim-easy-align"')) + q + +********************************************************************** +~ Retry +********************************************************************** + +Execute (Retry failed tasks): + call plug#begin() + Plug 'junegunn/vim-easy-align' + Plug 'junegunn/aaaaaaaaaaaaaa' + call plug#end() + + PlugInstall + Log getline(1, '$') + AssertExpect 'x aaa', 1 + AssertExpect '- vim-easy-align', 1 + normal R + Log getline(1, '$') + AssertExpect 'x aaa', 1 + AssertExpect '- vim-easy-align', 0 + AssertExpect! '[x]', 1 + q + + call plug#begin() + Plug 'junegunn/vim-easy-align' + Plug 'junegunn/aaaaaaaaaaaaaa' + Plug 'junegunn/bbbbbbbbbbbbbb' + Plug 'junegunn/cccccccccccccc' + call plug#end() + + " Ruby installer + PlugUpdate + normal R + AssertExpect '- vim-easy-align', 0 + AssertExpect! '[xxx]', 1 + q + + " Vim installer + PlugUpdate 1 + normal R + AssertExpect '- vim-easy-align', 0 + AssertExpect! '[xxx]', 1 + q + +********************************************************************** +~ Post-update hook (`do` option) +********************************************************************** + +Execute (Cleanup): + call plug#begin() + call plug#end() + PlugClean! + q + +Execute (On install): + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'do': 'touch installed' } + Plug 'junegunn/vim-pseudocl' + Plug 'junegunn/seoul256.vim' + Plug 'junegunn/goyo.vim' + Plug 'yous/subsubmodule' + call plug#end() + + silent PlugInstall + q + + Assert filereadable(g:plugs['vim-easy-align'].dir.'/installed'), + \ 'vim-easy-align/installed should exist' + Assert !filereadable(g:plugs['vim-pseudocl'].dir.'/installed'), + \ 'vim-pseudocl/installed should not exist' + AssertEqual ' ', system('cd '.g:plugs['subsubmodule'].dir.' && git submodule status')[0], + \ 'subsubmodule/subsubmodule should be initialized' + +Execute (On update): + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'do': 'touch updated' } + Plug 'junegunn/vim-pseudocl', { 'do': 'touch updated' } + Plug 'junegunn/seoul256.vim' + Plug 'junegunn/goyo.vim' + Plug 'yous/subsubmodule' + call plug#end() + + " New commits on remote + call system('cd /tmp/vim-plug-test/junegunn/vim-pseudocl && git commit --allow-empty -m "update"') + + silent PlugUpdate + Log getline(1, '$') + q + + Assert !filereadable(g:plugs['vim-easy-align'].dir.'/updated'), + \ 'vim-easy-align/updated should not exist' + Assert filereadable(g:plugs['vim-pseudocl'].dir.'/updated'), + \ 'vim-pseudocl/updated should exist' + +Execute (When already installed): + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'do': 'touch installed2' } + Plug 'junegunn/vim-pseudocl', { 'commit': '7f8cd78' } + Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co' } + Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } + Plug 'yous/subsubmodule' + call plug#end() + + PlugInstall + q + Assert !filereadable(g:plugs['vim-easy-align'].dir.'/installed2'), + \ 'vim-easy-align/installed2 should not exist' + AssertNotEqual '7f8cd78cb1fe52185b98b16a3749811f0cc508af', GitCommit('vim-pseudocl') + AssertNotEqual 'no-t_co', GitBranch('seoul256.vim') + AssertNotEqual '1.5.3', GitTag('goyo.vim') + +Execute (PlugInstall!): + silent PlugInstall! + q + Assert filereadable(g:plugs['vim-easy-align'].dir.'/installed2'), + \ 'vim-easy-align/installed2 should exist' + AssertEqual '7f8cd78cb1fe52185b98b16a3749811f0cc508af', GitCommit('vim-pseudocl') + AssertEqual 'no-t_co', GitBranch('seoul256.vim') + AssertEqual '1.5.3', GitTag('goyo.vim') + +Execute (When submodules are not initialized): + call system(printf('cd %s && git submodule deinit subsubmodule', g:plugs['subsubmodule'].dir)) + + silent PlugInstall! + q + + AssertEqual ' ', system(printf('cd %s && git submodule status', g:plugs['subsubmodule'].dir))[0], + \ 'subsubmodule/subsubmodule should be initialized' + +Execute (When already updated): + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'do': 'touch updated2' } + Plug 'junegunn/vim-pseudocl', { 'commit': 'dd507ca' } + Plug 'junegunn/seoul256.vim', { 'branch': 'master' } + Plug 'junegunn/goyo.vim', { 'tag': '1.6.0' } + Plug 'yous/subsubmodule' + call plug#end() + + PlugUpdate + q + Assert !filereadable(g:plugs['vim-easy-align'].dir.'/updated2'), + \ 'vim-easy-align/updated2 should not exist' + AssertEqual 'dd507ca0d5f3fdf0d522558cc5ecffdabf824469', GitCommit('vim-pseudocl') + AssertEqual 'master', GitBranch('seoul256.vim') + AssertEqual '1.6.0', GitTag('goyo.vim') + +Execute (PlugUpdate!): + silent PlugUpdate! + q + Assert filereadable(g:plugs['vim-easy-align'].dir.'/updated2'), + \ 'vim-easy-align/updated2 should exist' + +Execute (When submodules are not initialized): + call system(printf('cd %s && git submodule deinit subsubmodule', g:plugs['subsubmodule'].dir)) + +^ #481 submodule update should use standard shell + let sh = &shell + set sh=/bin/echo + silent PlugUpdate! + let &shell = sh + unlet sh + q + AssertEqual ' ', system(printf('cd %s && git submodule status', g:plugs['subsubmodule'].dir))[0], + \ 'subsubmodule/subsubmodule should be initialized' + +Execute (Using Funcref): + function! PlugUpdated(info) + call system('touch '. a:info.name . a:info.status . a:info.force . len(a:info)) + endfunction + + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'do': function('PlugUpdated') } + Plug 'junegunn/vim-pseudocl', { 'do': function('PlugUpdated') } + call plug#end() + + call system('cd /tmp/vim-plug-test/junegunn/vim-easy-align && git commit --allow-empty -m "update"') + call system('cd '.g:plugs['vim-easy-align'].dir.' && git reset --hard HEAD^') + call RmRf(g:plugs['vim-pseudocl'].dir) + + PlugUpdate + Log getline(1, '$') + q + Assert filereadable(g:plugs['vim-easy-align'].dir.'/vim-easy-alignupdated03'), + \ 'vim-easy-align/vim-easy-alignupdated03 should exist' + Assert filereadable(g:plugs['vim-pseudocl'].dir.'/vim-pseudoclinstalled03'), + \ 'vim-pseudocl/vim-pseudoclinstalled03 should exist' + + call RmRf(g:plugs['vim-pseudocl'].dir) + PlugInstall! + q + Assert filereadable(g:plugs['vim-easy-align'].dir.'/vim-easy-alignunchanged13'), + \ 'vim-easy-align/vim-easy-alignunchanged13 should exist' + Assert filereadable(g:plugs['vim-pseudocl'].dir.'/vim-pseudoclinstalled13'), + \ 'vim-pseudocl/vim-pseudoclinstalled13 should exist' + + call system('cd '.g:plugs['vim-easy-align'].dir.' && git reset --hard HEAD^') + PlugUpdate! + q + Assert filereadable(g:plugs['vim-easy-align'].dir.'/vim-easy-alignupdated13'), + \ 'vim-easy-align/vim-easy-alignupdated13 should exist' + Assert filereadable(g:plugs['vim-pseudocl'].dir.'/vim-pseudoclunchanged13'), + \ 'vim-pseudocl/vim-pseudoclunchanged13 should exist' + +Execute (Post-update hook output; success and failure): + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'do': 'xxx-non-existent-command-xxx' } + Plug 'junegunn/vim-pseudocl', { 'do': 'true' } + call plug#end() + + silent PlugInstall! 1 + AssertEqual '- Post-update hook for vim-pseudocl ... OK', getline(5) + AssertEqual 'x Post-update hook for vim-easy-align ... Exit status: 127', getline(6) + q + +Execute (Post-update hook output; invalid type or funcref): + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'do': 1 } + Plug 'junegunn/vim-pseudocl', { 'do': function('call') } + call plug#end() + + silent PlugInstall! 1 + AssertEqual 'x Post-update hook for vim-pseudocl ... Vim(call):E119: Not enough arguments for function: call', getline(5) + AssertEqual 'x Post-update hook for vim-easy-align ... Invalid hook type', getline(6) + q + +Execute (Should not run when failed to update): + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'do': 'touch failed' } + Plug 'junegunn/vim-pseudocl', { 'do': 'touch not-failed' } + call plug#end() + + " Invalid remote URL + call system(printf('cd %s && git remote set-url origin xxx', g:plugs['vim-easy-align'].dir)) + + " New commits on remote + call system('cd /tmp/vim-plug-test/junegunn/vim-easy-align && git commit --allow-empty -m "update"') + call system('cd /tmp/vim-plug-test/junegunn/vim-pseudocl && git commit --allow-empty -m "update"') + + silent PlugUpdate + Log getline(1, '$') + q + + Assert !filereadable(g:plugs['vim-easy-align'].dir.'/failed'), + \ 'vim-easy-align/failed should not exist' + Assert filereadable(g:plugs['vim-pseudocl'].dir.'/not-failed'), + \ 'vim-pseudocl/not-failed should exist' + +Execute (Vim command with : prefix): + call plug#begin() + Plug 'junegunn/vim-pseudocl', { 'do': ':call setline(2, 12345)' } + call plug#end() + + PlugInstall! + Log getline(1, '$') + AssertEqual '12345', getline(2) + q + +Execute (Vim command with : prefix closing the window): + call plug#begin() + Plug 'junegunn/vim-pseudocl', { 'do': ':close' } + call plug#end() + + redir => out + PlugInstall! + redir END + Assert out =~ 'vim-plug was terminated' + Assert out =~ 'of vim-pseudocl' + +Execute (Invalid vim command in post-update hook): + call plug#begin() + Plug 'junegunn/vim-pseudocl', { 'do': ':nosuchcommand' } + call plug#end() + + PlugInstall! + Log getline(1, '$') + AssertExpect! 'x Post-update hook for vim-pseudocl ... Vim:E492: Not an editor command: nosuchcommand', 1 + q + +********************************************************************** +~ Overriding `dir` +********************************************************************** + +Execute (Using custom dir): + call plug#begin() + Plug 'junegunn/vim-easy-align' + call plug#end() + Assert isdirectory(g:plugs['vim-easy-align'].dir) + + call RmRf('/tmp/vim-plug-test/easy-align') + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'dir': '/tmp/vim-plug-test/easy-align' } + call plug#end() + AssertEqual '/tmp/vim-plug-test/easy-align/', g:plugs['vim-easy-align'].dir + + PlugClean! + Assert !isdirectory(g:plugs['vim-easy-align'].dir) + q + + PlugInstall + q + Assert isdirectory(g:plugs['vim-easy-align'].dir) + +********************************************************************** +~ On-demand loading load order +********************************************************************** +Before (Clear global vars): + let g:xxx = [] + set rtp-=$PLUG_FIXTURES/xxx/ + set rtp-=$PLUG_FIXTURES/xxx/after + +Execute (Immediate loading): + call ReloadPlug() + call plug#begin() + Plug '$PLUG_FIXTURES/xxx' + call plug#end() + + " FIXME: + " Different result when Vader is run from commandline with `-c` option + Log g:xxx + if has('vim_starting') + AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect'], g:xxx + else + AssertEqual ['xxx/plugin', 'xxx/after/plugin', 'xxx/ftdetect', 'xxx/after/ftdetect'], g:xxx + endif + +Execute (Command-based on-demand loading): + call ReloadPlug() + call plug#begin() + Plug '$PLUG_FIXTURES/xxx', { 'on': 'XXX' } + call plug#end() + + AssertEqual [], g:xxx + + silent! XXX + AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'xxx/plugin', 'xxx/after/plugin'], g:xxx + + setf xxx + AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'xxx/plugin', 'xxx/after/plugin', 'xxx/ftplugin', 'xxx/after/ftplugin', 'xxx/indent', 'xxx/after/indent', 'xxx/syntax', 'xxx/after/syntax'], g:xxx + +Execute (Filetype-based on-demand loading): + call ReloadPlug() + call plug#begin() + Plug '$PLUG_FIXTURES/xxx', { 'for': 'xxx' } + Plug '$PLUG_FIXTURES/yyy', { 'for': 'yyy' } + call plug#end() + + AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect'], g:xxx + + setf xxx + AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'xxx/plugin', 'xxx/after/plugin', 'xxx/syntax', 'xxx/after/syntax', 'xxx/ftplugin', 'xxx/after/ftplugin', 'xxx/indent', 'xxx/after/indent'], g:xxx + + " syntax/xxx.vim and after/syntax/xxx.vim should not be loaded (#410) + setf yyy + AssertEqual ['yyy/ftdetect', 'yyy/after/ftdetect', 'yyy/plugin', 'yyy/after/plugin'], g:yyy + +Before: + +********************************************************************** +~ plug#helptags() +********************************************************************** + +Execute (plug#helptags): + call plug#begin() + Plug '$PLUG_FIXTURES/xxx' + Plug '$PLUG_FIXTURES/yyy', { 'rtp': 'rtp' } + call plug#end() + silent! call delete(expand('$PLUG_FIXTURES/xxx/doc/tags')) + silent! call delete(expand('$PLUG_FIXTURES/yyy/rtp/doc/tags')) + Assert !filereadable(expand('$PLUG_FIXTURES/xxx/doc/tags')) + Assert !filereadable(expand('$PLUG_FIXTURES/yyy/rtp/doc/tags')) + AssertEqual 1, plug#helptags() + Assert filereadable(expand('$PLUG_FIXTURES/xxx/doc/tags')) + Assert filereadable(expand('$PLUG_FIXTURES/yyy/rtp/doc/tags')) + +********************************************************************** +~ Manual loading +********************************************************************** + +Execute (plug#load - invalid arguments): + call ResetPlug() + call plug#begin() + Plug '$PLUG_FIXTURES/xxx', { 'for': 'xxx' } + Plug '$PLUG_FIXTURES/yyy', { 'for': 'yyy' } + call plug#end() + AssertEqual 0, plug#load() + AssertEqual 0, plug#load('non-existent-plugin') + AssertEqual 0, plug#load('non-existent-plugin', 'another-non-existent-plugin') + AssertEqual 1, plug#load('xxx') + AssertEqual 0, plug#load('xxx', 'non-existent-plugin') + AssertEqual 0, plug#load('non-existent-plugin', 'xxx') + +Execute (plug#load - list argument (#638)): + redir => out + call plug#load(keys(g:plugs)) + redir END + AssertEqual '', out + +Execute (on: []): + call plug#begin() + Plug 'junegunn/rust.vim', { 'on': [] } + call plug#end() + PlugInstall + q + +Execute (PlugStatus reports (not loaded)): + PlugStatus + AssertExpect 'not loaded', 1 + q + +Execute (plug#load to load it): + tabnew test.rs + " Vader will switch tab to [Vader-workbench] after Log + " Log &filetype + AssertEqual 1, plug#load('rust.vim') + AssertEqual 'rust', &filetype + q + +Execute (PlugStatus should not contain (not loaded)): + PlugStatus + AssertExpect 'not loaded', 0 + q + +Execute (Load plugin from PlugStatus screen with L key in normal mode): + call ResetPlug() + unlet! g:yyy + call plug#begin() + Plug '$PLUG_FIXTURES/yyy', { 'on': [] } + call plug#end() + + PlugStatus + AssertExpect 'not loaded', 1 + Assert !exists('g:yyy'), 'yyy not loaded' + /not loaded + normal L + AssertExpect 'not loaded', 0 + Assert exists('g:yyy'), 'yyy loaded' + q + +Execute (Load plugin from PlugStatus screen with L key in visual mode): + call plug#begin() + Plug '$PLUG_FIXTURES/z1', { 'on': [] } + Plug '$PLUG_FIXTURES/z2', { 'for': [] } + call plug#end() + + PlugStatus + AssertExpect 'not loaded', 2 + Assert !exists('g:z1'), 'z1 not loaded' + Assert !exists('g:z2'), 'z2 not loaded' + normal ggVGL + AssertExpect 'not loaded', 0 + Assert exists('g:z1'), 'z1 loaded' + Assert exists('g:z2'), 'z2 loaded' + q + +********************************************************************** +~ g:plug_window +********************************************************************** +Execute (Open plug window in a new tab): + " Without g:plug_window, plug window is open on the left split + let tabnr = tabpagenr() + PlugStatus + AssertEqual tabnr, tabpagenr() + AssertEqual 1, winnr() + + " PlugStatus again inside the window should not change the view + normal S + AssertEqual tabnr, tabpagenr() + AssertEqual 1, winnr() + q + + " Define g:plug_window so that plug window is open in a new tab + let g:plug_window = 'tabnew' + PlugStatus + AssertNotEqual tabnr, tabpagenr() + + " PlugStatus again inside the window should not change the view + let tabnr = tabpagenr() + normal S + AssertEqual tabnr, tabpagenr() + q + unlet g:plug_window tabnr + +********************************************************************** +~ g:plug_url_format +********************************************************************** +Execute (Using g:plug_url_format): + let prev_plug_url_format = g:plug_url_format + call plug#begin() + let g:plug_url_format = 'git@bitbucket.org:%s.git' + Plug 'junegunn/seoul256.vim' + let g:plug_url_format = 'git@bitsocket.org:%s.git' + Plug 'vim-scripts/beauty256' + AssertEqual 'git@bitbucket.org:junegunn/seoul256.vim.git', g:plugs['seoul256.vim'].uri + AssertEqual 'git@bitsocket.org:vim-scripts/beauty256.git', g:plugs['beauty256'].uri + let g:plug_url_format = prev_plug_url_format + +********************************************************************** +~ U +********************************************************************** +Execute (Plug block): + call plug#begin() + Plug 'junegunn/vim-easy-align' + Plug 'junegunn/vim-emoji' + call plug#end() + +Execute (Update plugin with U key in normal mode): + PlugStatus + /emoji + normal U + Log getline(1, '$') + AssertExpect 'Updated', 1 + AssertExpect 'vim-emoji', 1 + AssertExpect 'vim-easy-align', 0 + AssertExpect! '[=]', 1 + + " From PlugInstall screen + PlugInstall + /easy-align + normal U + AssertExpect 'Updated', 1 + AssertExpect 'vim-emoji', 0 + AssertExpect 'vim-easy-align', 1 + AssertExpect! '[=]', 1 + q + +Execute (Update plugins with U key in visual mode): + silent! call RmRf(g:plugs['vim-easy-align'].dir) + + PlugStatus + normal VGU + Log getline(1, '$') + AssertExpect 'Updated', 1 + AssertExpect 'vim-emoji', 1 + AssertExpect 'vim-easy-align', 1 + AssertExpect! '[==]', 1 + + " From PlugUpdate screen + normal VGU + Log getline(1, '$') + AssertExpect 'Updated', 1 + AssertExpect 'vim-emoji', 1 + AssertExpect 'vim-easy-align', 1 + AssertExpect! '[==]', 1 + q + +********************************************************************** +Execute (plug#begin should expand env vars): + AssertNotEqual '$HOME/.emacs/plugged', expand('$HOME/.emacs/plugged') + call plug#begin('$HOME/.emacs/plugged') + AssertEqual expand('$HOME/.emacs/plugged'), g:plug_home + +********************************************************************** +Execute (Plug directory with comma): + call plug#begin(g:temp_plugged . '/p,l,u,g,g,e,d') + Plug 'junegunn/vim-emoji' + call plug#end() + Log &rtp + + PlugInstall + q + let found = filter(split(globpath(&rtp, 'README.md'), '\n'), 'v:val =~ ","') + Log found + AssertEqual 1, len(found) + unlet found + +********************************************************************** +Execute (Strict load order): + let g:total_order = [] + call ReloadPlug() + call plug#begin() + Plug '$PLUG_FIXTURES/xxx' + Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] } + call plug#end() + call EnsureLoaded() + setf xxx + Log 'Case 1: ' . &rtp + AssertEqual ['yyy/ftdetect', 'yyy/after/ftdetect', 'xxx/ftdetect', 'xxx/after/ftdetect'], g:total_order[0:3] + Assert index(g:total_order, 'xxx/plugin') < index(g:total_order, 'yyy/plugin') + Assert index(g:total_order, 'xxx/after/plugin') < index(g:total_order, 'yyy/after/plugin') + let len = len(split(&rtp, ',')) + + let g:total_order = [] + call ReloadPlug() + call plug#begin() + Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] } + Plug '$PLUG_FIXTURES/yyy' + call plug#end() + call EnsureLoaded() + set rtp^=manually-prepended + set rtp+=manually-appended + setf xxx + Log 'Case 2: ' . &rtp + AssertEqual 'manually-prepended', split(&rtp, ',')[3] + AssertEqual 'manually-appended', split(&rtp, ',')[-4] + AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'yyy/ftdetect', 'yyy/after/ftdetect'], g:total_order[0:3] + Assert index(g:total_order, 'yyy/plugin') < index(g:total_order, 'xxx/plugin') + Assert index(g:total_order, 'yyy/after/plugin') < index(g:total_order, 'xxx/after/plugin') + AssertEqual len + 2, len(split(&rtp, ',')) + + let g:total_order = [] + call ReloadPlug() + set rtp^=manually-prepended + set rtp+=manually-appended + call plug#begin() + Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] } + Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] } + call plug#end() + call EnsureLoaded() + setf xxx + Log 'Case 3: ' . &rtp + AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'yyy/ftdetect', 'yyy/after/ftdetect'], g:total_order[0:3] + Assert index(g:total_order, 'xxx/plugin') < index(g:total_order, 'yyy/plugin') + Assert index(g:total_order, 'xxx/after/plugin') < index(g:total_order, 'yyy/after/plugin') + AssertEqual len + 2, len(split(&rtp, ',')) + +********************************************************************** +Execute (PlugClean should not try to remove unmanaged plugins inside g:plug_home): + call plug#begin('$PLUG_FIXTURES') + Plug '$PLUG_FIXTURES/ftplugin-msg', { 'for': [] } + Plug '$PLUG_FIXTURES/fzf' + Plug '$PLUG_FIXTURES/xxx' + Plug '$PLUG_FIXTURES/yyy' + call plug#end() + + " Remove z1, z2 + PlugClean! + AssertExpect '^\~ ', 2 + AssertExpect 'Already clean', 0 + + PlugClean! + AssertExpect '^\~ ', 0 + AssertExpect 'Already clean', 1 + q + +********************************************************************** +Execute (PlugSnapshot / #154 issues with paths containing spaces): + let $TMPDIR = '/tmp' + call plug#begin('$TMPDIR/plug with spaces') + Plug 'junegunn/vim-easy-align' + Plug 'junegunn/seoul256.vim' + call plug#end() + + PlugClean! + PlugInstall + call plug#load('vim-easy-align') " Should properly handle paths with spaces + PlugSnapshot + AssertEqual '" Generated by vim-plug', getline(1) + AssertEqual 0, stridx(getline(6), "silent! let g:plugs['seoul256.vim'].commit = '") + AssertEqual 0, stridx(getline(7), "silent! let g:plugs['vim-easy-align'].commit = '") + AssertEqual 'vim', &filetype + + call delete(g:plug_home.'/snapshot.vim') + execute 'PlugSnapshot' escape(g:plug_home.'/snapshot.vim', ' ') + AssertEqual 'vim', &filetype + AssertEqual 'snapshot.vim', fnamemodify(expand('%'), ':t') + q + +Execute(PlugSnapshot! to overwrite existing file): + call writefile(['foobar'], g:plug_home.'/snapshot.vim') + AssertEqual 'foobar', readfile(g:plug_home.'/snapshot.vim')[0] + execute 'PlugSnapshot!' escape(g:plug_home.'/snapshot.vim', ' ') + AssertEqual '" Generated by vim-plug', readfile(g:plug_home.'/snapshot.vim')[0] + q + +********************************************************************** +Execute (#221 Shallow-clone and tag option): + call plug#begin(g:temp_plugged) + Plug 'junegunn/goyo.vim' + call plug#end() + PlugInstall + + execute 'cd' g:plugs['goyo.vim'].dir + Assert len(split(system('git log --oneline'), '\n')) == 1 + Assert filereadable('.git/shallow') + + Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } + PlugUpdate + q + + Assert len(split(system('git log --oneline'), '\n')) > 1 + Assert system('git describe --tag') =~ '^1.5.3' + Assert !filereadable('.git/shallow') + cd - + +Execute (#221 Shallow-clone disabled by g:plug_shallow = 0): + call plug#begin(g:temp_plugged) + call plug#end() + PlugClean! + + let g:plug_shallow = 0 + call plug#begin(g:temp_plugged) + Plug 'junegunn/goyo.vim' + call plug#end() + PlugInstall + q + + execute 'cd' g:plugs['goyo.vim'].dir + Assert len(split(system('git log --oneline'), '\n')) > 1, 'not shallow' + Assert !filereadable('.git/shallow'), 'not shallow' + cd - + unlet g:plug_shallow + +Execute (#221 Shallow-clone disabled by tag): + call plug#begin(g:temp_plugged) + call plug#end() + PlugClean! + + call plug#begin(g:temp_plugged) + Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } + call plug#end() + Assert !isdirectory(g:plugs['goyo.vim'].dir) + PlugInstall + Assert isdirectory(g:plugs['goyo.vim'].dir) + q + + execute 'cd' g:plugs['goyo.vim'].dir + Assert system('git describe --tag') =~ '^1.5.3' + Assert len(split(system('git log --oneline'), '\n')) > 1 + Assert !filereadable('.git/shallow') + cd - + +Execute (Commit hash support): + " Get goyo back to master + call plug#begin(g:temp_plugged) + Plug 'junegunn/goyo.vim' + call plug#end() + PlugUpdate + + call plug#begin(g:temp_plugged) + Plug 'junegunn/goyo.vim', { 'commit': 'ffffffff' } + Plug 'junegunn/vim-emoji', { 'commit': '9db7fcfee0d90dafdbcb7a32090c0a9085eb054a' } + call plug#end() + PlugUpdate + Log getline(1, '$') + AssertEqual 'x goyo.vim:', getline(5) + AssertEqual ' fatal: invalid reference: ffffffff', getline(6) + AssertEqual 0, stridx(getline(7), '- vim-emoji: HEAD is now at 9db7fcf...') + + let hash = system(printf('cd %s && git rev-parse HEAD', g:plugs['vim-emoji'].dir))[:-2] + AssertEqual '9db7fcfee0d90dafdbcb7a32090c0a9085eb054a', hash + + " Validate error formatting + PlugStatus + Log getline(1, '$') + AssertEqual ['Finished. 1 error(s).', + \'[==]', + \'', + \'x goyo.vim:'], getline(1, 4) + Assert getline(5) =~ ' Invalid HEAD (expected: fffffff, actual: [0-9a-f]\{7})' + AssertEqual [' PlugUpdate required.', + \'- vim-emoji: OK'], getline(6, '$') + + " PlugDiff should show pending updates for vim-emoji + PlugDiff + Log getline(1, '$') + AssertEqual '0 plugin(s) updated. 1 plugin(s) have pending updates.', getline(1) + Assert !empty(mapcheck('o')) + Assert empty(mapcheck('X')) + Assert !empty(mapcheck("\")) + + " Nor in PlugSnapshot output + PlugSnapshot + Log getline(1, '$') + AssertEqual 8, line('$') + q + +Execute (Commit hash support - cleared): + call plug#begin(g:temp_plugged) + Plug 'junegunn/goyo.vim' + Plug 'junegunn/vim-emoji' + call plug#end() + + PlugInstall + let hash = system(printf('cd %s && git rev-parse HEAD', g:plugs['vim-emoji'].dir))[:-2] + AssertEqual '9db7fcfee0d90dafdbcb7a32090c0a9085eb054a', hash + + PlugUpdate + let hash = system(printf('cd %s && git rev-parse HEAD', g:plugs['vim-emoji'].dir))[:-2] + AssertNotEqual '9db7fcfee0d90dafdbcb7a32090c0a9085eb054a', hash + q + +Execute (#371 - 'as' option): + call plug#begin() + Plug 'jg/goyo.vim' + Plug 'junegunn/goyo.vim', {'as': 'yogo'} + call plug#end() + AssertEqual ['goyo.vim', 'yogo'], sort(keys(g:plugs)) + Log g:plugs + Assert g:plugs.yogo.dir =~# '/yogo/$' + + call plug#begin() + Plug 'junegunn/goyo.vim', {'as': 'yogo', 'dir': '/tmp/vim-plug-test/gogo'} + call plug#end() + AssertEqual ['yogo'], sort(keys(g:plugs)) + AssertEqual '/tmp/vim-plug-test/gogo/', g:plugs.yogo.dir + +Execute (#427 - Tag option with wildcard (requires git 1.9.2 or above)): + if str2nr(split(split(system('git --version'))[-1], '\.')[0]) < 2 + Log 'tag with wildcard requires git 1.9.2 or above' + else + call plug#begin() + Plug 'junegunn/vim-easy-align', { 'tag': '2.9.*' } + call plug#end() + PlugInstall! + Log getline(1, '$') + AssertExpect! '- Latest tag for 2.9.* -> 2.9.7 (vim-easy-align)', 1 + q + AssertEqual '2.9.7', GitTag('vim-easy-align') + endif + +Execute (#530 - Comparison of compatible git URIs): + " .git suffix + Assert CompareURI('https://github.com/junegunn/vim-plug.git', 'https://github.com/junegunn/vim-plug') + + " user@ + Assert CompareURI('https://github.com/junegunn/vim-plug.git', 'https://user@github.com/junegunn/vim-plug.git') + + " git::@ + Assert CompareURI('https://github.com/junegunn/vim-plug.git', 'https://git::@github.com/junegunn/vim-plug.git') + + " https and ssh + Assert CompareURI('https://github.com/junegunn/vim-plug.git', 'git@github.com:junegunn/vim-plug.git') + + " file:// + Assert CompareURI('file:///tmp/vim-plug', '/tmp/vim-plug') + Assert CompareURI('file:///tmp/vim-plug', '/tmp/vim-plug/') + +Execute (#530 - Comparison of incompatible git URIs): + " Different hostname + Assert !CompareURI('https://github.com/junegunn/vim-plug.git', 'https://bitbucket.com/junegunn/vim-plug.git') + + " Different repository + Assert !CompareURI('https://github.com/junegunn/vim-plug.git', 'https://github.com/junegunn/emacs-plug.git') + + " Different port + Assert !CompareURI('https://github.com/junegunn/vim-plug.git', 'https://github.com:12345/junegunn/vim-plug.git') + +Execute (#532 - Reuse plug window): + call plug#begin() + Plug 'junegunn/goyo.vim' + call plug#end() + PlugInstall + call system(printf('cd "%s" && git commit --allow-empty -m "dummy"', g:plugs['goyo.vim'].dir)) + + PlugDiff + AssertEqual 1, winnr() + AssertEqual 2, winnr('$') + + " Open preview window + execute "normal ]]jo" + AssertEqual 2, winnr() + AssertEqual 3, winnr('$') + + " Move plug window to the right + wincmd L + AssertEqual 3, winnr() + AssertEqual 3, winnr('$') + + " Reuse plug window. Preview window is closed. + PlugStatus + AssertEqual 2, winnr() + AssertEqual 2, winnr('$') + q diff --git a/.vimrc b/.vimrc index 6603745..a2101d2 100644 --- a/.vimrc +++ b/.vimrc @@ -120,3 +120,11 @@ if ! &diff let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 1 endif + +" vim-plug plugins +call plug#begin('~/.vim/plugged') +"Plug 'vim-airline/vim-airline' +Plug 'bling/vim-airline' +Plug 'vim-airline/vim-airline-themes' +call plug#end() +let g:airline_theme='minimalist'