Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.98k stars 117 forks source link

Do not call `DelimitMateDo` in ft autocmd if no filetypes are excluded #166

Closed blueyed closed 10 years ago

Raimondi commented 10 years ago

I see your point, but the FileType event is needed when you :read foo.bar and then :set ft=bar, otherwise settings bound to FileType will not be used.

blueyed commented 10 years ago

Do you mean the FileType event itself is required, or the call to DelimitMateDo?

From the code (https://github.com/Raimondi/delimitMate/blob/master/plugin/delimitMate.vim#L197) only the following would get skipped:

if exists("b:delimitMate_enabled") && b:delimitMate_enabled == 1
   call s:Unmap()
endif

Which is probably bad by itself.

I merely came up with this, while debugging delimitMate, and thought that this call was superfluous.

I am closing this pull request.