From: martin f. krafft Date: Tue, 8 Apr 2025 15:01:19 +0000 (+0200) Subject: Merge commit 'c58a4f3586473f7476510714698e60835fcb94ef' X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e?hp=c58a4f3586473f7476510714698e60835fcb94ef Merge commit 'c58a4f3586473f7476510714698e60835fcb94ef' --- diff --git a/.gitignore.d/vim b/.gitignore.d/vim new file mode 100644 index 00000000..72d90785 --- /dev/null +++ b/.gitignore.d/vim @@ -0,0 +1,493 @@ +* +!/.gitignore.d/vim +!/.var/vim/.gitignore +!/.vim/after/ftplugin/automake.vim +!/.vim/after/ftplugin/debchangelog.vim +!/.vim/after/ftplugin/diff.vim +!/.vim/after/ftplugin/gitcommit.vim +!/.vim/after/ftplugin/git.vim +!/.vim/after/ftplugin/mail.vim +!/.vim/after/ftplugin/make.vim +!/.vim/after/ftplugin/markdown.vim +!/.vim/after/ftplugin/nroff.vim +!/.vim/after/ftplugin/perl.vim +!/.vim/after/ftplugin/puppet.vim +!/.vim/after/ftplugin/python.vim +!/.vim/after/ftplugin/rst.vim +!/.vim/after/ftplugin/tex.vim +!/.vim/after/ftplugin/vo_base.vim +!/.vim/after/plugin/TabularMaps.vim +!/.vim/after/syntax/tex.vim +!/.vim/autoload/editorconfig.vim +!/.vim/autoload/fugitive.vim +!/.vim/autoload/khuno.vim +!/.vim/autoload/pathogen.vim +!/.vim/autoload/tabular.vim +!/.vim/autoload/vim_snippets.vim +!/.vim/autoload/voom/voom_vimplugin2657/__pycache__/__init__.cpython-37.pyc +!/.vim/autoload/voom/voom_vimplugin2657/__pycache__/voom_mode_fmr.cpython-37.pyc +!/.vim/autoload/voom/voom_vimplugin2657/__pycache__/voom_vim.cpython-37.pyc +!/.vim/autoload/youcompleteme.vim +!/.vim/black/.gitignore +!/.vim/black/pyvenv.cfg +!/.vim/bundle/black/action/main.py +!/.vim/bundle/black/action.yml +!/.vim/bundle/black/AUTHORS.md +!/.vim/bundle/black/autoload/black.vim +!/.vim/bundle/black/CHANGES.md +!/.vim/bundle/black/CONTRIBUTING.md +!/.vim/bundle/black/.coveragerc +!/.vim/bundle/black/Dockerfile +!/.vim/bundle/black/docs/authors.md +!/.vim/bundle/black/docs/change_log.md +!/.vim/bundle/black/docs/compatible_configs/flake8/.flake8 +!/.vim/bundle/black/docs/compatible_configs/flake8/setup.cfg +!/.vim/bundle/black/docs/compatible_configs/flake8/tox.ini +!/.vim/bundle/black/docs/compatible_configs/isort/.editorconfig +!/.vim/bundle/black/docs/compatible_configs/isort/.isort.cfg +!/.vim/bundle/black/docs/compatible_configs/isort/pyproject.toml +!/.vim/bundle/black/docs/compatible_configs/isort/setup.cfg +!/.vim/bundle/black/docs/compatible_configs/pylint/pylintrc +!/.vim/bundle/black/docs/compatible_configs/pylint/pyproject.toml +!/.vim/bundle/black/docs/compatible_configs/pylint/setup.cfg +!/.vim/bundle/black/docs/conf.py +!/.vim/bundle/black/docs/contributing/gauging_changes.md +!/.vim/bundle/black/docs/contributing/index.rst +!/.vim/bundle/black/docs/contributing/issue_triage.md +!/.vim/bundle/black/docs/contributing/reference/reference_classes.rst +!/.vim/bundle/black/docs/contributing/reference/reference_exceptions.rst +!/.vim/bundle/black/docs/contributing/reference/reference_functions.rst +!/.vim/bundle/black/docs/contributing/reference/reference_summary.rst +!/.vim/bundle/black/docs/contributing/release_process.md +!/.vim/bundle/black/docs/contributing/the_basics.md +!/.vim/bundle/black/docs/faq.md +!/.vim/bundle/black/docs/getting_started.md +!/.vim/bundle/black/docs/guides/index.rst +!/.vim/bundle/black/docs/guides/introducing_black_to_your_project.md +!/.vim/bundle/black/docs/guides/using_black_with_other_tools.md +!/.vim/bundle/black/docs/index.rst +!/.vim/bundle/black/docs/integrations/editors.md +!/.vim/bundle/black/docs/integrations/github_actions.md +!/.vim/bundle/black/docs/integrations/index.rst +!/.vim/bundle/black/docs/integrations/source_version_control.md +!/.vim/bundle/black/docs/license.rst +!/.vim/bundle/black/docs/make.bat +!/.vim/bundle/black/docs/Makefile +!/.vim/bundle/black/docs/requirements.txt +!/.vim/bundle/black/docs/_static/custom.css +!/.vim/bundle/black/docs/_static/license.svg +!/.vim/bundle/black/docs/_static/logo2.png +!/.vim/bundle/black/docs/_static/logo2-readme.png +!/.vim/bundle/black/docs/_static/pypi_template.svg +!/.vim/bundle/black/docs/the_black_code_style/current_style.md +!/.vim/bundle/black/docs/the_black_code_style/future_style.md +!/.vim/bundle/black/docs/the_black_code_style/index.rst +!/.vim/bundle/black/docs/usage_and_configuration/black_as_a_server.md +!/.vim/bundle/black/docs/usage_and_configuration/file_collection_and_discovery.md +!/.vim/bundle/black/docs/usage_and_configuration/index.rst +!/.vim/bundle/black/docs/usage_and_configuration/the_basics.md +!/.vim/bundle/black/.flake8 +!/.vim/bundle/black/fuzz.py +!/.vim/bundle/black/gallery/Dockerfile +!/.vim/bundle/black/gallery/gallery.py +!/.vim/bundle/black/gallery/README.md +!/.vim/bundle/black/.github/CODE_OF_CONDUCT.md +!/.vim/bundle/black/.github/ISSUE_TEMPLATE/bug_report.md +!/.vim/bundle/black/.github/ISSUE_TEMPLATE/config.yml +!/.vim/bundle/black/.github/ISSUE_TEMPLATE/docs-issue.md +!/.vim/bundle/black/.github/ISSUE_TEMPLATE/feature_request.md +!/.vim/bundle/black/.github/ISSUE_TEMPLATE/style_issue.md +!/.vim/bundle/black/.github/PULL_REQUEST_TEMPLATE.md +!/.vim/bundle/black/.github/workflows/changelog.yml +!/.vim/bundle/black/.github/workflows/docker.yml +!/.vim/bundle/black/.github/workflows/doc.yml +!/.vim/bundle/black/.github/workflows/fuzz.yml +!/.vim/bundle/black/.github/workflows/lint.yml +!/.vim/bundle/black/.github/workflows/primer.yml +!/.vim/bundle/black/.github/workflows/pypi_upload.yml +!/.vim/bundle/black/.github/workflows/test.yml +!/.vim/bundle/black/.github/workflows/upload_binary.yml +!/.vim/bundle/black/.github/workflows/uvloop_test.yml +!/.vim/bundle/black/.gitignore +!/.vim/bundle/black/LICENSE +!/.vim/bundle/black/MANIFEST.in +!/.vim/bundle/black/mypy.ini +!/.vim/bundle/black/Pipfile +!/.vim/bundle/black/Pipfile.lock +!/.vim/bundle/black/plugin/black.vim +!/.vim/bundle/black/.pre-commit-config.yaml +!/.vim/bundle/black/.pre-commit-hooks.yaml +!/.vim/bundle/black/.prettierrc.yaml +!/.vim/bundle/black/profiling/dict_big.py +!/.vim/bundle/black/profiling/dict_huge.py +!/.vim/bundle/black/profiling/list_big.py +!/.vim/bundle/black/profiling/list_huge.py +!/.vim/bundle/black/profiling/mix_big.py +!/.vim/bundle/black/profiling/mix_huge.py +!/.vim/bundle/black/profiling/mix_small.py +!/.vim/bundle/black/pyproject.toml +!/.vim/bundle/black/README.md +!/.vim/bundle/black/.readthedocs.yaml +!/.vim/bundle/black/scripts/check_pre_commit_rev_in_example.py +!/.vim/bundle/black/scripts/check_version_in_basics_example.py +!/.vim/bundle/black/scripts/__init__.py +!/.vim/bundle/black/setup.cfg +!/.vim/bundle/black/setup.py +!/.vim/bundle/black/src/black/brackets.py +!/.vim/bundle/black/src/black/cache.py +!/.vim/bundle/black/src/black/comments.py +!/.vim/bundle/black/src/black/concurrency.py +!/.vim/bundle/black/src/black/const.py +!/.vim/bundle/black/src/black/debug.py +!/.vim/bundle/black/src/blackd/__init__.py +!/.vim/bundle/black/src/blackd/middlewares.py +!/.vim/bundle/black/src/black/files.py +!/.vim/bundle/black/src/black/handle_ipynb_magics.py +!/.vim/bundle/black/src/black/__init__.py +!/.vim/bundle/black/src/black/linegen.py +!/.vim/bundle/black/src/black/lines.py +!/.vim/bundle/black/src/black/__main__.py +!/.vim/bundle/black/src/black/mode.py +!/.vim/bundle/black/src/black/nodes.py +!/.vim/bundle/black/src/black/numerics.py +!/.vim/bundle/black/src/black/output.py +!/.vim/bundle/black/src/black/parsing.py +!/.vim/bundle/black/src/black_primer/cli.py +!/.vim/bundle/black/src/black_primer/__init__.py +!/.vim/bundle/black/src/black_primer/lib.py +!/.vim/bundle/black/src/black_primer/primer.json +!/.vim/bundle/black/src/black/py.typed +!/.vim/bundle/black/src/black/report.py +!/.vim/bundle/black/src/black/rusty.py +!/.vim/bundle/black/src/black/strings.py +!/.vim/bundle/black/src/black/trans.py +!/.vim/bundle/black/src/blib2to3/Grammar.txt +!/.vim/bundle/black/src/blib2to3/__init__.py +!/.vim/bundle/black/src/blib2to3/LICENSE +!/.vim/bundle/black/src/blib2to3/PatternGrammar.txt +!/.vim/bundle/black/src/blib2to3/pgen2/conv.py +!/.vim/bundle/black/src/blib2to3/pgen2/driver.py +!/.vim/bundle/black/src/blib2to3/pgen2/grammar.py +!/.vim/bundle/black/src/blib2to3/pgen2/__init__.py +!/.vim/bundle/black/src/blib2to3/pgen2/literals.py +!/.vim/bundle/black/src/blib2to3/pgen2/parse.py +!/.vim/bundle/black/src/blib2to3/pgen2/pgen.py +!/.vim/bundle/black/src/blib2to3/pgen2/tokenize.py +!/.vim/bundle/black/src/blib2to3/pgen2/token.py +!/.vim/bundle/black/src/blib2to3/pygram.py +!/.vim/bundle/black/src/blib2to3/pytree.py +!/.vim/bundle/black/src/blib2to3/README +!/.vim/bundle/black/test_requirements.txt +!/.vim/bundle/black/tests/conftest.py +!/.vim/bundle/black/tests/data/async_as_identifier.py +!/.vim/bundle/black/tests/data/beginning_backslash.py +!/.vim/bundle/black/tests/data/blackd_diff.diff +!/.vim/bundle/black/tests/data/blackd_diff.py +!/.vim/bundle/black/tests/data/bracketmatch.py +!/.vim/bundle/black/tests/data/cantfit.py +!/.vim/bundle/black/tests/data/class_blank_parentheses.py +!/.vim/bundle/black/tests/data/class_methods_new_line.py +!/.vim/bundle/black/tests/data/collections.py +!/.vim/bundle/black/tests/data/comment_after_escaped_newline.py +!/.vim/bundle/black/tests/data/comments2.py +!/.vim/bundle/black/tests/data/comments3.py +!/.vim/bundle/black/tests/data/comments4.py +!/.vim/bundle/black/tests/data/comments5.py +!/.vim/bundle/black/tests/data/comments6.py +!/.vim/bundle/black/tests/data/comments7.py +!/.vim/bundle/black/tests/data/comments_non_breaking_space.py +!/.vim/bundle/black/tests/data/comments.py +!/.vim/bundle/black/tests/data/composition_no_trailing_comma.py +!/.vim/bundle/black/tests/data/composition.py +!/.vim/bundle/black/tests/data/debug_visitor.out +!/.vim/bundle/black/tests/data/debug_visitor.py +!/.vim/bundle/black/tests/data/decorators.py +!/.vim/bundle/black/tests/data/docstring_no_string_normalization.py +!/.vim/bundle/black/tests/data/docstring.py +!/.vim/bundle/black/tests/data/empty_lines.py +!/.vim/bundle/black/tests/data/empty_pyproject.toml +!/.vim/bundle/black/tests/data/expression.diff +!/.vim/bundle/black/tests/data/expression.py +!/.vim/bundle/black/tests/data/expression_skip_magic_trailing_comma.diff +!/.vim/bundle/black/tests/data/fmtonoff2.py +!/.vim/bundle/black/tests/data/fmtonoff3.py +!/.vim/bundle/black/tests/data/fmtonoff4.py +!/.vim/bundle/black/tests/data/fmtonoff.py +!/.vim/bundle/black/tests/data/fmtskip2.py +!/.vim/bundle/black/tests/data/fmtskip3.py +!/.vim/bundle/black/tests/data/fmtskip4.py +!/.vim/bundle/black/tests/data/fmtskip5.py +!/.vim/bundle/black/tests/data/fmtskip6.py +!/.vim/bundle/black/tests/data/fmtskip.py +!/.vim/bundle/black/tests/data/force_py36.py +!/.vim/bundle/black/tests/data/force_pyi.py +!/.vim/bundle/black/tests/data/fstring.py +!/.vim/bundle/black/tests/data/function2.py +!/.vim/bundle/black/tests/data/function.py +!/.vim/bundle/black/tests/data/function_trailing_comma.py +!/.vim/bundle/black/tests/data/import_spacing.py +!/.vim/bundle/black/tests/data/include_exclude_tests/b/.definitely_exclude/a.pie +!/.vim/bundle/black/tests/data/include_exclude_tests/b/.definitely_exclude/a.py +!/.vim/bundle/black/tests/data/include_exclude_tests/b/.definitely_exclude/a.pyi +!/.vim/bundle/black/tests/data/include_exclude_tests/b/dont_exclude/a.pie +!/.vim/bundle/black/tests/data/include_exclude_tests/b/dont_exclude/a.py +!/.vim/bundle/black/tests/data/include_exclude_tests/b/dont_exclude/a.pyi +!/.vim/bundle/black/tests/data/include_exclude_tests/b/exclude/a.pie +!/.vim/bundle/black/tests/data/include_exclude_tests/b/exclude/a.py +!/.vim/bundle/black/tests/data/include_exclude_tests/b/exclude/a.pyi +!/.vim/bundle/black/tests/data/include_exclude_tests/.gitignore +!/.vim/bundle/black/tests/data/include_exclude_tests/pyproject.toml +!/.vim/bundle/black/tests/data/invalid_gitignore_tests/a.py +!/.vim/bundle/black/tests/data/invalid_gitignore_tests/.gitignore +!/.vim/bundle/black/tests/data/invalid_gitignore_tests/pyproject.toml +!/.vim/bundle/black/tests/data/invalid_nested_gitignore_tests/a/a.py +!/.vim/bundle/black/tests/data/invalid_nested_gitignore_tests/a/.gitignore +!/.vim/bundle/black/tests/data/invalid_nested_gitignore_tests/a.py +!/.vim/bundle/black/tests/data/invalid_nested_gitignore_tests/pyproject.toml +!/.vim/bundle/black/tests/data/long_strings__edge_case.py +!/.vim/bundle/black/tests/data/long_strings_flag_disabled.py +!/.vim/bundle/black/tests/data/long_strings.py +!/.vim/bundle/black/tests/data/long_strings__regression.py +!/.vim/bundle/black/tests/data/missing_final_newline.diff +!/.vim/bundle/black/tests/data/missing_final_newline.py +!/.vim/bundle/black/tests/data/nested_gitignore_tests/pyproject.toml +!/.vim/bundle/black/tests/data/nested_gitignore_tests/root/a.py +!/.vim/bundle/black/tests/data/nested_gitignore_tests/root/b.py +!/.vim/bundle/black/tests/data/nested_gitignore_tests/root/child/a.py +!/.vim/bundle/black/tests/data/nested_gitignore_tests/root/child/b.py +!/.vim/bundle/black/tests/data/nested_gitignore_tests/root/child/c.py +!/.vim/bundle/black/tests/data/nested_gitignore_tests/root/child/.gitignore +!/.vim/bundle/black/tests/data/nested_gitignore_tests/root/c.py +!/.vim/bundle/black/tests/data/nested_gitignore_tests/root/.gitignore +!/.vim/bundle/black/tests/data/nested_gitignore_tests/x.py +!/.vim/bundle/black/tests/data/non_python_notebook.ipynb +!/.vim/bundle/black/tests/data/notebook_empty_metadata.ipynb +!/.vim/bundle/black/tests/data/notebook_no_trailing_newline.ipynb +!/.vim/bundle/black/tests/data/notebook_trailing_newline.ipynb +!/.vim/bundle/black/tests/data/notebook_which_cant_be_parsed.ipynb +!/.vim/bundle/black/tests/data/notebook_without_changes.ipynb +!/.vim/bundle/black/tests/data/numeric_literals.py +!/.vim/bundle/black/tests/data/numeric_literals_py2.py +!/.vim/bundle/black/tests/data/numeric_literals_skip_underscores.py +!/.vim/bundle/black/tests/data/pep_570.py +!/.vim/bundle/black/tests/data/pep_572_do_not_remove_parens.py +!/.vim/bundle/black/tests/data/pep_572.py +!/.vim/bundle/black/tests/data/pep_572_py310.py +!/.vim/bundle/black/tests/data/pep_572_py39.py +!/.vim/bundle/black/tests/data/pep_572_remove_parens.py +!/.vim/bundle/black/tests/data/percent_precedence.py +!/.vim/bundle/black/tests/data/python2_print_function.py +!/.vim/bundle/black/tests/data/python2.py +!/.vim/bundle/black/tests/data/python2_unicode_literals.py +!/.vim/bundle/black/tests/data/python37.py +!/.vim/bundle/black/tests/data/python38.py +!/.vim/bundle/black/tests/data/python39.py +!/.vim/bundle/black/tests/data/remove_parens.py +!/.vim/bundle/black/tests/data/slices.py +!/.vim/bundle/black/tests/data/string_prefixes.py +!/.vim/bundle/black/tests/data/string_quotes.py +!/.vim/bundle/black/tests/data/stub.pyi +!/.vim/bundle/black/tests/data/trailing_comma_optional_parens1.py +!/.vim/bundle/black/tests/data/trailing_comma_optional_parens2.py +!/.vim/bundle/black/tests/data/trailing_comma_optional_parens3.py +!/.vim/bundle/black/tests/data/tricky_unicode_symbols.py +!/.vim/bundle/black/tests/data/tupleassign.py +!/.vim/bundle/black/tests/empty.toml +!/.vim/bundle/black/tests/__init__.py +!/.vim/bundle/black/tests/optional.py +!/.vim/bundle/black/tests/test_blackd.py +!/.vim/bundle/black/tests/test_black.py +!/.vim/bundle/black/tests/test_format.py +!/.vim/bundle/black/tests/test_ipynb.py +!/.vim/bundle/black/tests/test_no_ipynb.py +!/.vim/bundle/black/tests/test_primer.py +!/.vim/bundle/black/tests/test.toml +!/.vim/bundle/black/tests/util.py +!/.vim/bundle/black/tox.ini +!/.vim/bundle/explainpat/autoload/explainpat.vim +!/.vim/bundle/explainpat/autoload/nwo/magic.vim +!/.vim/bundle/explainpat/doc/explainpat.txt +!/.vim/bundle/explainpat/.gitignore +!/.vim/bundle/explainpat/plugin/explainpat.vim +!/.vim/bundle/explainpat/README +!/.vim/bundle/password-store/autoload/password_store.vim +!/.vim/bundle/password-store/doc/vim-password-store.txt +!/.vim/bundle/password-store/ftdetect/pass.vim +!/.vim/bundle/password-store/ftplugin/pass.vim +!/.vim/bundle/password-store/LICENSE +!/.vim/bundle/password-store/README.md +!/.vim/bundle/password-store/syntax/obfuscated.vim +!/.vim/bundle/password-store/syntax/pass.vim +!/.vim/bundle/password-store/t/settings.vader +!/.vim/bundle/vim-artesanal/colors/artesanal.vim +!/.vim/bundle/vim-artesanal/doc/artesanal.txt +!/.vim/bundle/vim-artesanal/README.md +!/.vim/bundle/vim-artesanal/templates/artesanal.colortemplate +!/.vim/bundle/vim-artesanal/templates/_common.colortemplate +!/.vim/bundle/vim-artesanal/templates/_dark.colortemplate +!/.vim/bundle/vim-artesanal/templates/_help.colortemplate +!/.vim/bundle/vim-artesanal/templates/_light.colortemplate +!/.vim/bundle/vim-flake8/autoload/flake8.vim +!/.vim/bundle/vim-flake8/ftplugin/python_flake8.vim +!/.vim/bundle/vim-flake8/LICENSE +!/.vim/bundle/vim-flake8/README.mdown +!/.vim/bundle/vim-markdown/after/ftplugin/markdown.vim +!/.vim/bundle/vim-markdown/CONTRIBUTING.md +!/.vim/bundle/vim-markdown/doc/vim-markdown.txt +!/.vim/bundle/vim-markdown/ftdetect/markdown.vim +!/.vim/bundle/vim-markdown/ftplugin/markdown.vim +!/.vim/bundle/vim-markdown/.gitignore +!/.vim/bundle/vim-markdown/indent/markdown.vim +!/.vim/bundle/vim-markdown/Makefile +!/.vim/bundle/vim-markdown/README.md +!/.vim/bundle/vim-markdown/registry/markdown.yaml +!/.vim/bundle/vim-markdown/syntax/markdown.vim +!/.vim/bundle/vim-markdown/test/folding-toc.vader +!/.vim/bundle/vim-markdown/test/folding.vader +!/.vim/bundle/vim-markdown/test/ge_test.md +!/.vim/bundle/vim-markdown/test/indent.md +!/.vim/bundle/vim-markdown/test/indent-new-list-item.vader +!/.vim/bundle/vim-markdown/test/indent.vader +!/.vim/bundle/vim-markdown/test/map.vader +!/.vim/bundle/vim-markdown/test/python-folding.vader +!/.vim/bundle/vim-markdown/test/README.md +!/.vim/bundle/vim-markdown/test/run-tests.sh +!/.vim/bundle/vim-markdown/test/syntax.md +!/.vim/bundle/vim-markdown/test/syntax-singleline.vader +!/.vim/bundle/vim-markdown/test/syntax.vader +!/.vim/bundle/vim-markdown/test/table-format.vader +!/.vim/bundle/vim-markdown/test/toc-autofit.vader +!/.vim/bundle/vim-markdown/test/toc.vader +!/.vim/bundle/vim-markdown/test/vimrc +!/.vim/bundle/vim-markdown/.travis.yml +!/.vim/bundle/vim-python-pep8-indent/.circleci/config.yml +!/.vim/bundle/vim-python-pep8-indent/CONTRIBUTING.rst +!/.vim/bundle/vim-python-pep8-indent/COPYING.txt +!/.vim/bundle/vim-python-pep8-indent/.coveragerc +!/.vim/bundle/vim-python-pep8-indent/docker-compose.yml +!/.vim/bundle/vim-python-pep8-indent/Dockerfile +!/.vim/bundle/vim-python-pep8-indent/.dockerignore +!/.vim/bundle/vim-python-pep8-indent/Gemfile +!/.vim/bundle/vim-python-pep8-indent/.gitignore +!/.vim/bundle/vim-python-pep8-indent/indent/cython.vim +!/.vim/bundle/vim-python-pep8-indent/indent/python.vim +!/.vim/bundle/vim-python-pep8-indent/Makefile +!/.vim/bundle/vim-python-pep8-indent/README.rst +!/.vim/bundle/vim-python-pep8-indent/spec/indent/bytes_spec.rb +!/.vim/bundle/vim-python-pep8-indent/spec/indent/cython_spec.rb +!/.vim/bundle/vim-python-pep8-indent/spec/indent/indent_spec.rb +!/.vim/bundle/vim-python-pep8-indent/spec/make-coverage +!/.vim/bundle/vim-python-pep8-indent/spec/spec_helper.rb +!/.vim/bundle/vim-python-pep8-indent/spec/vimrc +!/.vim/colors/madduck.vim +!/.vim/doc/editorconfig.txt +!/.vim/doc/fugitive.txt +!/.vim/doc/.gitignore +!/.vim/doc/lastplace.txt +!/.vim/doc/Tabular.txt +!/.vim/doc/youcompleteme.txt +!/.vim/ftdetect/fugitive.vim +!/.vim/ftdetect/itsalltext.vim +!/.vim/ftdetect/mediawiki.vim +!/.vim/ftdetect/puppet.vim +!/.vim/ftplugin/gitcommit.vim +!/.vim/ftplugin/gitconfig.vim +!/.vim/ftplugin/itsalltext.vim +!/.vim/ftplugin/latex-suite/.gitignore +!/.vim/ftplugin/markdown.vim +!/.vim/ftplugin/mediawiki.vim +!/.vim/ftplugin/python/khuno.vim +!/.vim/ftplugin/tex.vim +!/.vim/ftplugin/vcard.vim +!/.vim/.gitignore +!/.vim/macros/table.vim +!/.vim/plugin/editorconfig.vim +!/.vim/plugin/fugitive.vim +!/.vim/plugin/justify.vim +!/.vim/plugin/lastplace.vim +!/.vim/plugin/lbdbq.vim +!/.vim/plugin/matchit.vim +!/.vim/plugin/Tabular.vim +!/.vim/plugin/vimsnippets.vim +!/.vim/plugin/youcompleteme.vim +!/.vim/pythonx/vimsnippets.py +!/.vimrc +!/.vim/snippets/actionscript.snippets +!/.vim/snippets/apache.snippets +!/.vim/snippets/autoit.snippets +!/.vim/snippets/chef.snippets +!/.vim/snippets/clojure.snippets +!/.vim/snippets/cmake.snippets +!/.vim/snippets/coffee/angular_coffee.snippets +!/.vim/snippets/coffee/coffee.snippets +!/.vim/snippets/coffee/jquery_coffee.snippets +!/.vim/snippets/cpp.snippets +!/.vim/snippets/c.snippets +!/.vim/snippets/cs.snippets +!/.vim/snippets/css.snippets +!/.vim/snippets/dart.snippets +!/.vim/snippets/diff.snippets +!/.vim/snippets/django.snippets +!/.vim/snippets/dosini.snippets +!/.vim/snippets/elixir.snippets +!/.vim/snippets/erlang.snippets +!/.vim/snippets/eruby.snippets +!/.vim/snippets/falcon.snippets +!/.vim/snippets/go.snippets +!/.vim/snippets/haml.snippets +!/.vim/snippets/haskell.snippets +!/.vim/snippets/htmldjango.snippets +!/.vim/snippets/html_minimal.snippets +!/.vim/snippets/html.snippets +!/.vim/snippets/htmltornado.snippets +!/.vim/snippets/jade.snippets +!/.vim/snippets/javascript/javascript.d3.snippets +!/.vim/snippets/javascript/javascript-jquery.snippets +!/.vim/snippets/javascript/javascript.snippets +!/.vim/snippets/java.snippets +!/.vim/snippets/jsp.snippets +!/.vim/snippets/ledger.snippets +!/.vim/snippets/ls.snippets +!/.vim/snippets/lua.snippets +!/.vim/snippets/make.snippets +!/.vim/snippets/mako.snippets +!/.vim/snippets/markdown.snippets +!/.vim/snippets/objc.snippets +!/.vim/snippets/openfoam.snippets +!/.vim/snippets/perl.snippets +!/.vim/snippets/php.snippets +!/.vim/snippets/plsql.snippets +!/.vim/snippets/po.snippets +!/.vim/snippets/processing.snippets +!/.vim/snippets/progress.snippets +!/.vim/snippets/puppet.snippets +!/.vim/snippets/python.snippets +!/.vim/snippets/r.snippets +!/.vim/snippets/rst.snippets +!/.vim/snippets/ruby.snippets +!/.vim/snippets/rust.snippets +!/.vim/snippets/scala.snippets +!/.vim/snippets/scheme.snippets +!/.vim/snippets/sh.snippets +!/.vim/snippets/slim.snippets +!/.vim/snippets/_.snippets +!/.vim/snippets/snippets.snippets +!/.vim/snippets/sql.snippets +!/.vim/snippets/tcl.snippets +!/.vim/snippets/tex.snippets +!/.vim/snippets/textile.snippets +!/.vim/snippets/vim.snippets +!/.vim/snippets/xslt.snippets +!/.vim/snippets/yii-chtml.snippets +!/.vim/snippets/yii.snippets +!/.vim/snippets/zsh.snippets +!/.vim/spell/en.utf-8.add +!/.vim/spell/.gitignore +!/.vim/syntax/fugitiveblame.vim +!/.vim/syntax/fugitive.vim +!/.vim/syntax/jinja.vim +!/.vim/syntax/mediawiki.vim +!/.vim/syntax/puppet.vim +!/.vim/syntax/tex.vim +!/.vim/UltiSnips/python.snippets +!/.zsh/zshenv/parts.d/50-vim diff --git a/.var/vim/.gitignore b/.var/vim/.gitignore new file mode 100644 index 00000000..01999147 --- /dev/null +++ b/.var/vim/.gitignore @@ -0,0 +1,2 @@ +view +viminfo diff --git a/.vim/.gitignore b/.vim/.gitignore new file mode 100644 index 00000000..6e92f57d --- /dev/null +++ b/.vim/.gitignore @@ -0,0 +1 @@ +tags diff --git a/.vim/after/ftplugin/gitcommit.vim b/.vim/after/ftplugin/gitcommit.vim new file mode 100644 index 00000000..bfefe09b --- /dev/null +++ b/.vim/after/ftplugin/gitcommit.vim @@ -0,0 +1,3 @@ +" display the git-diff --cached in window below commit +" assumes nosplitbelow set. Might want to use wincmd p otherwise +DiffGitCached | wincmd J diff --git a/.vim/after/ftplugin/markdown.vim b/.vim/after/ftplugin/markdown.vim new file mode 100644 index 00000000..0382d5d6 --- /dev/null +++ b/.vim/after/ftplugin/markdown.vim @@ -0,0 +1,19 @@ +if !exists("g:markdown_in_mail") + setlocal wrap + setlocal linebreak + setlocal textwidth=0 + + " treat wrapped lines normally + nnoremap k gk + nnoremap gk + inoremap gk + nnoremap j gj + nnoremap gj + inoremap gj + nnoremap 0 g0 + nnoremap g0 + inoremap g0 + nnoremap $ g$ + nnoremap g$ + inoremap g$ +end diff --git a/.vim/autoload/pathogen.vim b/.vim/autoload/pathogen.vim new file mode 120000 index 00000000..8bd4710f --- /dev/null +++ b/.vim/autoload/pathogen.vim @@ -0,0 +1 @@ +../bundle/vim-pathogen/autoload/pathogen.vim \ No newline at end of file diff --git a/.vim/bundle/explainpat/.gitignore b/.vim/bundle/explainpat/.gitignore new file mode 100644 index 00000000..926ccaaf --- /dev/null +++ b/.vim/bundle/explainpat/.gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/.vim/bundle/explainpat/README b/.vim/bundle/explainpat/README new file mode 100644 index 00000000..65cba883 --- /dev/null +++ b/.vim/bundle/explainpat/README @@ -0,0 +1,48 @@ +This is a mirror of http://www.vim.org/scripts/script.php?script_id=4364 + +:ExplainPattern {pattern} or +:ExplainPattern {register} + + parse the given Vim {pattern} and print a line of help + (with color) for each found pattern item. Nested + items get extra indent. + + A single-char argument is used as {register} argument: + / explain the last search pattern + * explain pattern from the clipboard + a explain pattern from register a + + +Example: :ExplainPattern * + +Register: * +Pattern: \C^\%(\\\%(@<.\|%[dxouU[(^$V#<>]\=\|z[1-9se(]\|@[>=!]\|_[[^$.]\=\|.\)\|.\) + \C match case while matching the pattern + ^ match at start of line (or string) + \%( start of non-capturing group + | \\ literal string (1 atom(s)) + | \%( start of non-capturing group + | | @< literal string (2 atom(s)) + | | . match any character + | | \| OR branch + | | % literal string (1 atom(s)) + | | [dxouU[(^$V#<>] collection + | | \= (multi) zero or one of the preceding atom + | | \| OR branch + | | z literal string (1 atom(s)) + | | [1-9se(] collection + | | \| OR branch + | | @ literal string (1 atom(s)) + | | [>=!] collection + | | \| OR branch + | | _ literal string (1 atom(s)) + | | [[^$.] collection + | | \= (multi) zero or one of the preceding atom + | | \| OR branch + | | . match any character + | \) end of group + | \| OR branch + | . match any character + \) end of group + +2013 Jan 17 diff --git a/.vim/bundle/explainpat/autoload/explainpat.vim b/.vim/bundle/explainpat/autoload/explainpat.vim new file mode 100644 index 00000000..0fded109 --- /dev/null +++ b/.vim/bundle/explainpat/autoload/explainpat.vim @@ -0,0 +1,609 @@ +" File: explainpat.vim +" Created: 2011 Nov 02 +" Last Change: 2017 Dec 15 +" Version: 0.9 +" Author: Andy Wokula +" License: Vim License, see :h license + +" Implements :ExplainPattern [pattern] + +" History: "{{{ +" 2013 Jun 21 AND/OR text is confusing, removed +" 2013 Apr 20 ... +"}}} + +" TODO {{{ +" - add something like "(empty) ... match everywhere" ... example: '\v(&&|str)' +" Pattern: \v(&&|str) +" Magic Pattern: \(\&\&\|str\) +" \( start of first capturing group +" | (empty) match everywhere +" | \& AND +" | (empty) match everywhere +" | \& AND +" | (empty) match everywhere +" | \| OR +" | str literal string (3 atom(s)) +" \) end of group +" - more testing, completeness check +" ? detailed collections +" ? literal string: also print the unescaped magic items +" ? literal string: show leading/trailing spaces +" +"}}} + +" Init Folklore {{{ +let s:cpo_save = &cpo +set cpo&vim +let g:explainpat#loaded = 1 +"}}} + +func! explainpat#ExplainPattern(cmd_arg, ...) "{{{ + " {a:1} alternative help printer object (caution, no sanity check) + " (for test running) + if a:cmd_arg == "" + " let pattern_str = nwo#vis#Get() + echo "(usage) :ExplainPattern [{register} | {pattern}]" + return + elseif strlen(a:cmd_arg) == 1 && a:cmd_arg =~ '["@0-9a-z\-:.*+/]' + echo 'Register:' a:cmd_arg + let pattern_str = getreg(a:cmd_arg) + else + let pattern_str = a:cmd_arg + endif + + echo printf('Pattern: %s', pattern_str) + let magicpat = nwo#magic#MakeMagic(pattern_str) + if magicpat !=# pattern_str + echo printf('Magic Pattern: %s', magicpat) + endif + + " we need state: + " set flag when in `\%[ ... ]' (optionally matched atoms): + let s:in_opt_atoms = 0 + " counter for `\(': + let s:capture_group_nr = 0 + " >=1 at pos 0 or after '\|', '\&', '\(', '\%(' or '\n'; else 0 or less: + let s:at_begin_of_pat = 1 + + let hulit = a:0>=1 && type(a:1)==s:DICT ? a:1 : explainpat#NewHelpPrinter() + call hulit.AddIndent(' ') + let bull = s:NewTokenBiter(magicpat) + while !bull.AtEnd() + let item = bull.Bite(s:magic_item_pattern) + if item != '' + let Doc = get(s:doc, item, '') + if empty(Doc) + call hulit.AddLiteral(item) + elseif type(Doc) == s:STRING + call hulit.Print(item, Doc) + elseif type(Doc) == s:FUNCREF + call call(Doc, [bull, hulit, item]) + elseif type(Doc) == s:LIST + call call(Doc[0], [bull, hulit, item, Doc[1]]) + endif + let s:at_begin_of_pat -= 1 + else + echoerr printf('ExplainPattern: cannot parse "%s"', bull.Rest()) + break + endif + unlet Doc + endwhile + call hulit.FlushLiterals() +endfunc "}}} + +" s: types {{{ +let s:STRING = type("") +let s:DICT = type({}) +let s:FUNCREF = type(function("tr")) +let s:LIST = type([]) +" }}} + +let s:magic_item_pattern = '\C^\%(\\\%(%#=\|%[dxouU[(^$V#<>]\=\|z[1-9se(]\|@[>=!]\=\|_[[^$.]\=\|.\)\|.\)' + +let s:doc = {} " {{{ +" this is all the help data ... +" strings, funcrefs and intermixed s:DocFoo() functions +" strongly depends on s:magic_item_pattern + +func! s:DocOrBranch(bull, hulit, item) "{{{ + call a:hulit.RemIndent() + call a:hulit.Print(a:item, "OR") + call a:hulit.AddIndent(' ') + let s:at_begin_of_pat = 2 +endfunc "}}} + +let s:doc['\|'] = function("s:DocOrBranch") + +func! s:DocBeginOfPat(bull, hulit, item, msg) "{{{ + call a:hulit.Print(a:item, a:msg) + let s:at_begin_of_pat = 2 +endfunc "}}} + +let s:doc['\&'] = [function("s:DocBeginOfPat"), "AND"] + +let s:ord = split('n first second third fourth fifth sixth seventh eighth ninth') + +func! s:DocGroupStart(bull, hulit, item) "{{{ + if a:item == '\%(' + call a:hulit.Print(a:item, "start of non-capturing group") + elseif a:item == '\(' + let s:capture_group_nr += 1 + call a:hulit.Print(a:item, printf("start of %s capturing group", get(s:ord, s:capture_group_nr, '(invalid)'))) + else " a:item == '\z(' + call a:hulit.Print(a:item, 'start of "external" group (only usable in :syn-region)') + endif + call a:hulit.AddIndent('| ', ' ') + let s:at_begin_of_pat = 2 +endfunc "}}} +func! s:DocGroupEnd(bull, hulit, item) "{{{ + call a:hulit.RemIndent(2) + call a:hulit.Print(a:item, "end of group") +endfunc "}}} + +let s:doc['\('] = function("s:DocGroupStart") +let s:doc['\%('] = function("s:DocGroupStart") +let s:doc['\)'] = function("s:DocGroupEnd") +" let s:doc['\z('] = "only in syntax scripts" +let s:doc['\z('] = function("s:DocGroupStart") + +func! s:DocStar(bull, hulit, item) "{{{ + if s:at_begin_of_pat >= 1 + " call a:hulit.Print(a:item, "(at begin of pattern) literal `*'") + call a:hulit.AddLiteral(a:item) + else + call a:hulit.Print(a:item, "(multi) zero or more of the preceding atom") + endif +endfunc "}}} + +" let s:doc['*'] = "(multi) zero or more of the preceding atom" +let s:doc['*'] = function("s:DocStar") + +let s:doc['\+'] = "(multi) one or more of the preceding atom" +let s:doc['\='] = "(multi) zero or one of the preceding atom" +let s:doc['\?'] = "(multi) zero or one of the preceding atom" +" let s:doc['\{'] = "(multi) N to M, greedy" +" let s:doc['\{-'] = "(multi) N to M, non-greedy" + +func! s:DocBraceMulti(bull, hulit, item) "{{{ + let rest = a:bull.Bite('^-\=\d*\%(,\d*\)\=\\\=}') + if rest != "" + if rest == '-}' + call a:hulit.Print(a:item. rest, "non-greedy version of `*'") + elseif rest =~ '^-' + call a:hulit.Print(a:item. rest, "(multi) N to M, non-greedy") + else + call a:hulit.Print(a:item. rest, "(multi) N to M, greedy") + endif + else + call a:hulit.Print(a:item, "(invalid) incomplete `\\{...}' item") + endif +endfunc "}}} + +let s:doc['\{'] = function("s:DocBraceMulti") + +let s:doc['\@>'] = "(multi) match preceding atom like a full pattern" +let s:doc['\@='] = "(assertion) require match for preceding atom" +let s:doc['\@!'] = "(assertion) forbid match for preceding atom" + +func! s:DocBefore(bull, hulit, item) "{{{ + let rest = a:bull.Bite('^\d*\%[<[=!]]') + if rest == "<=" + call a:hulit.Print(a:item.rest, "(assertion) require match for preceding atom to the left") + elseif rest == "= 1 + call a:hulit.Print(a:item, "(assertion) require match at start of line") + " after `^' is not at begin of pattern ... handle special case `^*' here: + if a:bull.Bite('^\*') == "*" + call a:hulit.AddLiteral("*") + endif + else + " call a:hulit.Print(a:item, "(not at begin of pattern) literal `^'") + call a:hulit.AddLiteral(a:item) + endif +endfunc "}}} + +" let s:doc['^'] = "(assertion) require match at start of line" +let s:doc['^'] = function("s:DocCircumFlex") + +let s:doc['\_^'] = "(assertion) like `^', allowed anywhere in the pattern" + +func! s:DocDollar(bull, hulit, item) "{{{ + if a:bull.Rest() =~ '^$\|^\\[&|)n]' + call a:hulit.Print(a:item, "(assertion) require match at end of line") + else + call a:hulit.AddLiteral(a:item) + endif +endfunc "}}} + +" let s:doc['$'] = "(assertion) require match at end of line" +let s:doc['$'] = function("s:DocDollar") + +let s:doc['\_$'] = "(assertion) like `$', allowed anywhere in the pattern" +let s:doc['.'] = "match any character" +let s:doc['\_.'] = "match any character or newline" + +func! s:DocUnderscore(bull, hulit, item) "{{{ + let cclass = a:bull.Bite('^\a') + if cclass != '' + let cclass_doc = get(s:doc, '\'. cclass, '(invalid character class)') + call a:hulit.Print(a:item. cclass, printf('%s or end-of-line', cclass_doc)) + else + call a:hulit.Print(a:item, "(invalid) `\\_' should be followed by a letter or `[...]'") + " echoerr printf('ExplainPattern: cannot parse %s', a:item. matchstr(a:bull.Rest(), '.')) + endif +endfunc "}}} + +let s:doc['\_'] = function("s:DocUnderscore") +let s:doc['\<'] = "(assertion) require match at begin of word, :h word" +let s:doc['\>'] = "(assertion) require match at end of word, :h word" +let s:doc['\zs'] = "set begin of match here" +let s:doc['\ze'] = "set end of match here" +let s:doc['\%^'] = "(assertion) match at begin of buffer" +let s:doc['\%$'] = "(assertion) match at end of buffer" +let s:doc['\%V'] = "(assertion) match within the Visual area" +let s:doc['\%#'] = "(assertion) match with cursor position" + +func! s:DocRegexEngine(bull, hulit, item) "{{{ + let engine = a:bull.Bite('^[012]') + if engine == "0" + call a:hulit.Print(a:item.engine, 'Force automatic selection of the regexp engine (since v7.3.970).') + elseif engine == "1" + call a:hulit.Print(a:item.engine, 'Force using the old engine (since v7.3.970).') + elseif engine == "2" + call a:hulit.Print(a:item.engine, 'Force using the NFA engine (since v7.3.970).') + else + call a:hulit.Print(a:item, '(invalid) \%#= can only be followed by 0, 1, or 2') + endif +endfunc "}}} + +let s:doc['\%#='] = function("s:DocRegexEngine") + +" \%'m \%<'m \%>'m +" \%23l \%<23l \%>23l +" \%23c \%<23c \%>23c +" \%23v \%<23v \%>23v +" backslash percent at/before/after +func! s:DocBspercAt(bull, hulit, item) "{{{ + let rest = a:bull.Bite('^\%(''.\|\d\+[lvc]\)\C') + if rest[0] == "'" + call a:hulit.Print(a:item.rest, "(assertion) match with position of mark ". rest[1]) + else + let number = rest[:-2] + let type = rest[-1:] + if type ==# "l" + call a:hulit.Print(a:item.rest, "match in line ". number) + elseif type ==# "c" + call a:hulit.Print(a:item.rest, "match in column ". number) + elseif type ==# "v" + call a:hulit.Print(a:item.rest, "match in virtual column ". number) + else + call a:hulit.Print(a:item.rest, "(invalid) incomplete `\\%' item") + " echoerr printf('ExplainPattern: incomplete item %s', a:item. rest) + endif + endif +endfunc "}}} +func! s:DocBspercBefore(bull, hulit, item) "{{{ + let rest = a:bull.Bite('^\%(''.\|\d\+[lvc]\)\C') + if rest[0] == "'" + call a:hulit.Print(a:item.rest, "(assertion) match before position of mark ". rest[1]) + else + let number = rest[:-2] + let type = rest[-1:] + if type ==# "l" + call a:hulit.Print(a:item.rest, printf("match above line %d (towards start of buffer)", number)) + elseif type ==# "c" + call a:hulit.Print(a:item.rest, "match before column ". number) + elseif type ==# "v" + call a:hulit.Print(a:item.rest, "match before virtual column ". number) + else + call a:hulit.Print(a:item.rest, "(invalid) incomplete `\\%<' item") + " echoerr printf('ExplainPattern: incomplete item %s', a:item. rest) + endif + endif +endfunc "}}} +func! s:DocBspercAfter(bull, hulit, item) "{{{ + let rest = a:bull.Bite('^\%(''.\|\d\+[lvc]\)\C') + if rest[0] == "'" + call a:hulit.Print(a:item.rest, "(assertion) match after position of mark ". rest[1]) + else + let number = rest[:-2] + let type = rest[-1:] + if type ==# "l" + call a:hulit.Print(a:item.rest, printf("match below line %d (towards end of buffer)", number)) + elseif type ==# "c" + call a:hulit.Print(a:item.rest, "match after column ". number) + elseif type ==# "v" + call a:hulit.Print(a:item.rest, "match after virtual column ". number) + else + call a:hulit.Print(a:item.rest, "(invalid) incomplete `\\%>' item") + " echoerr printf('ExplainPattern: incomplete item %s', a:item. rest) + endif + endif +endfunc "}}} + +let s:doc['\%'] = function("s:DocBspercAt") +let s:doc['\%<'] = function("s:DocBspercBefore") +let s:doc['\%>'] = function("s:DocBspercAfter") + +let s:doc['\i'] = "identifier character (see 'isident' option)" +let s:doc['\I'] = "like \"\\i\", but excluding digits" +let s:doc['\k'] = "keyword character (see 'iskeyword' option)" +let s:doc['\K'] = "like \"\\k\", but excluding digits" +let s:doc['\f'] = "file name character (see 'isfname' option)" +let s:doc['\F'] = "like \"\\f\", but excluding digits" +let s:doc['\p'] = "printable character (see 'isprint' option)" +let s:doc['\P'] = "like \"\\p\", but excluding digits" +let s:doc['\s'] = "whitespace character: and " +let s:doc['\S'] = "non-whitespace character; opposite of \\s" +let s:doc['\d'] = "digit: [0-9]" +let s:doc['\D'] = "non-digit: [^0-9]" +let s:doc['\x'] = "hex digit: [0-9A-Fa-f]" +let s:doc['\X'] = "non-hex digit: [^0-9A-Fa-f]" +let s:doc['\o'] = "octal digit: [0-7]" +let s:doc['\O'] = "non-octal digit: [^0-7]" +let s:doc['\w'] = "word character: [0-9A-Za-z_]" +let s:doc['\W'] = "non-word character: [^0-9A-Za-z_]" +let s:doc['\h'] = "head of word character: [A-Za-z_]" +let s:doc['\H'] = "non-head of word character: [^A-Za-z_]" +let s:doc['\a'] = "alphabetic character: [A-Za-z]" +let s:doc['\A'] = "non-alphabetic character: [^A-Za-z]" +let s:doc['\l'] = "lowercase character: [a-z]" +let s:doc['\L'] = "non-lowercase character: [^a-z]" +let s:doc['\u'] = "uppercase character: [A-Z]" +let s:doc['\U'] = "non-uppercase character: [^A-Z]" + +let s:doc['\e'] = "match " +let s:doc['\t'] = "match " +let s:doc['\r'] = "match " +let s:doc['\b'] = "match CTRL-H" +let s:doc['\n'] = [function("s:DocBeginOfPat"), "match a newline"] +let s:doc['~'] = "match the last given substitute string" +let s:doc['\1'] = "match first captured string" +let s:doc['\2'] = "match second captured string" +let s:doc['\3'] = "match third captured string" +let s:doc['\4'] = "match fourth captured string " +let s:doc['\5'] = "match fifth captured string" +let s:doc['\6'] = "match sixth captured string" +let s:doc['\7'] = "match seventh captured string" +let s:doc['\8'] = "match eighth captured string" +let s:doc['\9'] = "match ninth captured string" + +let s:doc['\z1'] = 'match same string matched by first "external" group' +let s:doc['\z2'] = 'match same string matched by second "external" group' +let s:doc['\z3'] = 'match same string matched by third "external" group' +let s:doc['\z4'] = 'match same string matched by fourth "external" group ' +let s:doc['\z5'] = 'match same string matched by fifth "external" group' +let s:doc['\z6'] = 'match same string matched by sixth "external" group' +let s:doc['\z7'] = 'match same string matched by seventh "external" group' +let s:doc['\z8'] = 'match same string matched by eighth "external" group' +let s:doc['\z9'] = 'match same string matched by ninth "external" group' + +" from MakeMagic() +" skip the rest of a collection +let s:coll_skip_pat = '^\^\=]\=\%(\%(\\[\^\]\-\\bertn]\|\[:\w\+:]\|\[=.=]\|\[\..\.]\|[^\]]\)\@>\)*]' + +func! s:DocCollection(bull, hulit, item) "{{{ + let collstr = a:bull.Bite(s:coll_skip_pat) + if collstr == "" || collstr == "]" + call a:hulit.AddLiteral('['. collstr) + else + let inverse = collstr =~ '^\^' + let with_nl = a:item == '\_[' + let descr = inverse ? printf('collection not matching [%s', collstr[1:]) : 'collection' + let descr_nl = printf("%s%s", (inverse && with_nl ? ', but' : ''), (with_nl ? ' with end-of-line added' : '')) + call a:hulit.Print(a:item. collstr, descr. descr_nl) + endif +endfunc "}}} + +let s:doc['['] = function("s:DocCollection") +let s:doc['\_['] = function("s:DocCollection") + +func! s:DocOptAtoms(bull, hulit, item) "{{{ + if a:item == '\%[' + call a:hulit.Print(a:item, "start a sequence of optionally matched atoms") + let s:in_opt_atoms = 1 + call a:hulit.AddIndent('. ') + else " a:item == ']' + if s:in_opt_atoms + call a:hulit.RemIndent() + call a:hulit.Print(a:item, "end of optionally matched atoms") + let s:in_opt_atoms = 0 + else + call a:hulit.AddLiteral(a:item) + endif + endif +endfunc "}}} + +" let s:doc['\%['] = "start a sequence of optionally matched atoms" +let s:doc['\%['] = function("s:DocOptAtoms") +let s:doc[']'] = function("s:DocOptAtoms") + +func! s:DocAnywhere(bull, hulit, item, msg) "{{{ + call a:hulit.Print(a:item, a:msg) + " keep state: + let s:at_begin_of_pat += 1 +endfunc "}}} + +let s:doc['\c'] = [function("s:DocAnywhere"), "ignore case while matching the pattern"] +let s:doc['\C'] = [function("s:DocAnywhere"), "match case while matching the pattern"] +let s:doc['\Z'] = [function("s:DocAnywhere"), "ignore composing characters in the pattern"] + +" \%d 123 +" \%x 2a +" \%o 0377 +" \%u 20AC +" \%U 1234abcd + +func! s:DocBspercDecimal(bull, hulit, item) "{{{ + let number = a:bull.Bite('^\d\{,3}') + let char = strtrans(nr2char(str2nr(number))) + call a:hulit.Print(a:item. number, printf("match character specified by decimal number %s (%s)", number, char)) +endfunc "}}} +func! s:DocBspercHexTwo(bull, hulit, item) "{{{ + let number = a:bull.Bite('^\x\{,2}') + let char = strtrans(nr2char(str2nr(number,16))) + call a:hulit.Print(a:item. number, printf("match character specified with hex number 0x%s (%s)", number, char)) +endfunc "}}} +func! s:DocBspercOctal(bull, hulit, item) "{{{ + let number = a:bull.Bite('^\o\{,4}') + let char = strtrans(nr2char(str2nr(number,8))) + call a:hulit.Print(a:item. number, printf("match character specified with octal number 0%s (%s)", substitute(number, '^0*', '', ''), char)) +endfunc "}}} +func! s:DocBspercHexFour(bull, hulit, item) "{{{ + let number = a:bull.Bite('^\x\{,4}') + let char = has("multi_byte_encoding") ? ' ('. strtrans(nr2char(str2nr(number,16))).')' : '' + call a:hulit.Print(a:item. number, printf("match character specified with hex number 0x%s%s", number, char)) +endfunc "}}} +func! s:DocBspercHexEight(bull, hulit, item) "{{{ + let number = a:bull.Bite('^\x\{,8}') + let char = has("multi_byte_encoding") ? ' ('. strtrans(nr2char(str2nr(number,16))).')' : '' + call a:hulit.Print(a:item. number, printf("match character specified with hex number 0x%s%s", number, char)) +endfunc "}}} + +let s:doc['\%d'] = function("s:DocBspercDecimal") " 123 +let s:doc['\%x'] = function("s:DocBspercHexTwo") " 2a +let s:doc['\%o'] = function("s:DocBspercOctal") " 0377 +let s:doc['\%u'] = function("s:DocBspercHexFour") " 20AC +let s:doc['\%U'] = function("s:DocBspercHexEight") " 1234abcd + +" \m +" \M +" \v +" \V +"}}} + +" {{{ +func! s:SillyCheck(digits) "{{{ + return strlen(a:digits) < 10 ? a:digits : '{silly large number}' +endfunc "}}} +" }}} + +func! explainpat#NewHelpPrinter() "{{{ + let obj = {} + let obj.literals = '' + let obj.indents = [] + let obj.len = 0 " can be negative (!) + + func! obj.Print(str, ...) "{{{ + call self.FlushLiterals() + let indstr = join(self.indents, '') + echohl Comment + echo indstr + echohl None + if a:0 == 0 + echon a:str + else + " echo indstr. printf("`%s' %s", a:str, a:1) + echohl PreProc + echon printf("%-10s", a:str) + echohl None + echohl Comment + echon printf(" %s", a:1) + echohl None + endif + endfunc "}}} + + func! obj.AddLiteral(item) "{{{ + let self.literals .= a:item + endfunc "}}} + + func! obj.FlushLiterals() "{{{ + if self.literals == '' + return + endif + let indstr = join(self.indents, '') + echohl Comment + echo indstr + echohl None + if self.literals =~ '^\s\|\s$' + echon printf("%-10s", '"'. self.literals. '"') + else + echon printf("%-10s", self.literals) + endif + echohl Comment + echon " literal string" + if exists("*strchars") + if self.literals =~ '\\' + let self.literals = substitute(self.literals, '\\\(.\)', '\1', 'g') + endif + let spconly = self.literals =~ '[^ ]' ? '' : ', spaces only' + let nlit = strchars(self.literals) + echon " (". nlit. (nlit==1 ? " atom" : " atoms"). spconly.")" + endif + echohl None + let self.literals = '' + endfunc "}}} + + func! obj.AddIndent(...) "{{{ + call self.FlushLiterals() + if self.len >= 0 + call extend(self.indents, copy(a:000)) + elseif self.len + a:0 >= 1 + call extend(self.indents, a:000[-(self.len+a:0):]) + endif + let self.len += a:0 + endfunc "}}} + + func! obj.RemIndent(...) "{{{ + call self.FlushLiterals() + if a:0 == 0 + if self.len >= 1 + call remove(self.indents, -1) + endif + let self.len -= 1 + else + if self.len > a:1 + call remove(self.indents, -a:1, -1) + elseif self.len >= 1 + call remove(self.indents, 0, -1) + endif + let self.len -= a:1 + endif + endfunc "}}} + + return obj +endfunc "}}} + +func! s:NewTokenBiter(str) "{{{ + " {str} string to eat pieces from + let obj = {'str': a:str} + + " consume piece from start of input matching {pat} + func! obj.Bite(pat) "{{{ + " {pat} should start with '^' + let bite = matchstr(self.str, a:pat) + let self.str = strpart(self.str, strlen(bite)) + return bite + endfunc "}}} + + " get the unparsed rest of input (not consuming) + func! obj.Rest() "{{{ + return self.str + endfunc "}}} + + " check if end of input reached + func! obj.AtEnd() "{{{ + return self.str == "" + endfunc "}}} + + return obj +endfunc "}}} + +" Modeline: {{{1 +let &cpo = s:cpo_save +unlet s:cpo_save +" vim:ts=8:fdm=marker: diff --git a/.vim/bundle/explainpat/autoload/nwo/magic.vim b/.vim/bundle/explainpat/autoload/nwo/magic.vim new file mode 100644 index 00000000..557af824 --- /dev/null +++ b/.vim/bundle/explainpat/autoload/nwo/magic.vim @@ -0,0 +1,169 @@ +" File: makemagic.vim +" Created: 2011 Apr 18 +" Last Change: 2013 Mar 06 +" Rev Days: 6 +" Author: Andy Wokula +" License: Vim License, see :h license +" Version: 0.3 + +"" Comments {{{ + +" nwo#magic#MakeMagic({pat}) +" +" remove embedded switches (\v, \m, \M and \V) from pattern {pat} by +" converting {pat} into a purely magic pattern. Return the converted +" pattern. +" + +" TODO +" - recognize [#-\\]], with spaces: [ #-\ \] ] +" (collection ends at second ']') +" + \v\z( => \z( + +" 2011 Nov 01 copied from asneeded\makemagic.vim +" now asneeded\nwo\makemagic.vim (comments there!) +"}}} + +" Init Folklore {{{ +let s:cpo_save = &cpo +set cpo&vim +let g:nwo#magic#loaded = 1 +"}}} + +func! nwo#magic#MakeMagic(pat, ...) "{{{ + " {pat} (string) + " {a:1} (boolean) initial magic mode (default follows the 'magic' option) + + if a:0>=1 ? a:1 : &magic + let magic_mode = 'm' + let bracket_is_magic = 1 + else + let magic_mode = 'M' + let bracket_is_magic = 0 + endif + let result_pat = '' + let endpos = strlen(a:pat) + + let spos = 0 + while spos >= 0 && spos < endpos + let mc1 = a:pat[spos] + let mc2 = a:pat[spos+1] + + let collection = 0 + if mc1 == '\' + if mc2 == '[' && !bracket_is_magic + let collection = 1 + let spos += 1 + elseif mc2 =~ '[vmMV]' + let magic_mode = mc2 + let bracket_is_magic = mc2 =~# '[vm]' + let spos += 2 + elseif mc2 == '_' + let mc3 = a:pat[spos+2] + if mc3 == '[' + let collection = 1 + endif + endif + elseif mc1 == '[' && bracket_is_magic + let collection = 1 + endif + + if collection + let nextpos = matchend(a:pat, s:collection_skip_pat, spos) + if nextpos >= 0 + let magpart = strpart(a:pat, spos, nextpos-spos) + else + let magpart = strpart(a:pat, spos) + endif + else + let nextpos = match(a:pat, s:switchpat[magic_mode], spos) + if nextpos >= 0 + if nextpos == spos + continue " optional + endif + let part = strpart(a:pat, spos, nextpos-spos) + else + let part = strpart(a:pat, spos) + endif + if magic_mode ==# 'v' + let magpart = substitute(part, s:vmagic_items_pat, '\=s:ToggleVmagicBslash(submatch(0))', 'g') + elseif magic_mode ==# 'm' + let magpart = part + elseif magic_mode ==# 'M' + let s:rem_bslash_before = '.*[~' + " the first two branches are only to eat the matches: + let magpart = substitute(part, '\\%\[\|\\_\\\=.\|\\.\|[.*[~]', '\=s:ToggleBslash(submatch(0))', 'g') + elseif magic_mode ==# 'V' + let s:rem_bslash_before = '^$.*[~' + let magpart = substitute(part, '\\%\[\|\\_\\\=.\|\\.\|[\^$.*[~]', '\=s:ToggleBslash(submatch(0))', 'g') + endif + endif + + let result_pat .= magpart + let spos = nextpos + endwhile + + return result_pat +endfunc "}}} + +" s:variables {{{ + +" pattern to match very magic items: +let s:vmagic_items_pat = '\C\\\%(z(\|.\)\|%\%([#$(UV[\^cdlouvx]\|[<>]\=\%(''.\|\d\+[clv]\)\)\|[&()+<=>?|]\|@\%([!=>]\|<[!=]\)\|{' + +" not escaped - require an even number of '\' (zero or more) to the left: +let s:not_escaped = '\%(\%(^\|[^\\]\)\%(\\\\\)*\)\@<=' + +" prohibit an unescaped match for '%' before what follows (used when trying +" to find '[', but not '%[', :h /\%[ ) +let s:not_vmagic_opt_atoms = '\%(\%(^\|[^\\]\)\%(\\\\\)*%\)\@\)*]' + +" }}} + +" for magic modes 'V' and 'M' +func! s:ToggleBslash(patitem) "{{{ + " {patitem} magic char or '\'.char + if a:patitem =~ '^.$' + return '\'.a:patitem + else + let mchar = matchstr(a:patitem, '^\\\zs.') + if stridx(s:rem_bslash_before, mchar) >= 0 + return mchar + else + return a:patitem + endif + endif +endfunc "}}} + +func! s:ToggleVmagicBslash(patitem) "{{{ + " {patitem} magic char or '\'.char + if a:patitem =~ '^\\' + let mchar = a:patitem[1] + if mchar =~ '[\^$.*[\]~\\[:alnum:]_]' + return a:patitem + else + return mchar + endif + else + return '\'.a:patitem + endif +endfunc "}}} + +" Modeline: {{{1 +let &cpo = s:cpo_save +unlet s:cpo_save +" vim:ts=8:fdm=marker: diff --git a/.vim/bundle/explainpat/doc/explainpat.txt b/.vim/bundle/explainpat/doc/explainpat.txt new file mode 100644 index 00000000..0268c699 --- /dev/null +++ b/.vim/bundle/explainpat/doc/explainpat.txt @@ -0,0 +1,103 @@ +*explainpat.txt* Give detailed help on a regexp pattern. + + For Vim version 7.0. Last change: 2017 Dec 15 + By Andy Wokula + + *explainpat* *explainpat.vim* +ExplainPat is a plugin to inspect a Vim regexp pattern and show a line of help +for each found regexp item. Purpose is to get a better view on somebody +else's complex regexp string. It may also help with spotting mistakes. + +If you find that it explains something wrong, please drop me an email. + +URL http://vim.sourceforge.net/scripts/script.php?script_id=4364 +============================================================================== + *:ExplainPattern* +:ExplainPattern {pattern} +:ExplainPattern {register} + inspect the given Vim {pattern} and print a line of + help (with color) for each found pattern item. Nested + items get extra indent. + + A single-char argument is used as {register} argument: + / explain the last search pattern + * explain pattern from the clipboard + a explain pattern from register a + etc. + +> + :ExplainPattern \C^\%(\\\%(@<\|%#=\|%[dxouU[(^$V#<>]\=\|z[1-9se(]\|@[>=!]\|_[[^$.]\=\|.\)\|.\) + +Notes: +The pattern is first converted into a purely |magic| pattern using +|nwo#magic#MakeMagic()|. This means that embedded |/\V| |/\M| |/\m| |/\v| +specifiers are effectively removed from the explanation. + +:ExplainPattern also accepts some invalid patterns: > + :ExplainPattern \) + Pattern: \) + \) end of group + +============================================================================== +TODO: +? `\%[...]` can be nested? But documentation |/\%[]| says no. + +Ideas: +- If the user already knows regular expressions but of a different kind, + explain items in that different language. + Other regexp idioms: + Perl, Python, Emacs, Java, C#, Sed, Grep; + Vim ... very magic, nomagic, very nomagic + Possible config var name: + g:explainpat_user_knows = "Perl" + g:explainpat_background = "Perl" + g:explainpat_in_terms_of = "Perl" + g:explainpat_language = "Perl" + +============================================================================== +History: + +v0.9 ++ BF accept `\@123<=` and `\@123 explainpat#NewHelpPrinter() + +v0.7 ++ BF `\{3,4\}` not accepted, only `\{3,4}` + +v0.6 ++ BF `[]` is a literal string (not a collection) + +v0.5 ++ BF `$\n^` ++ wording: `\|` is not an "OR branch" (it separates or branches) ++ NF added tests (not part of release) ++ NF accept custom help printer (for testing purpose, could also be used to + export HTML etc.) + +v0.4 ++ BF `[foo` is a literal string ++ BF for |/star|, |/^| and |/$|, distinguish position in the pattern + (sometimes these become literal); special cases: `^**`, `^^`, `\c^^`, `$$`, + `a\|^b`, `a\&*b`, `[ab`, `\_[ab`, ... + +v0.3 ++ BF accept `\z(...\)` and `\z[N]` ++ BF accept `[=a=]` and `[.a.]` in collections + +v0.2 ++ include vim_use suggestions [2012 Dec 19] + * for collections [^...], add "not matching [...]" + * fix `\%>'a1` + * more detailed `\%x31` + +v0.1 (initial version) ++ start of "first" capturing group, start of 2nd ... ++ `\|` should get less indent than the branches, do we need to create an + AST? ! no, keep it straight forward ++ `\%[...]` ++ `\{`, `\{-` + +============================================================================== +vim:tw=78:fo=tcq2:sts=0:ts=8:sw=8:fdm=marker:fmr=^_\^,^\^:ft=help: diff --git a/.vim/bundle/explainpat/plugin/explainpat.vim b/.vim/bundle/explainpat/plugin/explainpat.vim new file mode 100644 index 00000000..731f9a43 --- /dev/null +++ b/.vim/bundle/explainpat/plugin/explainpat.vim @@ -0,0 +1,34 @@ +" File: explainpat.vim +" Created: 2011 Nov 02 +" Last Change: 2013 Mar 08 +" Rev Days: 7 +" Author: Andy Wokula +" License: Vim License, see :h license +" Version: 0.5 + +" :ExplainPattern [pattern] +" +" parse the given Vim [pattern] (default: text in the Visual area) and +" print a line of help (with color!) for each found pattern item. Nested +" items get extra indent. +" +" A single-char [pattern] argument is used as register argument: +" / explain the last search pattern +" * explain pattern from the clipboard +" a explain pattern from register a +" + +if exists("loaded_explainpat") + finish +endif +let loaded_explainpat = 1 + +if v:version < 700 + echomsg "explainpat: you need at least Vim 7.0" + finish +endif + +com! -nargs=? ExplainPattern call explainpat#ExplainPattern() + +" Modeline: {{{1 +" vim:ts=8:fdm=marker: diff --git a/.vim/bundle/password-store/.projections.json b/.vim/bundle/password-store/.projections.json new file mode 100644 index 00000000..89596b83 --- /dev/null +++ b/.vim/bundle/password-store/.projections.json @@ -0,0 +1,18 @@ +{ + "t/*.vader" : { + "type" : "test", + "alternate" : [ "autoload/{}.vim", "ftplugin/{}.vim" ] + }, + "autoload/*.vim" : { + "type" : "autoload", + "alternate" : "t/pass.vader" + }, + "ftplugin/*.vim" : { + "type" : "plugin", + "alternate" : "t/{}.vader" + }, + ".scratch/*.vim" : { + "type" : "scratch", + "alternate" : "{}" + } +} diff --git a/.vim/bundle/password-store/LICENSE b/.vim/bundle/password-store/LICENSE new file mode 100644 index 00000000..b6e9c7f7 --- /dev/null +++ b/.vim/bundle/password-store/LICENSE @@ -0,0 +1 @@ +Same as vim's license diff --git a/.vim/bundle/password-store/README.md b/.vim/bundle/password-store/README.md new file mode 100644 index 00000000..28bf33b0 --- /dev/null +++ b/.vim/bundle/password-store/README.md @@ -0,0 +1,31 @@ +# vim-password-store +Vim niceties for password store ("pass" the standard Unix Password Manager) + +This is a fairly straight-forward fork of Tom Ryder's password-store plugin, +included in the contrib folder for pass and at Tom's cgit store: +https://git.zx2c4.com/password-store/ + +I've added some niceties based around a fuller filetype implementation, +in particular + +* unset spell +* add simple syntax highlighting + +I've added some simple shoulder surfing protection via syntax highlighting. +When loading a pass file for editing, the first line will be obscured. It is +editable when the cursor is in place, but will be obscured while editing other +fields. + +There are two commands to facilitate hiding and concealing + +*:Reveal* + +*:Conceal* + +These do what you might expect, reset the syntax highlighting of the password +from obscured to cleared. + +There is also integration with ``pwgen`` the same utility called by +password-store to generate passwords. By default this is mapped to vim's +increment and decrement operators ```` and ```` but the mapping is +available by a plug mapping ``password_rotate`` diff --git a/.vim/bundle/password-store/autoload/password_store.vim b/.vim/bundle/password-store/autoload/password_store.vim new file mode 100644 index 00000000..5ac486ed --- /dev/null +++ b/.vim/bundle/password-store/autoload/password_store.vim @@ -0,0 +1,29 @@ +function! password_store#generate() abort + if executable('pwgen') + let l:result = systemlist('pwgen -N1 ' . password_store#setting('pw_length') ) + return l:result[0] + endif +endfunction + +function! password_store#replace() abort + execute 's/\<.*\>/' . password_store#generate() . '/' +endfunction + +let s:default_settings = { + \ 'pw_length' : '12', + \ 'enable_syntax' : 'true', + \ } + +function! password_store#setting(key) + if exists('g:password_store_settings') && has_key(g:password_store_settings, a:key) + return g:password_store_settings[a:key] + else + return s:default_settings[a:key] + endif +endfunction + +function! password_store#get_highight(group, key) abort + let l:hl_line = execute( 'highlight ' . a:group) + let l:key = matchstr(l:hl_line, a:key . '=\zs\S*') + return l:key +endfunction diff --git a/.vim/bundle/password-store/doc/vim-password-store.txt b/.vim/bundle/password-store/doc/vim-password-store.txt new file mode 100644 index 00000000..1ffcf365 --- /dev/null +++ b/.vim/bundle/password-store/doc/vim-password-store.txt @@ -0,0 +1,86 @@ +*vim-password-store* Niceties for editing password-store files + +=============================================================================== +CONTENTS *password-store-contents* + + 1. Intro ........................................... |password-store-intro| + 2. Requirements ............................. |password-store-requirements| + 3. Usage ........................................... |password-store-usage| + 4. Configuration .................................. |password-store-config| + 5. Licence ....................................... |password-store-licence| + 6. Credits ....................................... |password-store-credits| +=============================================================================== +1. Intro *password-store-intro* + +Password store is a nice command line password manager, well suited to +vim's style. Tom Ryder has written a plugin to unset the standard +password security leakages, backup files, info files etc. This works +well, but doesn't provide hooks for extending. I wanted to add a few +simple enhancements, including unsetting spelling (no password should be +spell checked :-) and some simple syntax highlighting. + +2. Requirements *password-store-requirements* + +A plugin manager (not required but the plugin is written to expect +this) and password-store https://www.passwordstore.org/ . + +3. Usage *password-store-usage* + +The plugin automatically loads when it sees the appropriate file paths +for password-store. This is Tom Ryders + +There are two functions: +> + :Conceal + :Reveal +< +That apply syntax highlighting to obscure and un-obscure the password. +By default the pass file loads in obscured mode, however when the cursor is on +the word it should readable and editable. This offers minor "shoulder surfing" +protection, facilitating editing of metadata, such as adding URLs etc. + +There's minor feedback for short passwords, with Error highlighting for +passwords 6 or less characters long. + +Password store also adds password generation support via pwgen. Since +password-store already leverages pwgen, this is a fairly safe assumption. +There is a Plug mapping *rotate_password* +by default this is mapped to and but can be overridden via setting +an alternate plug mapping +> + nnoremap >M-a> rotate_password +< +The mapped sequence will generate a random password. As neither decrement nor +increment mean anything in this context, buth are mapped to the same plug. +The default length of the password is 10 character, but +modifiable by configuration This is also available via the function call(s) +> + password_store#replace() +< +4. Configuration *password-store-config* + +Configuration is done through a global dictionary *g:password_store_settings* +Initialize the dictionary and add settings as needed +> + let g:password_store_settings = {} + +Syntax obfustaction is enabled by default. To disable it: +> + let g:password_store_settings.enable_syntax = 'false" + + +Auto "increment" password length is 12 characters. To change it +> + let g:password_store_settings.pw_length = 20 +< +4. Licence *password-store-licence* + +This plugin is licensed under the same terms as vim itself (see +|license| ) + +5. Credits *password-store-credits* + +Tom Ryder +https://git.zx2c4.com/password-store/ + +vim:ft=help diff --git a/.vim/bundle/password-store/ftdetect/pass.vim b/.vim/bundle/password-store/ftdetect/pass.vim new file mode 100644 index 00000000..408c174e --- /dev/null +++ b/.vim/bundle/password-store/ftdetect/pass.vim @@ -0,0 +1,9 @@ +" this is mostly from Tom Ryders plugin +" with deleyed obfuscation syntax +autocmd VimEnter + \ /dev/shm/pass.?*/?*.txt + \,/dev/shm/gopass-edit*/secret + \,$TMPDIR/pass.?*/?*.txt + \,/tmp/pass.?*/?*.txt + \ setlocal filetype=pass | + \ if password_store#setting('enable_syntax') ==# 'true' | setlocal syntax=pass.obfuscated | endif diff --git a/.vim/bundle/password-store/ftplugin/pass.vim b/.vim/bundle/password-store/ftplugin/pass.vim new file mode 100644 index 00000000..5c8b41e3 --- /dev/null +++ b/.vim/bundle/password-store/ftplugin/pass.vim @@ -0,0 +1,54 @@ +if exists('did_pass_ftplugin') || &compatible || v:version < 700 + finish +endif +let g:did_pass = 'did_pass_ftplugin' +let s:save_cpo = &cpoptions +set cpoptions&vim + +nmap rotate_password :call password_store#replace() +if ! hasmapto( '\rotate_password', 'n') + nmap rotate_password +endif + +setlocal nospell + + +" Check whether we should set redacting options or not +function! s:CheckArgsRedact() + + " Ensure there's one argument and it's the matched file + if argc() != 1 || fnamemodify(argv(0), ':p') !=# expand(':p') + return + endif + + " Disable all the leaky options globally + set nobackup + set nowritebackup + set noswapfile + set viminfo= + if has('persistent_undo') + set noundofile + endif + + " Tell the user what we're doing so they know this worked, via a message and + " a global variable they can check + echomsg 'Editing password file--disabled leaky options!' + let g:redact_pass_redacted = 1 + +endfunction + +call s:CheckArgsRedact() + +function! s:reveal_pass() abort + setlocal syntax=pass +endfunction +command! Reveal call reveal_pass() + +function! s:conceal_pass() abort + setlocal syntax=pass.obfuscated +endfunction +command! Conceal call conceal_pass() +normal! GG + +" Cleanup at end +let &cpoptions = s:save_cpo diff --git a/.vim/bundle/password-store/syntax/obfuscated.vim b/.vim/bundle/password-store/syntax/obfuscated.vim new file mode 100644 index 00000000..8eff972a --- /dev/null +++ b/.vim/bundle/password-store/syntax/obfuscated.vim @@ -0,0 +1,31 @@ +if exists('b:current_syntax') | finish| endif + +if execute('highlight CursorLine') =~# 'xxx term=underline cterm=underline guibg=Grey40' + echohl WarningMsg + echo 'cursorline expected for obfuscation, manually setting' + echohl None + highlight CursorLine term=underline ctermbg=gray guibg=Grey40 +endif + +setlocal cursorline + +" set redacted colors from colorscheme +" regular passwords are Comment +let s:comment_guifg = password_store#get_highight('Comment', 'guifg') +let s:comment_ctermfg = password_store#get_highight('Comment', 'ctermfg') + +" short passwords are Error +let s:error_guifg = password_store#get_highight('Error', 'guifg') +let s:error_ctermfg = password_store#get_highight('Error', 'ctermfg') + +execute 'highlight password_store_password ' . + \ ' guibg=' . s:comment_guifg . + \ ' guifg=' . s:comment_guifg . + \ ' ctermfg=' . s:comment_ctermfg + \ 'ctermbg=' . s:comment_ctermfg + +execute 'highlight password_store_password_short ' . + \ ' guibg=' . s:error_guifg . + \ ' guifg=' . s:error_guifg . + \ ' ctermfg=' . s:error_ctermfg + \ 'ctermbg=' . s:error_ctermfg diff --git a/.vim/bundle/password-store/syntax/pass.vim b/.vim/bundle/password-store/syntax/pass.vim new file mode 100644 index 00000000..4ab26e41 --- /dev/null +++ b/.vim/bundle/password-store/syntax/pass.vim @@ -0,0 +1,15 @@ +if exists('b:current_syntax') | finish| endif + +" first line (by convention always a single pasword) +syntax match password_store_password /\%1l.*/ +highlight! link password_store_password Comment + +" highlight short passwords +syntax match password_store_password_short /\%1l.\{,6\}$/ +highlight! link password_store_password_short Error + +" colon field value is the suggested path for additional information +syntax match password_store_header '\v^[^:]+:' +highlight link password_store_header PreProc + + diff --git a/.vim/bundle/password-store/t/pass.vader b/.vim/bundle/password-store/t/pass.vader new file mode 100644 index 00000000..e1c5db0b --- /dev/null +++ b/.vim/bundle/password-store/t/pass.vader @@ -0,0 +1,45 @@ +Given pass (short password): + pass + +Execute (test short password syntax): + AssertEqual SyntaxAt(2), 'password_store_password_short' + +Given pass (longer password): + passwordlonger + +Execute (test longer password syntax): + AssertEqual SyntaxAt(2), 'password_store_password' + +Given pass (another password): + passwordlonger + +Before (disable syntax): + let g:password_store_settings = {} + let g:password_store_settings.enable_syntax = 'false' + +Execute (test disable syntax ): + AssertEqual &filetype, 'pass' + +Execute (test increment password length): + AssertEqual len( password_store#generate()), 12 + +Execute (test new generates do not match): + AssertNotEqual password_store#generate(), password_store#generate() + +Given text (test ftdetect): + passwordtesting + +Before (mimic settings): + let g:password_store_settings = {} + let g:password_store_settings.enable_syntax = 'false' + let g:password_store_settings.pw_length = '16' + +Execute (test ftdetect trigger): + set filetype=pass + AssertEqual password_store#setting('enable_syntax'), 'false' + AssertEqual len( password_store#generate() ), 16 + +Execute (test highlight group parsing): + Assert password_store#get_highight('Comment', 'guifg') =~# '\v#[0-9a-f]{6}' + Assert password_store#get_highight('Comment', 'not_a_real_group') =~# '' + diff --git a/.vim/bundle/vim-artesanal/README.md b/.vim/bundle/vim-artesanal/README.md new file mode 100644 index 00000000..b8bf3e6e --- /dev/null +++ b/.vim/bundle/vim-artesanal/README.md @@ -0,0 +1,19 @@ +# vim-artesanal +A Vim colorscheme with light and dark variants originally based on Material Design (now strongly modified to my likings). + +This is a **W**ork **I**n **P**rogress. Finally with a couple of screenshots ;-) + +## Screenshots ## +### viml ### +#### light #### +![viml light](http://wimstefan.github.io/screenshots/artesanal-viml-light.png "viml light") +#### dark #### +![viml dark](http://wimstefan.github.io/screenshots/artesanal-viml-dark.png "viml dark") + +### vimdiff ### +#### light #### +![vimdiff light](http://wimstefan.github.io/screenshots/artesanal-vimdiff-light.png "vimdiff light") +#### dark #### +![vimdiff dark](http://wimstefan.github.io/screenshots/artesanal-vimdiff-dark.png "vimdiff dark") + +Inspired by & built with [Colortemplate](https://github.com/lifepillar/vim-colortemplate). diff --git a/.vim/bundle/vim-artesanal/colors/artesanal.vim b/.vim/bundle/vim-artesanal/colors/artesanal.vim new file mode 100644 index 00000000..d3d9589d --- /dev/null +++ b/.vim/bundle/vim-artesanal/colors/artesanal.vim @@ -0,0 +1,1140 @@ +" Name: Artesanal +" Description: A Vim colorscheme with light and dark variants originally based on Material Design (now strongly modified to my likings). +" Author: Stefan Wimmer +" Maintainer: Stefan Wimmer +" Website: https://github.com/wimstefan/vim-artesanal +" License: Vim License (see `:help license`) +" Last Updated: Sat 31 Jul 2021 08:04:13 AM CEST + +" Generated by Colortemplate v2.1.0 + +hi clear +let g:colors_name = 'artesanal' + +let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 2 +let s:italics = (&t_ZH != '' && &t_ZH != '') || has('gui_running') || has('nvim') + +if (has('termguicolors') && &termguicolors) || has('gui_running') + if &background ==# 'dark' + let g:terminal_ansi_colors = ['#575c66', '#ff616f', '#69f0b9', '#ffff8d', '#90caf9', '#b39ddb', '#80deea', '#ffffff', '#1c313a', '#ef5350', '#15cf83', '#ffeb3b', '#5d99c6', '#9575cd', '#4dd0e1', '#eff1f4'] + if has('nvim') + let g:terminal_color_0 = '#575c66' + let g:terminal_color_1 = '#ff616f' + let g:terminal_color_2 = '#69f0b9' + let g:terminal_color_3 = '#ffff8d' + let g:terminal_color_4 = '#90caf9' + let g:terminal_color_5 = '#b39ddb' + let g:terminal_color_6 = '#80deea' + let g:terminal_color_7 = '#ffffff' + let g:terminal_color_8 = '#1c313a' + let g:terminal_color_9 = '#ef5350' + let g:terminal_color_10 = '#15cf83' + let g:terminal_color_11 = '#ffeb3b' + let g:terminal_color_12 = '#5d99c6' + let g:terminal_color_13 = '#9575cd' + let g:terminal_color_14 = '#4dd0e1' + let g:terminal_color_15 = '#eff1f4' + endif + if !has('gui_running') && get(g:, 'artesanal_dimmed', 0) + if !has('gui_running') && &background ==# 'light' + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal guifg=#000000 guibg=NONE gui=NONE cterm=NONE + else + hi Normal guifg=#000000 guibg=#2e3440 gui=NONE cterm=NONE + endif + elseif !has('gui_running') && &background ==# 'dark' + if get(g:, 'artesanal_transparent', 0) + hi Normal guifg=#ffffff guibg=NONE gui=NONE cterm=NONE + else + hi Normal guifg=#ffffff guibg=#2e3440 gui=NONE cterm=NONE + endif + endif + hi Conceal guifg=#5d99c6 guibg=NONE gui=NONE cterm=NONE + hi Constant guifg=#15cf83 guibg=NONE gui=NONE cterm=NONE + hi Directory guifg=#5d99c6 guibg=NONE gui=bold cterm=bold + hi Error guifg=#ef5350 guibg=NONE gui=bold,standout cterm=bold,reverse + hi Function guifg=#4dd0e1 guibg=NONE gui=NONE cterm=NONE + hi Identifier guifg=#5d99c6 guibg=NONE gui=NONE cterm=NONE + hi ModeMsg guifg=#5d99c6 guibg=NONE gui=NONE cterm=NONE + hi MoreMsg guifg=#15cf83 guibg=NONE gui=NONE cterm=NONE + hi PreProc guifg=#4dd0e1 guibg=NONE gui=NONE cterm=NONE + hi Statement guifg=#ef5350 guibg=NONE gui=NONE cterm=NONE + hi Special guifg=#ffeb3b guibg=NONE gui=NONE cterm=NONE + hi Todo guifg=#4dd0e1 guibg=NONE gui=reverse cterm=reverse + hi WarningMsg guifg=#ef5350 guibg=NONE gui=NONE cterm=NONE + hi WildMenu guifg=#5d99c6 guibg=#455a64 gui=bold cterm=bold + else + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal guifg=#e4e6eb guibg=NONE gui=NONE cterm=NONE + else + hi Normal guifg=#e4e6eb guibg=#2e3440 gui=NONE cterm=NONE + endif + hi Conceal guifg=#90caf9 guibg=NONE gui=NONE cterm=NONE + hi Constant guifg=#69f0b9 guibg=NONE gui=NONE cterm=NONE + hi Directory guifg=#90caf9 guibg=NONE gui=bold cterm=bold + hi Error guifg=#ff616f guibg=NONE gui=bold,standout cterm=bold,reverse + hi Function guifg=#80deea guibg=NONE gui=NONE cterm=NONE + hi Identifier guifg=#90caf9 guibg=NONE gui=NONE cterm=NONE + hi ModeMsg guifg=#90caf9 guibg=NONE gui=NONE cterm=NONE + hi MoreMsg guifg=#69f0b9 guibg=NONE gui=NONE cterm=NONE + hi PreProc guifg=#80deea guibg=NONE gui=NONE cterm=NONE + hi Statement guifg=#ff616f guibg=NONE gui=NONE cterm=NONE + hi Special guifg=#ffff8d guibg=NONE gui=NONE cterm=NONE + hi Todo guifg=#80deea guibg=NONE gui=reverse cterm=reverse + hi WarningMsg guifg=#ff616f guibg=NONE gui=NONE cterm=NONE + hi WildMenu guifg=#90caf9 guibg=#455a64 gui=bold cterm=bold + endif + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi LineNr guifg=#455a64 guibg=NONE gui=NONE cterm=NONE + hi CursorLineNr guifg=#ffff8d guibg=NONE gui=NONE cterm=NONE + hi FoldColumn guifg=#575c66 guibg=NONE gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + hi VertSplit guifg=#546e7a guibg=NONE gui=NONE cterm=NONE + hi Pmenu guifg=#e4e6eb guibg=NONE gui=NONE cterm=NONE + hi PmenuSbar guifg=#cdd2db guibg=NONE gui=NONE cterm=NONE + hi PmenuSel guifg=#cdd2db guibg=NONE gui=reverse cterm=reverse + hi PmenuThumb guifg=NONE guibg=#cdd2db gui=NONE cterm=NONE + else + hi LineNr guifg=#455a64 guibg=#37474f gui=NONE cterm=NONE + hi CursorLineNr guifg=#ffff8d guibg=#37474f gui=NONE cterm=NONE + hi FoldColumn guifg=#575c66 guibg=#37474f gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=#37474f gui=NONE cterm=NONE + hi VertSplit guifg=#546e7a guibg=#2e3440 gui=NONE cterm=NONE + hi Pmenu guifg=#e4e6eb guibg=#455a64 gui=NONE cterm=NONE + hi PmenuSbar guifg=NONE guibg=#455a64 gui=NONE cterm=NONE + hi PmenuSel guifg=#37474f guibg=#cdd2db gui=bold cterm=bold + hi PmenuThumb guifg=NONE guibg=#90a4ae gui=NONE cterm=NONE + endif + hi ColorColumn guifg=NONE guibg=#37474f gui=bold cterm=bold + hi Cursor guifg=NONE guibg=NONE gui=bold,reverse ctermfg=NONE ctermbg=NONE cterm=bold,reverse + hi CursorColumn guifg=NONE guibg=#37474f gui=NONE cterm=NONE + hi CursorLine guifg=NONE guibg=#37474f gui=bold cterm=bold + hi DiffAdd guifg=NONE guibg=#3f7070 gui=NONE cterm=NONE + hi DiffAdded guifg=NONE guibg=#3f7070 gui=NONE cterm=NONE + hi DiffChange guifg=NONE guibg=#3f5a70 gui=NONE cterm=NONE + hi DiffDelete guifg=NONE guibg=#663d43 gui=NONE cterm=NONE + hi DiffRemoved guifg=NONE guibg=#663d43 gui=NONE cterm=NONE + hi DiffText guifg=NONE guibg=#3f7070 gui=NONE cterm=NONE + hi EndOfBuffer guifg=#2e3440 guibg=NONE gui=NONE cterm=NONE + hi! link ErrorMsg Error + hi Folded guifg=#546e7a guibg=#37474f gui=italic cterm=NONE + hi IncSearch guifg=#ffff8d guibg=#1c313a gui=reverse cterm=reverse + hi MatchParen guifg=NONE guibg=#455a64 gui=bold cterm=bold + hi NonText guifg=#90a4ae guibg=NONE gui=NONE cterm=NONE + hi Question guifg=#ffeb3b guibg=NONE gui=NONE cterm=NONE + hi! link QuickFixLine Search + hi Search guifg=#fff9c4 guibg=#1c313a gui=reverse cterm=reverse + hi SpecialKey guifg=#90a4ae guibg=NONE gui=NONE cterm=NONE + hi SpellBad guifg=#ff616f guibg=NONE gui=italic,undercurl cterm=underline + hi SpellCap guifg=#90caf9 guibg=NONE gui=italic,undercurl cterm=underline + hi SpellLocal guifg=#80deea guibg=NONE gui=italic,undercurl cterm=underline + hi SpellRare guifg=#b39ddb guibg=NONE gui=italic,undercurl cterm=underline + hi StatusLine guifg=#e4e6eb guibg=#455a64 gui=NONE cterm=NONE + hi StatusLineNC guifg=#cdd2db guibg=#37474f gui=NONE cterm=NONE + hi! link StatusLineTerm StatusLine + hi! link StatusLineTermNC StatusLineNC + hi! link TabLine TabLineFill + hi TabLineFill guifg=#cdd2db guibg=#546e7a gui=NONE cterm=NONE + hi TabLineSel guifg=#e4e6eb guibg=#37474f gui=NONE cterm=NONE + hi Title guifg=#ff616f guibg=NONE gui=bold cterm=bold + hi Visual guifg=NONE guibg=#37474f gui=NONE cterm=NONE + hi! link VisualNOS Visual + hi! link Boolean Constant + hi! link Character Constant + hi Comment guifg=#b6bdcb guibg=NONE gui=NONE cterm=NONE + hi! link Conditional Statement + hi! link Define PreProc + hi! link Debug Special + hi! link Delimiter Special + hi! link Exception Statement + hi! link Float Constant + hi Ignore guifg=fg guibg=NONE gui=NONE cterm=NONE + hi! link Include PreProc + hi! link Keyword Statement + hi! link Label Statement + hi! link Macro PreProc + hi! link Number Constant + hi! link Operator Statement + hi! link PreCondit PreProc + hi! link Repeat Statement + hi! link SpecialChar Special + hi! link SpecialComment Special + hi! link StorageClass Type + hi! link String Constant + hi! link Structure Type + hi! link Tag Special + hi Type guifg=#4dd0e1 guibg=NONE gui=NONE cterm=NONE + hi! link Typedef Type + hi Underlined guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline + hi! link lCursor Cursor + hi CursorIM guifg=NONE guibg=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse + hi ToolbarLine guifg=NONE guibg=#546e7a gui=NONE cterm=NONE + hi ToolbarButton guifg=#eff1f4 guibg=#546e7a gui=bold cterm=bold + hi! link iCursor Cursor + hi! link vCursor Cursor + hi NormalMode guifg=#cdd2db guibg=#2e3440 gui=reverse cterm=reverse + hi InsertMode guifg=#90caf9 guibg=#2e3440 gui=reverse cterm=reverse + hi ReplaceMode guifg=#80deea guibg=#2e3440 gui=reverse cterm=reverse + hi VisualMode guifg=#ffff8d guibg=#2e3440 gui=reverse cterm=reverse + hi CommandMode guifg=#b39ddb guibg=#2e3440 gui=reverse cterm=reverse + hi Warnings guifg=#ff616f guibg=#2e3440 gui=reverse cterm=reverse + if !s:italics + hi Folded gui=NONE cterm=NONE + hi SpellBad gui=undercurl cterm=underline + hi SpellCap gui=undercurl cterm=underline + hi SpellLocal gui=undercurl cterm=underline + hi SpellRare gui=undercurl cterm=underline + endif + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi GitSignsAdd guifg=#69f0b9 guibg=NONE gui=NONE cterm=NONE + hi GitSignsChange guifg=#90caf9 guibg=NONE gui=NONE cterm=NONE + hi GitSignsDelete guifg=#ff616f guibg=NONE gui=NONE cterm=NONE + else + hi GitSignsAdd guifg=#69f0b9 guibg=#37474f gui=NONE cterm=NONE + hi GitSignsChange guifg=#90caf9 guibg=#37474f gui=NONE cterm=NONE + hi GitSignsDelete guifg=#ff616f guibg=#37474f gui=NONE cterm=NONE + endif + hi! link GitSignsAddNr GitSignsAdd + hi! link GitSignsChangeNr GitSignsChange + hi! link GitSignsDeleteNr GitSignsDelete + if has('nvim') + hi! link TermCursor Cursor + hi TermCursorNC guifg=#37474f guibg=#e4e6eb gui=NONE cterm=NONE + endif + unlet s:t_Co s:italics + finish + endif + " Light background + let g:terminal_ansi_colors = ['#1c313a', '#99000d', '#0c7047', '#cc6c0b', '#064578', '#5f468a', '#198b9a', '#eff1f4', '#575c66', '#b2000f', '#0e8756', '#ff870e', '#0961a8', '#7a5ab2', '#1d9fb0', '#ffffff'] + if has('nvim') + let g:terminal_color_0 = '#1c313a' + let g:terminal_color_1 = '#99000d' + let g:terminal_color_2 = '#0c7047' + let g:terminal_color_3 = '#cc6c0b' + let g:terminal_color_4 = '#064578' + let g:terminal_color_5 = '#5f468a' + let g:terminal_color_6 = '#198b9a' + let g:terminal_color_7 = '#eff1f4' + let g:terminal_color_8 = '#575c66' + let g:terminal_color_9 = '#b2000f' + let g:terminal_color_10 = '#0e8756' + let g:terminal_color_11 = '#ff870e' + let g:terminal_color_12 = '#0961a8' + let g:terminal_color_13 = '#7a5ab2' + let g:terminal_color_14 = '#1d9fb0' + let g:terminal_color_15 = '#ffffff' + endif + if !has('gui_running') && get(g:, 'artesanal_dimmed', 0) + if !has('gui_running') && &background ==# 'light' + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal guifg=#000000 guibg=NONE gui=NONE cterm=NONE + else + hi Normal guifg=#000000 guibg=#eff1f4 gui=NONE cterm=NONE + endif + elseif !has('gui_running') && &background ==# 'dark' + if get(g:, 'artesanal_transparent', 0) + hi Normal guifg=#ffffff guibg=NONE gui=NONE cterm=NONE + else + hi Normal guifg=#ffffff guibg=#eff1f4 gui=NONE cterm=NONE + endif + endif + hi Conceal guifg=#064578 guibg=NONE gui=NONE cterm=NONE + hi Constant guifg=#0c7047 guibg=NONE gui=NONE cterm=NONE + hi Directory guifg=#064578 guibg=NONE gui=bold cterm=bold + hi Error guifg=#99000d guibg=NONE gui=bold,standout cterm=bold,reverse + hi Function guifg=#198b9a guibg=NONE gui=NONE cterm=NONE + hi Identifier guifg=#064578 guibg=NONE gui=NONE cterm=NONE + hi ModeMsg guifg=#064578 guibg=NONE gui=NONE cterm=NONE + hi MoreMsg guifg=#0c7047 guibg=NONE gui=NONE cterm=NONE + hi PreProc guifg=#198b9a guibg=NONE gui=NONE cterm=NONE + hi Statement guifg=#99000d guibg=NONE gui=NONE cterm=NONE + hi Special guifg=#cc6c0b guibg=NONE gui=NONE cterm=NONE + hi Todo guifg=#198b9a guibg=NONE gui=reverse cterm=reverse + hi WarningMsg guifg=#99000d guibg=NONE gui=NONE cterm=NONE + hi WildMenu guifg=#064578 guibg=#cdd2db gui=bold cterm=bold + else + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal guifg=#37474f guibg=NONE gui=NONE cterm=NONE + else + hi Normal guifg=#37474f guibg=#eff1f4 gui=NONE cterm=NONE + endif + hi Conceal guifg=#0961a8 guibg=NONE gui=NONE cterm=NONE + hi Constant guifg=#0e8756 guibg=NONE gui=NONE cterm=NONE + hi Directory guifg=#0961a8 guibg=NONE gui=bold cterm=bold + hi Error guifg=#b2000f guibg=NONE gui=bold,standout cterm=bold,reverse + hi Function guifg=#1d9fb0 guibg=NONE gui=NONE cterm=NONE + hi Identifier guifg=#0961a8 guibg=NONE gui=NONE cterm=NONE + hi ModeMsg guifg=#0961a8 guibg=NONE gui=NONE cterm=NONE + hi MoreMsg guifg=#0e8756 guibg=NONE gui=NONE cterm=NONE + hi PreProc guifg=#1d9fb0 guibg=NONE gui=NONE cterm=NONE + hi Statement guifg=#b2000f guibg=NONE gui=NONE cterm=NONE + hi Special guifg=#ff870e guibg=NONE gui=NONE cterm=NONE + hi Todo guifg=#1d9fb0 guibg=NONE gui=reverse cterm=reverse + hi WarningMsg guifg=#b2000f guibg=NONE gui=NONE cterm=NONE + hi WildMenu guifg=#0961a8 guibg=#cdd2db gui=bold cterm=bold + endif + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi LineNr guifg=#cdd2db guibg=NONE gui=NONE cterm=NONE + hi CursorLineNr guifg=#ff870e guibg=NONE gui=NONE cterm=NONE + hi FoldColumn guifg=#575c66 guibg=NONE gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + hi VertSplit guifg=#b6bdcb guibg=NONE gui=NONE cterm=NONE + hi Pmenu guifg=#37474f guibg=NONE gui=NONE cterm=NONE + hi PmenuSbar guifg=#455a64 guibg=NONE gui=NONE cterm=NONE + hi PmenuSel guifg=#455a64 guibg=NONE gui=reverse cterm=reverse + hi PmenuThumb guifg=NONE guibg=#455a64 gui=NONE cterm=NONE + else + hi LineNr guifg=#cdd2db guibg=#e4e6eb gui=NONE cterm=NONE + hi CursorLineNr guifg=#ff870e guibg=#e4e6eb gui=NONE cterm=NONE + hi FoldColumn guifg=#575c66 guibg=#e4e6eb gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=#e4e6eb gui=NONE cterm=NONE + hi VertSplit guifg=#b6bdcb guibg=#eff1f4 gui=NONE cterm=NONE + hi Pmenu guifg=#37474f guibg=#cdd2db gui=NONE cterm=NONE + hi PmenuSbar guifg=NONE guibg=#cdd2db gui=NONE cterm=NONE + hi PmenuSel guifg=#e4e6eb guibg=#455a64 gui=bold cterm=bold + hi PmenuThumb guifg=NONE guibg=#9fa8ba gui=NONE cterm=NONE + endif + hi ColorColumn guifg=NONE guibg=#e4e6eb gui=bold cterm=bold + hi Cursor guifg=NONE guibg=NONE gui=bold,reverse ctermfg=NONE ctermbg=NONE cterm=bold,reverse + hi CursorColumn guifg=NONE guibg=#e4e6eb gui=NONE cterm=NONE + hi CursorLine guifg=NONE guibg=#e4e6eb gui=bold cterm=bold + hi DiffAdd guifg=NONE guibg=#c3e6d7 gui=NONE cterm=NONE + hi DiffAdded guifg=NONE guibg=#c3e6d7 gui=NONE cterm=NONE + hi DiffChange guifg=NONE guibg=#c3d1e6 gui=NONE cterm=NONE + hi DiffDelete guifg=NONE guibg=#f0cccf gui=NONE cterm=NONE + hi DiffRemoved guifg=NONE guibg=#f0cccf gui=NONE cterm=NONE + hi DiffText guifg=NONE guibg=#c3e6d7 gui=NONE cterm=NONE + hi EndOfBuffer guifg=#eff1f4 guibg=NONE gui=NONE cterm=NONE + hi! link ErrorMsg Error + hi Folded guifg=#b6bdcb guibg=#e4e6eb gui=italic cterm=NONE + hi IncSearch guifg=#ff870e guibg=#1c313a gui=reverse cterm=reverse + hi MatchParen guifg=NONE guibg=#cdd2db gui=bold cterm=bold + hi NonText guifg=#9fa8ba guibg=NONE gui=NONE cterm=NONE + hi Question guifg=#cc6c0b guibg=NONE gui=NONE cterm=NONE + hi! link QuickFixLine Search + hi Search guifg=#ffb76e guibg=#1c313a gui=reverse cterm=reverse + hi SpecialKey guifg=#9fa8ba guibg=NONE gui=NONE cterm=NONE + hi SpellBad guifg=#b2000f guibg=NONE gui=italic,undercurl cterm=underline + hi SpellCap guifg=#0961a8 guibg=NONE gui=italic,undercurl cterm=underline + hi SpellLocal guifg=#1d9fb0 guibg=NONE gui=italic,undercurl cterm=underline + hi SpellRare guifg=#7a5ab2 guibg=NONE gui=italic,undercurl cterm=underline + hi StatusLine guifg=#37474f guibg=#cdd2db gui=NONE cterm=NONE + hi StatusLineNC guifg=#455a64 guibg=#e4e6eb gui=NONE cterm=NONE + hi! link StatusLineTerm StatusLine + hi! link StatusLineTermNC StatusLineNC + hi! link TabLine TabLineFill + hi TabLineFill guifg=#455a64 guibg=#b6bdcb gui=NONE cterm=NONE + hi TabLineSel guifg=#37474f guibg=#e4e6eb gui=NONE cterm=NONE + hi Title guifg=#b2000f guibg=NONE gui=bold cterm=bold + hi Visual guifg=NONE guibg=#e4e6eb gui=NONE cterm=NONE + hi! link VisualNOS Visual + hi! link Boolean Constant + hi! link Character Constant + hi Comment guifg=#546e7a guibg=NONE gui=NONE cterm=NONE + hi! link Conditional Statement + hi! link Define PreProc + hi! link Debug Special + hi! link Delimiter Special + hi! link Exception Statement + hi! link Float Constant + hi Ignore guifg=fg guibg=NONE gui=NONE cterm=NONE + hi! link Include PreProc + hi! link Keyword Statement + hi! link Label Statement + hi! link Macro PreProc + hi! link Number Constant + hi! link Operator Statement + hi! link PreCondit PreProc + hi! link Repeat Statement + hi! link SpecialChar Special + hi! link SpecialComment Special + hi! link StorageClass Type + hi! link String Constant + hi! link Structure Type + hi! link Tag Special + hi Type guifg=#198b9a guibg=NONE gui=NONE cterm=NONE + hi! link Typedef Type + hi Underlined guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline + hi! link lCursor Cursor + hi CursorIM guifg=NONE guibg=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse + hi ToolbarLine guifg=NONE guibg=#b6bdcb gui=NONE cterm=NONE + hi ToolbarButton guifg=#2e3440 guibg=#b6bdcb gui=bold cterm=bold + hi! link iCursor Cursor + hi! link vCursor Cursor + hi NormalMode guifg=#455a64 guibg=#eff1f4 gui=reverse cterm=reverse + hi InsertMode guifg=#0961a8 guibg=#eff1f4 gui=reverse cterm=reverse + hi ReplaceMode guifg=#1d9fb0 guibg=#eff1f4 gui=reverse cterm=reverse + hi VisualMode guifg=#ff870e guibg=#eff1f4 gui=reverse cterm=reverse + hi CommandMode guifg=#7a5ab2 guibg=#eff1f4 gui=reverse cterm=reverse + hi Warnings guifg=#b2000f guibg=#eff1f4 gui=reverse cterm=reverse + if !s:italics + hi Folded gui=NONE cterm=NONE + hi SpellBad gui=undercurl cterm=underline + hi SpellCap gui=undercurl cterm=underline + hi SpellLocal gui=undercurl cterm=underline + hi SpellRare gui=undercurl cterm=underline + endif + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi GitSignsAdd guifg=#0e8756 guibg=NONE gui=NONE cterm=NONE + hi GitSignsChange guifg=#0961a8 guibg=NONE gui=NONE cterm=NONE + hi GitSignsDelete guifg=#b2000f guibg=NONE gui=NONE cterm=NONE + else + hi GitSignsAdd guifg=#0e8756 guibg=#e4e6eb gui=NONE cterm=NONE + hi GitSignsChange guifg=#0961a8 guibg=#e4e6eb gui=NONE cterm=NONE + hi GitSignsDelete guifg=#b2000f guibg=#e4e6eb gui=NONE cterm=NONE + endif + hi! link GitSignsAddNr GitSignsAdd + hi! link GitSignsChangeNr GitSignsChange + hi! link GitSignsDeleteNr GitSignsDelete + if has('nvim') + hi! link TermCursor Cursor + hi TermCursorNC guifg=#e4e6eb guibg=#37474f gui=NONE cterm=NONE + endif + unlet s:t_Co s:italics + finish +endif + +if s:t_Co >= 256 + if &background ==# 'dark' + if !has('gui_running') && get(g:, 'artesanal_dimmed', 0) + if !has('gui_running') && &background ==# 'light' + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=16 ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=16 ctermbg=236 cterm=NONE + if !has('patch-8.0.0616') && !has('nvim') " Fix for Vim bug + set background=dark + endif + endif + elseif !has('gui_running') && &background ==# 'dark' + if get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=231 ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=231 ctermbg=236 cterm=NONE + if !has('patch-8.0.0616') && !has('nvim') " Fix for Vim bug + set background=dark + endif + endif + endif + hi Conceal ctermfg=67 ctermbg=NONE cterm=NONE + hi Constant ctermfg=42 ctermbg=NONE cterm=NONE + hi Directory ctermfg=67 ctermbg=NONE cterm=bold + hi Error ctermfg=203 ctermbg=NONE cterm=bold,reverse + hi Function ctermfg=80 ctermbg=NONE cterm=NONE + hi Identifier ctermfg=67 ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=67 ctermbg=NONE cterm=NONE + hi MoreMsg ctermfg=42 ctermbg=NONE cterm=NONE + hi PreProc ctermfg=80 ctermbg=NONE cterm=NONE + hi Statement ctermfg=203 ctermbg=NONE cterm=NONE + hi Special ctermfg=226 ctermbg=NONE cterm=NONE + hi Todo ctermfg=80 ctermbg=NONE cterm=reverse + hi WarningMsg ctermfg=203 ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=67 ctermbg=240 cterm=bold + else + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=254 ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=254 ctermbg=236 cterm=NONE + if !has('patch-8.0.0616') && !has('nvim') " Fix for Vim bug + set background=dark + endif + endif + hi Conceal ctermfg=153 ctermbg=NONE cterm=NONE + hi Constant ctermfg=85 ctermbg=NONE cterm=NONE + hi Directory ctermfg=153 ctermbg=NONE cterm=bold + hi Error ctermfg=203 ctermbg=NONE cterm=bold,reverse + hi Function ctermfg=116 ctermbg=NONE cterm=NONE + hi Identifier ctermfg=153 ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=153 ctermbg=NONE cterm=NONE + hi MoreMsg ctermfg=85 ctermbg=NONE cterm=NONE + hi PreProc ctermfg=116 ctermbg=NONE cterm=NONE + hi Statement ctermfg=203 ctermbg=NONE cterm=NONE + hi Special ctermfg=228 ctermbg=NONE cterm=NONE + hi Todo ctermfg=116 ctermbg=NONE cterm=reverse + hi WarningMsg ctermfg=203 ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=153 ctermbg=240 cterm=bold + endif + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi LineNr ctermfg=240 ctermbg=NONE cterm=NONE + hi CursorLineNr ctermfg=228 ctermbg=NONE cterm=NONE + hi FoldColumn ctermfg=59 ctermbg=NONE cterm=NONE + hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE + hi VertSplit ctermfg=242 ctermbg=NONE cterm=NONE + hi Pmenu ctermfg=254 ctermbg=NONE cterm=NONE + hi PmenuSbar ctermfg=252 ctermbg=NONE cterm=NONE + hi PmenuSel ctermfg=252 ctermbg=NONE cterm=reverse + hi PmenuThumb ctermfg=NONE ctermbg=252 cterm=NONE + else + hi LineNr ctermfg=240 ctermbg=238 cterm=NONE + hi CursorLineNr ctermfg=228 ctermbg=238 cterm=NONE + hi FoldColumn ctermfg=59 ctermbg=238 cterm=NONE + hi SignColumn ctermfg=NONE ctermbg=238 cterm=NONE + hi VertSplit ctermfg=242 ctermbg=236 cterm=NONE + hi Pmenu ctermfg=254 ctermbg=240 cterm=NONE + hi PmenuSbar ctermfg=NONE ctermbg=240 cterm=NONE + hi PmenuSel ctermfg=238 ctermbg=252 cterm=bold + hi PmenuThumb ctermfg=NONE ctermbg=247 cterm=NONE + endif + hi ColorColumn ctermfg=NONE ctermbg=238 cterm=bold + hi Cursor ctermfg=NONE ctermbg=NONE cterm=bold,reverse + hi CursorColumn ctermfg=NONE ctermbg=238 cterm=NONE + hi CursorLine ctermfg=NONE ctermbg=238 cterm=bold + hi DiffAdd ctermfg=NONE ctermbg=23 cterm=NONE + hi DiffAdded ctermfg=NONE ctermbg=23 cterm=NONE + hi DiffChange ctermfg=NONE ctermbg=24 cterm=NONE + hi DiffDelete ctermfg=NONE ctermbg=95 cterm=NONE + hi DiffRemoved ctermfg=NONE ctermbg=95 cterm=NONE + hi DiffText ctermfg=NONE ctermbg=23 cterm=NONE + hi EndOfBuffer ctermfg=236 ctermbg=NONE cterm=NONE + hi! link ErrorMsg Error + hi Folded ctermfg=242 ctermbg=238 cterm=NONE + hi IncSearch ctermfg=228 ctermbg=236 cterm=reverse + hi MatchParen ctermfg=NONE ctermbg=240 cterm=bold + hi NonText ctermfg=247 ctermbg=NONE cterm=NONE + hi Question ctermfg=226 ctermbg=NONE cterm=NONE + hi! link QuickFixLine Search + hi Search ctermfg=230 ctermbg=236 cterm=reverse + hi SpecialKey ctermfg=247 ctermbg=NONE cterm=NONE + hi SpellBad ctermfg=203 ctermbg=NONE cterm=underline + hi SpellCap ctermfg=153 ctermbg=NONE cterm=underline + hi SpellLocal ctermfg=116 ctermbg=NONE cterm=underline + hi SpellRare ctermfg=140 ctermbg=NONE cterm=underline + hi StatusLine ctermfg=254 ctermbg=240 cterm=NONE + hi StatusLineNC ctermfg=252 ctermbg=238 cterm=NONE + hi! link StatusLineTerm StatusLine + hi! link StatusLineTermNC StatusLineNC + hi! link TabLine TabLineFill + hi TabLineFill ctermfg=252 ctermbg=242 cterm=NONE + hi TabLineSel ctermfg=254 ctermbg=238 cterm=NONE + hi Title ctermfg=203 ctermbg=NONE cterm=bold + hi Visual ctermfg=NONE ctermbg=238 cterm=NONE + hi! link VisualNOS Visual + hi! link Boolean Constant + hi! link Character Constant + hi Comment ctermfg=250 ctermbg=NONE cterm=NONE + hi! link Conditional Statement + hi! link Define PreProc + hi! link Debug Special + hi! link Delimiter Special + hi! link Exception Statement + hi! link Float Constant + hi Ignore ctermfg=fg ctermbg=NONE cterm=NONE + hi! link Include PreProc + hi! link Keyword Statement + hi! link Label Statement + hi! link Macro PreProc + hi! link Number Constant + hi! link Operator Statement + hi! link PreCondit PreProc + hi! link Repeat Statement + hi! link SpecialChar Special + hi! link SpecialComment Special + hi! link StorageClass Type + hi! link String Constant + hi! link Structure Type + hi! link Tag Special + hi Type ctermfg=80 ctermbg=NONE cterm=NONE + hi! link Typedef Type + hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline + hi! link lCursor Cursor + hi CursorIM ctermfg=NONE ctermbg=NONE cterm=reverse + hi ToolbarLine ctermfg=NONE ctermbg=242 cterm=NONE + hi ToolbarButton ctermfg=255 ctermbg=242 cterm=bold + hi! link iCursor Cursor + hi! link vCursor Cursor + hi NormalMode ctermfg=252 ctermbg=236 cterm=reverse + hi InsertMode ctermfg=153 ctermbg=236 cterm=reverse + hi ReplaceMode ctermfg=116 ctermbg=236 cterm=reverse + hi VisualMode ctermfg=228 ctermbg=236 cterm=reverse + hi CommandMode ctermfg=140 ctermbg=236 cterm=reverse + hi Warnings ctermfg=203 ctermbg=236 cterm=reverse + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi GitSignsAdd ctermfg=85 ctermbg=NONE cterm=NONE + hi GitSignsChange ctermfg=153 ctermbg=NONE cterm=NONE + hi GitSignsDelete ctermfg=203 ctermbg=NONE cterm=NONE + else + hi GitSignsAdd ctermfg=85 ctermbg=238 cterm=NONE + hi GitSignsChange ctermfg=153 ctermbg=238 cterm=NONE + hi GitSignsDelete ctermfg=203 ctermbg=238 cterm=NONE + endif + hi! link GitSignsAddNr GitSignsAdd + hi! link GitSignsChangeNr GitSignsChange + hi! link GitSignsDeleteNr GitSignsDelete + if has('nvim') + hi! link TermCursor Cursor + hi TermCursorNC ctermfg=238 ctermbg=254 cterm=NONE + endif + unlet s:t_Co s:italics + finish + endif + " Light background + if !has('gui_running') && get(g:, 'artesanal_dimmed', 0) + if !has('gui_running') && &background ==# 'light' + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=16 ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=16 ctermbg=255 cterm=NONE + endif + elseif !has('gui_running') && &background ==# 'dark' + if get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=231 ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=231 ctermbg=255 cterm=NONE + endif + endif + hi Conceal ctermfg=25 ctermbg=NONE cterm=NONE + hi Constant ctermfg=29 ctermbg=NONE cterm=NONE + hi Directory ctermfg=25 ctermbg=NONE cterm=bold + hi Error ctermfg=88 ctermbg=NONE cterm=bold,reverse + hi Function ctermfg=30 ctermbg=NONE cterm=NONE + hi Identifier ctermfg=25 ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=25 ctermbg=NONE cterm=NONE + hi MoreMsg ctermfg=29 ctermbg=NONE cterm=NONE + hi PreProc ctermfg=30 ctermbg=NONE cterm=NONE + hi Statement ctermfg=88 ctermbg=NONE cterm=NONE + hi Special ctermfg=166 ctermbg=NONE cterm=NONE + hi Todo ctermfg=30 ctermbg=NONE cterm=reverse + hi WarningMsg ctermfg=88 ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=25 ctermbg=252 cterm=bold + else + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=238 ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=238 ctermbg=255 cterm=NONE + endif + hi Conceal ctermfg=25 ctermbg=NONE cterm=NONE + hi Constant ctermfg=29 ctermbg=NONE cterm=NONE + hi Directory ctermfg=25 ctermbg=NONE cterm=bold + hi Error ctermfg=124 ctermbg=NONE cterm=bold,reverse + hi Function ctermfg=37 ctermbg=NONE cterm=NONE + hi Identifier ctermfg=25 ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=25 ctermbg=NONE cterm=NONE + hi MoreMsg ctermfg=29 ctermbg=NONE cterm=NONE + hi PreProc ctermfg=37 ctermbg=NONE cterm=NONE + hi Statement ctermfg=124 ctermbg=NONE cterm=NONE + hi Special ctermfg=208 ctermbg=NONE cterm=NONE + hi Todo ctermfg=37 ctermbg=NONE cterm=reverse + hi WarningMsg ctermfg=124 ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=25 ctermbg=252 cterm=bold + endif + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi LineNr ctermfg=252 ctermbg=NONE cterm=NONE + hi CursorLineNr ctermfg=208 ctermbg=NONE cterm=NONE + hi FoldColumn ctermfg=59 ctermbg=NONE cterm=NONE + hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE + hi VertSplit ctermfg=250 ctermbg=NONE cterm=NONE + hi Pmenu ctermfg=238 ctermbg=NONE cterm=NONE + hi PmenuSbar ctermfg=240 ctermbg=NONE cterm=NONE + hi PmenuSel ctermfg=240 ctermbg=NONE cterm=reverse + hi PmenuThumb ctermfg=NONE ctermbg=240 cterm=NONE + else + hi LineNr ctermfg=252 ctermbg=254 cterm=NONE + hi CursorLineNr ctermfg=208 ctermbg=254 cterm=NONE + hi FoldColumn ctermfg=59 ctermbg=254 cterm=NONE + hi SignColumn ctermfg=NONE ctermbg=254 cterm=NONE + hi VertSplit ctermfg=250 ctermbg=255 cterm=NONE + hi Pmenu ctermfg=238 ctermbg=252 cterm=NONE + hi PmenuSbar ctermfg=NONE ctermbg=252 cterm=NONE + hi PmenuSel ctermfg=254 ctermbg=240 cterm=bold + hi PmenuThumb ctermfg=NONE ctermbg=248 cterm=NONE + endif + hi ColorColumn ctermfg=NONE ctermbg=254 cterm=bold + hi Cursor ctermfg=NONE ctermbg=NONE cterm=bold,reverse + hi CursorColumn ctermfg=NONE ctermbg=254 cterm=NONE + hi CursorLine ctermfg=NONE ctermbg=254 cterm=bold + hi DiffAdd ctermfg=NONE ctermbg=152 cterm=NONE + hi DiffAdded ctermfg=NONE ctermbg=152 cterm=NONE + hi DiffChange ctermfg=NONE ctermbg=153 cterm=NONE + hi DiffDelete ctermfg=NONE ctermbg=224 cterm=NONE + hi DiffRemoved ctermfg=NONE ctermbg=224 cterm=NONE + hi DiffText ctermfg=NONE ctermbg=152 cterm=NONE + hi EndOfBuffer ctermfg=255 ctermbg=NONE cterm=NONE + hi! link ErrorMsg Error + hi Folded ctermfg=250 ctermbg=254 cterm=NONE + hi IncSearch ctermfg=208 ctermbg=236 cterm=reverse + hi MatchParen ctermfg=NONE ctermbg=252 cterm=bold + hi NonText ctermfg=248 ctermbg=NONE cterm=NONE + hi Question ctermfg=166 ctermbg=NONE cterm=NONE + hi! link QuickFixLine Search + hi Search ctermfg=215 ctermbg=236 cterm=reverse + hi SpecialKey ctermfg=248 ctermbg=NONE cterm=NONE + hi SpellBad ctermfg=124 ctermbg=NONE cterm=underline + hi SpellCap ctermfg=25 ctermbg=NONE cterm=underline + hi SpellLocal ctermfg=37 ctermbg=NONE cterm=underline + hi SpellRare ctermfg=97 ctermbg=NONE cterm=underline + hi StatusLine ctermfg=238 ctermbg=252 cterm=NONE + hi StatusLineNC ctermfg=240 ctermbg=254 cterm=NONE + hi! link StatusLineTerm StatusLine + hi! link StatusLineTermNC StatusLineNC + hi! link TabLine TabLineFill + hi TabLineFill ctermfg=240 ctermbg=250 cterm=NONE + hi TabLineSel ctermfg=238 ctermbg=254 cterm=NONE + hi Title ctermfg=124 ctermbg=NONE cterm=bold + hi Visual ctermfg=NONE ctermbg=254 cterm=NONE + hi! link VisualNOS Visual + hi! link Boolean Constant + hi! link Character Constant + hi Comment ctermfg=242 ctermbg=NONE cterm=NONE + hi! link Conditional Statement + hi! link Define PreProc + hi! link Debug Special + hi! link Delimiter Special + hi! link Exception Statement + hi! link Float Constant + hi Ignore ctermfg=fg ctermbg=NONE cterm=NONE + hi! link Include PreProc + hi! link Keyword Statement + hi! link Label Statement + hi! link Macro PreProc + hi! link Number Constant + hi! link Operator Statement + hi! link PreCondit PreProc + hi! link Repeat Statement + hi! link SpecialChar Special + hi! link SpecialComment Special + hi! link StorageClass Type + hi! link String Constant + hi! link Structure Type + hi! link Tag Special + hi Type ctermfg=30 ctermbg=NONE cterm=NONE + hi! link Typedef Type + hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline + hi! link lCursor Cursor + hi CursorIM ctermfg=NONE ctermbg=NONE cterm=reverse + hi ToolbarLine ctermfg=NONE ctermbg=250 cterm=NONE + hi ToolbarButton ctermfg=236 ctermbg=250 cterm=bold + hi! link iCursor Cursor + hi! link vCursor Cursor + hi NormalMode ctermfg=240 ctermbg=255 cterm=reverse + hi InsertMode ctermfg=25 ctermbg=255 cterm=reverse + hi ReplaceMode ctermfg=37 ctermbg=255 cterm=reverse + hi VisualMode ctermfg=208 ctermbg=255 cterm=reverse + hi CommandMode ctermfg=97 ctermbg=255 cterm=reverse + hi Warnings ctermfg=124 ctermbg=255 cterm=reverse + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi GitSignsAdd ctermfg=29 ctermbg=NONE cterm=NONE + hi GitSignsChange ctermfg=25 ctermbg=NONE cterm=NONE + hi GitSignsDelete ctermfg=124 ctermbg=NONE cterm=NONE + else + hi GitSignsAdd ctermfg=29 ctermbg=254 cterm=NONE + hi GitSignsChange ctermfg=25 ctermbg=254 cterm=NONE + hi GitSignsDelete ctermfg=124 ctermbg=254 cterm=NONE + endif + hi! link GitSignsAddNr GitSignsAdd + hi! link GitSignsChangeNr GitSignsChange + hi! link GitSignsDeleteNr GitSignsDelete + if has('nvim') + hi! link TermCursor Cursor + hi TermCursorNC ctermfg=254 ctermbg=238 cterm=NONE + endif + unlet s:t_Co s:italics + finish +endif + +if s:t_Co >= 16 + if &background ==# 'dark' + if !has('gui_running') && get(g:, 'artesanal_dimmed', 0) + if !has('gui_running') && &background ==# 'light' + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=Black ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=Black ctermbg=Black cterm=NONE + endif + elseif !has('gui_running') && &background ==# 'dark' + if get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=White ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=White ctermbg=Black cterm=NONE + endif + endif + hi Conceal ctermfg=DarkBlue ctermbg=NONE cterm=NONE + hi Constant ctermfg=DarkGreen ctermbg=NONE cterm=NONE + hi Directory ctermfg=DarkBlue ctermbg=NONE cterm=bold + hi Error ctermfg=DarkRed ctermbg=NONE cterm=bold,reverse + hi Function ctermfg=DarkCyan ctermbg=NONE cterm=NONE + hi Identifier ctermfg=DarkBlue ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=DarkBlue ctermbg=NONE cterm=NONE + hi MoreMsg ctermfg=DarkGreen ctermbg=NONE cterm=NONE + hi PreProc ctermfg=DarkCyan ctermbg=NONE cterm=NONE + hi Statement ctermfg=DarkRed ctermbg=NONE cterm=NONE + hi Special ctermfg=DarkYellow ctermbg=NONE cterm=NONE + hi Todo ctermfg=DarkCyan ctermbg=NONE cterm=reverse + hi WarningMsg ctermfg=DarkRed ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=DarkBlue ctermbg=DarkGrey cterm=bold + else + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=White ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=White ctermbg=Black cterm=NONE + endif + hi Conceal ctermfg=Blue ctermbg=NONE cterm=NONE + hi Constant ctermfg=Green ctermbg=NONE cterm=NONE + hi Directory ctermfg=Blue ctermbg=NONE cterm=bold + hi Error ctermfg=Red ctermbg=NONE cterm=bold,reverse + hi Function ctermfg=Cyan ctermbg=NONE cterm=NONE + hi Identifier ctermfg=Blue ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=Blue ctermbg=NONE cterm=NONE + hi MoreMsg ctermfg=Green ctermbg=NONE cterm=NONE + hi PreProc ctermfg=Cyan ctermbg=NONE cterm=NONE + hi Statement ctermfg=Red ctermbg=NONE cterm=NONE + hi Special ctermfg=Yellow ctermbg=NONE cterm=NONE + hi Todo ctermfg=Cyan ctermbg=NONE cterm=reverse + hi WarningMsg ctermfg=Red ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=Blue ctermbg=DarkGrey cterm=bold + endif + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi LineNr ctermfg=DarkGrey ctermbg=NONE cterm=NONE + hi CursorLineNr ctermfg=Yellow ctermbg=NONE cterm=NONE + hi FoldColumn ctermfg=DarkGray ctermbg=NONE cterm=NONE + hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE + hi VertSplit ctermfg=DarkGrey ctermbg=NONE cterm=NONE + hi Pmenu ctermfg=White ctermbg=NONE cterm=NONE + hi PmenuSbar ctermfg=LightGrey ctermbg=NONE cterm=NONE + hi PmenuSel ctermfg=LightGrey ctermbg=NONE cterm=reverse + hi PmenuThumb ctermfg=NONE ctermbg=LightGrey cterm=NONE + else + hi LineNr ctermfg=DarkGrey ctermbg=Black cterm=NONE + hi CursorLineNr ctermfg=Yellow ctermbg=Black cterm=NONE + hi FoldColumn ctermfg=DarkGray ctermbg=Black cterm=NONE + hi SignColumn ctermfg=NONE ctermbg=Black cterm=NONE + hi VertSplit ctermfg=DarkGrey ctermbg=Black cterm=NONE + hi Pmenu ctermfg=White ctermbg=DarkGrey cterm=NONE + hi PmenuSbar ctermfg=NONE ctermbg=DarkGrey cterm=NONE + hi PmenuSel ctermfg=Black ctermbg=LightGrey cterm=bold + hi PmenuThumb ctermfg=NONE ctermbg=LightGrey cterm=NONE + endif + hi ColorColumn ctermfg=NONE ctermbg=Black cterm=bold + hi Cursor ctermfg=NONE ctermbg=NONE cterm=bold,reverse + hi CursorColumn ctermfg=NONE ctermbg=Black cterm=NONE + hi CursorLine ctermfg=NONE ctermbg=Black cterm=bold + hi DiffAdd ctermfg=NONE ctermbg=Green cterm=NONE + hi DiffAdded ctermfg=NONE ctermbg=Green cterm=NONE + hi DiffChange ctermfg=NONE ctermbg=Blue cterm=NONE + hi DiffDelete ctermfg=NONE ctermbg=Red cterm=NONE + hi DiffRemoved ctermfg=NONE ctermbg=Red cterm=NONE + hi DiffText ctermfg=NONE ctermbg=Green cterm=NONE + hi EndOfBuffer ctermfg=Black ctermbg=NONE cterm=NONE + hi! link ErrorMsg Error + hi Folded ctermfg=DarkGrey ctermbg=Black cterm=NONE + hi IncSearch ctermfg=Yellow ctermbg=Black cterm=reverse + hi MatchParen ctermfg=NONE ctermbg=DarkGrey cterm=bold + hi NonText ctermfg=LightGrey ctermbg=NONE cterm=NONE + hi Question ctermfg=DarkYellow ctermbg=NONE cterm=NONE + hi! link QuickFixLine Search + hi Search ctermfg=LightYellow ctermbg=Black cterm=reverse + hi SpecialKey ctermfg=LightGrey ctermbg=NONE cterm=NONE + hi SpellBad ctermfg=Red ctermbg=NONE cterm=underline + hi SpellCap ctermfg=Blue ctermbg=NONE cterm=underline + hi SpellLocal ctermfg=Cyan ctermbg=NONE cterm=underline + hi SpellRare ctermfg=Magenta ctermbg=NONE cterm=underline + hi StatusLine ctermfg=White ctermbg=DarkGrey cterm=NONE + hi StatusLineNC ctermfg=LightGrey ctermbg=Black cterm=NONE + hi! link StatusLineTerm StatusLine + hi! link StatusLineTermNC StatusLineNC + hi! link TabLine TabLineFill + hi TabLineFill ctermfg=LightGrey ctermbg=DarkGrey cterm=NONE + hi TabLineSel ctermfg=White ctermbg=Black cterm=NONE + hi Title ctermfg=Red ctermbg=NONE cterm=bold + hi Visual ctermfg=NONE ctermbg=Black cterm=NONE + hi! link VisualNOS Visual + hi! link Boolean Constant + hi! link Character Constant + hi Comment ctermfg=DarkGrey ctermbg=NONE cterm=NONE + hi! link Conditional Statement + hi! link Define PreProc + hi! link Debug Special + hi! link Delimiter Special + hi! link Exception Statement + hi! link Float Constant + hi Ignore ctermfg=fg ctermbg=NONE cterm=NONE + hi! link Include PreProc + hi! link Keyword Statement + hi! link Label Statement + hi! link Macro PreProc + hi! link Number Constant + hi! link Operator Statement + hi! link PreCondit PreProc + hi! link Repeat Statement + hi! link SpecialChar Special + hi! link SpecialComment Special + hi! link StorageClass Type + hi! link String Constant + hi! link Structure Type + hi! link Tag Special + hi Type ctermfg=DarkCyan ctermbg=NONE cterm=NONE + hi! link Typedef Type + hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline + hi! link lCursor Cursor + hi CursorIM ctermfg=NONE ctermbg=NONE cterm=reverse + hi ToolbarLine ctermfg=NONE ctermbg=DarkGrey cterm=NONE + hi ToolbarButton ctermfg=White ctermbg=DarkGrey cterm=bold + hi! link iCursor Cursor + hi! link vCursor Cursor + hi NormalMode ctermfg=LightGrey ctermbg=Black cterm=reverse + hi InsertMode ctermfg=Blue ctermbg=Black cterm=reverse + hi ReplaceMode ctermfg=Cyan ctermbg=Black cterm=reverse + hi VisualMode ctermfg=Yellow ctermbg=Black cterm=reverse + hi CommandMode ctermfg=Magenta ctermbg=Black cterm=reverse + hi Warnings ctermfg=Red ctermbg=Black cterm=reverse + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi GitSignsAdd ctermfg=Green ctermbg=NONE cterm=NONE + hi GitSignsChange ctermfg=Blue ctermbg=NONE cterm=NONE + hi GitSignsDelete ctermfg=Red ctermbg=NONE cterm=NONE + else + hi GitSignsAdd ctermfg=Green ctermbg=Black cterm=NONE + hi GitSignsChange ctermfg=Blue ctermbg=Black cterm=NONE + hi GitSignsDelete ctermfg=Red ctermbg=Black cterm=NONE + endif + hi! link GitSignsAddNr GitSignsAdd + hi! link GitSignsChangeNr GitSignsChange + hi! link GitSignsDeleteNr GitSignsDelete + if has('nvim') + hi! link TermCursor Cursor + hi TermCursorNC ctermfg=Black ctermbg=White cterm=NONE + endif + unlet s:t_Co s:italics + finish + endif + " Light background + if !has('gui_running') && get(g:, 'artesanal_dimmed', 0) + if !has('gui_running') && &background ==# 'light' + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=Black ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=Black ctermbg=White cterm=NONE + endif + elseif !has('gui_running') && &background ==# 'dark' + if get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=White ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=White ctermbg=White cterm=NONE + endif + endif + hi Conceal ctermfg=DarkBlue ctermbg=NONE cterm=NONE + hi Constant ctermfg=DarkGreen ctermbg=NONE cterm=NONE + hi Directory ctermfg=DarkBlue ctermbg=NONE cterm=bold + hi Error ctermfg=DarkRed ctermbg=NONE cterm=bold,reverse + hi Function ctermfg=DarkCyan ctermbg=NONE cterm=NONE + hi Identifier ctermfg=DarkBlue ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=DarkBlue ctermbg=NONE cterm=NONE + hi MoreMsg ctermfg=DarkGreen ctermbg=NONE cterm=NONE + hi PreProc ctermfg=DarkCyan ctermbg=NONE cterm=NONE + hi Statement ctermfg=DarkRed ctermbg=NONE cterm=NONE + hi Special ctermfg=DarkYellow ctermbg=NONE cterm=NONE + hi Todo ctermfg=DarkCyan ctermbg=NONE cterm=reverse + hi WarningMsg ctermfg=DarkRed ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=DarkBlue ctermbg=LightGrey cterm=bold + else + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi Normal ctermfg=Black ctermbg=NONE cterm=NONE + else + hi Normal ctermfg=Black ctermbg=White cterm=NONE + endif + hi Conceal ctermfg=Blue ctermbg=NONE cterm=NONE + hi Constant ctermfg=Green ctermbg=NONE cterm=NONE + hi Directory ctermfg=Blue ctermbg=NONE cterm=bold + hi Error ctermfg=Red ctermbg=NONE cterm=bold,reverse + hi Function ctermfg=Cyan ctermbg=NONE cterm=NONE + hi Identifier ctermfg=Blue ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=Blue ctermbg=NONE cterm=NONE + hi MoreMsg ctermfg=Green ctermbg=NONE cterm=NONE + hi PreProc ctermfg=Cyan ctermbg=NONE cterm=NONE + hi Statement ctermfg=Red ctermbg=NONE cterm=NONE + hi Special ctermfg=Yellow ctermbg=NONE cterm=NONE + hi Todo ctermfg=Cyan ctermbg=NONE cterm=reverse + hi WarningMsg ctermfg=Red ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=Blue ctermbg=LightGrey cterm=bold + endif + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi LineNr ctermfg=LightGrey ctermbg=NONE cterm=NONE + hi CursorLineNr ctermfg=Yellow ctermbg=NONE cterm=NONE + hi FoldColumn ctermfg=DarkGray ctermbg=NONE cterm=NONE + hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE + hi VertSplit ctermfg=DarkGrey ctermbg=NONE cterm=NONE + hi Pmenu ctermfg=Black ctermbg=NONE cterm=NONE + hi PmenuSbar ctermfg=DarkGrey ctermbg=NONE cterm=NONE + hi PmenuSel ctermfg=DarkGrey ctermbg=NONE cterm=reverse + hi PmenuThumb ctermfg=NONE ctermbg=DarkGrey cterm=NONE + else + hi LineNr ctermfg=LightGrey ctermbg=White cterm=NONE + hi CursorLineNr ctermfg=Yellow ctermbg=White cterm=NONE + hi FoldColumn ctermfg=DarkGray ctermbg=White cterm=NONE + hi SignColumn ctermfg=NONE ctermbg=White cterm=NONE + hi VertSplit ctermfg=DarkGrey ctermbg=White cterm=NONE + hi Pmenu ctermfg=Black ctermbg=LightGrey cterm=NONE + hi PmenuSbar ctermfg=NONE ctermbg=LightGrey cterm=NONE + hi PmenuSel ctermfg=White ctermbg=DarkGrey cterm=bold + hi PmenuThumb ctermfg=NONE ctermbg=DarkGrey cterm=NONE + endif + hi ColorColumn ctermfg=NONE ctermbg=White cterm=bold + hi Cursor ctermfg=NONE ctermbg=NONE cterm=bold,reverse + hi CursorColumn ctermfg=NONE ctermbg=White cterm=NONE + hi CursorLine ctermfg=NONE ctermbg=White cterm=bold + hi DiffAdd ctermfg=NONE ctermbg=LightGreen cterm=NONE + hi DiffAdded ctermfg=NONE ctermbg=LightGreen cterm=NONE + hi DiffChange ctermfg=NONE ctermbg=LightBlue cterm=NONE + hi DiffDelete ctermfg=NONE ctermbg=LightRed cterm=NONE + hi DiffRemoved ctermfg=NONE ctermbg=LightRed cterm=NONE + hi DiffText ctermfg=NONE ctermbg=LightGreen cterm=NONE + hi EndOfBuffer ctermfg=White ctermbg=NONE cterm=NONE + hi! link ErrorMsg Error + hi Folded ctermfg=DarkGrey ctermbg=White cterm=NONE + hi IncSearch ctermfg=Yellow ctermbg=Black cterm=reverse + hi MatchParen ctermfg=NONE ctermbg=LightGrey cterm=bold + hi NonText ctermfg=DarkGrey ctermbg=NONE cterm=NONE + hi Question ctermfg=DarkYellow ctermbg=NONE cterm=NONE + hi! link QuickFixLine Search + hi Search ctermfg=LightYellow ctermbg=Black cterm=reverse + hi SpecialKey ctermfg=DarkGrey ctermbg=NONE cterm=NONE + hi SpellBad ctermfg=Red ctermbg=NONE cterm=underline + hi SpellCap ctermfg=Blue ctermbg=NONE cterm=underline + hi SpellLocal ctermfg=Cyan ctermbg=NONE cterm=underline + hi SpellRare ctermfg=Magenta ctermbg=NONE cterm=underline + hi StatusLine ctermfg=Black ctermbg=LightGrey cterm=NONE + hi StatusLineNC ctermfg=DarkGrey ctermbg=White cterm=NONE + hi! link StatusLineTerm StatusLine + hi! link StatusLineTermNC StatusLineNC + hi! link TabLine TabLineFill + hi TabLineFill ctermfg=DarkGrey ctermbg=DarkGrey cterm=NONE + hi TabLineSel ctermfg=Black ctermbg=White cterm=NONE + hi Title ctermfg=Red ctermbg=NONE cterm=bold + hi Visual ctermfg=NONE ctermbg=White cterm=NONE + hi! link VisualNOS Visual + hi! link Boolean Constant + hi! link Character Constant + hi Comment ctermfg=DarkGrey ctermbg=NONE cterm=NONE + hi! link Conditional Statement + hi! link Define PreProc + hi! link Debug Special + hi! link Delimiter Special + hi! link Exception Statement + hi! link Float Constant + hi Ignore ctermfg=fg ctermbg=NONE cterm=NONE + hi! link Include PreProc + hi! link Keyword Statement + hi! link Label Statement + hi! link Macro PreProc + hi! link Number Constant + hi! link Operator Statement + hi! link PreCondit PreProc + hi! link Repeat Statement + hi! link SpecialChar Special + hi! link SpecialComment Special + hi! link StorageClass Type + hi! link String Constant + hi! link Structure Type + hi! link Tag Special + hi Type ctermfg=DarkCyan ctermbg=NONE cterm=NONE + hi! link Typedef Type + hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline + hi! link lCursor Cursor + hi CursorIM ctermfg=NONE ctermbg=NONE cterm=reverse + hi ToolbarLine ctermfg=NONE ctermbg=DarkGrey cterm=NONE + hi ToolbarButton ctermfg=Black ctermbg=DarkGrey cterm=bold + hi! link iCursor Cursor + hi! link vCursor Cursor + hi NormalMode ctermfg=DarkGrey ctermbg=White cterm=reverse + hi InsertMode ctermfg=Blue ctermbg=White cterm=reverse + hi ReplaceMode ctermfg=Cyan ctermbg=White cterm=reverse + hi VisualMode ctermfg=Yellow ctermbg=White cterm=reverse + hi CommandMode ctermfg=Magenta ctermbg=White cterm=reverse + hi Warnings ctermfg=Red ctermbg=White cterm=reverse + if !has('gui_running') && get(g:, 'artesanal_transparent', 0) + hi GitSignsAdd ctermfg=Green ctermbg=NONE cterm=NONE + hi GitSignsChange ctermfg=Blue ctermbg=NONE cterm=NONE + hi GitSignsDelete ctermfg=Red ctermbg=NONE cterm=NONE + else + hi GitSignsAdd ctermfg=Green ctermbg=White cterm=NONE + hi GitSignsChange ctermfg=Blue ctermbg=White cterm=NONE + hi GitSignsDelete ctermfg=Red ctermbg=White cterm=NONE + endif + hi! link GitSignsAddNr GitSignsAdd + hi! link GitSignsChangeNr GitSignsChange + hi! link GitSignsDeleteNr GitSignsDelete + if has('nvim') + hi! link TermCursor Cursor + hi TermCursorNC ctermfg=White ctermbg=Black cterm=NONE + endif + unlet s:t_Co s:italics + finish +endif + +" Background: light +" Color: fg0 #2e3440 ~ Black +" Color: fg1 #37474f ~ Black +" Color: fg2 #455a64 ~ DarkGrey +" Color: fg3 #546e7a ~ DarkGrey +" Color: fg4 #90a4ae ~ LightGrey +" Color: bg0 #eff1f4 ~ White +" Color: bg1 #e4e6eb ~ White +" Color: bg2 #cdd2db ~ LightGrey +" Color: bg3 #b6bdcb ~ DarkGrey +" Color: bg4 #9fa8ba ~ DarkGrey +" Color: black #1c313a ~ Black +" Color: realblack #000000 ~ Black +" Color: darkgray #575c66 ~ DarkGray +" Color: red #b2000f ~ Red +" Color: brightred #f0cccf ~ LightRed +" Color: darkred #99000d ~ DarkRed +" Color: diffred #f0cccf ~ LightRed +" Color: green #0e8756 ~ Green +" Color: brightgreen #c3e6d7 ~ LightGreen +" Color: darkgreen #0c7047 ~ DarkGreen +" Color: diffgreen #c3e6d7 ~ LightGreen +" Color: yellow #ff870e ~ Yellow +" Color: brightyellow #ffb76e ~ LightYellow +" Color: darkyellow #cc6c0b ~ DarkYellow +" Color: blue #0961a8 ~ Blue +" Color: brightblue #c3d1e6 ~ LightBlue +" Color: darkblue #064578 ~ DarkBlue +" Color: diffblue #c3d1e6 ~ LightBlue +" Color: magenta #7a5ab2 ~ Magenta +" Color: brightmagenta #e1bee7 ~ LightMagenta +" Color: darkmagenta #5f468a ~ DarkMagenta +" Color: cyan #1d9fb0 ~ Cyan +" Color: brightcyan #62ebff ~ LightCyan +" Color: darkcyan #198b9a ~ DarkCyan +" Color: white #eff1f4 ~ White +" Color: brightwhite #ffffff ~ White +" Term Colors: black darkred darkgreen darkyellow darkblue darkmagenta darkcyan white +" Term Colors: darkgray red green yellow blue magenta cyan brightwhite +" Background: dark +" Color: fg0 #eff1f4 ~ White +" Color: fg1 #e4e6eb ~ White +" Color: fg2 #cdd2db ~ LightGrey +" Color: fg3 #b6bdcb ~ DarkGrey +" Color: fg4 #9fa8ba ~ DarkGrey +" Color: bg0 #2e3440 ~ Black +" Color: bg1 #37474f ~ Black +" Color: bg2 #455a64 ~ DarkGrey +" Color: bg3 #546e7a ~ DarkGrey +" Color: bg4 #90a4ae ~ LightGrey +" Color: black #1c313a ~ Black +" Color: realblack #000000 ~ Black +" Color: darkgray #575c66 ~ DarkGray +" Color: red #ff616f ~ Red +" Color: brightred #ffcdd2 ~ LightRed +" Color: darkred #ef5350 ~ DarkRed +" Color: diffred #663d43 ~ Red +" Color: green #69f0b9 ~ Green +" Color: brightgreen #9fffe0 ~ LightGreen +" Color: darkgreen #15cf83 ~ DarkGreen +" Color: diffgreen #3f7070 ~ Green +" Color: yellow #ffff8d ~ Yellow +" Color: brightyellow #fff9c4 ~ LightYellow +" Color: darkyellow #ffeb3b ~ DarkYellow +" Color: blue #90caf9 ~ Blue +" Color: brightblue #bbdefb ~ LightBlue +" Color: darkblue #5d99c6 ~ DarkBlue +" Color: diffblue #3f5a70 ~ Blue +" Color: magenta #b39ddb ~ Magenta +" Color: brightmagenta #ce93d8 ~ LightMagenta +" Color: darkmagenta #9575cd ~ DarkMagenta +" Color: cyan #80deea ~ Cyan +" Color: brightcyan #b2ebf2 ~ LightCyan +" Color: darkcyan #4dd0e1 ~ DarkCyan +" Color: white #eff1f4 ~ White +" Color: brightwhite #ffffff ~ White +" Term Colors: darkgray red green yellow blue magenta cyan brightwhite +" Term Colors: black darkred darkgreen darkyellow darkblue darkmagenta darkcyan white +" vim: et ts=2 sw=2 diff --git a/.vim/bundle/vim-artesanal/doc/artesanal.txt b/.vim/bundle/vim-artesanal/doc/artesanal.txt new file mode 100644 index 00000000..7cfe157f --- /dev/null +++ b/.vim/bundle/vim-artesanal/doc/artesanal.txt @@ -0,0 +1,33 @@ +*artesanal.txt* For Vim version 8.0 Last change: 2021 Jul 31 + + + Artesanal color scheme by Stefan Wimmer + + + Artesanal colorscheme *artesanal* + +Artesanal is my personal colorscheme. + +It supports dark and light backgrounds, so you must set 'background' +before loading the colorscheme. For example: + + set background=dark + colorscheme artesanal + +Artesanal requires at least 256 colors and supports "true color" terminals. + +============================================================================== +Colorscheme options artesanal-options* + + *g:artesanal_dimmed* +Set to 1 to dim down some colours a bit. +Takes effect only in the terminal. + + let g:artesanal_dimmed = 0 + + *g:artesanal_transparent* +Set to 1 if you want a transparent background. +Takes effect only in the terminal. + + let g:artesanal_transparent = 0 + diff --git a/.vim/bundle/vim-artesanal/templates/_common.colortemplate b/.vim/bundle/vim-artesanal/templates/_common.colortemplate new file mode 100644 index 00000000..7823b86a --- /dev/null +++ b/.vim/bundle/vim-artesanal/templates/_common.colortemplate @@ -0,0 +1,188 @@ +; vim: ft=colortemplate fdm=marker + +; Default highlight groups {{{ +#if !has('gui_running') && get(g:, '@optionprefix_dimmed', 0) + ; dimmed colours + #if !has('gui_running') && &background ==# 'light' + #if !has('gui_running') && get(g:, '@optionprefix_transparent', 0) + Normal realblack none + #else + Normal realblack bg0 + #endif + #elseif !has('gui_running') && &background ==# 'dark' + #if get(g:, '@optionprefix_transparent', 0) + Normal brightwhite none + #else + Normal brightwhite bg0 + #endif + #endif + Conceal darkblue none + Constant darkgreen none + Directory darkblue none bold + Error darkred none t=reverse,bold g=standout,bold + Function darkcyan none + Identifier darkblue none + ModeMsg darkblue none + MoreMsg darkgreen none + PreProc darkcyan none + Statement darkred none + Special darkyellow none + Todo darkcyan none reverse + WarningMsg darkred none + WildMenu darkblue bg2 bold +#else + ; default colours + #if !has('gui_running') && get(g:, '@optionprefix_transparent', 0) + Normal fg1 none + #else + Normal fg1 bg0 + #endif + Conceal blue none + Constant green none + Directory blue none bold + Error red none t=reverse,bold g=standout,bold + Function cyan none + Identifier blue none + ModeMsg blue none + MoreMsg green none + PreProc cyan none + Statement red none + Special yellow none + Todo cyan none reverse + WarningMsg red none + WildMenu blue bg2 bold +#endif +#if !has('gui_running') && get(g:, '@optionprefix_transparent', 0) + ; transparent background + LineNr bg2 none + CursorLineNr yellow none + FoldColumn darkgray none + SignColumn none none + VertSplit bg3 none + Pmenu fg1 none + PmenuSbar fg2 none + PmenuSel fg2 none reverse + PmenuThumb none fg2 +#else + ; opaque background + LineNr bg2 bg1 + CursorLineNr yellow bg1 + FoldColumn darkgray bg1 + SignColumn none bg1 + VertSplit bg3 bg0 + Pmenu fg1 bg2 + PmenuSbar none bg2 + PmenuSel bg1 fg2 bold + PmenuThumb none bg4 +#endif + +; Group Fg Bg Attributes +ColorColumn none bg1 bold +Cursor none none reverse,bold +CursorColumn none bg1 +CursorLine none bg1 bold +DiffAdd none diffgreen +DiffAdded none diffgreen +DiffChange none diffblue +DiffDelete none diffred +DiffRemoved none diffred +DiffText none diffgreen +EndOfBuffer bg0 none +ErrorMsg -> Error +Folded bg3 bg1 g=italic +IncSearch yellow black reverse +MatchParen none bg2 bold +NonText bg4 none +Question darkyellow none +QuickFixLine -> Search +Search brightyellow black reverse +SpecialKey bg4 none +SpellBad red none t=underline g=italic,undercurl +SpellCap blue none t=underline g=italic,undercurl +SpellLocal cyan none t=underline g=italic,undercurl +SpellRare magenta none t=underline g=italic,undercurl +StatusLine fg1 bg2 +StatusLineNC fg2 bg1 +StatusLineTerm -> StatusLine +StatusLineTermNC -> StatusLineNC +TabLine -> TabLineFill +TabLineFill fg2 bg3 +TabLineSel fg1 bg1 +Title red none bold +Visual none bg1 +VisualNOS -> Visual +; Other conventional group names (see `:help group-name`) +Boolean -> Constant +Character -> Constant +Comment fg3 none +Conditional -> Statement +Define -> PreProc +Debug -> Special +Delimiter -> Special +Exception -> Statement +Float -> Constant +Ignore fg none +Include -> PreProc +Keyword -> Statement +Label -> Statement +Macro -> PreProc +Number -> Constant +Operator -> Statement +PreCondit -> PreProc +Repeat -> Statement +SpecialChar -> Special +SpecialComment -> Special +StorageClass -> Type +String -> Constant +Structure -> Type +Tag -> Special +Type darkcyan none +Typedef -> Type +Underlined none none underline +; Language mapping cursor +lCursor -> Cursor +; See `:help CursorIM` +CursorIM none none reverse +; See `:help window-toolbar` +ToolbarLine none bg3 +ToolbarButton fg0 bg3 bold +; }}} + +; Additional highlight groups {{{ +; Input mode cursor +iCursor -> Cursor +; Visual mode cursor, selection +vCursor -> Cursor + +; Useful for custom status lines +NormalMode fg2 bg0 reverse +InsertMode blue bg0 reverse +ReplaceMode cyan bg0 reverse +VisualMode yellow bg0 reverse +CommandMode magenta bg0 reverse +Warnings red bg0 reverse +; }}} + +; Plugin support {{{ +; GitSigns +#if !has('gui_running') && get(g:, '@optionprefix_transparent', 0) + ; transparent background + GitSignsAdd green none + GitSignsChange blue none + GitSignsDelete red none +#else + ; opaque background + GitSignsAdd green bg1 + GitSignsChange blue bg1 + GitSignsDelete red bg1 +#endif +GitSignsAddNr -> GitSignsAdd +GitSignsChangeNr -> GitSignsChange +GitSignsDeleteNr -> GitSignsDelete +; }}} + +; Terminal colors {{{ +TermCursor -> Cursor +TermCursorNC bg1 fg1 +; }}} + diff --git a/.vim/bundle/vim-artesanal/templates/_dark.colortemplate b/.vim/bundle/vim-artesanal/templates/_dark.colortemplate new file mode 100644 index 00000000..b9aea579 --- /dev/null +++ b/.vim/bundle/vim-artesanal/templates/_dark.colortemplate @@ -0,0 +1,35 @@ +; vim: ft=colortemplate sessionoptions=buffers,tabpages,winsize,folds + +; Comment out (do not delete) the definitions that you want to keep at their default. +; Color name GUI Base256 Base16 (optional) +Color: black #1c313a ~ Black +Color: realblack #000000 ~ Black +Color: darkgray #575c66 ~ DarkGray +Color: red #ff616f ~ Red +Color: brightred #ffcdd2 ~ LightRed +Color: darkred #ef5350 ~ DarkRed +Color: diffred #663d43 ~ Red +Color: green #69f0b9 ~ Green +Color: brightgreen #9fffe0 ~ LightGreen +Color: darkgreen #15cf83 ~ DarkGreen +Color: diffgreen #3f7070 ~ Green +Color: yellow #ffff8d ~ Yellow +Color: brightyellow #fff9c4 ~ LightYellow +Color: darkyellow #ffeb3b ~ DarkYellow +Color: blue #90caf9 ~ Blue +Color: brightblue #bbdefb ~ LightBlue +Color: darkblue #5d99c6 ~ DarkBlue +Color: diffblue #3f5a70 ~ Blue +Color: magenta #b39ddb ~ Magenta +Color: brightmagenta #ce93d8 ~ LightMagenta +Color: darkmagenta #9575cd ~ DarkMagenta +Color: cyan #80deea ~ Cyan +Color: brightcyan #b2ebf2 ~ LightCyan +Color: darkcyan #4dd0e1 ~ DarkCyan +Color: white #eff1f4 ~ White +Color: brightwhite #ffffff ~ White + +Term Colors: darkgray red green yellow blue magenta cyan brightwhite +Term Colors: black darkred darkgreen darkyellow darkblue darkmagenta darkcyan white + +Include: _common.colortemplate diff --git a/.vim/bundle/vim-artesanal/templates/_help.colortemplate b/.vim/bundle/vim-artesanal/templates/_help.colortemplate new file mode 100644 index 00000000..f521118d --- /dev/null +++ b/.vim/bundle/vim-artesanal/templates/_help.colortemplate @@ -0,0 +1,37 @@ +; vim: ft=colortemplate fdm=marker noet ts=8 tw=78 + +documentation +*@shortname.txt* For Vim version @vimversion Last change: @date + + + @fullname color scheme by @maintainer + + + @fullname colorscheme *@shortname* + +@fullname is my personal colorscheme. + +It supports dark and light backgrounds, so you must set 'background' +before loading the colorscheme. For example: + + set background=dark + colorscheme @shortname + +@fullname requires at least 256 colors and supports "true color" terminals. + +============================================================================== +Colorscheme options @shortname-options* + + *g:@optionprefix_dimmed* +Set to 1 to dim down some colours a bit. +Takes effect only in the terminal. + + let g:@optionprefix_dimmed = 0 + + *g:@optionprefix_transparent* +Set to 1 if you want a transparent background. +Takes effect only in the terminal. + + let g:@optionprefix_transparent = 0 + +enddocumentation diff --git a/.vim/bundle/vim-artesanal/templates/_light.colortemplate b/.vim/bundle/vim-artesanal/templates/_light.colortemplate new file mode 100644 index 00000000..2f7a1b60 --- /dev/null +++ b/.vim/bundle/vim-artesanal/templates/_light.colortemplate @@ -0,0 +1,35 @@ +; vim: ft=colortemplate sessionoptions=buffers,tabpages,winsize,folds + +; Comment out (do not delete) the definitions that you want to keep at their default. +; Color name GUI Base256 Base16 (optional) +Color: black #1c313a ~ Black +Color: realblack #000000 ~ Black +Color: darkgray #575c66 ~ DarkGray +Color: red #b2000f ~ Red +Color: brightred #f0cccf ~ LightRed +Color: darkred #99000d ~ DarkRed +Color: diffred #f0cccf ~ LightRed +Color: green #0e8756 ~ Green +Color: brightgreen #c3e6d7 ~ LightGreen +Color: darkgreen #0c7047 ~ DarkGreen +Color: diffgreen #c3e6d7 ~ LightGreen +Color: yellow #ff870e ~ Yellow +Color: brightyellow #ffb76e ~ LightYellow +Color: darkyellow #cc6c0b ~ DarkYellow +Color: blue #0961a8 ~ Blue +Color: brightblue #c3d1e6 ~ LightBlue +Color: darkblue #064578 ~ DarkBlue +Color: diffblue #c3d1e6 ~ LightBlue +Color: magenta #7a5ab2 ~ Magenta +Color: brightmagenta #e1bee7 ~ LightMagenta +Color: darkmagenta #5f468a ~ DarkMagenta +Color: cyan #1d9fb0 ~ Cyan +Color: brightcyan #62ebff ~ LightCyan +Color: darkcyan #198b9a ~ DarkCyan +Color: white #eff1f4 ~ White +Color: brightwhite #ffffff ~ White + +Term Colors: black darkred darkgreen darkyellow darkblue darkmagenta darkcyan white +Term Colors: darkgray red green yellow blue magenta cyan brightwhite + +Include: _common.colortemplate diff --git a/.vim/bundle/vim-artesanal/templates/artesanal.colortemplate b/.vim/bundle/vim-artesanal/templates/artesanal.colortemplate new file mode 100644 index 00000000..3bb4ef5e --- /dev/null +++ b/.vim/bundle/vim-artesanal/templates/artesanal.colortemplate @@ -0,0 +1,42 @@ +; vim: ft=colortemplate sessionoptions=buffers,tabpages,winsize,folds + +Full name: Artesanal +Short name: artesanal +Author: Stefan Wimmer +Maintainer: Stefan Wimmer +Website: https://github.com/wimstefan/vim-artesanal +Description: A Vim colorscheme with light and dark variants originally based on Material Design (now strongly modified to my likings). +Variant: gui 256 16 +Option Prefix: artesanal +NeoVim: yes + +Include: _help.colortemplate + +Background: light +Variant: gui 256 16 +Color: fg0 #2e3440 ~ Black +Color: fg1 #37474f ~ Black +Color: fg2 #455a64 ~ DarkGrey +Color: fg3 #546e7a ~ DarkGrey +Color: fg4 #90a4ae ~ LightGrey +Color: bg0 #eff1f4 ~ White +Color: bg1 #e4e6eb ~ White +Color: bg2 #cdd2db ~ LightGrey +Color: bg3 #b6bdcb ~ DarkGrey +Color: bg4 #9fa8ba ~ DarkGrey +Include: _light.colortemplate + +Background: dark +Variant: gui 256 16 +Color: fg0 #eff1f4 ~ White +Color: fg1 #e4e6eb ~ White +Color: fg2 #cdd2db ~ LightGrey +Color: fg3 #b6bdcb ~ DarkGrey +Color: fg4 #9fa8ba ~ DarkGrey +Color: bg0 #2e3440 ~ Black +Color: bg1 #37474f ~ Black +Color: bg2 #455a64 ~ DarkGrey +Color: bg3 #546e7a ~ DarkGrey +Color: bg4 #90a4ae ~ LightGrey +Include: _dark.colortemplate + diff --git a/.github/workflows/reviewdog.yml b/.vim/bundle/vim-markdown/.github/workflows/reviewdog.yml similarity index 100% rename from .github/workflows/reviewdog.yml rename to .vim/bundle/vim-markdown/.github/workflows/reviewdog.yml diff --git a/.github/workflows/vader.yml b/.vim/bundle/vim-markdown/.github/workflows/vader.yml similarity index 100% rename from .github/workflows/vader.yml rename to .vim/bundle/vim-markdown/.github/workflows/vader.yml diff --git a/.github/workflows/vint.yml b/.vim/bundle/vim-markdown/.github/workflows/vint.yml similarity index 100% rename from .github/workflows/vint.yml rename to .vim/bundle/vim-markdown/.github/workflows/vint.yml diff --git a/.gitignore b/.vim/bundle/vim-markdown/.gitignore similarity index 100% rename from .gitignore rename to .vim/bundle/vim-markdown/.gitignore diff --git a/.vintrc.yaml b/.vim/bundle/vim-markdown/.vintrc.yaml similarity index 100% rename from .vintrc.yaml rename to .vim/bundle/vim-markdown/.vintrc.yaml diff --git a/CONTRIBUTING.md b/.vim/bundle/vim-markdown/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .vim/bundle/vim-markdown/CONTRIBUTING.md diff --git a/Makefile b/.vim/bundle/vim-markdown/Makefile similarity index 100% rename from Makefile rename to .vim/bundle/vim-markdown/Makefile diff --git a/README.md b/.vim/bundle/vim-markdown/README.md similarity index 100% rename from README.md rename to .vim/bundle/vim-markdown/README.md diff --git a/after/ftplugin/markdown.vim b/.vim/bundle/vim-markdown/after/ftplugin/markdown.vim similarity index 100% rename from after/ftplugin/markdown.vim rename to .vim/bundle/vim-markdown/after/ftplugin/markdown.vim diff --git a/doc/vim-markdown.txt b/.vim/bundle/vim-markdown/doc/vim-markdown.txt similarity index 100% rename from doc/vim-markdown.txt rename to .vim/bundle/vim-markdown/doc/vim-markdown.txt diff --git a/ftdetect/markdown.vim b/.vim/bundle/vim-markdown/ftdetect/markdown.vim similarity index 100% rename from ftdetect/markdown.vim rename to .vim/bundle/vim-markdown/ftdetect/markdown.vim diff --git a/ftplugin/markdown.vim b/.vim/bundle/vim-markdown/ftplugin/markdown.vim similarity index 100% rename from ftplugin/markdown.vim rename to .vim/bundle/vim-markdown/ftplugin/markdown.vim diff --git a/indent/markdown.vim b/.vim/bundle/vim-markdown/indent/markdown.vim similarity index 100% rename from indent/markdown.vim rename to .vim/bundle/vim-markdown/indent/markdown.vim diff --git a/registry/markdown.yaml b/.vim/bundle/vim-markdown/registry/markdown.yaml similarity index 100% rename from registry/markdown.yaml rename to .vim/bundle/vim-markdown/registry/markdown.yaml diff --git a/syntax/markdown.vim b/.vim/bundle/vim-markdown/syntax/markdown.vim similarity index 100% rename from syntax/markdown.vim rename to .vim/bundle/vim-markdown/syntax/markdown.vim diff --git a/test/README.md b/.vim/bundle/vim-markdown/test/README.md similarity index 100% rename from test/README.md rename to .vim/bundle/vim-markdown/test/README.md diff --git a/test/folding-toc.vader b/.vim/bundle/vim-markdown/test/folding-toc.vader similarity index 100% rename from test/folding-toc.vader rename to .vim/bundle/vim-markdown/test/folding-toc.vader diff --git a/test/folding.vader b/.vim/bundle/vim-markdown/test/folding.vader similarity index 100% rename from test/folding.vader rename to .vim/bundle/vim-markdown/test/folding.vader diff --git a/test/ge_test.md b/.vim/bundle/vim-markdown/test/ge_test.md similarity index 100% rename from test/ge_test.md rename to .vim/bundle/vim-markdown/test/ge_test.md diff --git a/test/header-decrease.vader b/.vim/bundle/vim-markdown/test/header-decrease.vader similarity index 100% rename from test/header-decrease.vader rename to .vim/bundle/vim-markdown/test/header-decrease.vader diff --git a/test/indent-new-list-item.vader b/.vim/bundle/vim-markdown/test/indent-new-list-item.vader similarity index 100% rename from test/indent-new-list-item.vader rename to .vim/bundle/vim-markdown/test/indent-new-list-item.vader diff --git a/test/indent.md b/.vim/bundle/vim-markdown/test/indent.md similarity index 100% rename from test/indent.md rename to .vim/bundle/vim-markdown/test/indent.md diff --git a/test/indent.vader b/.vim/bundle/vim-markdown/test/indent.vader similarity index 100% rename from test/indent.vader rename to .vim/bundle/vim-markdown/test/indent.vader diff --git a/test/insert-toc.vader b/.vim/bundle/vim-markdown/test/insert-toc.vader similarity index 100% rename from test/insert-toc.vader rename to .vim/bundle/vim-markdown/test/insert-toc.vader diff --git a/test/map.vader b/.vim/bundle/vim-markdown/test/map.vader similarity index 100% rename from test/map.vader rename to .vim/bundle/vim-markdown/test/map.vader diff --git a/test/python-folding.vader b/.vim/bundle/vim-markdown/test/python-folding.vader similarity index 100% rename from test/python-folding.vader rename to .vim/bundle/vim-markdown/test/python-folding.vader diff --git a/test/run-tests.sh b/.vim/bundle/vim-markdown/test/run-tests.sh similarity index 100% rename from test/run-tests.sh rename to .vim/bundle/vim-markdown/test/run-tests.sh diff --git a/test/setextoatx.vader b/.vim/bundle/vim-markdown/test/setextoatx.vader similarity index 100% rename from test/setextoatx.vader rename to .vim/bundle/vim-markdown/test/setextoatx.vader diff --git a/test/strikethrough.vader b/.vim/bundle/vim-markdown/test/strikethrough.vader similarity index 100% rename from test/strikethrough.vader rename to .vim/bundle/vim-markdown/test/strikethrough.vader diff --git a/test/syntax-singleline.vader b/.vim/bundle/vim-markdown/test/syntax-singleline.vader similarity index 100% rename from test/syntax-singleline.vader rename to .vim/bundle/vim-markdown/test/syntax-singleline.vader diff --git a/test/syntax.md b/.vim/bundle/vim-markdown/test/syntax.md similarity index 100% rename from test/syntax.md rename to .vim/bundle/vim-markdown/test/syntax.md diff --git a/test/syntax.vader b/.vim/bundle/vim-markdown/test/syntax.vader similarity index 100% rename from test/syntax.vader rename to .vim/bundle/vim-markdown/test/syntax.vader diff --git a/test/table-format.vader b/.vim/bundle/vim-markdown/test/table-format.vader similarity index 100% rename from test/table-format.vader rename to .vim/bundle/vim-markdown/test/table-format.vader diff --git a/test/toc-autofit.vader b/.vim/bundle/vim-markdown/test/toc-autofit.vader similarity index 100% rename from test/toc-autofit.vader rename to .vim/bundle/vim-markdown/test/toc-autofit.vader diff --git a/test/toc.vader b/.vim/bundle/vim-markdown/test/toc.vader similarity index 100% rename from test/toc.vader rename to .vim/bundle/vim-markdown/test/toc.vader diff --git a/test/vimrc b/.vim/bundle/vim-markdown/test/vimrc similarity index 100% rename from test/vimrc rename to .vim/bundle/vim-markdown/test/vimrc diff --git a/.vim/bundle/vim-pathogen/.github/FUNDING.yml b/.vim/bundle/vim-pathogen/.github/FUNDING.yml new file mode 100644 index 00000000..e2a49d11 --- /dev/null +++ b/.vim/bundle/vim-pathogen/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: tpope +custom: ["https://www.paypal.me/vimpope"] diff --git a/.vim/bundle/vim-pathogen/CONTRIBUTING.markdown b/.vim/bundle/vim-pathogen/CONTRIBUTING.markdown new file mode 100644 index 00000000..3bbabf8d --- /dev/null +++ b/.vim/bundle/vim-pathogen/CONTRIBUTING.markdown @@ -0,0 +1,18 @@ +Follow the commit message guidelines at [commit.style](https://commit.style). +This is an absolute requirement for my repositories, and doing so proves you +actually read the contribution guidelines, which makes for a good first +impression. + +Good commit messages imply good commits. Pull requests should typically be a +single commit, or for the rare complicated case, a series of atomic commits. +If I request a change, use `git commit --amend` or `git rebase --interactive` +and force push to your branch. + +For feature requests, don't be shy about proposing it in an issue before +drafting a patch. If it's a great idea, I might do it for you. If it's a +terrible idea, no patch will change my mind. + +The worst ideas are configuration options. You'll need to provide a great +justification in order to persuade me to take on the maintenance and support +burden it will inevitably entail. See if you can get away with a custom map +or autocommand instead. diff --git a/.vim/bundle/vim-pathogen/LICENSE b/.vim/bundle/vim-pathogen/LICENSE new file mode 100644 index 00000000..99f03caf --- /dev/null +++ b/.vim/bundle/vim-pathogen/LICENSE @@ -0,0 +1,81 @@ +VIM LICENSE + +I) There are no restrictions on distributing unmodified copies of + pathogen.vim except that they must include this license text. You can + also distribute unmodified parts of pathogen.vim, likewise unrestricted + except that they must include this license text. You are also allowed to + include executables that you made from the unmodified pathogen.vim + sources, plus your own usage examples and Vim scripts. + +II) It is allowed to distribute a modified (or extended) version of + pathogen.vim, including executables and/or source code, when the following + four conditions are met: + 1) This license text must be included unmodified. + 2) The modified pathogen.vim must be distributed in one of the following + five ways: + a) If you make changes to pathogen.vim yourself, you must clearly + describe in the distribution how to contact you. When the + maintainer asks you (in any way) for a copy of the modified + pathogen.vim you distributed, you must make your changes, including + source code, available to the maintainer without fee. The + maintainer reserves the right to include your changes in the + official version of pathogen.vim. What the maintainer will do with + your changes and under what license they will be distributed is + negotiable. If there has been no negotiation then this license, or + a later version, also applies to your changes. The current + maintainer is Bram Moolenaar . If this changes it + will be announced in appropriate places (most likely vim.sf.net, + www.vim.org and/or comp.editors). When it is completely impossible + to contact the maintainer, the obligation to send him your changes + ceases. Once the maintainer has confirmed that he has received your + changes they will not have to be sent again. + b) If you have received a modified pathogen.vim that was distributed as + mentioned under a) you are allowed to further distribute it + unmodified, as mentioned at I). If you make additional changes the + text under a) applies to those changes. + c) Provide all the changes, including source code, with every copy of + the modified pathogen.vim you distribute. This may be done in the + form of a context diff. You can choose what license to use for new + code you add. The changes and their license must not restrict + others from making their own changes to the official version of + pathogen.vim. + d) When you have a modified pathogen.vim which includes changes as + mentioned under c), you can distribute it without the source code + for the changes if the following three conditions are met: + - The license that applies to the changes permits you to distribute + the changes to the Vim maintainer without fee or restriction, and + permits the Vim maintainer to include the changes in the official + version of pathogen.vim without fee or restriction. + - You keep the changes for at least three years after last + distributing the corresponding modified pathogen.vim. When the + maintainer or someone who you distributed the modified + pathogen.vim to asks you (in any way) for the changes within this + period, you must make them available to him. + - You clearly describe in the distribution how to contact you. This + contact information must remain valid for at least three years + after last distributing the corresponding modified pathogen.vim, + or as long as possible. + e) When the GNU General Public License (GPL) applies to the changes, + you can distribute the modified pathogen.vim under the GNU GPL + version 2 or any later version. + 3) A message must be added, at least in the output of the ":version" + command and in the intro screen, such that the user of the modified + pathogen.vim is able to see that it was modified. When distributing as + mentioned under 2)e) adding the message is only required for as far as + this does not conflict with the license used for the changes. + 4) The contact information as required under 2)a) and 2)d) must not be + removed or changed, except that the person himself can make + corrections. + +III) If you distribute a modified version of pathogen.vim, you are encouraged + to use the Vim license for your changes and make them available to the + maintainer, including the source code. The preferred way to do this is + by e-mail or by uploading the files to a server and e-mailing the URL. If + the number of changes is small (e.g., a modified Makefile) e-mailing a + context diff will do. The e-mail address to be used is + + +IV) It is not allowed to remove this license from the distribution of the + pathogen.vim sources, parts of it or from a modified version. You may + use this license for previous pathogen.vim releases instead of the + license that they came with, at your option. diff --git a/.vim/bundle/vim-pathogen/README.markdown b/.vim/bundle/vim-pathogen/README.markdown new file mode 100644 index 00000000..8dc6a87a --- /dev/null +++ b/.vim/bundle/vim-pathogen/README.markdown @@ -0,0 +1,153 @@ +# pathogen.vim + +Manage your `'runtimepath'` with ease. In practical terms, pathogen.vim +makes it super easy to install plugins and runtime files in their own +private directories. + +**For new users, I recommend using Vim's built-in package management +instead.** `:help packages` + +## Installation + +Install to `~/.vim/autoload/pathogen.vim`. +Or copy and paste the following into your terminal/shell: + + mkdir -p ~/.vim/autoload ~/.vim/bundle && \ + curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim + +If you're using Windows, change all occurrences of `~/.vim` to `~\vimfiles`. + +## Runtime Path Manipulation + +Add this to your vimrc: + + execute pathogen#infect() + +If you're brand new to Vim and lacking a vimrc, `vim ~/.vimrc` and paste +in the following super-minimal example: + + execute pathogen#infect() + syntax on + filetype plugin indent on + +Now any plugins you wish to install can be extracted to a subdirectory +under `~/.vim/bundle`, and they will be added to the `'runtimepath'`. +Observe: + + cd ~/.vim/bundle && \ + git clone https://github.com/tpope/vim-sensible.git + +Now [sensible.vim](https://github.com/tpope/vim-sensible) is installed. +If you really want to get crazy, you could set it up as a submodule in +whatever repository you keep your dot files in. I don't like to get +crazy. + +If you don't like the directory name `bundle`, you can pass a runtime relative +glob as an argument: + + execute pathogen#infect('stuff/{}') + +The `{}` indicates where the expansion should occur. + +You can also pass an absolute path instead. I keep the plugins I maintain under `~/src`, and this is how I add them: + + execute pathogen#infect('bundle/{}', '~/src/vim/bundle/{}') + +Normally to generate documentation, Vim expects you to run `:helptags` +on each directory with documentation (e.g., `:helptags ~/.vim/doc`). +Provided with pathogen.vim is a `:Helptags` command that does this on +every directory in your `'runtimepath'`. If you really want to get +crazy, you could even invoke `Helptags` in your vimrc. I don't like to +get crazy. + +Finally, pathogen.vim has a rich API that can manipulate `'runtimepath'` +and other comma-delimited path options in ways most people will never +need to do. If you're one of those edge cases, look at the source. +It's well documented. + +## Native Vim Package Management + +Vim 8 includes support for package management in a manner similar to +pathogen.vim. If you'd like to transition to this native support, +pathogen.vim can help. Calling `pathogen#infect()` on an older version of Vim +will supplement the `bundle/{}` default with `pack/{}/start/{}`, effectively +backporting a subset of the new native functionality. + +## Runtime File Editing + +`:Vopen`, `:Vedit`, `:Vsplit`, `:Vvsplit`, `:Vtabedit`, `:Vpedit`, and +`:Vread` have all moved to [scriptease.vim][]. + +[scriptease.vim]: https://github.com/tpope/vim-scriptease + +## FAQ + +> Can I put pathogen.vim in a submodule like all my other plugins? + +Sure, stick it under `~/.vim/bundle`, and prepend the following to your +vimrc: + + runtime bundle/vim-pathogen/autoload/pathogen.vim + +Or if your bundles are somewhere other than `~/.vim` (say, `~/src/vim`): + + source ~/src/vim/bundle/vim-pathogen/autoload/pathogen.vim + +> Will you accept these 14 pull requests adding a `.gitignore` for +> `tags` so I don't see untracked changes in my dot files repository? + +No, but I'll teach you how to ignore `tags` globally: + + git config --global core.excludesfile '~/.cvsignore' + echo tags >> ~/.cvsignore + +While any filename will work, I've chosen to follow the ancient +tradition of `.cvsignore` because utilities like rsync use it, too. +Clever, huh? + +> What about Vimballs? + +If you really must use one: + + :e name.vba + :!mkdir ~/.vim/bundle/name + :UseVimball ~/.vim/bundle/name + +> Why don't my plugins load when I use Vim sessions? + +Vim sessions default to capturing all global options, which includes the +`'runtimepath'` that pathogen.vim manipulates. This can cause other problems +too, so I recommend turning that behavior off: + + set sessionoptions-=options + +## Contributing + +If your [commit message sucks](http://stopwritingramblingcommitmessages.com/), +I'm not going to accept your pull request. I've explained very politely +dozens of times that +[my general guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) +are absolute rules on my own repositories, so I may lack the energy to +explain it to you yet another time. And please, if I ask you to change +something, `git commit --amend`. + +Beyond that, don't be shy about asking before patching. What takes you +hours might take me minutes simply because I have both domain knowledge +and a perverse knowledge of Vim script so vast that many would consider +it a symptom of mental illness. On the flip side, some ideas I'll +reject no matter how good the implementation is. "Send a patch" is an +edge case answer in my book. + +## Self-Promotion + +Like pathogen.vim? Follow the repository on +[GitHub](https://github.com/tpope/vim-pathogen) and vote for it on +[vim.org](http://www.vim.org/scripts/script.php?script_id=2332). And if +you're feeling especially charitable, follow [tpope](http://tpo.pe/) on +[Twitter](http://twitter.com/tpope) and +[GitHub](https://github.com/tpope). + +## License + +Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. +See `:help license`. diff --git a/.vim/bundle/vim-pathogen/autoload/pathogen.vim b/.vim/bundle/vim-pathogen/autoload/pathogen.vim new file mode 100644 index 00000000..8cd8e97b --- /dev/null +++ b/.vim/bundle/vim-pathogen/autoload/pathogen.vim @@ -0,0 +1,264 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.4 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#interpose() or an absolute path to invoke pathogen#surround(). +" Curly braces are expanded with pathogen#expand(): "bundle/{}" finds all +" subdirectories inside "bundle" inside all directories in the runtime path. +" If no arguments are given, defaults "bundle/{}", and also "pack/{}/start/{}" +" on versions of Vim without native package support. +function! pathogen#infect(...) abort + if a:0 + let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")') + else + let paths = ['bundle/{}', 'pack/{}/start/{}'] + endif + if has('packages') + call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"') + endif + let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*$' + for path in filter(copy(paths), 'v:val =~# static') + call pathogen#surround(path) + endfor + for path in filter(copy(paths), 'v:val !~# static') + if path =~# '^\%([$~\\/]\|\w:[\\/]\)' + call pathogen#surround(path) + else + call pathogen#interpose(path) + endif + endfor + call pathogen#cycle_filetype() + if pathogen#is_disabled($MYVIMRC) + return 'finish' + endif + return '' +endfunction + +" Split a path into a list. +function! pathogen#split(path) abort + if type(a:path) == type([]) | return a:path | endif + if empty(a:path) | return [] | endif + let split = split(a:path,'\\\@]','\\&','') + endif +endfunction + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction + +" vim:set et sw=2: diff --git a/.vim/bundle/vim-python-pep8-indent/.circleci/config.yml b/.vim/bundle/vim-python-pep8-indent/.circleci/config.yml new file mode 100644 index 00000000..8d54439b --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/.circleci/config.yml @@ -0,0 +1,37 @@ +version: 2 + +common: &common + working_directory: ~/repo + docker: + - image: blueyed/vim-python-pep8-indent-vims-for-test:3@sha256:e7e3c4f4b021954a40f2f1d88dc470f119dc65603c63724d1c58cbe437fdc2d4 + +jobs: + test: + <<: *common + steps: + - checkout + - run: + name: Run tests + command: | + spec/make-coverage + - run: + name: Report coverage + command: | + covimerage xml + codecov -X search gcov pycov -f coverage.xml + + checkqa: + <<: *common + steps: + - checkout + - run: + name: Lint + command: | + vint **/*.vim + +workflows: + version: 2 + test: + jobs: + - test + - checkqa diff --git a/.vim/bundle/vim-python-pep8-indent/.coveragerc b/.vim/bundle/vim-python-pep8-indent/.coveragerc new file mode 100644 index 00000000..74cc24e8 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/.coveragerc @@ -0,0 +1,7 @@ +[run] +plugins = covimerage +data_file = .coverage_covimerage +source = indent/python.vim + +[report] +include = indent/python.vim diff --git a/.vim/bundle/vim-python-pep8-indent/.dockerignore b/.vim/bundle/vim-python-pep8-indent/.dockerignore new file mode 100644 index 00000000..1a99a797 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/.dockerignore @@ -0,0 +1,2 @@ +* +!Gemfile diff --git a/.vim/bundle/vim-python-pep8-indent/.gitignore b/.vim/bundle/vim-python-pep8-indent/.gitignore new file mode 100644 index 00000000..e8035f64 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/.gitignore @@ -0,0 +1,3 @@ +.*.swp +.coverage_covimerage +Gemfile.lock diff --git a/.vim/bundle/vim-python-pep8-indent/CONTRIBUTING.rst b/.vim/bundle/vim-python-pep8-indent/CONTRIBUTING.rst new file mode 100644 index 00000000..094f20ad --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/CONTRIBUTING.rst @@ -0,0 +1,37 @@ +How To Contribute +================= + +``vim-python-pep8-indent`` is always open for suggestions and contributions by generous developers. +I’ve collected a few tips to get you started. + +Please: + +- *Always* add tests for your code. +- Write `good commit messages`_. + + +Running Tests +------------- + +- They are written in Ruby_ (sorry :() using vimrunner_ which requires rspec_. +- The tests go into ``spec/indent/indent_spec.rb``. + Look at the ``describe`` blocks to get the hang of it. +- Run the tests with the command:: + + $ rspec spec +- Alternatively you can use Docker:: + + $ make test_docker + +- You can select tests based on line numbers, e.g.:: + + $ rspec ./spec/indent/indent_spec.rb:385 + $ make test_docker RSPEC_ARGS=./spec/indent/indent_spec.rb:385 + +Thank you for considering to contribute! + + +.. _Ruby: https://www.ruby-lang.org/ +.. _`good commit messages`: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +.. _vimrunner: https://github.com/AndrewRadev/vimrunner +.. _rspec: https://github.com/rspec/rspec diff --git a/.vim/bundle/vim-python-pep8-indent/COPYING.txt b/.vim/bundle/vim-python-pep8-indent/COPYING.txt new file mode 100644 index 00000000..0e259d42 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/COPYING.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/.vim/bundle/vim-python-pep8-indent/Dockerfile b/.vim/bundle/vim-python-pep8-indent/Dockerfile new file mode 100644 index 00000000..14e39ea1 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/Dockerfile @@ -0,0 +1,24 @@ +FROM testbed/vim:latest + +RUN apk --no-cache add gtk+2.0-dev libx11-dev libxt-dev mcookie xauth xvfb +# NOTE: +profile needs huge features. +RUN install_vim -tag v8.1.0129 -name vim --with-features=huge \ + --disable-channel --disable-netbeans --disable-xim \ + --enable-gui=gtk2 --with-x -build +RUN ln -s /vim-build/bin/vim /usr/bin/gvim +RUN gvim --version + +# Install covimerage and vint. +# NOTE: we have py2 already via gtk+2.0-dev. +# NOTE: enum34+pathlib+typing gets installed as workaround for broken vim-vint wheel. +RUN apk --no-cache add py2-pip \ + && pip install --no-cache-dir codecov covimerage==0.0.9 vim-vint enum34 pathlib typing \ + && rm -rf /usr/include /usr/lib/python*/turtle* /usr/lib/python*/tkinter + +WORKDIR /vim-python-pep8-indent + +ADD Gemfile . +RUN apk --no-cache add coreutils ruby-bundler +RUN bundle install + +ENTRYPOINT ["rspec", "spec"] diff --git a/.vim/bundle/vim-python-pep8-indent/Gemfile b/.vim/bundle/vim-python-pep8-indent/Gemfile new file mode 100644 index 00000000..9bbf5968 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem "vimrunner", "0.3.4" +gem "rspec" diff --git a/.vim/bundle/vim-python-pep8-indent/Makefile b/.vim/bundle/vim-python-pep8-indent/Makefile new file mode 100644 index 00000000..2566d411 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/Makefile @@ -0,0 +1,25 @@ +test: + VIMRUNNER_REUSE_SERVER=1 xvfb-run bundle exec rspec + +# Run tests in dockerized Vims. +DOCKER_REPO:=blueyed/vim-python-pep8-indent-vims-for-test +DOCKER_TAG:=3 +DOCKER_IMAGE:=$(DOCKER_REPO):$(DOCKER_TAG) + +docker_image: + docker build -t $(DOCKER_REPO):$(DOCKER_TAG) . +docker_push: + docker push $(DOCKER_REPO):$(DOCKER_TAG) +docker_update_latest: + docker tag $(DOCKER_REPO):$(DOCKER_TAG) $(DOCKER_REPO):latest + docker push $(DOCKER_REPO):latest + +test_docker: XVFB_ERRORFILE:=/dev/null +test_docker: + @set -x; export DISPLAY=$(if $(VIMRUNNER_TEST_DISPLAY),$(VIMRUNNER_TEST_DISPLAY),172.17.0.1:99; Xvfb -ac -listen tcp :99 >$(XVFB_ERRORFILE) 2>&1 & XVFB_PID=$$!); \ + docker run --rm -ti -e DISPLAY -e VIMRUNNER_REUSE_SERVER=1 \ + -v $(CURDIR):/vim-python-pep8-indent $(DOCKER_IMAGE) $(RSPEC_ARGS) \ + $(if $(VIMRUNNER_TEST_DISPLAY),,; ret=$$?; kill $$XVFB_PID; exit $$ret) + +test_coverage: + spec/make-coverage diff --git a/.vim/bundle/vim-python-pep8-indent/README.rst b/.vim/bundle/vim-python-pep8-indent/README.rst new file mode 100644 index 00000000..77be58cc --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/README.rst @@ -0,0 +1,169 @@ +vim-python-pep8-indent +====================== + +.. image:: https://circleci.com/gh/Vimjas/vim-python-pep8-indent.svg?style=svg + :target: https://circleci.com/gh/Vimjas/vim-python-pep8-indent +.. image:: https://codecov.io/gh/Vimjas/vim-python-pep8-indent/branch/master/graph/badge.svg + :target: https://codecov.io/gh/Vimjas/vim-python-pep8-indent + +This small script modifies Vim_’s indentation behavior to comply with PEP8_ and my aesthetic preferences. +Most importantly:: + + foobar(foo, + bar) + +and:: + + foobar( + foo, + bar + ) + + +Installation +------------ + +Install the plugin using your favorite plugin manager / method, a few examples +follow: + +Pathogen +^^^^^^^^ + +Follow the instructions on installing Pathogen_ and then: + +.. code-block:: shell-session + + $ cd ~/.vim/bundle + $ git clone https://github.com/Vimjas/vim-python-pep8-indent.git + + +Vundle +^^^^^^ + +Follow the instructions on installing Vundle_ and add the appropriate plugin line into your ``.vimrc``: + +.. code-block:: vim + + Plugin 'Vimjas/vim-python-pep8-indent' + + +NeoBundle +^^^^^^^^^ + +Follow the instructions on installing NeoBundle_ and add the appropriate NeoBundle line into your ``.vimrc``: + +.. code-block:: vim + + NeoBundle 'Vimjas/vim-python-pep8-indent' + + +Configuration +------------- + +g:python_pep8_indent_multiline_string +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can configure the initial indentation of multiline strings using ``g:python_pep8_indent_multiline_string`` (which can also be set per buffer). +This defaults to ``0``, which means that multiline strings are not indented. +``-1`` and positive values will be used as-is, where ``-1`` is a special value for Vim's ``indentexpr``, and will keep the existing indent (using Vim's ``autoindent`` setting). +``-2`` is meant to be used for strings that are wrapped with ``textwrap.dedent`` etc. It will add a level of indentation if the multiline string started in the previous line, without any content in it already:: + + testdir.makeconftest(""" + _ + +With content already, it will be aligned to the opening parenthesis:: + + testdir.makeconftest("""def pytest_addoption(parser): + _ + +Existing indentation (including ``0``) in multiline strings will be kept, so this setting only applies to the indentation of new/empty lines. + +g:python_pep8_indent_hang_closing +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Control closing bracket indentation with ``python_pep8_indent_hang_closing``, set globally or per buffer. + +By default (set to ``0``), closing brackets line up with the opening line:: + + my_list = [ + 1, 2, 3, + 4, 5, 6, + ] + result = some_function_that_takes_arguments( + 'a', 'b', 'c', + 'd', 'e', 'f', + ) + +With ``python_pep8_indent_hang_closing = 1``, closing brackets line up with the items:: + + my_list = [ + 1, 2, 3, + 4, 5, 6, + ] + result = some_function_that_takes_arguments( + 'a', 'b', 'c', + 'd', 'e', 'f', + ) + + +Troubleshooting +--------------- + +In case it is not working, please make sure your Vim is configured to load +indent files (``filetype indent on``). +This is typically the case when using a plugin manager, but check its docs. + +Check ``:verbose set indentexpr?`` in a Python file, which should show +something like the following: + + indentexpr=GetPythonPEPIndent(v:lnum) + Last set from ~/…/plugged/vim-python-pep8-indent/indent/python.vim + + +Notes +----- + +Please note that Kirill Klenov’s python-mode_ ships its own version of this bundle. +Therefore, if you want to use this version specifically, you’ll have to disable python-mode’s using: + +.. code-block:: vim + + let g:pymode_indent = 0 + + +License and Authorship +---------------------- + +This script is based on one from Vim’s official `script repo`_ that was *not* originally written by me. +Unfortunately the indentation was off by one character in one case and the script hasn’t been updated since 2005. + +Even more unfortunately, I wasn’t able to reach any of the original authors/maintainers: +**David Bustos** and **Eric Mc Sween**. + +So I fixed the annoyance with the help of `Steve Losh`_ and am putting it out here so you don’t have to patch the original yourself. +The original patch is still available here_. + +Over the time a lot more improvements have been contributed_ by `generous people`_. + +I’d like to thank the original authors here for their work and release it hereby to the *Public Domain* (using the CC0_ licence) since I hope that would be in their spirit. +If anyone with a say in this objects, please let me_ know immediately. +Also, if someone is in contact with one of them, I would appreciate being introduced. + +While my Vimscript_ skills are still feeble, I intend to maintain it for now. +This mainly means that I’ll triage through bugs and pull requests but won’t be fixing much myself. + + +.. _Vim: http://www.vim.org/ +.. _PEP8: http://www.python.org/dev/peps/pep-0008/ +.. _`script repo`: http://www.vim.org/scripts/script.php?script_id=974 +.. _`Steve Losh`: http://stevelosh.com/ +.. _here: https://gist.github.com/2965846 +.. _Neobundle: https://github.com/Shougo/neobundle.vim +.. _Pathogen: https://github.com/tpope/vim-pathogen +.. _python-mode: https://github.com/klen/python-mode +.. _`Vimscript`: http://learnvimscriptthehardway.stevelosh.com/ +.. _vundle: https://github.com/gmarik/Vundle.vim +.. _me: https://hynek.me/ +.. _CC0: http://creativecommons.org/publicdomain/zero/1.0/ +.. _contributed: https://github.com/hynek/vim-python-pep8-indent/blob/master/CONTRIBUTING.rst +.. _`generous people`: https://github.com/hynek/vim-python-pep8-indent/graphs/contributors diff --git a/.vim/bundle/vim-python-pep8-indent/docker-compose.yml b/.vim/bundle/vim-python-pep8-indent/docker-compose.yml new file mode 100644 index 00000000..71760c2d --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/docker-compose.yml @@ -0,0 +1,6 @@ +version: '2' +services: + rspec: + build: . + volumes: + - .:/vim-python-pep8-indent diff --git a/.vim/bundle/vim-python-pep8-indent/indent/cython.vim b/.vim/bundle/vim-python-pep8-indent/indent/cython.vim new file mode 120000 index 00000000..4407bc18 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/indent/cython.vim @@ -0,0 +1 @@ +python.vim \ No newline at end of file diff --git a/.vim/bundle/vim-python-pep8-indent/indent/python.vim b/.vim/bundle/vim-python-pep8-indent/indent/python.vim new file mode 100644 index 00000000..047ae3d7 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/indent/python.vim @@ -0,0 +1,454 @@ +" PEP8 compatible Python indent file +" Language: Python +" Maintainer: Daniel Hahler +" Prev Maintainer: Hynek Schlawack +" Prev Maintainer: Eric Mc Sween (address invalid) +" Original Author: David Bustos (address invalid) +" License: CC0 +" +" vim-python-pep8-indent - A nicer Python indentation style for vim. +" Written in 2004 by David Bustos +" Maintained from 2004-2005 by Eric Mc Sween +" Maintained from 2013 by Hynek Schlawack +" Maintained from 2017 by Daniel Hahler +" +" To the extent possible under law, the author(s) have dedicated all copyright +" and related and neighboring rights to this software to the public domain +" worldwide. This software is distributed without any warranty. +" You should have received a copy of the CC0 Public Domain Dedication along +" with this software. If not, see +" . + +" Only load this indent file when no other was loaded. +if exists('b:did_indent') + finish +endif +let b:did_indent = 1 + +setlocal nolisp +setlocal autoindent +setlocal indentexpr=GetPythonPEPIndent(v:lnum) +setlocal indentkeys=!^F,o,O,<:>,0),0],0},=elif,=except + +if !exists('g:python_pep8_indent_multiline_string') + let g:python_pep8_indent_multiline_string = 0 +endif + +if !exists('g:python_pep8_indent_hang_closing') + let g:python_pep8_indent_hang_closing = 0 +endif + +" TODO: check required patch for timeout argument, likely lower than 7.3.429 though. +if !exists('g:python_pep8_indent_searchpair_timeout') + if has('patch-8.0.1483') + let g:python_pep8_indent_searchpair_timeout = 150 + else + let g:python_pep8_indent_searchpair_timeout = 0 + endif +endif + +let s:block_rules = { + \ '^\s*elif\>': [['if', 'elif'], ['else']], + \ '^\s*except\>': [['try', 'except'], []], + \ '^\s*finally\>': [['try', 'except', 'else'], []] + \ } +let s:block_rules_multiple = { + \ '^\s*else\>': [['if', 'elif', 'for', 'try', 'except'], []] + \ } +" Pairs to look for when searching for opening parenthesis. +" The value is the maximum offset in lines. +let s:paren_pairs = {'()': 50, '[]': 100, '{}': 1000} + +if &filetype ==# 'pyrex' || &filetype ==# 'cython' + let b:control_statement = '\v^\s*(class|def|if|while|with|for|except|cdef|cpdef)>' +else + let b:control_statement = '\v^\s*(class|def|if|while|with|for|except)>' +endif +let s:stop_statement = '^\s*\(break\|continue\|raise\|return\|pass\)\>' + +let s:skip_after_opening_paren = 'synIDattr(synID(line("."), col("."), 0), "name") ' . + \ '=~? "\\vcomment|jedi\\S"' + +let s:special_chars_syn_pattern = "\\vstring|comment|^pythonbytes%(contents)=$|pythonTodo|jedi\\S" + +if !get(g:, 'python_pep8_indent_skip_concealed', 0) || !has('conceal') + " Skip strings and comments. Return 1 for chars to skip. + " jedi* refers to syntax definitions from jedi-vim for call signatures, which + " are inserted temporarily into the buffer. + function! s:_skip_special_chars(line, col) + return synIDattr(synID(a:line, a:col, 0), 'name') + \ =~? s:special_chars_syn_pattern + endfunction +else + " Also ignore anything concealed. + " TODO: doc; likely only necessary with jedi-vim, where a better version is + " planned (https://github.com/Vimjas/vim-python-pep8-indent/pull/98). + + " Wrapper around synconcealed for older Vim (7.3.429, used on Travis CI). + function! s:is_concealed(line, col) + let concealed = synconcealed(a:line, a:col) + return len(concealed) && concealed[0] + endfunction + + function! s:_skip_special_chars(line, col) + return synIDattr(synID(a:line, a:col, 0), 'name') + \ =~? s:special_chars_syn_pattern + \ || s:is_concealed(a:line, a:col) + endfunction +endif + +" Use 'shiftwidth()' instead of '&sw'. +" (Since Vim patch 7.3.629, 'shiftwidth' can be set to 0 to follow 'tabstop'). +if exists('*shiftwidth') + function! s:sw() + return shiftwidth() + endfunction +else + function! s:sw() + return &shiftwidth + endfunction +endif + +" Find backwards the closest open parenthesis/bracket/brace. +function! s:find_opening_paren(lnum, col) + " Return if cursor is in a comment. + if synIDattr(synID(a:lnum, a:col, 0), 'name') =~? 'comment' + return [0, 0] + endif + + call cursor(a:lnum, a:col) + + let nearest = [0, 0] + let timeout = g:python_pep8_indent_searchpair_timeout + let skip_special_chars = 's:_skip_special_chars(line("."), col("."))' + for [p, maxoff] in items(s:paren_pairs) + let stopline = max([0, line('.') - maxoff, nearest[0]]) + let next = searchpairpos( + \ '\V'.p[0], '', '\V'.p[1], 'bnW', skip_special_chars, stopline, timeout) + if next[0] && (next[0] > nearest[0] || (next[0] == nearest[0] && next[1] > nearest[1])) + let nearest = next + endif + endfor + return nearest +endfunction + +" Find the start of a multi-line statement +function! s:find_start_of_multiline_statement(lnum) + let lnum = a:lnum + while lnum > 0 + if getline(lnum - 1) =~# '\\$' + let lnum = prevnonblank(lnum - 1) + else + let [paren_lnum, _] = s:find_opening_paren(lnum, 1) + if paren_lnum < 1 + return lnum + else + let lnum = paren_lnum + endif + endif + endwhile +endfunction + +" Find possible indent(s) of the block starter that matches the current line. +function! s:find_start_of_block(lnum, types, skip, multiple) abort + let r = [] + let re = '\V\^\s\*\('.join(a:types, '\|').'\)\>' + if !empty(a:skip) + let re_skip = '\V\^\s\*\('.join(a:skip, '\|').'\)\>' + else + let re_skip = '' + endif + let last_indent = indent(a:lnum) + 1 + let lnum = a:lnum - 1 + while lnum > 0 && last_indent > 0 + let indent = indent(lnum) + if indent < last_indent + let line = getline(lnum) + if !empty(re_skip) && line =~# re_skip + let last_indent = indent + elseif line =~# re + if !a:multiple + return [indent] + endif + if index(r, indent) == -1 + let r += [indent] + endif + let last_indent = indent + endif + endif + let lnum = prevnonblank(lnum - 1) + endwhile + return r +endfunction + +" Is "expr" true for every position in "lnum", beginning at "start"? +" (optionally up to a:1 / 4th argument) +function! s:match_expr_on_line(expr, lnum, start, ...) + let text = getline(a:lnum) + let end = a:0 ? a:1 : len(text) + if a:start > end + return 1 + endif + let save_pos = getpos('.') + let r = 1 + for i in range(a:start, end) + call cursor(a:lnum, i) + if !(eval(a:expr) || text[i-1] =~# '\s') + let r = 0 + break + endif + endfor + call setpos('.', save_pos) + return r +endfunction + +" Line up with open parenthesis/bracket/brace. +function! s:indent_like_opening_paren(lnum) + let [paren_lnum, paren_col] = s:find_opening_paren(a:lnum, 1) + if paren_lnum <= 0 + return -2 + endif + let text = getline(paren_lnum) + let base = indent(paren_lnum) + + let nothing_after_opening_paren = s:match_expr_on_line( + \ s:skip_after_opening_paren, paren_lnum, paren_col+1) + let starts_with_closing_paren = getline(a:lnum) =~# '^\s*[])}]' + + let hang_closing = get(b:, 'python_pep8_indent_hang_closing', + \ get(g:, 'python_pep8_indent_hang_closing', 0)) + + if nothing_after_opening_paren + if starts_with_closing_paren && !hang_closing + let res = base + else + let res = base + s:sw() + + " Special case for parenthesis. + if text[paren_col-1] ==# '(' && getline(a:lnum) !~# '\v\)\s*:?\s*$' + return res + endif + endif + else + " Indent to match position of opening paren. + let res = paren_col + endif + + " If this line is the continuation of a control statement + " indent further to distinguish the continuation line + " from the next logical line. + if text =~# b:control_statement && res == base + s:sw() + " But only if not inside parens itself (Flake's E127). + let [paren_lnum, _] = s:find_opening_paren(paren_lnum, 1) + if paren_lnum <= 0 + return res + s:sw() + endif + endif + return res +endfunction + +" Match indent of first block of this type. +function! s:indent_like_block(lnum) + let text = getline(a:lnum) + for [multiple, block_rules] in [ + \ [0, s:block_rules], + \ [1, s:block_rules_multiple], + \ ] + for [line_re, blocks_ignore] in items(block_rules) + if text !~# line_re + continue + endif + + let [blocks, skip] = blocks_ignore + let indents = s:find_start_of_block(a:lnum, blocks, skip, multiple) + if empty(indents) + return -1 + endif + if len(indents) == 1 + return indents[0] + endif + + " Multiple valid indents, e.g. for 'else' with both try and if. + let indent = indent(a:lnum) + if index(indents, indent) != -1 + " The indent is valid, keep it. + return indent + endif + " Fallback to the first/nearest one. + return indents[0] + endfor + endfor + return -2 +endfunction + +function! s:indent_like_previous_line(lnum) + let lnum = prevnonblank(a:lnum - 1) + + " No previous line, keep current indent. + if lnum < 1 + return -1 + endif + + let text = getline(lnum) + let start = s:find_start_of_multiline_statement(lnum) + let base = indent(start) + let current = indent(a:lnum) + + " Ignore last character in previous line? + let lastcol = len(text) + let col = lastcol + + " Search for final colon that is not inside something to be ignored. + while 1 + if col == 1 | break | endif + if text[col-1] =~# '\s' || s:_skip_special_chars(lnum, col) + let col = col - 1 + continue + elseif text[col-1] ==# ':' + return base + s:sw() + endif + break + endwhile + + if text =~# '\\$' && !s:_skip_special_chars(lnum, lastcol) + " If this line is the continuation of a control statement + " indent further to distinguish the continuation line + " from the next logical line. + if getline(start) =~# b:control_statement + return base + s:sw() * 2 + endif + + " Nest (other) explicit continuations only one level deeper. + return base + s:sw() + endif + + let empty = getline(a:lnum) =~# '^\s*$' + + " Current and prev line are empty, next is not -> indent like next. + if empty && a:lnum > 1 && + \ (getline(a:lnum - 1) =~# '^\s*$') && + \ !(getline(a:lnum + 1) =~# '^\s*$') + return indent(a:lnum + 1) + endif + + " If the previous statement was a stop-execution statement or a pass + if getline(start) =~# s:stop_statement + " Remove one level of indentation if the user hasn't already dedented + if empty || current > base - s:sw() + return base - s:sw() + endif + " Otherwise, trust the user + return -1 + endif + + if (current || !empty) && s:is_dedented_already(current, base) + return -1 + endif + + " In all other cases, line up with the start of the previous statement. + return base +endfunction + +" If this line is dedented and the number of indent spaces is valid +" (multiple of the indentation size), trust the user. +function! s:is_dedented_already(current, base) + let dedent_size = a:current - a:base + return (dedent_size < 0 && a:current % s:sw() == 0) ? 1 : 0 +endfunction + +" Is the syntax at lnum (and optionally cnum) a python string? +function! s:is_python_string(lnum, ...) + let line = getline(a:lnum) + if a:0 + let cols = type(a:1) != type([]) ? [a:1] : a:1 + else + let cols = range(1, max([1, len(line)])) + endif + for cnum in cols + if match(map(synstack(a:lnum, cnum), + \ "synIDattr(v:val, 'name')"), 'python\S*String') == -1 + return 0 + end + endfor + return 1 +endfunction + +function! GetPythonPEPIndent(lnum) + " First line has indent 0 + if a:lnum == 1 + return 0 + endif + + let line = getline(a:lnum) + let prevline = getline(a:lnum-1) + + " Multilinestrings: continous, docstring or starting. + if s:is_python_string(a:lnum-1, max([1, len(prevline)])) + \ && (s:is_python_string(a:lnum, 1) + \ || match(line, '^\%("""\|''''''\)') != -1) + + " Indent closing quotes as the line with the opening ones. + let match_quotes = match(line, '^\s*\zs\%("""\|''''''\)') + if match_quotes != -1 + " closing multiline string + let quotes = line[match_quotes:(match_quotes+2)] + call cursor(a:lnum, 1) + let pairpos = searchpairpos(quotes, '', quotes, 'bW', '', 0, g:python_pep8_indent_searchpair_timeout) + if pairpos[0] != 0 + return indent(pairpos[0]) + else + return -1 + endif + endif + + if s:is_python_string(a:lnum-1) + " Previous line is (completely) a string: keep current indent. + return -1 + endif + + if match(prevline, '^\s*\%("""\|''''''\)') != -1 + " docstring. + return indent(a:lnum-1) + endif + + let indent_multi = get(b:, 'python_pep8_indent_multiline_string', + \ get(g:, 'python_pep8_indent_multiline_string', 0)) + if match(prevline, '\v%("""|'''''')$') != -1 + " Opening multiline string, started in previous line. + if (&autoindent && indent(a:lnum) == indent(a:lnum-1)) + \ || match(line, '\v^\s+$') != -1 + " with empty line or to split up 'foo("""bar' into + " 'foo("""' and 'bar'. + if indent_multi == -2 + return indent(a:lnum-1) + s:sw() + endif + return indent_multi + endif + endif + + " Keep existing indent. + if match(line, '\v^\s*\S') != -1 + return -1 + endif + + if indent_multi != -2 + return indent_multi + endif + + return s:indent_like_opening_paren(a:lnum) + endif + + " Parens: If we can find an open parenthesis/bracket/brace, line up with it. + let indent = s:indent_like_opening_paren(a:lnum) + if indent >= -1 + return indent + endif + + " Blocks: Match indent of first block of this type. + let indent = s:indent_like_block(a:lnum) + if indent >= -1 + return indent + endif + + return s:indent_like_previous_line(a:lnum) +endfunction diff --git a/.vim/bundle/vim-python-pep8-indent/spec/indent/bytes_spec.rb b/.vim/bundle/vim-python-pep8-indent/spec/indent/bytes_spec.rb new file mode 100644 index 00000000..3d6744e8 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/spec/indent/bytes_spec.rb @@ -0,0 +1,36 @@ +require "spec_helper" + +describe "handles byte strings" do + before(:all) { + vim.command 'syn region pythonBytes start=+[bB]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell' + vim.command "syn match pythonBytesEscape '\\\\$'" + } + + before(:each) { + # clear buffer + vim.normal 'gg"_dG' + + # Insert two blank lines. + # The first line is a corner case in this plugin that would shadow the + # correct behaviour of other tests. Thus we explicitly jump to the first + # line when we require so. + vim.feedkeys 'i\\\' + } + + it "it does not indent to bracket in byte string" do + vim.feedkeys 'ireg = b"["\' + vim.echo('map(synstack(line("."), col(".")), "synIDattr(v:val, \"name\")")' + ).should == "['pythonBytes']" + vim.feedkeys 'o' + indent.should == 0 + end + + it "it indents backslash continuation correctly" do + vim.feedkeys 'iwith foo, \\' + vim.echo('getline(".")').should == "with foo, \\" + vim.echo('map(synstack(line("."), col(".")), "synIDattr(v:val, \"name\")")' + ).should == "['pythonBytesEscape']" + vim.feedkeys 'o' + indent.should == 8 + end +end diff --git a/.vim/bundle/vim-python-pep8-indent/spec/indent/cython_spec.rb b/.vim/bundle/vim-python-pep8-indent/spec/indent/cython_spec.rb new file mode 100644 index 00000000..03dcbb2a --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/spec/indent/cython_spec.rb @@ -0,0 +1,36 @@ +require "spec_helper" + +describe "vim for cython" do + before(:all) { + vim.command "new" + vim.command "set ft=cython" + vim.command("set indentexpr?").should include "GetPythonPEPIndent(" + } + before(:each) { + # clear buffer + vim.normal 'gg"_dG' + + # Insert two blank lines. + # The first line is a corner case in this plugin that would shadow the + # correct behaviour of other tests. Thus we explicitly jump to the first + # line when we require so. + vim.feedkeys 'i\\\' + } + after(:all) { + vim.command "bwipe!" + } + + describe "when using a cdef function definition" do + it "indents shiftwidth spaces" do + vim.feedkeys 'icdef long_function_name(\arg' + indent.should == shiftwidth + end + end + + describe "when using a cpdef function definition" do + it "indents shiftwidth spaces" do + vim.feedkeys 'icpdef long_function_name(\arg' + indent.should == shiftwidth + end + end +end diff --git a/.vim/bundle/vim-python-pep8-indent/spec/indent/indent_spec.rb b/.vim/bundle/vim-python-pep8-indent/spec/indent/indent_spec.rb new file mode 100644 index 00000000..745e939d --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/spec/indent/indent_spec.rb @@ -0,0 +1,796 @@ +require "spec_helper" + +shared_examples_for "vim" do + before(:each) { + # clear buffer + vim.normal 'gg"_dG' + + # Insert two blank lines. + # The first line is a corner case in this plugin that would shadow the + # correct behaviour of other tests. Thus we explicitly jump to the first + # line when we require so. + vim.feedkeys 'i\\\' + } + + describe "when using the indent plugin" do + it "sets the indentexpr and indentkeys options" do + vim.command("set indentexpr?").should include "GetPythonPEPIndent(" + vim.command("set indentkeys?").should include "=elif" + end + + it "sets autoindent and expandtab" do + vim.command("set autoindent?").should match(/\s*autoindent/) + vim.command("set expandtab?").should match(/\s*expandtab/) + end + end + + describe "when entering the first line" do + before { vim.feedkeys '0ggipass' } + + it "does not indent" do + indent.should == 0 + proposed_indent.should == 0 + end + + it "does not indent when using '=='" do + vim.normal "==" + indent.should == 0 + end + end + + describe "when after a '(' that is at the end of its line" do + before { vim.feedkeys 'itest(\' } + + it "indents by one level" do + proposed_indent.should == shiftwidth + vim.feedkeys 'something' + indent.should == shiftwidth + vim.normal '==' + indent.should == shiftwidth + end + + it "puts the closing parenthesis at the same level" do + vim.feedkeys ')' + indent.should == (hang_closing ? shiftwidth : 0) + end + end + + describe "when after an '(' that is followed by something" do + before { vim.feedkeys 'itest(something,\' } + + it "lines up on following lines" do + indent.should == 5 + vim.feedkeys 'more,\' + indent.should == 5 + end + + it "lines up the closing parenthesis" do + vim.feedkeys ')' + indent.should == 5 + end + + it "does not touch the closing parenthesis if it is already indented further" do + vim.feedkeys ' )' + indent.should == 7 + end + end + + describe "when after an '{' that is followed by a comment" do + before { vim.feedkeys 'imydict = { # comment\' } + + it "indent by one level" do + indent.should == shiftwidth + vim.feedkeys '1: 1,\' + indent.should == shiftwidth + end + + it "lines up the closing parenthesis" do + vim.feedkeys '}' + indent.should == (hang_closing ? shiftwidth : 0) + end + end + + describe "when using gq to reindent a '(' that is" do + before { vim.feedkeys 'itest(' } + it "something and has a string without spaces at the end" do + vim.feedkeys 'something_very_long_blaaaaaaaaa, "some_very_long_string_blaaaaaaaaaaaaaaaaaaaa"\gqq' + indent.should == 5 + end + end + + describe "when after multiple parens of different types" do + it "indents by one level" do + vim.feedkeys 'if({\' + indent.should == shiftwidth + end + + it "lines up with the last paren" do + vim.feedkeys 'ifff({123: 456,\' + indent.should == 5 + end + end + + describe "when '#' is contained in a string that is followed by a colon" do + it "indents by one level" do + vim.feedkeys 'iif "some#thing" == "test":#test\pass' + indent.should == shiftwidth + end + end + + describe "when '#' is not contained in a string and is followed by a colon" do + it "does not indent" do + vim.feedkeys 'iif "some#thing" == "test"#:test\' + indent.should == 0 + end + end + + describe "when inside an unfinished string" do + it "does not indent" do + vim.feedkeys 'i"test:\' + vim.echo('synIDattr(synID(line("."), col("."), 0), "name")' + ).downcase.should include 'string' + vim.feedkeys 'a\' + proposed_indent.should == -1 + indent.should == 0 + end + + it "does not dedent" do + vim.feedkeys 'iif True:\"test:\' + vim.echo('synIDattr(synID(line("."), col("."), 0), "name")' + ).downcase.should include 'string' + proposed_indent.should == shiftwidth + indent.should == shiftwidth + end + end + + describe "when the previous line has a colon in a string" do + before { vim.feedkeys 'itest(":".join(["1","2"]))\' } + it "does not indent" do + vim.feedkeys 'if True:' + indent.should == 0 + proposed_indent.should == 0 + end + end + + describe "when the previous line has a list slice" do + it "does not indent" do + vim.feedkeys 'ib = a[2:]\' + indent.should == 0 + proposed_indent.should == 0 + end + end + + describe "when line is empty inside a block" do + it "is indented like the previous line" do + vim.feedkeys 'idef a():\1\\2\kcc' + indent.should == shiftwidth + end + end + + describe "when an empty line is after empty line / before non-empty" do + it "is indented like the next line" do + vim.feedkeys 'idef a():\1\\\2\<1\\\\0i\2\kcc' + indent.should == shiftwidth + end + end + + describe "when line is empty inside a block following multi-line statement" do + it "is indented like the previous line" do + vim.feedkeys 'idef a():\x = (1 +\2)\\y\kcc' + indent.should == shiftwidth + end + end + + describe "when line is empty inside a block following stop statement" do + it "is indented like the previous line minus shiftwidth" do + vim.feedkeys 'iif x:\if y:\pass\\z\kcc' + indent.should == shiftwidth + end + end + + describe "when using simple control structures" do + it "indents shiftwidth spaces" do + vim.feedkeys 'iwhile True:\pass' + indent.should == shiftwidth + end + end + + describe "when using a function definition" do + it "handles indent with closing parenthesis on same line" do + vim.feedkeys 'idef long_function_name(\arg' + indent.should == shiftwidth + vim.feedkeys '):' + indent.should == shiftwidth * 2 + end + + it "handles indent with closing parenthesis on new line" do + vim.feedkeys 'idef long_function_name(\arg' + indent.should == shiftwidth + vim.feedkeys '\' + indent.should == shiftwidth + vim.feedkeys ')' + indent.should == (hang_closing ? shiftwidth * 2 : 0) + vim.feedkeys ':' + indent.should == (hang_closing ? shiftwidth * 2 : 0) + vim.feedkeys '\k' + indent.should == shiftwidth + end + end + + describe "when using a class definition" do + it "indents shiftwidth spaces" do + vim.feedkeys 'iclass Foo(\' + indent.should == shiftwidth + end + end + + describe "when writing an 'else' block" do + it "aligns to the preceeding 'for' block" do + vim.feedkeys 'ifor x in "abc":\pass\else:' + indent.should == 0 + end + + it "aligns to the preceeding 'if' block" do + vim.feedkeys 'ifor x in "abc":\if True:\pass\else:' + indent.should == shiftwidth + end + end + + describe "when using parens and control statements" do + it "avoids ambiguity by using extra indentation" do + vim.feedkeys 'iif (111 and\' + if shiftwidth == 4 + indent.should == shiftwidth * 2 + else + indent.should == 4 + end + vim.feedkeys '222):\' + indent.should == shiftwidth + vim.feedkeys 'pass\' + indent.should == 0 + end + + it "still aligns parens properly if not ambiguous" do + vim.feedkeys 'iwhile (111 and\' + indent.should == 7 + vim.feedkeys '222):\' + indent.should == shiftwidth + vim.feedkeys 'pass\' + indent.should == 0 + end + + it "handles nested expressions (Flake8's E127)" do + vim.feedkeys 'i[\x for x in foo\if (\' + indent.should == shiftwidth * 2 + end + + it "still handles multiple parens correctly" do + vim.feedkeys 'iif (111 and (222 and 333\' + indent.should == 13 + vim.feedkeys 'and 444\' + indent.should == 13 + vim.feedkeys ')\' + if shiftwidth == 4 + indent.should == shiftwidth * 2 + else + indent.should == 4 + end + vim.feedkeys 'and 555):\' + indent.should == shiftwidth + vim.feedkeys 'pass\' + indent.should == 0 + end + end + + describe "when a line breaks with a manual '\\'" do + it "indents shiftwidth spaces on normal line" do + vim.feedkeys 'ivalue = test + \\\\\' + indent.should == shiftwidth + end + + it "indents 2x shiftwidth spaces for control structures" do + vim.feedkeys 'iif somevalue == xyz and \\\\\' + indent.should == shiftwidth * 2 + end + + it "indents relative to line above" do + vim.feedkeys 'i\value = test + \\\\\' + indent.should == shiftwidth * 2 + end + end + + describe "when current line is dedented compared to previous line" do + before { vim.feedkeys 'i\\if x:\y = True\\' } + it "and current line has a valid indentation (Part 1)" do + vim.feedkeys '0i\if y:' + proposed_indent.should == -1 + end + + it "and current line has a valid indentation (Part 2)" do + vim.feedkeys '0i\\if y:' + proposed_indent.should == -1 + end + + it "and current line has an invalid indentation" do + vim.feedkeys 'i while True:\' + indent.should == previous_indent + shiftwidth + end + end + + describe "when current line is dedented compared to the last non-empty line" do + before { vim.feedkeys 'i\\if x:\y = True\\\' } + it "and current line has a valid indentation" do + vim.feedkeys '0i\if y:' + proposed_indent.should == -1 + end + end + + describe "when an 'if' is followed by" do + before { vim.feedkeys 'i\\if x:\' } + it "an elif, it lines up with the 'if'" do + vim.feedkeys 'elif y:' + indent.should == shiftwidth * 2 + end + + it "an 'else', it lines up with the 'if'" do + vim.feedkeys 'else:' + indent.should == shiftwidth * 2 + end + end + + describe "when an 'if' contains a try-except" do + before { + vim.feedkeys 'iif x:\try:\pass\except:\pass\' + indent.should == shiftwidth + } + it "an 'else' should be indented to the try" do + vim.feedkeys 'else:' + indent.should == shiftwidth + proposed_indent.should == shiftwidth + end + it "an 'else' should keep the indent of the 'if'" do + vim.feedkeys 'else:\<<' + indent.should == 0 + proposed_indent.should == 0 + end + end + + describe "when a 'for' is followed by" do + before { vim.feedkeys 'i\\for x in y:\' } + it "an 'else', it lines up with the 'for'" do + vim.feedkeys 'else:' + indent.should == shiftwidth * 2 + end + end + + describe "when an 'else' is followed by" do + before { vim.feedkeys 'i\\else:\XXX\' } + it "a 'finally', it lines up with the 'else'" do + vim.feedkeys 'finally:' + indent.should == shiftwidth * 2 + end + end + + + describe "when a 'try' is followed by" do + before { vim.feedkeys 'i\\try:\' } + it "an 'except', it lines up with the 'try'" do + vim.feedkeys 'except:' + indent.should == shiftwidth * 2 + end + + it "an 'else', it lines up with the 'try'" do + vim.feedkeys 'else:' + indent.should == shiftwidth * 2 + end + + it "a 'finally', it lines up with the 'try'" do + vim.feedkeys 'finally:' + indent.should == shiftwidth * 2 + end + end + + describe "when an 'except' is followed by" do + before { vim.feedkeys 'i\\except:\' } + it "an 'else', it lines up with the 'except'" do + vim.feedkeys 'else:' + indent.should == shiftwidth * 2 + end + + it "another 'except', it lines up with the previous 'except'" do + vim.feedkeys 'except:' + indent.should == shiftwidth * 2 + end + + it "a 'finally', it lines up with the 'except'" do + vim.feedkeys 'finally:' + indent.should == shiftwidth * 2 + end + end + + describe "when an else is used inside of a nested if" do + before { vim.feedkeys 'iif foo:\if bar:\pass\' } + it "indents the else to the inner if" do + vim.feedkeys 'else:' + indent.should == shiftwidth + end + end + + describe "when an else is used outside of a nested if" do + before { vim.feedkeys 'iif True:\if True:\pass\\0' } + it "indents the else to the outer if" do + indent.should == 0 + proposed_indent.should == shiftwidth + + vim.feedkeys 'ielse:' + indent.should == 0 + proposed_indent.should == 0 + end + end + + describe "when jedi-vim call signatures are used" do + before { vim.command 'syn match jediFunction "JEDI_CALL_SIGNATURE" keepend extend' } + + it "ignores the call signature after a colon" do + vim.feedkeys 'iif True: JEDI_CALL_SIGNATURE\' + indent.should == shiftwidth + end + + it "ignores the call signature after a function" do + vim.feedkeys 'idef f( JEDI_CALL_SIGNATURE\' + indent.should == shiftwidth + end + end +end + +shared_examples_for "multiline strings" do + before(:each) { + # clear buffer + vim.normal 'gg"_dG' + + # Insert two blank lines. + # The first line is a corner case in this plugin that would shadow the + # correct behaviour of other tests. Thus we explicitly jump to the first + # line when we require so. + vim.feedkeys 'i\\\' + } + + describe "when after an '(' that is followed by an unfinished string" do + before { vim.feedkeys 'itest("""' } + + it "it indents the next line" do + vim.feedkeys '\' + expected_proposed, expected_indent = multiline_indent(0, shiftwidth) + proposed_indent.should == expected_proposed + indent.should == expected_indent + end + + it "with contents it indents the second line to the parenthesis" do + vim.feedkeys 'second line\' + expected_proposed, expected_indent = multiline_indent(0, 5) + proposed_indent.should == expected_proposed + indent.should == expected_indent + end + end + + describe "when after assigning an unfinished string" do + before { vim.feedkeys 'itest = """' } + + it "it indents the next line" do + vim.feedkeys '\' + expected_proposed, expected_indent = multiline_indent(0, shiftwidth) + proposed_indent.should == expected_proposed + indent.should == expected_indent + end + end + + describe "when after assigning an indented unfinished string" do + before { vim.feedkeys 'i test = """' } + + it "it indents the next line" do + vim.feedkeys '\' + expected_proposed, expected_indent = multiline_indent(4, shiftwidth + 4) + proposed_indent.should == expected_proposed + indent.should == expected_indent + end + end + + describe "when after assigning an indented finished string" do + before { vim.feedkeys 'i test = ""' } + + it "it does indent the next line" do + vim.feedkeys '\' + indent.should == 4 + end + + it "and writing a new string, it does indent the next line" do + vim.feedkeys '\""' + indent.should == 4 + end + end + + describe "when after a docstring" do + it "it does indent the next line to the docstring" do + vim.feedkeys 'i """\' + indent.should == 4 + proposed_indent.should == 4 + end + + it "indents the closing docstring quotes" do + vim.feedkeys 'i """\\"""' + indent.should == 4 + proposed_indent.should == 4 + vim.echo('getline(3)').should == ' """' + end + + it "indents non-matching docstring quotes" do + vim.feedkeys 'i """\\' + vim.feedkeys "0C'''" + vim.echo('line(".")').should == "4" + vim.echo('getline(".")').should == "'''" + indent.should == 0 + proposed_indent.should == -1 + end + end + + describe "when after a docstring with contents" do + before { vim.feedkeys 'i """First line' } + it "it does indent the next line to the docstring" do + vim.feedkeys '\' + indent.should == 4 + proposed_indent.should == 4 + end + end + + describe "when breaking a string after opening parenthesis" do + before { vim.feedkeys 'i foo("""bar\\\' } + it "it does indent the next line as after an opening multistring" do + vim.feedkeys '\' + _, expected_indent = multiline_indent(4, 4 + shiftwidth) + indent.should == expected_indent + proposed_indent.should == -1 + + # it keeps the indent after an empty line + vim.feedkeys '\' + proposed_indent, expected_indent = multiline_indent(4, 4 + shiftwidth) + indent.should == expected_indent + proposed_indent.should == proposed_indent + + # it keeps the indent of nonblank above + vim.feedkeys '\\' + proposed_indent, expected_indent = multiline_indent(4, 4 + shiftwidth) + indent.should == expected_indent + proposed_indent.should == proposed_indent + + # it keeps the indent of nonblank above before an empty line + vim.feedkeys '\' + proposed_indent, expected_indent = multiline_indent(4, 4 + shiftwidth) + indent.should == expected_indent + proposed_indent.should == proposed_indent + end + end +end + +SUITE_SHIFTWIDTHS = [4, 3] +SUITE_HANG_CLOSINGS = [false, true] + +SUITE_SHIFTWIDTHS.each do |sw| + describe "vim when using width of #{sw}" do + before { + vim.command("set sw=#{sw} ts=#{sw} sts=#{sw} et") + } + it "sets shiftwidth to #{sw}" do + shiftwidth.should == sw + end + + SUITE_HANG_CLOSINGS.each do |hc| + describe "vim when hang_closing is set to #{hc}" do + before { + set_hang_closing hc + } + it "sets hang_closing to #{hc}" do + hang_closing.should == !!hc + end + + it_behaves_like "vim" + end + end + end +end + +describe "vim when not using python_pep8_indent_multiline_string" do + before { + vim.command("set sw=4 ts=4 sts=4 et") + vim.command("unlet! g:python_pep8_indent_multiline_string") + } + it_behaves_like "multiline strings" +end + +describe "vim when using python_pep8_indent_multiline_first=0" do + before { + vim.command("set sw=4 ts=4 sts=4 et") + vim.command("let g:python_pep8_indent_multiline_string=0") + } + it_behaves_like "multiline strings" +end + +describe "vim when using python_pep8_indent_multiline_string=-1" do + before { + vim.command("set sw=4 ts=4 sts=4 et") + vim.command("let g:python_pep8_indent_multiline_string=-1") + } + it_behaves_like "multiline strings" +end + +describe "vim when using python_pep8_indent_multiline_string=-2" do + before { + vim.command("set sw=4 ts=4 sts=4 et") + vim.command("let g:python_pep8_indent_multiline_string=-2") + } + it_behaves_like "multiline strings" +end + +describe "Handles far away opening parens" do + before { vim.feedkeys '\ggdGifrom foo import (' } + + it "indents by one level" do + vim.feedkeys '\' + proposed_indent.should == shiftwidth + end + + it "indents by one level for 10 lines" do + vim.command('set paste | exe "norm 9o" | set nopaste') + vim.feedkeys '\o' + indent.should == shiftwidth + end + + it "indents by one level for 50 lines" do + vim.command('set paste | exe "norm 49o" | set nopaste') + vim.feedkeys '\o' + indent.should == shiftwidth + end +end + +describe "Handles far away opening square brackets" do + before { vim.feedkeys '\ggdGibar = [' } + + it "indents by one level" do + vim.feedkeys '\' + proposed_indent.should == shiftwidth + end + + it "indents by one level for 10 lines" do + vim.command('set paste | exe "norm 9o" | set nopaste') + vim.feedkeys '\o' + indent.should == shiftwidth + end + + it "indents by one level for 100 lines" do + vim.command('set paste | exe "norm 99o" | set nopaste') + vim.feedkeys '\o' + indent.should == shiftwidth + end +end + +describe "Handles far away opening curly brackets" do + before { vim.feedkeys '\ggdGijson = {' } + + it "indents by one level" do + vim.feedkeys '\' + vim.feedkeys '\o' + proposed_indent.should == shiftwidth + end + + it "indents by one level for 10 lines" do + vim.command('set paste | exe "norm 9o" | set nopaste') + vim.feedkeys '\o' + indent.should == shiftwidth + end + + it "indents by one level for 1000 lines" do + vim.command('set paste | exe "norm 999o" | set nopaste') + vim.feedkeys '\o' + indent.should == shiftwidth + end +end + +describe "Compact multiline dict" do + before { vim.feedkeys '\ggdGid = {"one": 1,' } + + it "gets indented correctly" do + vim.feedkeys '\' + proposed_indent.should == 5 + + vim.feedkeys '"two": 2}' + proposed_indent.should == 5 + + vim.feedkeys '\' + proposed_indent.should == 0 + end +end + +describe "Using O" do + before { + vim.feedkeys '\ggdG' + vim.feedkeys 'iif foo:\' + } + + it "respects autoindent" do + vim.feedkeys '1\\' + indent.should == shiftwidth + vim.feedkeys '\ko' + indent.should == shiftwidth + vim.feedkeys '\kO' + indent.should == shiftwidth + # Uses/keeps indent from line above + vim.feedkeys '\i2\O' + indent.should == shiftwidth + # Uses/keeps indent from line above + vim.feedkeys '\j\O' + indent.should == 0 + end +end + +describe "searchpairpos" do + before { vim.feedkeys '\ggdG' } + it "handles nested parenthesis" do + vim.feedkeys 'iif foo.startswith("("):\' + indent.should == shiftwidth + end +end + +describe "o within TODO" do + before { + vim.feedkeys '\ggdG' + vim.feedkeys 'iif 1: # TODO\' + # Assertion that we have a pythonTodo here. + vim.echo('synIDattr(synID(line("."), col("."), 0), "name")').should match 'pythonTodo' + } + + it "respects autoindent" do + vim.feedkeys 'o' + indent.should == shiftwidth + end +end + +describe "elif after else" do + before { + vim.feedkeys '\ggdG' + } + + it "is indented to the outer if" do + vim.feedkeys 'iif 1:\if 2:\pass\else:\pass\elif 3:\' + indent.should == 0 + + vim.feedkeys '\ggdG' + vim.feedkeys 'i if 1:\if 2:\pass\else:\pass\elif 3:\' + indent.should == 4 + end +end + +describe "elif after two ifs" do + before { + vim.feedkeys '\ggdG' + } + + it "keeps its indent to the outer if" do + vim.feedkeys 'iif 1:\if 2:\pass\elif 3:\pass\' + indent.should == 4 + vim.feedkeys '\' + indent.should == 0 + proposed_indent.should == shiftwidth + vim.feedkeys 'ielif 4:' + indent.should == 0 + proposed_indent.should == 0 + vim.feedkeys '\' + indent.should == 4 + proposed_indent.should == 4 + end +end diff --git a/.vim/bundle/vim-python-pep8-indent/spec/make-coverage b/.vim/bundle/vim-python-pep8-indent/spec/make-coverage new file mode 100755 index 00000000..f425496a --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/spec/make-coverage @@ -0,0 +1,24 @@ +#!/bin/sh + +set -ex + +rm -f .coverage_covimerage +export PYTHON_PEP8_INDENT_TEST_PROFILE_BASE=/tmp/vim-python-pep8-profile + +Xvfb :99 2>/dev/null >&2 & +export DISPLAY=:99 + +export VIMRUNNER_REUSE_SERVER=1 + +ret=0 +for file in ./spec/indent/*_spec.rb; do + # shellcheck disable=SC2086 + bundle exec rspec "$file" $RSPEC_OPTIONS || ret=1 + + for p in "${PYTHON_PEP8_INDENT_TEST_PROFILE_BASE}".*; do + covimerage write_coverage --append "$p" + rm "$p" + covimerage report -m + done +done +exit $ret diff --git a/.vim/bundle/vim-python-pep8-indent/spec/spec_helper.rb b/.vim/bundle/vim-python-pep8-indent/spec/spec_helper.rb new file mode 100644 index 00000000..c6cc5174 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/spec/spec_helper.rb @@ -0,0 +1,70 @@ +require 'vimrunner' +require 'vimrunner/rspec' +require 'vimrunner/server' + +# Explicitly enable usage of "should". +RSpec.configure do |config| + config.expect_with(:rspec) { |c| c.syntax = :should } +end + +Vimrunner::RSpec.configure do |config| + # Use a single Vim instance for the test suite. Set to false to use an + # instance per test (slower, but can be easier to manage). + # This requires using gvim, otherwise it hangs after a few tests. + config.reuse_server = ENV['VIMRUNNER_REUSE_SERVER'] == '1' ? true : false + + config.start_vim do + exe = config.reuse_server ? Vimrunner::Platform.gvim : Vimrunner::Platform.vim + vimrc = File.expand_path("../vimrc", __FILE__) + vim = Vimrunner::Server.new(:executable => exe, + :vimrc => vimrc).start + # More friendly killing. + # Otherwise profiling information might not be written. + def vim.kill + normal(':qall!') + + Timeout.timeout(5) do + sleep 0.1 while server.running? + end + end + + plugin_path = File.expand_path('../..', __FILE__) + vim.command "set rtp^=#{plugin_path}" + vim.command "set filetype=python" + + def shiftwidth + @shiftwidth ||= vim.echo("exists('*shiftwidth') ? shiftwidth() : &sw").to_i + end + def tabstop + @tabstop ||= vim.echo("&tabstop").to_i + end + def indent + vim.echo("indent('.')").to_i + end + def previous_indent + pline = vim.echo("line('.')").to_i - 1 + vim.echo("indent('#{pline}')").to_i + end + def proposed_indent + line = vim.echo("line('.')") + col = vim.echo("col('.')") + indent_value = vim.echo("GetPythonPEPIndent(#{line})").to_i + vim.command("call cursor(#{line}, #{col})") + return indent_value + end + def multiline_indent(prev, default) + i = vim.echo("get(g:, 'python_pep8_indent_multiline_string', 0)").to_i + return (i == -2 ? default : i), i < 0 ? (i == -1 ? prev : default) : i + end + def hang_closing + i = vim.echo("get(g:, 'python_pep8_indent_hang_closing', 0)").to_i + return (i != 0) + end + def set_hang_closing(value) + i = value ? 1 : 0 + vim.command("let g:python_pep8_indent_hang_closing=#{i}") + end + + vim + end +end diff --git a/.vim/bundle/vim-python-pep8-indent/spec/vimrc b/.vim/bundle/vim-python-pep8-indent/spec/vimrc new file mode 100644 index 00000000..e549f80e --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/spec/vimrc @@ -0,0 +1,22 @@ +" vint: -ProhibitSetNoCompatible +set nocompatible + +filetype plugin on +filetype indent on +syntax on + +set noswapfile nobackup + +" remove default ~/.vim directories to avoid loading plugins +set runtimepath-=~/.vim +set runtimepath-=~/.vim/after + +let sfile = expand('') +let plugin_path = fnamemodify(sfile, ':p:h:h') +exe 'set runtimepath^='.plugin_path + +if !empty($PYTHON_PEP8_INDENT_TEST_PROFILE_BASE) + execute printf('profile start %s.%s', + \ $PYTHON_PEP8_INDENT_TEST_PROFILE_BASE, getpid()) + execute 'profile! file '. plugin_path . '/indent/python.vim' +endif diff --git a/.vim/doc/.gitignore b/.vim/doc/.gitignore new file mode 100644 index 00000000..6e92f57d --- /dev/null +++ b/.vim/doc/.gitignore @@ -0,0 +1 @@ +tags diff --git a/.vim/ftplugin/automake.vim b/.vim/ftplugin/automake.vim new file mode 100644 index 00000000..bbd8967d --- /dev/null +++ b/.vim/ftplugin/automake.vim @@ -0,0 +1 @@ +setlocal noexpandtab diff --git a/.vim/ftplugin/debchangelog.vim b/.vim/ftplugin/debchangelog.vim new file mode 100644 index 00000000..d3524959 --- /dev/null +++ b/.vim/ftplugin/debchangelog.vim @@ -0,0 +1,3 @@ +setlocal foldclose= +setlocal nofoldenable +setlocal comments+=f:- diff --git a/.vim/ftplugin/diff.vim b/.vim/ftplugin/diff.vim new file mode 100644 index 00000000..bbd8967d --- /dev/null +++ b/.vim/ftplugin/diff.vim @@ -0,0 +1 @@ +setlocal noexpandtab diff --git a/.vim/ftplugin/git.vim b/.vim/ftplugin/git.vim new file mode 100644 index 00000000..446f25e2 --- /dev/null +++ b/.vim/ftplugin/git.vim @@ -0,0 +1 @@ +setlocal textwidth=72 diff --git a/.vim/ftplugin/gitcommit.vim b/.vim/ftplugin/gitcommit.vim new file mode 100644 index 00000000..23051d41 --- /dev/null +++ b/.vim/ftplugin/gitcommit.vim @@ -0,0 +1 @@ +setlocal tw=68 diff --git a/.vim/ftplugin/gitconfig.vim b/.vim/ftplugin/gitconfig.vim new file mode 100644 index 00000000..976959bc --- /dev/null +++ b/.vim/ftplugin/gitconfig.vim @@ -0,0 +1,3 @@ +" git uses tabs by default +setlocal noet +setlocal sw=8 diff --git a/.vim/ftplugin/mail.vim b/.vim/ftplugin/mail.vim new file mode 100644 index 00000000..cdecab22 --- /dev/null +++ b/.vim/ftplugin/mail.vim @@ -0,0 +1,222 @@ +<<<<<<< HEAD +setlocal textwidth=68 +setlocal formatoptions-=o +setlocal formatoptions-=r +setlocal formatoptions-=l +setlocal formatoptions+=a +setlocal formatoptions+=w +setlocal formatoptions+=n + +setlocal comments=n:> + +"setlocal spell + +augroup tsperrorinsert + au! +augroup END +match none /\s*$/ +augroup listinsert + au! +augroup END +setlocal list + +" Dynamically set format options, depending on where you are in a +" mail, idea from Teemu Likonen: +" http://groups.google.com/group/vim_use/msg/f59e5c1adc6be2b3 + +let s:defaults = "setlocal fo=".&fo +" tw=".&tw." ts=".&ts." sts=".&sts." sw=".&sw." fo=".&fo +execute s:defaults +let b:MailAreaDetect=1 + +nnoremap :call MailAreaDetect_Switch(0) +inoremap :call MailAreaDetect_Switch(1) + +function! s:MailAreaDetect_Switch(vmode) + if b:MailAreaDetect + silent call MailAreaDetect_Off() + let b:MailAreaDetect=0 + echo 'MailAreaDetect Off' + if a:vmode + sleep 1 + endif + else + silent call MailAreaDetect_On() + let b:MailAreaDetect=1 + echo 'MailAreaDetect On' + if a:vmode + sleep 1 + endif + endif +endfu + +function! s:MailAreaDetect_On() + silent autocmd! MailAreaDetect CursorMoved,CursorMoved + \ call AreaOptions() + let b:MailAreaDetect=1 +endfunction + +function! s:MailAreaDetect_Off() + silent autocmd! MailAreaDetect + execute s:defaults + let b:MailAreaDetect=0 +endfunction + +augroup MailAreaDetect + autocmd! + call MailAreaDetect_On() +augroup END + +function! s:AreaOptions() + execute s:defaults + + let s:synCur = synIDattr(synID(line("."),1,0),"name") + let s:synNext = synIDattr(synID(line(".")+1,1,0),"name") + + if s:synNext =~ '^mailQuote' && s:synCur == '' && getline('.') =~ '^.' + " elseif getline('.') =~ '^\s*[^>]' && getline(line('.')+1) =~ '\m^\s*>' + setlocal fo-=a + "echo 'Quotation leader (fo='.&fo.')' + elseif s:synCur =~ '^mailQuote' + " elseif getline('.') =~ '\m^\s*>' + setlocal fo-=a + "echo 'Quotation (fo='.&fo.')' + elseif CheckArea('\m^--- .*\n^+++ ','\v(^$|\n^-- $)') + setlocal fo-=a fo-=w fo-=t noet + "echo 'Patch (fo='.&fo.')' + elseif s:synCur == '' && s:synNext =~ '^mailSignature' + " elseif getline(line('.')+1) =~ '\m^-- $' + setlocal fo-=a fo-=w fo-=t + "echo 'Last line before signature (fo='.&fo.')' + elseif s:synCur =~ '^mailSignature' + " elseif CheckArea('^-- $','^$') + setlocal fo-=a fo-=w fo-=t + "echo 'Signature (fo='.&fo.')' + elseif s:synCur =~ '^mail' + " if CheckArea('\v^From( |: ).*\n','\v^$') + setlocal fo-=a fo-=w fo-=t + "echo 'Header (fo='.&fo.')' + else + "echo 'My text (fo='.&fo.')' + endif +endfunction + +function! s:CheckArea(start, end) + return (search(a:start,'bcnW')-line('.')) > + \ (search(a:end,'bnW')-line('.')) +endfunction + +function! FixQuotes() + let l:i = 0 + let l:lineNxt = getline(l:i) + let l:synNxt = synIDattr(synID(l:i,1,0),"name") + while l:i < line('$')-1 + let l:lineCur = l:lineNxt + let l:synCur = l:synNxt + let l:lineNxt = getline(l:i+1) + let l:synNxt = synIDattr(synID(l:i+1,1,0),"name") + if l:synCur =~ '^mailQuote' && l:lineCur =~ '\w.*\S$' && + \ l:synNxt =~ '^mailQuote' && l:lineNxt =~ '\w' + call setline(l:i, l:lineCur . ' ') + endif + let l:i += 1 + endwhile +endfunction + +augroup fixquotes + au! + autocmd BufWinEnter $TMPDIR/mutt-* call FixQuotes() +augroup END + +nmap :w:%!mailplate --keep-unknown official +nmap :w:%!mailplate --keep-unknown pobox +nmap :w:%!mailplate --keep-unknown tahi +nmap :w:%!mailplate --keep-unknown toni + +nmap :w:%!mailplate --keep-unknown kbkg +nmap :w:%!mailplate --keep-unknown krafftwerk +nmap :w:%!mailplate --keep-unknown siby +nmap :w:%!mailplate --keep-unknown debian + +nmap :w:%!mailplate --keep-unknown uniwh +nmap :w:%!mailplate --keep-unknown mtfk +nmap :w:%!mailplate --keep-unknown sudetia +nmap :w:%!mailplate --keep-unknown default +nmap :w:%!mailplate --auto --keep-unknown 2>/dev/null + +" change subject line +" Before: Subject: old +" After : Subject: New (was: old) +" http://strcat.de/wiki/dotfiles#vim +" map ,sw 1G/^Subject: :s/Re:/was:/Wi ($)0Whi +map ns 1G/^Subject: /:s,\(Subject: \)\(Re: \)*\(.*\)$,\1 (was: \3),:set nohlsf li + +" Delete 'was' in the Subject. +" Before: Subject: New (was: old) +" After : Subject: New +" http://strcat.de/wiki/dotfiles#vim +map dw 1G/^Subject: /:s, *(was: .*)$:set nohlsf l + +packadd lbdbq + +" http://dollyfish.net.nz/blog/2008-04-01/mutt-and-vim-custom-autocompletion +fun! LBDBCompleteFn(findstart, base) + let line = getline('.') + if a:findstart + " locate the start of the word + let start = col('.') - 1 + while start > 0 && line[start - 1] =~ '[^:,]' + let start -= 1 + endwhile + while start < col('.') && line[start] =~ '[:, ]' + let start += 1 + endwhile + return start + else + let res = [] + let query = substitute(a:base, '"', '', 'g') + let query = substitute(query, '\s*<.*>\s*', '', 'g') + for m in LbdbQuery(query) + call complete_add(printf('"%s" <%s>', escape(m[0], '"'), m[1])) + if complete_check() + break + endif + endfor + return res + endif +endfun +set completefunc=LBDBCompleteFn + +" And this magic by James Vega, which ensures that we only complete with lbdb +" on the recipient lines of the mail header. +inoremap DelegateCompletion(1) +inoremap DelegateCompletion(0) + +fun! DelegateCompletion(next) + if getline('.') =~? '^\%(To\|B\=Cc\):' + return "\x18\x15" + elseif a:next + return "\x0e" + else + return "\x10" + endif +endfun + +function! WriteMailBackup() + let l:tmpdir = fnameescape((exists('$TMPDIR') ? expand('$TMPDIR') : '/tmp')) + let l:tgtdir = l:tmpdir . '/mail-backups' + call mkdir(l:tgtdir, "p", 0o700) + let l:modified = &modified + let l:filename = l:tgtdir . '/' . strftime('%Y-%m-%d-%H%M%S') . '.msg' + exe 'silent update! ' . l:filename + if 0 && l:modified + echo 'Backup written to ' . l:filename + endif +endfunction +autocmd BufWritePre call WriteMailBackup() + +let g:markdown_in_mail = 1 +runtime! ftplugin/markdown.vim +======= +packadd! lbdbq +>>>>>>> 733463ee (move lbdbq package to mail ftplugin) diff --git a/.vim/ftplugin/make.vim b/.vim/ftplugin/make.vim new file mode 100644 index 00000000..bbd8967d --- /dev/null +++ b/.vim/ftplugin/make.vim @@ -0,0 +1 @@ +setlocal noexpandtab diff --git a/.vim/ftplugin/markdown.vim b/.vim/ftplugin/markdown.vim new file mode 100644 index 00000000..af9d67d8 --- /dev/null +++ b/.vim/ftplugin/markdown.vim @@ -0,0 +1,4 @@ +let g:vim_markdown_folding_disabled = 1 +let g:vim_markdown_strikethrough = 1 +let g:vim_markdown_follow_anchor = 1 +let g:vim_markdown_conceal = 1 diff --git a/.vim/ftplugin/nroff.vim b/.vim/ftplugin/nroff.vim new file mode 100644 index 00000000..1eb89d9f --- /dev/null +++ b/.vim/ftplugin/nroff.vim @@ -0,0 +1 @@ +setlocal tw=75 diff --git a/.vim/ftplugin/perl.vim b/.vim/ftplugin/perl.vim new file mode 100644 index 00000000..f419622d --- /dev/null +++ b/.vim/ftplugin/perl.vim @@ -0,0 +1,3 @@ +setlocal sw=8 +setlocal sts=8 +setlocal noet diff --git a/.vim/ftplugin/puppet.vim b/.vim/ftplugin/puppet.vim new file mode 100644 index 00000000..54363e78 --- /dev/null +++ b/.vim/ftplugin/puppet.vim @@ -0,0 +1,3 @@ +setlocal sw=4 +setlocal sts=4 +iunab ➬ diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim new file mode 100644 index 00000000..e8634578 --- /dev/null +++ b/.vim/ftplugin/python.vim @@ -0,0 +1,13 @@ +let python_highlight_all=1 + +let g:linelength = 88 + +setlocal sw=4 +setlocal sts=4 +let &l:textwidth=g:linelength +setlocal autoindent + +setlocal formatoptions+=bl + +imap t import ipdb; ipdb.set_trace() # noqa:E402,E702 # fmt: skip +imap m if __name__ == "__main__":import syssys.exit()i diff --git a/.vim/ftplugin/rst.vim b/.vim/ftplugin/rst.vim new file mode 100644 index 00000000..d1944432 --- /dev/null +++ b/.vim/ftplugin/rst.vim @@ -0,0 +1,4 @@ +"setlocal formatoptions+=a +setlocal formatoptions-=n +setlocal formatoptions-=o +setlocal formatoptions-=r diff --git a/.vim/ftplugin/tex.vim b/.vim/ftplugin/tex.vim new file mode 100644 index 00000000..eddf539e --- /dev/null +++ b/.vim/ftplugin/tex.vim @@ -0,0 +1,7 @@ +setlocal formatoptions-=r +setlocal formatoptions-=o +setlocal formatoptions-=n + +setlocal iskeyword+=: + +"setlocal spell diff --git a/.vim/ftplugin/vcard.vim b/.vim/ftplugin/vcard.vim new file mode 100644 index 00000000..15ffa317 --- /dev/null +++ b/.vim/ftplugin/vcard.vim @@ -0,0 +1,3 @@ +"autocmd BufWritePre *.vcf :/^REV:/s/:.*/\=strftime(":%Y%m%dT%H%M%S%z")/ge + +nmap :%s/^UID:.*/\="UID:urn:uuid:" . split(system("uuid"))[0]/:nohlsearch diff --git a/.vim/ftplugin/vo_base.vim b/.vim/ftplugin/vo_base.vim new file mode 100644 index 00000000..6f5fe3de --- /dev/null +++ b/.vim/ftplugin/vo_base.vim @@ -0,0 +1 @@ +setlocal nolist diff --git a/.vim/spell/.gitignore b/.vim/spell/.gitignore new file mode 100644 index 00000000..6d535c0c --- /dev/null +++ b/.vim/spell/.gitignore @@ -0,0 +1 @@ +*.spl diff --git a/.vim/spell/en.utf-8.add b/.vim/spell/en.utf-8.add new file mode 100644 index 00000000..d5e61a2d --- /dev/null +++ b/.vim/spell/en.utf-8.add @@ -0,0 +1,101 @@ +ADSL +Ajzen +Akkerman +alioth +alright +anonymise +anonymised +anonymising +autotools +B +bikeshed +blog +blogged +bo +Boehm +BTS +c0ffee +changelog +chroot +codings +cosmopolite +cosmopoliteness +deadbeef +debhelper +debian +Debian +Debianisation +debianised +Debian's +Delphis +determinist +devel +diff +dpkg +EFTE +Farquhar +Fishbein +FreeBSD +freenode +Genericity +hamm +heterophilous +heterophily +Heterophily +homophilous +homophily +Homophily +iff +interpretivism +IRC +Jun +learnable +lenny +Likert +lintian +localite +madduck +mdadm +namespace +occasionalist +oldstable +panelist +panelists +peercolation +Peercolation +phd +pkg +pleonastic +POSIX +RC +rebase +rebases +rebasing +rex +s +S +Schulze +screenshot +Slackware +snapshotted +Solaris +svn +tarball +tarballs +Tarde's +tesseract +trialability +Trialability +trialable +Troup +Ubuntu +upstream's +vcs +vi +Wichert +wiki +workflow +workflows +netbooks +Hurd +grep diff --git a/.vim/syntax/jinja.vim b/.vim/syntax/jinja.vim new file mode 120000 index 00000000..4a072144 --- /dev/null +++ b/.vim/syntax/jinja.vim @@ -0,0 +1 @@ +/usr/share/vim/addons/syntax/jinja.vim \ No newline at end of file diff --git a/.vimrc b/.vimrc new file mode 100644 index 00000000..379ff653 --- /dev/null +++ b/.vimrc @@ -0,0 +1,1554 @@ +" obtained from the output of :options, then postprocessed: +" d2} +" :%s/^ *[[:digit:]]\+/""" +" qa +" ma +" wi\n +" /^\([^[:space:]"].*\)\?$/ +" k +" :'a,.s/^/" / +" /^[^[:space:]"] +" O +" :%s,\n\n\n",\r\r" + +""" important + +" compatible +" behave very Vi compatible (not advisable) +" set cp nocp +set nocp + +" cpoptions +" list of flags to specify Vi compatibility +" set cpo=aABceFs + +" insertmode +" use Insert mode as the default mode +" set noim im + +" paste +" paste mode, insert typed text literally +" set nopaste paste + +" pastetoggle +" key sequence to toggle paste mode +" set pt= +set pt= + +" runtimepath +" list of directories used for runtime files and plugins +" set rtp=/home/madduck/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vimcurrent,/usr/share/vim/vimfiles/after,/home/madduck/.vim/after + +" helpfile +" name of the main help file +" set hf=/usr/share/vim/vimcurrent/doc/help.txt + +""" moving around, searching and patterns + +" whichwrap +" list of flags specifying which commands wrap to another line +" (local to window) +" set ww= +set ww=b,s,[,<,>,],~ + +" startofline +" many jump commands move the cursor to the first non-blank +" character of a line +" set sol nosol + +" paragraphs +" nroff macro names that separate paragraphs +" set para=IPLPPPQPP\ LIpplpipbp + +" sections +" nroff macro names that separate sections +" set sect=SHNHH\ HUnhsh + +" path +" list of directory names used for file searching +" (global or local to buffer) +" set pa=.,/usr/include,, + +" cdpath +" list of directory names used for :cd +" set cd=,, + +" wrapscan +" search commands wrap around the end of the buffer +" set ws nows +"set ws + +" incsearch +" show match for partly typed search command +" set nois is +set is + +" magic +" change the way backslashes are used in search patterns +" set magic nomagic + +" ignorecase +" ignore case when using a search pattern +" set noic ic +set ic + +" smartcase +" override 'ignorecase' when pattern has upper case characters +" set noscs scs +set scs + +" casemap +" What method to use for changing case of letters +" set cmp=internal,keepascii + +" maxmempattern +" maximum amount of memory in Kbyte used for pattern matching +" set mmp=1000 + +" define +" pattern for a macro definition line +" (global or local to buffer) +" set def=^\\s*#\\s*define + +" include +" pattern for an include-file line +" (local to buffer) +" set inc=^\\s*#\\s*include + +" includeexpr +" expression used to transform an include line to a file name +" (local to buffer) +" set inex= + +""" tags + +" tagbsearch +" use binary searching in tags files +" set tbs notbs + +" taglength +" number of significant characters in a tag name or zero +" set tl=0 + +" tags +" list of file names to search for tags +" (global or local to buffer) +" set tag=./tags,./TAGS,tags,TAGS + +" tagrelative +" file names in a tags file are relative to the tags file +" set notr tr + +" tagstack +" a :tag command will use the tagstack +" set tgst notgst + +" showfulltag +" when completing tags in Insert mode show more info +" set nosft sft + +" cscopeprg +" command for executing cscope +" set csprg=cscope + +" cscopetag +" use cscope for tag commands +" set nocst cst + +" cscopetagorder +" 0 or 1; the order in which ":cstag" performs a search +" set csto=0 + +" cscopeverbose +" give messages when adding a cscope database +" set nocsverb csverb + +" cscopepathcomp +" how many components of the path to show +" set cspc=0 + +" cscopequickfix +" When to open a quickfix window for cscope +" set csqf= + +""" displaying text + +" scroll +" number of lines to scroll for CTRL-U and CTRL-D +" (local to window) +" set scr=8 + +" scrolloff +" number of screen lines to show around the cursor +" set so=0 +set so=5 + +" wrap +" long lines wrap +" set wrap nowrap +set nowrap + +" linebreak +" wrap long lines at a character in 'breakat' +" (local to window) +" set nolbr lbr +" does not work with autocmd set list/nolist below + +" breakat +" which characters might cause a line break +" set brk=\ \ !@*-+;:,./? + +" showbreak +" string to put before wrapped screen lines +" set sbr= + +" sidescroll +" minimal number of columns to scroll horizontally +" set ss=0 + +" sidescrolloff +" minimal number of columns to keep left and right of the cursor +" set siso=0 +set siso=0 + +" display +" include "lastline" to show the last line even if it doesn't fit +" include "uhex" to show unprintable characters as a hex number +" set dy= +set dy=lastline,uhex + +" fillchars +" characters to use for the status line, folds and filler lines +" set fcs=vert:\|,fold:- + +" cmdheight +" number of lines used for the command-line +" set ch=1 + +" columns +" width of the display +" set co=80 + +" lines +" number of lines in the display +" set lines=25 + +" lazyredraw +" don't redraw while executing macros +" set nolz lz +set lz + +" writedelay +" delay in msec for each char written to the display +" (for debugging) +" set wd=0 + +" list +" show as ^I and end-of-line as $ +" (local to window) +" set nolist list +set list + +" listchars +" list of strings used for list mode +" set lcs=eol:$ +set lcs=tab:⇝·,trail:· + +" number +" show the line number for each line +" (local to window) +" set nonu nu + +" numberwidth +" number of columns to use for the line number +" (local to window) +" set nuw=8 + +""" syntax, highlighting and spelling + +" background +" "dark" or "light"; the background color brightness +" set bg=light + +" filetype +" type of file; triggers the FileType event when set +" (local to buffer) +" set ft= + +" syntax +" name of syntax highlighting used +" (local to buffer) +" set syn= + +" synmaxcol +" maximum column to look for syntax items +" (local to buffer) +" set smc=3000 + +" highlight +" which highlighting to use for various occasions +" set hl=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine + +" hlsearch +" highlight all matches for the last used search pattern +" set nohls hls +set hls + +" cursorcolumn +" highlight the screen column of the cursor +" (local to window) +" set nocuc cuc + +" cursorline +" highlight the screen line of the cursor +" (local to window) +" set nocul cul + +" spell +" highlight spelling mistakes +" (local to window) +" set nospell spell + +" spelllang +" list of accepted languages +" (local to buffer) +" set spl=en + +" spellfile +" file that "zg" adds good words to +" (local to buffer) +" set spf= + +" spellcapcheck +" pattern to locate the end of a sentence +" (local to buffer) +" set spc=[.?!]\\_[\\])'\"\ \ ]\\+ +set spc= + +" spellsuggest +" methods used to suggest corrections +" set sps=best + +" mkspellmem +" amount of memory used by :mkspell before compressing +" set msm=460000,2000,500 + +""" multiple windows + +" laststatus +" 0, 1 or 2; when to use a status line for the last window +" set ls=1 + +" statusline +" alternate format to be used for a status line +" set stl= + +" equalalways +" make all windows the same size when adding/removing windows +" set ea noea + +" eadirection +" in which direction 'equalalways' works: "ver", "hor" or "both" +" set ead=both + +" winheight +" minimal number of lines used for the current window +" set wh=1 + +" winminheight +" minimal number of lines used for any window +" set wmh=1 + +" winfixheight +" keep the height of the window +" (local to window) +" set nowfh wfh + +" winfixwidth +" keep the width of the window +" (local to window) +" set nowfw wfw + +" winwidth +" minimal number of columns used for the current window +" set wiw=20 + +" winminwidth +" minimal number of columns used for any window +" set wmw=1 + +" helpheight +" initial height of the help window +" set hh=20 + +" previewheight +" default height for the preview window +" set pvh=12 + +" previewwindow +" identifies the preview window +" (local to window) +" set nopvw pvw + +" hidden +" don't unload a buffer when no longer shown in a window +" set nohid hid + +" switchbuf +" "useopen" and/or "split"; which window to use when jumping +" to a buffer +" set swb= + +" splitbelow +" a new window is put below the current one +" set nosb sb + +" splitright +" a new window is put right of the current one +" set nospr spr + +" scrollbind +" this window scrolls together with other bound windows +" (local to window) +" set noscb scb + +" scrollopt +" "ver", "hor" and/or "jump"; list of options for 'scrollbind' +" set sbo=ver,jump + +""" multiple tab pages + +" showtabline +" 0, 1 or 2; when to use a tab pages line +" set stal=1 + +" tabpagemax +" maximum number of tab pages to open for -p and "tab all" +" set tpm=10 + +" tabline +" custom tab pages line +" set tal= + +""" terminal + +" term +" name of the used terminal +" set term=rxvt-unicode + +" ttytype +" alias for 'term' +" set tty=rxvt-unicode + +" ttybuiltin +" check built-in termcaps first +" set tbi notbi + +" ttyfast +" terminal connection is fast +" set tf notf + +" weirdinvert +" terminal that requires extra redrawing +" set nowiv wiv + +" esckeys +" recognize keys that start with in Insert mode +" set noek ek + +" scrolljump +" minimal number of lines to scroll at a time +" set sj=1 + +" ttyscroll +" maximum number of lines to use scrolling instead of redrawing +" set tsl=999 + +" title +" show info in the window title +" set notitle title +set notitle + +" titlelen +" percentage of 'columns' used for the window title +" set titlelen=85 + +" titlestring +" when not empty, string to be used for the window title +" set titlestring= + +" titleold +" string to restore the title to when exiting Vim +" set titleold=Thanks\ for\ flying\ Vim + +" icon +" set the text of the icon for this window +" set noicon icon + +" iconstring +" when not empty, text for the icon of this window +" set iconstring= + +""" using the mouse + +" mouse +" list of flags for using the mouse +" set mouse= + +" mousemodel +" "extend", "popup" or "popup_setpos"; what the right +" mouse button is used for +" set mousem=extend + +" mousetime +" maximum time in msec to recognize a double-click +" set mouset=500 + +" ttymouse +" "xterm", "xterm2", "dec" or "netterm"; type of mouse +" set ttym=xterm + +""" printing + +" printoptions +" list of items that control the format of :hardcopy output +" set popt= + +" printdevice +" name of the printer to be used for :hardcopy +" set pdev= + +" printexpr +" expression used to print the PostScript file for :hardcopy +" set pexpr=system('lpr'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -P'\ .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\ v:shell_error +set pexpr=system('lp'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -d'\ .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\ v:shell_error + +" printfont +" name of the font to be used for :hardcopy +" set pfn=courier + +" printheader +" format of the header used for :hardcopy +" set pheader=%<%f%h%m%=Page\ %N + +" printencoding +" encoding used to print the PostScript file for :hardcopy +" set penc= + +" printmbcharset +" the CJK character set to be used for CJK output from :hardcopy +" set pmbcs= + +" printmbfont +" list of font names to be used for CJK output from :hardcopy +" set pmbfn= + +""" messages and info + +" terse +" add 's' flag in 'shortmess' (don't show search message) +" set noterse terse + +" shortmess +" list of flags to make messages shorter +" set shm= +set shortmess=atTWoOI + +" showcmd +" show (partial) command keys in the status line +" set nosc sc + +" showmode +" display the current mode in the status line +" set nosmd smd + +" ruler +" show cursor position below each window +" set noru ru +set ruler + +" rulerformat +" alternate format to be used for the ruler +" set ruf=%20(%=%-14(%l,%c%V%)\ %P%) + +" report +" threshold for reporting number of changed lines +" set report=2 + +" verbose +" the higher the more messages are given +" set vbs=0 + +" verbosefile +" file to write messages in +" set vfile= + +" more +" pause listings when the screen is full +" set nomore more + +" confirm +" start a dialog when a command fails +" set nocf cf + +" errorbells +" ring the bell for error messages +" set noeb eb + +" visualbell +" use a visual bell instead of beeping +" set novb vb + +" helplang +" list of preferred languages for finding help +" set hlg=en + +""" selecting text + +" selection +" "old", "inclusive" or "exclusive"; how selecting text behaves +" set sel=inclusive + +" selectmode +" "mouse", "key" and/or "cmd"; when to start Select mode +" instead of Visual mode +" set slm= + +" keymodel +" "startsel" and/or "stopsel"; what special keys can do +" set km= + +""" editing text + +" undolevels +" maximum number of changes that can be undone +" set ul=1000 + +" modified +" changes have been made and not written to a file +" (local to buffer) +" set nomod mod + +" readonly +" buffer is not to be written +" (local to buffer) +" set noro ro + +" modifiable +" changes to the text are not possible +" (local to buffer) +" set ma noma + +" textwidth +" line length above which to break a line +" (local to buffer) +" set tw=0 +set tw=78 + +" wrapmargin +" margin from the right in which to break a line +" (local to buffer) +" set wm=0 + +" backspace +" specifies what , CTRL-W, etc. can do in Insert mode +" set bs= +set bs=indent,eol,start + +" comments +" definition of what comment lines look like +" (local to buffer) +" set com=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- + +" formatoptions +" list of flags that tell how automatic formatting works +" (local to buffer) +" set fo=vt +set fo=tcroqn1l + +" formatlistpat +" pattern to recognize a numbered list +" (local to buffer) +" set flp=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +let &flp='^\v\s*(((#|\a|\d{,4}|[ivx]{,4})[]:.)}/])+|[-\*.·→+])\s+' + +" formatexpr +" expression used for "gq" to format lines +" (local to buffer) +" set fex= + +" complete +" specifies how Insert mode completion works for CTRL-N and CTRL-P +" (local to buffer) +" set cpt=.,w,b,u,t,i + +" completeopt +" whether to use a popup menu for Insert mode completion +" set cot=menu,preview + +" pumheight +" maximum height of the popup menu +" set ph=0 + +" completefunc +" user defined function for Insert mode completion +" (local to buffer) +" set cfu= + +" omnifunc +" function for filetype-specific Insert mode completion +" (local to buffer) +" set ofu= + +" dictionary +" list of dictionary files for keyword completion +" (global or local to buffer) +" set dict= + +" thesaurus +" list of thesaurus files for keyword completion +" (global or local to buffer) +" set tsr= + +" infercase +" adjust case of a keyword completion match +" (local to buffer) +" set noinf inf +set inf + +" digraph +" enable entering digraps with c1 c2 +" set nodg dg +"set dg + +" tildeop +" the "~" command behaves like an operator +" set notop top +"set tildeop + +" operatorfunc +" function called for the"g@" operator +" set opfunc= + +" showmatch +" When inserting a bracket, briefly jump to its match +" set nosm sm + +" matchtime +" tenth of a second to show a match for 'showmatch' +" set mat=5 + +" matchpairs +" list of pairs that match for the "%" command +" (local to buffer) +" set mps=(:),{:},[:] + +" joinspaces +" use two spaces after '.' when joining a line +" set js nojs +set nojs + +" nrformats +" "alpha", "octal" and/or "hex"; number formats recognized for +" CTRL-A and CTRL-X commands +" (local to buffer) +" set nf=octal,hex + +""" tabs and indenting + +" tabstop +" number of spaces a in the text stands for +" (local to buffer) +" set ts=8 +" +" You could set the 'tabstop' option to 2. However, if you edit the file +" another time, with 'tabstop' set to the default value of 8, it will look +" wrong. In other programs and when printing the indent will also be +" wrong. Therefore it is recommended to keep 'tabstop' at eight all the +" time. That's the standard value everywhere. +" +"set ts=2 + +" shiftwidth +" number of spaces used for each step of (auto)indent +" (local to buffer) +" set sw=8 +set sw=2 + +" smarttab +" a in an indent inserts 'shiftwidth' spaces +" set nosta sta +set sta + +" softtabstop +" if non-zero, number of spaces to insert for a +" (local to buffer) +" set sts=0 +set sts=2 + +" shiftround +" round to 'shiftwidth' for "<<" and ">>" +" set nosr sr +set sr + +" expandtab +" expand to spaces in Insert mode +" (local to buffer) +" set noet et +set et + +" autoindent +" automatically set the indent of a new line +" (local to buffer) +" set noai ai +set ai + +" smartindent +" do clever autoindenting +" (local to buffer) +" set nosi si + +" cindent +" enable specific indenting for C code +" (local to buffer) +" set nocin cin + +" cinoptions +" options for C-indenting +" (local to buffer) +" set cino= + +" cinkeys +" keys that trigger C-indenting in Insert mode +" (local to buffer) +" set cink=0{,0},0),:,0#,!^F,o,O,e + +" cinwords +" list of words that cause more C-indent +" (local to buffer) +" set cinw=if,else,while,do,for,switch + +" indentexpr +" expression used to obtain the indent of a line +" (local to buffer) +" set inde= + +" indentkeys +" keys that trigger indenting with 'indentexpr' in Insert mode +" (local to buffer) +" set indk=0{,0},:,0#,!^F,o,O,e + +" copyindent +" Copy whitespace for indenting from previous line +" (local to buffer) +" set noci ci +set ci + +" preserveindent +" Preserve kind of whitespace when changing indent +" (local to buffer) +" set nopi pi +""" set pi this ABORTS < 1:7.1-135+1 (see #446268) +if has('patch073') + set pi +endif + +" lisp +" enable lisp mode +" (local to buffer) +" set nolisp lisp + +" lispwords +" words that change how lisp indenting works +" set lw=defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object + +""" folding + +" foldenable +" set to display all folds open +" (local to window) +" set fen nofen + +" foldlevel +" folds with a level higher than this number will be closed +" (local to window) +" set fdl=0 + +" foldlevelstart +" value for 'foldlevel' when starting to edit a file +" set fdls=-1 + +" foldcolumn +" width of the column used to indicate folds +" (local to window) +" set fdc=0 + +" foldtext +" expression used to display the text of a closed fold +" (local to window) +" set fdt=foldtext() + +" foldclose +" set to "all" to close a fold when the cursor leaves it +" set fcl= + +" foldopen +" specifies for which commands a fold will be opened +" set fdo=block,hor,mark,percent,quickfix,search,tag,undo + +" foldminlines +" minimum number of screen lines for a fold to be closed +" (local to window) +" set fml=1 + +" commentstring +" template for comments; used to put the marker in +" set cms=/*%s*/ + +" foldmethod +" folding type: "manual", "indent", "expr", "marker" or "syntax" +" (local to window) +" set fdm=manual +set fdm=marker + +" foldexpr +" expression used when 'foldmethod' is "expr" +" (local to window) +" set fde=0 + +" foldignore +" used to ignore lines when 'foldmethod' is "indent" +" (local to window) +" set fdi=# + +" foldmarker +" markers used when 'foldmethod' is "marker" +" (local to window) +" set fmr={{{,}}} + +" foldnestmax +" maximum fold depth for when 'foldmethod is "indent" or "syntax" +" (local to window) +" set fdn=20 + +""" diff mode + +" diff +" use diff mode for the current window +" (local to window) +" set nodiff diff + +" diffopt +" options for using diff mode +" set dip=filler + +" diffexpr +" expression used to obtain a diff file +" set dex= + +" patchexpr +" expression used to patch a file +" set pex= + +""" mapping + +" maxmapdepth +" maximum depth of mapping +" set mmd=1000 + +" remap +" recognize mappings in mapped keys +" set remap noremap + +" timeout +" allow timing out halfway into a mapping +" set to noto + +" ttimeout +" allow timing out halfway into a key code +" set nottimeout ttimeout + +" timeoutlen +" time in msec for 'timeout' +" set tm=1000 + +" ttimeoutlen +" time in msec for 'ttimeout' +" set ttm=-1 + +""" reading and writing files + +" modeline +" enable using settings from modelines when reading a file +" (local to buffer) +" set noml ml +set ml + +" modelines +" number of lines to check for modelines +" set mls=5 + +" binary +" binary file editing +" (local to buffer) +" set nobin bin + +" endofline +" last line in the file has an end-of-line +" (local to buffer) +" set eol noeol + +" bomb +" Prepend a Byte Order Mark to the file +" (local to buffer) +" set nobomb bomb + +" fileformat +" end-of-line format: "dos", "unix" or "mac" +" (local to buffer) +" set ff=unix + +" fileformats +" list of file formats to look for when editing a file +" set ffs= + +" textmode +" obsolete, use 'fileformat' +" (local to buffer) +" set notx tx + +" textauto +" obsolete, use 'fileformats' +" set nota ta + +" write +" writing files is allowed +" set write nowrite + +" writebackup +" write a backup file before overwriting a file +" set wb nowb + +" backup +" keep a backup after overwriting a file +" set nobk bk + +" backupskip +" patterns that specify for which files a backup is not made +" set bsk=/tmp/* + +" backupcopy +" whether to make the backup as a copy or rename the existing file +" set bkc=yes + +" backupdir +" list of directories to put backup files in +" set bdir=.,/home/madduck/tmp,/home/madduck/ + +" backupext +" file name extension for the backup file +" set bex=~ + +" autowrite +" automatically write a file when leaving a modified buffer +" set noaw aw +set aw + +" autowriteall +" as 'autowrite', but works with more commands +" set noawa awa +set awa + +" writeany +" always write without asking for confirmation +" set nowa wa + +" autoread +" automatically read a file when it was modified outside of Vim +" (global or local to buffer) +" set noar ar +set ar + +" patchmode +" keep oldest version of a file; specifies file name extension +" set pm= + +" fsync +" forcibly sync the file to disk after writing it +" set fs nofs + +" shortname +" use 8.3 file names +" (local to buffer) +" set nosn sn + +""" the swap file + +" directory +" list of directories for the swap file +" set dir=.,/home/madduck/tmp,/var/tmp,/tmp +set dir=.,$TMPDIR//,/var/tmp//,/tmp// + +" swapfile +" use a swap file for this buffer +" (local to buffer) +" set swf noswf + +" swapsync +" "sync", "fsync" or empty; how to flush a swap file to disk +" set sws=fsync +set sws= + +" updatecount +" number of characters typed to cause a swap file update +" set uc=200 + +" updatetime +" time in msec after which the swap file will be updated +" set ut=4000 +set ut=10000 + +" maxmem +" maximum amount of memory in Kbyte used for one buffer +" set mm=1030480 + +" maxmemtot +" maximum amount of memory in Kbyte used for all buffers +" set mmt=1030480 + +""" command line editing + +" history +" how many command lines are remembered +" set hi=0 +set hi=100 + +" wildchar +" key that triggers command-line expansion +" set wc=5 + +" wildcharm +" like 'wildchar' but can also be used in a mapping +" set wcm=0 + +" wildmode +" specifies how command line completion works +" set wim=full +set wim=list:full + +" suffixes +" list of file name extensions that have a lower priority +" set su=.bak,~,.o,.h,.info,.swp,.obj + +" suffixesadd +" list of file name extensions added when searching for a file +" (local to buffer) +" set sua= + +" wildignore +" list of patterns to ignore files for file name completion +" set wig= +set wig=*.o,*.pyc,*.pyo,*~,*.bk,*.bak + +" wildmenu +" command-line completion shows a list of matches +" set nowmnu wmnu + +" cedit +" key used to open the command-line window +" set cedit= + +" cmdwinheight +" height of the command-line window +" set cwh=7 + +""" executing external commands + +" shell +" name of the shell program used for external commands +" set sh=/bin/zsh + +" shellquote +" character(s) to enclose a shell command in +" set shq= + +" shellxquote +" like 'shellquote' but include the redirection +" set sxq= + +" shellcmdflag +" argument for 'shell' to execute a command +" set shcf=-c + +" shellredir +" used to redirect command output to a file +" set srr=>%s\ 2>&1 + +" shelltemp +" use a temp file for shell commands instead of using a pipe +" set nostmp stmp + +" equalprg +" program used for "=" command +" (global or local to buffer) +" set ep= + +" formatprg +" program used to format lines with "gq" command +" set fp= + +" keywordprg +" program used for the "K" command +" set kp=man + +" warn +" warn when using a shell command and a buffer has changes +" set warn nowarn +set warn + +""" running make and jumping to errors + +" errorfile +" name of the file that contains error messages +" set ef=errors.err + +" errorformat +" list of formats for error messages +" (global or local to buffer) +" set efm=%*[^\"]\"%f\"%*\\D%l:\ %m,\"%f\"%*\\D%l:\ %m,%-G%f:%l:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,%-G%f:%l:\ for\ each\ function\ it\ appears\ in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',%D%*\\a:\ Entering\ directory\ `%f',%X%*\\a:\ Leaving\ directory\ `%f',%DMaking\ %*\\a\ in\ %f,%f\|%l\|\ %m + +" makeprg +" program used for the ":make" command +" (global or local to buffer) +" set mp=make + +" shellpipe +" string used to put the output of ":make" in the error file +" set sp=2>&1\|\ tee + +" makeef +" name of the errorfile for the 'makeprg' command +" set mef= + +" grepprg +" program used for the ":grep" command +" (global or local to buffer) +" set gp=grep\ -n\ $*\ /dev/null + +" grepformat +" list of formats for output of 'grepprg' +" set gfm=%f:%l:%m,%f:%l%m,%f\ \ %l%m + +""" language specific + +" isfname +" specifies the characters in a file name +" set isf=@,48-57,/,.,-,_,+,,,#,$,%,~,= + +" isident +" specifies the characters in an identifier +" set isi=@,48-57,_,192-255 + +" iskeyword +" specifies the characters in a keyword +" (local to buffer) +" set isk=@,48-57,_ + +" isprint +" specifies printable characters +" set isp=@,161-255 + +" quoteescape +" specifies escape characters in a string +" (local to buffer) +" set qe=\\ + +" rightleft +" display the buffer right-to-left +" (local to window) +" set norl rl + +" rightleftcmd +" When to edit the command-line right-to-left +" (local to window) +" set rlc=search + +" revins +" Insert characters backwards +" set nori ri + +" allowrevins +" Allow CTRL-_ in Insert and Command-line mode to toggle 'revins' +" set noari ari + +" aleph +" the ASCII code for the first letter of the Hebrew alphabet +" set al=224 + +" hkmap +" use Hebrew keyboard mapping +" set nohk hk + +" hkmapp +" use phonetic Hebrew keyboard mapping +" set nohkp hkp + +" altkeymap +" use Farsi as the second language when 'revins' is set +" set noakm akm + +" fkmap +" use Farsi keyboard mapping +" set nofk fk + +" arabic +" Prepare for editing Arabic text +" (local to window) +" set noarab arab + +" arabicshape +" Perform shaping of Arabic characters +" set noarshape noarshape + +" termbidi +" Terminal will perform bidi handling +" set notbidi tbidi + +" keymap +" name of a keyboard mappping +" set kmp= + +" langmap +" translate characters for Normal mode +" set lmap= + +" iminsert +" in Insert mode: 1: use :lmap; 2: use IM; 0: neither +" (local to window) +" set imi=0 + +" imsearch +" entering a search pattern: 1: use :lmap; 2: use IM; 0: neither +" (local to window) +" set ims=0 + +""" multi-byte characters + +" encoding +" character encoding used in Vim: "latin1", "utf-8" +" "euc-jp", "big5", etc. +" set enc=utf-8 + +" fileencoding +" character encoding for the current file +" (local to buffer) +" set fenc=utf-8 + +" fileencodings +" automatically detected character encodings +" set fencs=ucs-bom,utf-8,default,latin1 + +" termencoding +" character encoding used by the terminal +" set tenc= + +" charconvert expression +" used for character encoding conversion +" set ccv= + +" delcombine +" Delete combining (composing) characters on their own +" set nodeco deco + +" maxcombine +" Maximum number of combining (composing) characters displayed +" set mco=2 + +" ambiwidth +" Width of ambiguous width characters +" set ambw=single + +""" various + +" virtualedit +" when to use virtual editing: "block", "insert" and/or "all" +" set ve= + +" eventignore +" list of autocommand events which are to be ignored +" set ei= + +" loadplugins +" load plugin scripts when starting up +" set nolpl lpl +set lpl + +" exrc +" enable reading .vimrc/.exrc/.gvimrc in the current directory +" set noex ex + +" secure +" safer working with script files in the current directory +" set nosecure secure +set secure + +" gdefault +" use the 'g' flag for ":substitute" +" set nogd gd + +" edcompatible +" 'g' and 'c' flags of ":substitute" toggle +" set noed ed + +" maxfuncdepth +" maximum depth of function calls +" set mfd=100 + +" sessionoptions +" list of words that specifies what to put in a session file +" set ssop=blank,buffers,curdir,folds,help,options,tabpages,winsize + +" viewoptions +" list of words that specifies what to save for :mkview +" set vop=folds,options,cursor + +" viewdir +" directory where to store files with :mkview +" set vdir=/home/madduck/.vim/view +set vdir=$VARDIR/vim/view + +" viminfo +" list that specifies what to write in the viminfo file +" set vi= +set vi=<1000,'1000,\"1000,:100,/100,@100,f1,%,!,h,n$VARDIR/vim/viminfo + +" bufhidden +" what happens with a buffer when it's no longer in a window +" (local to buffer) +" set bh= + +" buftype +" "", "nofile", "nowrite" or "quickfix": type of buffer +" (local to buffer) +" set bt= + +" buflisted +" whether the buffer shows up in the buffer list +" (local to buffer) +" set bl nobl + +" debug +" set to "msg" to see all error messages +" set debug= + +if &cp | set nocp | endif +let s:cpo_save=&cpo +set cpo&vim + +let g:netrw_home="$VARDIR/vim" + +filetype plugin indent on +syntax on + +packadd! editorconfig +packadd! matchit +packadd! gnupg + +" leave the w mark whenever a file is written +autocmd BufWrite * normal mw + +autocmd BufRead *.vcf set filetype=vcard + +" leave the i mark whenever we go idle (after updatetime) +"augroup markidle + "autocmd CursorHold * normal mi + "autocmd CursorHoldI * normal mi "DISABLED while broken (shifts left) +"augroup end + +" disable list mode when inserting stuff, otherwise keep it enabled, it's +" useful (see also setting lcs) +augroup listinsert + autocmd InsertEnter * set nolist + autocmd InsertLeave * set list +augroup end +" flag trailing spaces as error only when not inserting +augroup tsperrorinsert + autocmd InsertEnter * match none /\s\+$/ + autocmd InsertLeave * match Error /\s\+$/ +augroup end + +" this isn't windows, screw the F1->help key +map +imap +vmap + +" ignore Q -- Ex mode +map Q + +let mapleader = ';' +let maplocalleader = ';' + +" replace fake tab chars with real ones +map ft :%s,⇝·*, ,g:nohlsearch`` +" replace fake spaces with real ones +map fs :%s,·, ,g:nohlsearch`` + +function WhatHighlight() + echon 'hi<' . synIDattr(synID(line('.'),col('.'),1),'name') . '> ' + echon 'trans<' . synIDattr(synID(line('.'),col('.'),0),'name') . '> ' + echon 'lo<' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)),'name') . '>' +endfunction + +map sy :call WhatHighlight() + +map / :nohlsearch + +iab sgf Sehr geehrte Frau +iab sgh Sehr geehrter Herr +iab sghn Sehr geehrte Herren +iab lf Liebe Frau +iab lh Lieber Herr +iab sgdh Sehr geehrte Damen und Herren +iab twimc To Whom It May Concern +iab lg liebe Grüsse +iab Lg Liebe Grüsse +iab fg Freundliche Grüsse +iab mfg Mit freundlichen Grüssen +iab mbg Mit den besten Grüssen +iab hg Herzliche Grüsse +iab mhg Mit herzlichen Grüssen +iab mbbg Mit bundesbrüderlichen Grüssen +iab mvbg Mit verbandsbrüderlichen Grüssen +iab dallarmi Dall'Armi-Strasse +iab muc5 80538 München +iab muc6 80638 München + +iab → ➬ + +iab :thumbsup: 👍️ + +try + execute pathogen#infect() +catch + "echo "Pathogen not installed" +endtry + +set background=light +let g:artesanal_dimmed = 1 +let g:artesanal_transparent = 1 +colorscheme artesanal + +let g:is_posix = 1 + +let g:ycm_add_preview_to_completeopt="popup" +let g:ycm_autoclose_preview_window_after_completion = 1 + +let g:UltiSnipsExpandTrigger = "" +let g:UltiSnipsJumpForwardTrigger = "" +let g:UltiSnipsJumpBackwardTrigger = "" +let g:UltiSnipsListSnippets = "q" +map :UltiSnipsEdit +imap :UltiSnipsEdit + +let &cpo=s:cpo_save +unlet s:cpo_save diff --git a/.zsh/zshenv/parts.d/50-vim b/.zsh/zshenv/parts.d/50-vim new file mode 100644 index 00000000..51d633e3 --- /dev/null +++ b/.zsh/zshenv/parts.d/50-vim @@ -0,0 +1,15 @@ +# +# set the editor variables to Vim +# +# Copyright © 1994–2017 martin f. krafft +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: http://git.madduck.net/v/etc/zsh.git +# + +if command -v vim >/dev/null; then + export EDITOR==vim + export VISUAL=$EDITOR +fi + +# vim:ft=zsh