My configuration files are hosted here. A simplified version (more re-usable) is here
"*y
"*p
"ay / "ap
:%s/\s\+$//