diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index 732238e..f330efb 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -384,8 +384,6 @@ augroup delimitMate " Run on file type change. au FileType * call setup() - au VimEnter * call 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 diff --git a/test/first_buffer_no_ft.vim b/test/first_buffer_no_ft.vim new file mode 100644 index 0000000..dc5225c --- /dev/null +++ b/test/first_buffer_no_ft.vim @@ -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'), 'delimitMate(', 'Mappings defined for the first buffer without filetype set.') +call vimtest#Quit() + +