mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-08 05:34:45 +08:00
Reset autocmds on re-loading.
This commit is contained in:
@@ -93,19 +93,24 @@ command! DelimitMateTest call s:TestMappingsDo()
|
|||||||
|
|
||||||
" Switch On/Off:
|
" Switch On/Off:
|
||||||
command! DelimitMateSwitch call s:DelimitMateSwitch()
|
command! DelimitMateSwitch call s:DelimitMateSwitch()
|
||||||
|
"}}}
|
||||||
|
|
||||||
" Run on file type events.
|
" Autocommands: {{{
|
||||||
"autocmd VimEnter * autocmd FileType * call <SID>DelimitMateDo()
|
|
||||||
autocmd FileType * call <SID>DelimitMateDo()
|
|
||||||
|
|
||||||
" Run on new buffers.
|
augroup delimitMate
|
||||||
autocmd BufNewFile,BufRead,BufEnter * if !exists("b:loaded_delimitMate") | call <SID>DelimitMateDo() | endif
|
au!
|
||||||
|
" Run on file type change.
|
||||||
|
"autocmd VimEnter * autocmd FileType * call <SID>DelimitMateDo()
|
||||||
|
autocmd FileType * call <SID>DelimitMateDo()
|
||||||
|
|
||||||
" Flush the char buffer:
|
" Run on new buffers.
|
||||||
autocmd InsertEnter * call delimitMate#FlushBuffer()
|
autocmd BufNewFile,BufRead,BufEnter * if !exists("b:loaded_delimitMate") | call <SID>DelimitMateDo() | endif
|
||||||
autocmd BufEnter * if mode() == 'i' | call delimitMate#FlushBuffer() | endif
|
|
||||||
|
|
||||||
"function! s:GetSynRegion () | echo synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') | endfunction
|
" Flush the char buffer:
|
||||||
|
autocmd InsertEnter * call delimitMate#FlushBuffer()
|
||||||
|
autocmd BufEnter * if mode() == 'i' | call delimitMate#FlushBuffer() | endif
|
||||||
|
|
||||||
|
augroup END
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user