using new version from Gary Johnson

Updated to use code from http://www.vim.org/scripts/script.php?script_id=610