Clone of http://www.vim.org/scripts/script.php?script_id=3221 v4.15