From ff4745b191a49c88387ffa44f57b92b95717c446 Mon Sep 17 00:00:00 2001 From: Israel Chauca Fuentes Date: Sat, 6 Nov 2010 22:38:13 -0500 Subject: [PATCH] More flexible test for 'backspace' values. --- doc/delimitMate.txt | 3 ++- plugin/delimitMate.vim | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/delimitMate.txt b/doc/delimitMate.txt index 5aa6117..a7a5a84 100644 --- a/doc/delimitMate.txt +++ b/doc/delimitMate.txt @@ -182,7 +182,8 @@ Values: 1 or 0 ~ Default: 0 ~ This option turns on/off the expansion of . Read |delimitMateExpansion| -for details. +for details. NOTE This feature requires that 'backspace' is either set to 2 or +has "eol" and "start" as part of its value. e.g.: > let delimitMate_expand_cr = 1 au FileType mail let b:delimitMate_expand_cr = 1 diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index 37bc6ed..dc895ab 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -104,11 +104,10 @@ function! s:init() "{{{ unlet g:delimitMate_expand_cr let g:delimitMate_expand_cr = 1 endif - if (&backspace !~ 'eol' || &backspace !~ 'start') && + if ((&backspace !~ 'eol' || &backspace !~ 'start') && &backspace != 2) && \ ((exists('b:delimitMate_expand_cr') && b:delimitMate_expand_cr == 1) || \ (exists('g:delimitMate_expand_cr') && g:delimitMate_expand_cr == 1)) - echom "delimitMate: In order to use the expansion, you need to have 'eol' and 'start' in your backspace option. Read :help 'backspace'." - let b:delimitMate_expand_cr = 0 + echom "delimitMate: There seems to be some incompatibility with your settings that may interfer with the expansion of . See :help 'delimitMate_expand_cr' for details." endif call s:option_init("expand_cr", 0)