mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-08 05:34:45 +08:00
Prevent calling autoload on entering Insert mode.
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
" Utilities {{{
|
" Utilities {{{
|
||||||
|
|
||||||
|
let delimitMate_loaded = 1
|
||||||
|
|
||||||
function! delimitMate#ShouldJump() "{{{
|
function! delimitMate#ShouldJump() "{{{
|
||||||
" Returns 1 if the next character is a closing delimiter.
|
" Returns 1 if the next character is a closing delimiter.
|
||||||
let col = col('.')
|
let col = col('.')
|
||||||
|
|||||||
@@ -268,6 +268,12 @@ function! s:DelimitMateSwitch() "{{{
|
|||||||
endif
|
endif
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
|
function! s:FlushBuffer()
|
||||||
|
if exists('g:delimitMate_loaded')
|
||||||
|
call delimitMate#FlushBuffer()
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" Mappers: {{{
|
" Mappers: {{{
|
||||||
@@ -409,10 +415,10 @@ augroup delimitMate
|
|||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
" Flush the char buffer:
|
" Flush the char buffer:
|
||||||
autocmd InsertEnter * call delimitMate#FlushBuffer()
|
autocmd InsertEnter * call <SID>FlushBuffer()
|
||||||
autocmd BufEnter *
|
autocmd BufEnter *
|
||||||
\ if mode() == 'i' |
|
\ if mode() == 'i' |
|
||||||
\ call delimitMate#FlushBuffer() |
|
\ call <SID>FlushBuffer() |
|
||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
augroup END
|
augroup END
|
||||||
|
|||||||
Reference in New Issue
Block a user