Directly replace buffer contents instead of going through selection
Add animated gif example