Townk / vim-autoclose

This plugin for Vim enable an auto-close chars feature for you. For instance if you type an '(', ``autoclose`` will automatically insert a ')' and put the cursor between than.
http://townk.github.com/vim-autoclose/
503 stars 66 forks source link

"silent doautocmd FileType" in s:CreateMaps causes failure of filetype detection after re-sourcing ~/.vimrc #42

Open blueyed opened 12 years ago

blueyed commented 12 years ago

I use to re-source ~/.vimrc after having made changes to it.

After having updated autoclose this causes the filetype detection to be broken.

Newly opened buffers have "no filetype" and therefore also no syntax highlighting.

Executing :e to re-read the buffer fixes this. Also commenting the silent doautocmd FileType line in autoclose's s:CreateMaps function works around this. (This has been introduced in https://github.com/Townk/vim-autoclose/commit/265fdd0d09bd978dff4a06b7be048551727d3c35)

I should have grouped all my autocommands and added "augroup!" to it.

Can you help me debug this?