From 94ed7a9e9ed567da775a40c1407b735278e9afb7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 22 Dec 2019 20:53:12 +0100 Subject: [PATCH] [FIX][VIM] Unlet ftplugin variables without errors --- vim/.vim/after/ftplugin/bash.vim | 6 +++--- vim/.vim/after/ftplugin/c.vim | 6 +++--- vim/.vim/after/ftplugin/cpp.vim | 6 +++--- vim/.vim/after/ftplugin/d.vim | 2 +- vim/.vim/after/ftplugin/fugitive.vim | 2 +- vim/.vim/after/ftplugin/help.vim | 2 +- vim/.vim/after/ftplugin/json.vim | 2 +- vim/.vim/after/ftplugin/pandoc.vim | 2 +- vim/.vim/after/ftplugin/python.vim | 14 +++++++------- vim/.vim/after/ftplugin/rust.vim | 8 ++++---- vim/.vim/after/ftplugin/sh.vim | 6 +++--- vim/.vim/after/ftplugin/zsh.vim | 6 +++--- 12 files changed, 31 insertions(+), 31 deletions(-) diff --git a/vim/.vim/after/ftplugin/bash.vim b/vim/.vim/after/ftplugin/bash.vim index 07ff9e5..2b69ab4 100644 --- a/vim/.vim/after/ftplugin/bash.vim +++ b/vim/.vim/after/ftplugin/bash.vim @@ -3,12 +3,12 @@ call ftplugined#check_undo_ft() " Use shfmt as ALE fixer for bash let b:ale_fixers=[ 'shfmt' ] -let b:undo_ftplugin.='|unlet b:ale_fixers' +let b:undo_ftplugin.='|unlet! b:ale_fixers' " Indent with 4 spaces, simplify script, indent switch cases, use Bash variant let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash' -let b:undo_ftplugin.='|unlet b:ale_sh_shfmt_options' +let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options' " Use bash dialect explicitly, require explicit empty string test let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions' -let b:undo_ftplugin.='|unlet b:ale_sh_shellcheck_options' +let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options' diff --git a/vim/.vim/after/ftplugin/c.vim b/vim/.vim/after/ftplugin/c.vim index 1b699e2..a85ff07 100644 --- a/vim/.vim/after/ftplugin/c.vim +++ b/vim/.vim/after/ftplugin/c.vim @@ -3,12 +3,12 @@ call ftplugined#check_undo_ft() " More warnings and the usual version in flags for Clang let b:ale_c_clang_options='-Wall -Wextra -pedantic -std=c99' -let b:undo_ftplugin.='|unlet b:ale_c_clang_options' +let b:undo_ftplugin.='|unlet! b:ale_c_clang_options' " More warnings and the usual version in flags for GCC let b:ale_c_gcc_options='-Wall -Wextra -pedantic -std=c99' -let b:undo_ftplugin.='|unlet b:ale_c_gcc_options' +let b:undo_ftplugin.='|unlet! b:ale_c_gcc_options' " Use compile_commands.json to look for additional flags let b:ale_c_parse_compile_commands=1 -let b:undo_ftplugin.='|unlet b:ale_c_parse_compile_commands' +let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands' diff --git a/vim/.vim/after/ftplugin/cpp.vim b/vim/.vim/after/ftplugin/cpp.vim index fc54454..4fa501e 100644 --- a/vim/.vim/after/ftplugin/cpp.vim +++ b/vim/.vim/after/ftplugin/cpp.vim @@ -3,12 +3,12 @@ call ftplugined#check_undo_ft() " More warnings and the usual version in flags for Clang let b:ale_cpp_clang_options='-Wall -Wextra -pedantic -std=c++17' -let b:undo_ftplugin.='|unlet b:ale_cpp_clang_options' +let b:undo_ftplugin.='|unlet! b:ale_cpp_clang_options' " More warnings and the usual version in flags for GCC let b:ale_cpp_gcc_options='-Wall -Wextra -pedantic -std=c++17' -let b:undo_ftplugin.='|unlet b:ale_cpp_gcc_options' +let b:undo_ftplugin.='|unlet! b:ale_cpp_gcc_options' " Use compile_commands.json to look for additional flags let b:ale_c_parse_compile_commands=1 -let b:undo_ftplugin.='|unlet b:ale_c_parse_compile_commands' +let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands' diff --git a/vim/.vim/after/ftplugin/d.vim b/vim/.vim/after/ftplugin/d.vim index aee25a1..0e868c7 100644 --- a/vim/.vim/after/ftplugin/d.vim +++ b/vim/.vim/after/ftplugin/d.vim @@ -3,4 +3,4 @@ call ftplugined#check_undo_ft() " Use my desired ALE fixer for D let b:ale_fixers=[ 'dfmt' ] -let b:undo_ftplugin.='|unlet b:ale_fixers' +let b:undo_ftplugin.='|unlet! b:ale_fixers' diff --git a/vim/.vim/after/ftplugin/fugitive.vim b/vim/.vim/after/ftplugin/fugitive.vim index 95aba2b..e324494 100644 --- a/vim/.vim/after/ftplugin/fugitive.vim +++ b/vim/.vim/after/ftplugin/fugitive.vim @@ -3,4 +3,4 @@ call ftplugined#check_undo_ft() " Don't highlight trailing whitespace in fugitive windows let b:better_whitespace_enabled=0 -let b:undo_ftplugin.='|unlet b:better_whitespace_enabled' +let b:undo_ftplugin.='|unlet! b:better_whitespace_enabled' diff --git a/vim/.vim/after/ftplugin/help.vim b/vim/.vim/after/ftplugin/help.vim index b4087f7..884bf64 100644 --- a/vim/.vim/after/ftplugin/help.vim +++ b/vim/.vim/after/ftplugin/help.vim @@ -3,4 +3,4 @@ call ftplugined#check_undo_ft() " Don't highlight trailing whitespace in help windows let b:better_whitespace_enabled=0 -let b:undo_ftplugin.='|unlet b:better_whitespace_enabled' +let b:undo_ftplugin.='|unlet! b:better_whitespace_enabled' diff --git a/vim/.vim/after/ftplugin/json.vim b/vim/.vim/after/ftplugin/json.vim index 4856a8d..2b4ba56 100644 --- a/vim/.vim/after/ftplugin/json.vim +++ b/vim/.vim/after/ftplugin/json.vim @@ -3,4 +3,4 @@ call ftplugined#check_undo_ft() " Use my desired ALE fixer for JSON let b:ale_fixers=[ 'jq' ] -let b:undo_ftplugin.='|unlet b:ale_fixers' +let b:undo_ftplugin.='|unlet! b:ale_fixers' diff --git a/vim/.vim/after/ftplugin/pandoc.vim b/vim/.vim/after/ftplugin/pandoc.vim index 3754bd7..d9b639a 100644 --- a/vim/.vim/after/ftplugin/pandoc.vim +++ b/vim/.vim/after/ftplugin/pandoc.vim @@ -3,4 +3,4 @@ call ftplugined#check_undo_ft() " Let ALE know that I want Markdown linters let b:ale_linter_aliases=[ 'markdown' ] -let b:undo_ftplugin.='|unlet b:ale_linter_aliases' +let b:undo_ftplugin.='|unlet! b:ale_linter_aliases' diff --git a/vim/.vim/after/ftplugin/python.vim b/vim/.vim/after/ftplugin/python.vim index 71c6f1d..a18299e 100644 --- a/vim/.vim/after/ftplugin/python.vim +++ b/vim/.vim/after/ftplugin/python.vim @@ -3,14 +3,14 @@ call ftplugined#check_undo_ft() " Use my desired ALE fixers for python let b:ale_fixers=[ 'black', 'isort' ] -let b:undo_ftplugin.='|unlet b:ale_fixers' +let b:undo_ftplugin.='|unlet! b:ale_fixers' " Use my desired ALE linters for python let b:ale_linters=[ 'flake8', 'mypy', 'pylint', 'pyls' ] -let b:undo_ftplugin.='|unlet b:ale_linters' +let b:undo_ftplugin.='|unlet! b:ale_linters' " Use pyls inside the python environment if needed let b:ale_python_pyls_auto_pipenv=1 -let b:undo_ftplugin.='|unlet b:ale_python_pyls_auto_pipenv' +let b:undo_ftplugin.='|unlet! b:ale_python_pyls_auto_pipenv' " Disable pycodestyle checks from pyls because I'm already using flake8 let b:ale_python_pyls_config={ @@ -22,18 +22,18 @@ let b:ale_python_pyls_config={ \ }, \ }, \ } -let b:undo_ftplugin.='|unlet b:ale_python_pyls_config' +let b:undo_ftplugin.='|unlet! b:ale_python_pyls_config' " Don't use mypy to check for syntax errors let b:ale_python_mypy_ignore_invalid_syntax=1 -let b:undo_ftplugin.='|unlet b:ale_python_mypy_ignore_invalid_syntax' +let b:undo_ftplugin.='|unlet! b:ale_python_mypy_ignore_invalid_syntax' " Use mypy inside the python environment if needed let b:ale_python_mypy_auto_pipenv=1 -let b:undo_ftplugin.='|unlet b:ale_python_mypy_auto_pipenv' +let b:undo_ftplugin.='|unlet! b:ale_python_mypy_auto_pipenv' " Automatically format files when saving them let b:ale_fix_on_save=1 -let b:undo_ftplugin='|unlet b:ale_lint_on_save' +let b:undo_ftplugin='|unlet! b:ale_lint_on_save' " Change max length of a line to 88 for this buffer to match black's settings setlocal colorcolumn=88 diff --git a/vim/.vim/after/ftplugin/rust.vim b/vim/.vim/after/ftplugin/rust.vim index 7120205..f135875 100644 --- a/vim/.vim/after/ftplugin/rust.vim +++ b/vim/.vim/after/ftplugin/rust.vim @@ -3,16 +3,16 @@ call ftplugined#check_undo_ft() " Check tests too let b:ale_rust_cargo_check_tests=1 -let b:undo_ftplugin='|unlet b:ale_rust_cargo_check_tests' +let b:undo_ftplugin='|unlet! b:ale_rust_cargo_check_tests' " Check examples too let b:ale_rust_cargo_check_examples=1 -let b:undo_ftplugin='|unlet b:ale_rust_cargo_check_examples' +let b:undo_ftplugin='|unlet! b:ale_rust_cargo_check_examples' " Use clippy if it's available instead of just cargo check let b:ale_rust_cargo_use_clippy=executable('cargo-clippy') -let b:undo_ftplugin='|unlet b:ale_rust_cargo_use_clippy' +let b:undo_ftplugin='|unlet! b:ale_rust_cargo_use_clippy' " Use rustfmt as ALE fixer for rust let b:ale_fixers=[ 'rustfmt' ] -let b:undo_ftplugin.='|unlet b:ale_fixers' +let b:undo_ftplugin.='|unlet! b:ale_fixers' diff --git a/vim/.vim/after/ftplugin/sh.vim b/vim/.vim/after/ftplugin/sh.vim index 91fb389..5b5a88c 100644 --- a/vim/.vim/after/ftplugin/sh.vim +++ b/vim/.vim/after/ftplugin/sh.vim @@ -3,12 +3,12 @@ call ftplugined#check_undo_ft() " Use shfmt as ALE fixer for sh let b:ale_fixers=[ 'shfmt' ] -let b:undo_ftplugin.='|unlet b:ale_fixers' +let b:undo_ftplugin.='|unlet! b:ale_fixers' " Indent with 4 spaces, simplify the code, indent switch cases, use POSIX let b:ale_sh_shfmt_options='-i 4 -s -ci -ln posix' -let b:undo_ftplugin.='|unlet b:ale_sh_shfmt_options' +let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options' " Require explicit empty string test let b:ale_sh_shellcheck_options='-o avoid-nullary-conditions' -let b:undo_ftplugin.='|unlet b:ale_sh_shellcheck_options' +let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options' diff --git a/vim/.vim/after/ftplugin/zsh.vim b/vim/.vim/after/ftplugin/zsh.vim index b9af12c..b8c7a31 100644 --- a/vim/.vim/after/ftplugin/zsh.vim +++ b/vim/.vim/after/ftplugin/zsh.vim @@ -3,12 +3,12 @@ call ftplugined#check_undo_ft() " Use shfmt as ALE fixer for zsh let b:ale_fixers=[ 'shfmt' ] -let b:undo_ftplugin.='|unlet b:ale_fixers' +let b:undo_ftplugin.='|unlet! b:ale_fixers' " Indent with 4 spaces, simplify script, indent switch cases, use Bash variant let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash' -let b:undo_ftplugin.='|unlet b:ale_sh_shfmt_options' +let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options' " Use bash dialect explicitly, require explicit empty string test let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions' -let b:undo_ftplugin.='|unlet b:ale_sh_shellcheck_options' +let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'