mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-05-25 17:58:46 +08:00
More flexible test for 'backspace' values.
This commit is contained in:
+2
-1
@@ -182,7 +182,8 @@ Values: 1 or 0 ~
|
|||||||
Default: 0 ~
|
Default: 0 ~
|
||||||
|
|
||||||
This option turns on/off the expansion of <CR>. Read |delimitMateExpansion|
|
This option turns on/off the expansion of <CR>. 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.: >
|
e.g.: >
|
||||||
let delimitMate_expand_cr = 1
|
let delimitMate_expand_cr = 1
|
||||||
au FileType mail let b:delimitMate_expand_cr = 1
|
au FileType mail let b:delimitMate_expand_cr = 1
|
||||||
|
|||||||
@@ -104,11 +104,10 @@ function! s:init() "{{{
|
|||||||
unlet g:delimitMate_expand_cr
|
unlet g:delimitMate_expand_cr
|
||||||
let g:delimitMate_expand_cr = 1
|
let g:delimitMate_expand_cr = 1
|
||||||
endif
|
endif
|
||||||
if (&backspace !~ 'eol' || &backspace !~ 'start') &&
|
if ((&backspace !~ 'eol' || &backspace !~ 'start') && &backspace != 2) &&
|
||||||
\ ((exists('b:delimitMate_expand_cr') && b:delimitMate_expand_cr == 1) ||
|
\ ((exists('b:delimitMate_expand_cr') && b:delimitMate_expand_cr == 1) ||
|
||||||
\ (exists('g:delimitMate_expand_cr') && g:delimitMate_expand_cr == 1))
|
\ (exists('g:delimitMate_expand_cr') && g:delimitMate_expand_cr == 1))
|
||||||
echom "delimitMate: In order to use the <CR> expansion, you need to have 'eol' and 'start' in your backspace option. Read :help 'backspace'."
|
echom "delimitMate: There seems to be some incompatibility with your settings that may interfer with the expansion of <CR>. See :help 'delimitMate_expand_cr' for details."
|
||||||
let b:delimitMate_expand_cr = 0
|
|
||||||
endif
|
endif
|
||||||
call s:option_init("expand_cr", 0)
|
call s:option_init("expand_cr", 0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user