mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 04:34:29 +08:00
Call s:setup() directly in the plugin. Should fix #202.
- Move 'call s:setup()' out of the autocmd. - Add a test for the first buffer without filetype set.
This commit is contained in:
@@ -384,8 +384,6 @@ augroup delimitMate
|
||||
" Run on file type change.
|
||||
au FileType * call <SID>setup()
|
||||
|
||||
au VimEnter * call <SID>setup()
|
||||
|
||||
" Run on new buffers.
|
||||
au BufNewFile,BufRead,BufEnter *
|
||||
\ if !exists('b:delimitMate_was_here') |
|
||||
@@ -396,6 +394,9 @@ augroup END
|
||||
|
||||
"}}}
|
||||
|
||||
" This is for the default buffer when it does not have a filetype.
|
||||
call s:setup()
|
||||
|
||||
let &cpo = save_cpo
|
||||
" GetLatestVimScripts: 2754 1 :AutoInstall: delimitMate.vim
|
||||
" vim:foldmethod=marker:foldcolumn=4:ts=2:sw=2
|
||||
|
||||
8
test/first_buffer_no_ft.vim
Normal file
8
test/first_buffer_no_ft.vim
Normal file
@@ -0,0 +1,8 @@
|
||||
let g:delimitMate_expand_cr = 1
|
||||
let g:delimitMate_eol_marker = ';'
|
||||
call vimtest#StartTap()
|
||||
call vimtap#Plan(1)
|
||||
call vimtap#Like(maparg('(', 'i'), '<Plug>delimitMate(', 'Mappings defined for the first buffer without filetype set.')
|
||||
call vimtest#Quit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user