Do you know of a IDE that does this automagically?

I use Neovim with the yanky plugin.

https://github.com/gbprod/yanky.nvim