From 5633ff06788982be8e6558ac10b451e359ed4e9e Mon Sep 17 00:00:00 2001 From: Anthoni Manseau Date: Tue, 15 May 2018 08:28:01 -0400 Subject: [PATCH 1/4] Fix autoclose for HTML/XML tags --- plugin/AutoClose.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/AutoClose.vim b/plugin/AutoClose.vim index d91ba8b..74a62c9 100644 --- a/plugin/AutoClose.vim +++ b/plugin/AutoClose.vim @@ -221,7 +221,7 @@ function! s:InsertPair(opener) let l:next = s:GetNextChar() " only add closing pair before space or any of the closepair chars - let close_before = '\s\|\V\[,.;' . escape(join(keys(b:AutoClosePairs) + values(b:AutoClosePairs), ''), ']').']' + let close_before = '\s\|\V\[,.;<>' . escape(join(keys(b:AutoClosePairs) + values(b:AutoClosePairs), ''), ']').']' if (l:next == "\0" || l:next =~ close_before) && s:AllowQuote(a:opener, 0) call s:InsertStringAtCursor(b:AutoClosePairs[a:opener]) call s:PushBuffer(b:AutoClosePairs[a:opener]) From a685e6914ea317c149d6598360a7e4001c61e902 Mon Sep 17 00:00:00 2001 From: Anthoni Manseau Date: Tue, 15 May 2018 08:37:05 -0400 Subject: [PATCH 2/4] Fix temporarily autoclose issue with some colorschemes --- plugin/AutoClose.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/AutoClose.vim b/plugin/AutoClose.vim index 74a62c9..cfb4d15 100644 --- a/plugin/AutoClose.vim +++ b/plugin/AutoClose.vim @@ -366,7 +366,7 @@ function! s:DefineVariables() " The buffer namespace is used internally let defaults = { \ 'AutoClosePairs': AutoClose#DefaultPairs(), - \ 'AutoCloseProtectedRegions': ["Comment", "String", "Character"], + \ 'AutoCloseProtectedRegions': ["Comment"], \ 'AutoCloseSmartQuote': 1, \ 'AutoCloseOn': 1, \ 'AutoCloseSelectionWrapPrefix': 'a', From 675178816b5c5ba551fb6e644550a3633779fffb Mon Sep 17 00:00:00 2001 From: Anthoni Manseau Date: Tue, 15 May 2018 08:38:42 -0400 Subject: [PATCH 3/4] Set AutoCloseExpandSpace to 0 as default Resolves a conflic with mappings in insert mode. --- plugin/AutoClose.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/AutoClose.vim b/plugin/AutoClose.vim index cfb4d15..e3a1b7c 100644 --- a/plugin/AutoClose.vim +++ b/plugin/AutoClose.vim @@ -372,7 +372,7 @@ function! s:DefineVariables() \ 'AutoCloseSelectionWrapPrefix': 'a', \ 'AutoClosePumvisible': {"ENTER": "\", "ESC": "\"}, \ 'AutoCloseExpandEnterOn': "", - \ 'AutoCloseExpandSpace': 1, + \ 'AutoCloseExpandSpace': 0, \ } " Let the user define if he/she wants the plugin to do special actions when the From cb33d3acd576babc6b4ff6af010af97ffd69132c Mon Sep 17 00:00:00 2001 From: Anthoni Manseau Date: Tue, 26 Feb 2019 16:11:22 -0500 Subject: [PATCH 4/4] Add '/' to the closepair chars --- plugin/AutoClose.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/AutoClose.vim b/plugin/AutoClose.vim index e3a1b7c..bed8735 100644 --- a/plugin/AutoClose.vim +++ b/plugin/AutoClose.vim @@ -221,7 +221,7 @@ function! s:InsertPair(opener) let l:next = s:GetNextChar() " only add closing pair before space or any of the closepair chars - let close_before = '\s\|\V\[,.;<>' . escape(join(keys(b:AutoClosePairs) + values(b:AutoClosePairs), ''), ']').']' + let close_before = '\s\|\V\[,.;<>\/' . escape(join(keys(b:AutoClosePairs) + values(b:AutoClosePairs), ''), ']').']' if (l:next == "\0" || l:next =~ close_before) && s:AllowQuote(a:opener, 0) call s:InsertStringAtCursor(b:AutoClosePairs[a:opener]) call s:PushBuffer(b:AutoClosePairs[a:opener])