From 36b9f62d7461521b61395ba9ce7e70b079dd49b3 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 6 Apr 2021 12:44:28 +0100 Subject: [PATCH 1/3] Adds Lexima and ultisnips Lexima auto-closes brackets and quotes etc. --- .gitmodules | 3 +++ nvim/.config/nvim/init.vim | 15 ++++++++++++++- nvim/.config/nvim/pack/bundle/opt/lexima.vim | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) create mode 160000 nvim/.config/nvim/pack/bundle/opt/lexima.vim diff --git a/.gitmodules b/.gitmodules index 143fd2ac..f2030cc8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -73,3 +73,6 @@ [submodule "nvim/.config/nvim/pack/bundle/opt/vim-snippets"] path = nvim/.config/nvim/pack/bundle/opt/vim-snippets url = https://github.com/honza/vim-snippets +[submodule "nvim/.config/nvim/pack/bundle/opt/lexima.vim"] + path = nvim/.config/nvim/pack/bundle/opt/lexima.vim + url = https://github.com/cohama/lexima.vim diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 4df98874..5bd66e9a 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -6,20 +6,27 @@ if has('packages') packadd! AnsiEsc.vim packadd! fzf.vim packadd! gruvbox + packadd! lexima.vim + packadd! ultisnips packadd! vim-fugitive packadd! vim-json packadd! vim-less packadd! vim-repeat + packadd! vim-snippets packadd! vim-surround packadd! vim-tridactyl packadd! vim-vinegar if has('nvim') - packadd! nvim-lspconfig packadd! deoplete.nvim packadd! deoplete-abook packadd! deoplete-lsp packadd! deoplete-notmuch packadd! firenvim + lua < Date: Fri, 9 Apr 2021 11:45:05 +0100 Subject: [PATCH 2/3] Fixes bug where it would try and test an empty line Thanks Rob Norman for reporting and helping debug. --- bin/.bin/webtest/analyse-headers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/.bin/webtest/analyse-headers b/bin/.bin/webtest/analyse-headers index f099dfcc..a94853a2 100755 --- a/bin/.bin/webtest/analyse-headers +++ b/bin/.bin/webtest/analyse-headers @@ -533,7 +533,7 @@ while read -r line; do fi done<<<"$(echo "$headers" | sed '1d')" # We don't want the initial http banner -echo "$missingHeaders" | while read -r line; do +echo -n "$missingHeaders" | while read -r line; do echo -e "${RED}$line${NC}" functionName="test_$line" "$functionName" >> "$tmpfile" From dac2ea8b45b18fc62df892a30cc07efd117916c6 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 9 Apr 2021 11:55:47 +0100 Subject: [PATCH 3/3] BIN: analyse-headers: adds -k flag like curl This flag will prevent curl from doing certificate checks The long form, `--insecure` can also be used Thanks Rob Norman for the suggestion --- bin/.bin/webtest/analyse-headers | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/.bin/webtest/analyse-headers b/bin/.bin/webtest/analyse-headers index a94853a2..8fef7912 100755 --- a/bin/.bin/webtest/analyse-headers +++ b/bin/.bin/webtest/analyse-headers @@ -432,6 +432,7 @@ usage(){ Options: -h, --help Display this help and exit + -k, --insecure Ignores certificate errors " } @@ -472,11 +473,13 @@ done set -- "${options[@]}" unset options +insecure="" # Read the options and set stuff while [[ $1 = -?* ]]; do case $1 in -h|--help) usage; exit;; + -k|--insecure) insecure="-k" ;; --) shift; break ;; *) die "invalid option: '$1'." ;; esac @@ -493,7 +496,7 @@ url="${args[0]}" if [ "$url" = "-" ]; then headers="$(cat -)" else - headers="$(curl -s -I "$url")" + headers="$(curl -s -I $insecure "$url")" fi missingHeaders="x-frame-options