Rather than yanking into the a register yank into the * or + register to
yank the file contents into the X clipboard using one of:

:%y*
:%y+

This does require that you're using a copy of vim that has X support compiled
in and is able to connect to your X server. Which of those works better for you
will depend on which type of clipboard the target editor uses.

You can even have one of those registers used as the default for yank and paste
operations by including one of the following in your .vimrc file: