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 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'* 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."