it appears the differences are in the pio header, and it looks like the only difference is simply the added pin names to the g18
mv (or ren) pio/samr21e18a.h pio/samr21e18a.h.bak
cp (or copy) pio/samr21g18a.h pio/samr21e18a.h
the headers one level up have the same two names, but are identical (except for DEVice ID), and then include the specific pio header
so the above rename will have the e18 including the g18 pio header with the additional pin defines
(could also simply change the include line in the base e18 header to include the g18 pio header instead, tomAto tomOto)
edit-
you may also be able to add to the global build options
-U__SAMR21E18A__ -D__SAMR21G18A__
or __ATSAM..., not sure what is used
then no files need changing