From 5263e2554875551fa89871d6eb91fcbf6a8aa9a2 Mon Sep 17 00:00:00 2001 From: Taylor Hedberg Date: Thu, 25 Aug 2011 12:36:15 -0400 Subject: [PATCH 1/3] delimitMate_offByDefault option to disable delimitMate by default --- plugin/delimitMate.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index 096d516..2410524 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -237,7 +237,9 @@ function! s:DelimitMateDo(...) "{{{ call s:init() " Now, add magic: - call s:Map() + if !exists("g:delimitMate_offByDefault") || !g:delimitMate_offByDefault + call s:Map() + endif if a:0 > 0 echo "delimitMate has been reset." From 6dad313734cb3b0aa7910fc7b5f0b0e4325de691 Mon Sep 17 00:00:00 2001 From: Taylor Hedberg Date: Thu, 25 Aug 2011 12:42:32 -0400 Subject: [PATCH 2/3] Documentation for delimitMate_offByDefault --- doc/delimitMate.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/delimitMate.txt b/doc/delimitMate.txt index 80e4be1..d50517c 100644 --- a/doc/delimitMate.txt +++ b/doc/delimitMate.txt @@ -128,6 +128,15 @@ e.g.: > let loaded_delimitMate = 1 au FileType mail let b:loaded_delimitMate = 1 < +------------------------------------------------------------------------------ + *'delimitMate_offByDefault'* +Values: 0 or 1.~ +Default: 0~ + +If this option is set to 1, delimitMate will load, but will not take +effect in any buffer unless |:DelimitMateSwitch| is called in that +buffer. + ------------------------------------------------------------------------------ *'delimitMate_autoclose'* *'b:delimitMate_autoclose'* From ce1d05fac5188aa02b4e12e819b3a0a4a1e119ca Mon Sep 17 00:00:00 2001 From: Taylor Hedberg Date: Thu, 3 Nov 2011 12:47:21 -0400 Subject: [PATCH 3/3] [fix] Broken undo after expanded --- autoload/delimitMate.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index bd10975..8b4f77f 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -387,7 +387,7 @@ function! delimitMate#ExpandReturn() "{{{ " Expand: call delimitMate#FlushBuffer() "return "\a\x\\k$\"_xa" - return "\\\o" + return "\a\\\o" else return "\" endif