mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
Make jumping over space and CR expansions optional and off by default.
- Closes #130. - Closes #110. - As suggested in #95.
This commit is contained in:
@@ -21,6 +21,10 @@ function! delimitMate#ShouldJump(...) "{{{
|
||||
return 1
|
||||
endif
|
||||
|
||||
if !b:_l_delimitMate_jump_expansion
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Closing delimiter with space expansion.
|
||||
let nchar = delimitMate#GetCharFromCursor(1)
|
||||
if !a:0 && b:_l_delimitMate_expand_space && char == " "
|
||||
@@ -40,7 +44,6 @@ function! delimitMate#ShouldJump(...) "{{{
|
||||
elseif a:0 && b:_l_delimitMate_expand_cr && uchar == a:1
|
||||
return 5
|
||||
endif
|
||||
|
||||
return 0
|
||||
endfunction "}}}
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ specific file types, see |delimitMateOptionDetails| for examples.
|
||||
|
||||
|'delimitMate_expand_space'| Turns on/off the expansion of <Space>.
|
||||
|
||||
|'delimitMate_jump_expansion'| Turns on/off jumping over expansions.
|
||||
|
||||
|'delimitMate_smart_quotes'| Turns on/off the "smart quotes" feature.
|
||||
|
||||
|'delimitMate_smart_matchpairs'| Turns on/off the "smart matchpairs" feature.
|
||||
@@ -214,6 +216,17 @@ e.g.: >
|
||||
let delimitMate_expand_space = 1
|
||||
au FileType tcl let b:delimitMate_expand_space = 1
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'delimitMate_jump_expansion'*
|
||||
*'b:delimitMate_jump_expansion'*
|
||||
Values: 1 or 0 ~
|
||||
Default: 0 ~
|
||||
This option turns on/off the jumping over <CR> and <Space> expansions when
|
||||
inserting closing matchpairs. Read |delimitMateExpansion| for details.
|
||||
e.g.: >
|
||||
let delimitMate_jump_expansion = 1
|
||||
au FileType tcl let b:delimitMate_jump_expansion = 1
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'delimitMate_smart_quotes'*
|
||||
*'b:delimitMate_smart_quotes'*
|
||||
|
||||
@@ -113,6 +113,9 @@ function! s:init() "{{{
|
||||
endif
|
||||
call s:option_init("expand_cr", 0)
|
||||
|
||||
" jump_expansion
|
||||
call s:option_init("jump_expansion", 0)
|
||||
|
||||
" smart_matchpairs
|
||||
call s:option_init("smart_matchpairs", '^\%(\w\|\!\|£\|\$\|_\|["'']\s*\S\)')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user