Mirror del plugin autoclose: http://www.vim.org/scripts/script.php?script_id=1849